/* ══════════════════════════════════════════════════════════════════════
   The new coach dashboard (modules/coach-dashboard/), loaded the first time it shows.
   From the approved prototype, mockups/ultimate-dashboard-v3-2026-10-13.html (its .dv block), on the CRM's
   own tokens. The softer look's corner scale: 16px cards · 12px inner panels and tooltips · 10px buttons and
   inputs · pills. Sapphire #2557D6 is the only data colour, in both themes. Card titles are the Quiet style
   (plain font, capitals). No light-mode card shadow: that was approved for the prototype only.
   ══════════════════════════════════════════════════════════════════════ */
.dv {
  --radius: 16px; --radius-sm: 10px;
  --dv-muted: #5b6b82;          /* 4.9:1 on the ground, 5.3:1 on white */
  --dv-track: #e5eaf2;
  --dv-open: #7a8aa3;           /* the compared line: 3.5:1 on white */
  --dv-t-online: #1f46b3; --dv-t-hybrid: #4f78e3; --dv-t-inPerson: #98b2f2;
  --dv-grid: #e3e8f0;           /* chart gridlines */
  --dv-tint: #b9cdf4;           /* money still to come: a lighter shade of the bar */
  --dv-c0: #edf2fc; --dv-c1: #dbe5f9; --dv-c2: #b9cdf4; --dv-chev-ink: #3b4a63; /* the chevrons, deepening to sapphire */
  /* Shading under a line, at its top. Dark needs more of the same sapphire to be as visible. */
  --dv-fade: .2; --dv-fade-line: .16;
}
[data-theme="dark"] .dv {
  --dv-muted: #9aa6b6;
  --dv-track: #262c34;
  --dv-open: #8794a6;
  --dv-t-online: #2557d6; --dv-t-hybrid: #7399f3; --dv-t-inPerson: #bccffa;
  --dv-grid: #262c34;
  --dv-tint: rgba(115, 153, 243, .28);
  --dv-c0: #1b2231; --dv-c1: #1f2a44; --dv-c2: #253a6c; --dv-chev-ink: #b8c3d4;
  --dv-fade: .36; --dv-fade-line: .29;
}
.dv *:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dv-wrap { max-width: 1320px; container: dv-page / inline-size; }

/* ── Header ── */
.dv .view-header { margin-bottom: 24px; align-items: center; }
.dv-date { margin-top: 6px; font-size: var(--fs-sm); color: var(--dv-muted); }

/* ── Cards ── */
.dv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.dv-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.dv-s4 { grid-column: span 4; } .dv-s6 { grid-column: span 6; } .dv-s8 { grid-column: span 8; } .dv-s12 { grid-column: span 12; }
.dv-title { margin: 0; font-family: 'Saira', 'Inter', -apple-system, sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .02em; line-height: 1.25; text-transform: uppercase; color: var(--text); }
.dv-quiet-titles .dv-title, .dv-quiet-titles .dv-kpi .dv-label { font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: .05em; line-height: 1.25; text-transform: uppercase; }
.dv-info { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--dv-muted); cursor: pointer; }
.dv-info:hover, .dv-info[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.dv-info svg { width: 16px; height: 16px; }

/* ── A tile: label · value · comparison · picture · footnote ── */
.dv-kpi { padding: 20px 22px 18px; }
.dv-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.dv-kpi-tools { display: inline-flex; align-items: center; gap: 4px; }
.dv-label { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.dv-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-top: 10px; }
.dv-num { font-size: 36px; line-height: 1.05; font-weight: 650; letter-spacing: -0.025em; color: var(--text); }
[data-theme="dark"] .dv-num { color: #F4F7FA; }
.dv-num .cur { font-size: .6em; font-weight: 500; letter-spacing: 0; margin-right: 1px; vertical-align: .38em; color: var(--dv-muted); }
.dv-of { font-size: var(--fs-md); color: var(--dv-muted); }
.dv-sub { margin-top: 6px; font-size: var(--fs-sm); color: var(--dv-muted); }
.dv-sub b { color: var(--text); font-weight: 600; }
.dv-chg { display: inline-flex; align-items: center; gap: 5px; }
.dv-chg svg { width: 14px; height: 14px; flex: none; color: var(--text); stroke-width: 2.4; }
.dv-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
[data-theme="dark"] .dv-link { color: var(--accent-strong); }
.dv-link:hover { text-decoration: underline; }
.dv-kpi .dv-sub, .dv-kpi .dv-foot > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-kpi .dv-sub { min-height: 22px; }
.dv-vis { margin-top: 14px; height: 64px; display: flex; flex-direction: column; justify-content: flex-end; }
.dv-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: nowrap; margin-top: 10px; min-height: 20px; font-size: var(--fs-sm); color: var(--dv-muted); }
.dv-foot b { color: var(--text); font-weight: 600; }

/* While the numbers load */
.dv-skel { min-height: 214px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%; animation: dvSkel 1.4s ease-in-out infinite; }
.dv-skel.dv-skel--chart { min-height: 330px; } /* after .dv-skel and one class stronger, or its 214px wins */
@keyframes dvSkel { to { background-position: -200% 0; } }

/* ── Active clients: one bar split by type, and its key ── */
.t-online { --t: var(--dv-t-online); } .t-hybrid { --t: var(--dv-t-hybrid); } .t-inPerson { --t: var(--dv-t-inPerson); }
.dv-typebar { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; }
.dv-typebar i { background: var(--t); }
.dv-typekey { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: var(--fs-sm); color: var(--dv-muted); }
.dv-typekey span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dv-typekey b { color: var(--text); font-weight: 600; }
.dv-tsw { width: 10px; height: 10px; border-radius: 3px; background: var(--t); flex: none; }

/* ── The small charts in the tiles ── */
svg.dv-miniplot { display: block; width: 100%; height: auto; overflow: visible; }
svg.dv-miniplot .dv-pace-last { fill: none; stroke: var(--dv-open); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linejoin: round; }
svg.dv-miniplot .dv-pace-this { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.dv-miniplot .dv-end { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
svg.dv-miniplot .dv-mini-t { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 12px; font-weight: 500; fill: var(--dv-muted); }
svg.dv-miniplot[data-run] { cursor: default; }
svg.dv-miniplot[data-run]:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 8px; }
svg.dv-miniplot .dv-run-guide { stroke: var(--dv-open); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; pointer-events: none; }
svg.dv-miniplot .dv-run-dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; opacity: 0; pointer-events: none; }
svg.dv-miniplot .dv-run-dot--2 { fill: var(--dv-open); }
/* Dark: the answer line and its dots use the CRM's bright sapphire, so they are never dimmer than the grey comparison */
[data-theme="dark"] svg.dv-miniplot .dv-pace-this { stroke: var(--accent-strong); }
[data-theme="dark"] svg.dv-miniplot .dv-end, [data-theme="dark"] svg.dv-miniplot .dv-run-dot:not(.dv-run-dot--2) { fill: var(--accent-strong); }

/* ── The two monthly charts ── */
.dv-charts { margin-top: 20px; }
.dv-chart { padding-bottom: 16px; }
.dv-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 28px; margin-bottom: 16px; }
.dv-chart-head { align-items: flex-start; }
.dv-chart-sum { margin-top: 6px; font-size: var(--fs-sm); color: var(--dv-muted); }
.dv-chart-sum b { color: var(--text); font-weight: 600; }
/* ⚠️ Only the monthly charts: the tiles' small charts (.dv-plotbox.dv-mini) must keep their own height (review: a
   200px minimum pushed them up over the tiles' numbers) */
.dv-charts .dv-plotbox { min-height: 200px; }
svg.dv-plot { display: block; width: 100%; height: auto; overflow: visible; }
svg.dv-plot:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 12px; }
svg.dv-plot text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 12px; fill: var(--dv-muted); font-variant-numeric: tabular-nums; }
svg.dv-plot .grid { stroke: var(--dv-grid); stroke-width: 1; }
svg.dv-plot .base { stroke: var(--border); stroke-width: 1; }
svg.dv-plot .bar { fill: var(--primary); transition: opacity .15s; }
svg.dv-plot .bar-sched { fill: var(--dv-tint); transition: opacity .15s; }
svg.dv-plot .bar-sched-line { fill: none; stroke: none; pointer-events: none; transition: opacity .15s; }
[data-theme="dark"] svg.dv-plot .bar-sched-line { stroke: #7399f3; stroke-width: 1.5px; }
svg.dv-plot .seg { fill: var(--t); transition: opacity .15s; }
svg.dv-plot.is-hover .bar, svg.dv-plot.is-hover .bar-sched, svg.dv-plot.is-hover .bar-sched-line, svg.dv-plot.is-hover .seg { opacity: .45; }
svg.dv-plot.is-hover .on .bar, svg.dv-plot.is-hover .on .bar-sched, svg.dv-plot.is-hover .on .bar-sched-line, svg.dv-plot.is-hover .on .seg { opacity: 1; }
svg.dv-plot .val { fill: var(--text); font-weight: 600; font-size: 12.5px; }
svg.dv-plot .hit { fill: transparent; cursor: default; }
svg.dv-plot .guide { stroke: var(--dv-open); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; }
svg.dv-plot .on .guide { opacity: 1; }
.dv-chart-note { margin-top: 10px; font-size: var(--fs-xs); color: var(--dv-muted); }
.dv-ckey { display: inline-flex; gap: 14px; margin-right: 14px; }
.dv-ckey span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dv-nowrap { white-space: nowrap; }
.dv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── The period button and its menu (the menu lives on <body>) ── */
.dv-pick { display: inline-flex; align-items: center; gap: 4px; max-width: 240px; height: 28px; padding: 0 7px 0 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s; }
[data-theme="light"] .dv-pick { border-color: #dde3ed; }
.dv-pick:hover, .dv-pick[aria-expanded="true"] { background: var(--surface-2); }
.dv-pick > b { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.dv-pick svg { width: 15px; height: 15px; color: var(--dv-muted); }
/* ⚠️ No transform on the menu, ever: the calendar inside it would measure against the menu, not the screen */
.dv-menu { position: fixed; z-index: 9999; width: 280px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .16); opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .15s, visibility 0s linear .15s; }
[data-theme="dark"] .dv-menu { box-shadow: 0 14px 36px rgba(0, 0, 0, .5); }
.dv-menu.on { opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.dv-menu :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dv-menu .dv-mi { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px 0 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); text-align: left; white-space: nowrap; cursor: pointer; }
.dv-menu .dv-mi:hover { background: var(--surface-2); }
.dv-menu .dv-mi:focus-visible { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--primary); outline: none; }
.dv-menu .dv-mi > svg, .dv-menu .ck { width: 16px; height: 16px; flex: none; color: var(--primary); }
[data-theme="dark"] .dv-menu .dv-mi > svg { color: var(--accent-strong); }
.dv-menu .dv-mi > span { display: inline-flex; align-items: center; margin-left: auto; color: var(--dv-muted); white-space: nowrap; }
.dv-menu .dv-mi > span svg { width: 15px; height: 15px; }
.dv-menu .dv-mi[disabled] { color: var(--dv-muted); cursor: default; }
.dv-menu .dv-mi[disabled]:hover { background: none; }
.dv-menu hr { height: 0; margin: 5px 6px; border: 0; border-top: 1px solid var(--border); }
/* Custom dates: the same menu turns into two of the CRM's own date boxes (modules/date-picker.js) */
.dv-cr { padding: 0 0 6px; }
.dv-menu .dv-cr-back { font-weight: 600; }
.dv-menu .dv-cr-back > svg { color: var(--dv-muted); }
.dv-cr-f { display: flex; flex-direction: column; gap: 6px; margin: 10px 8px 0; }
.dv-cr-f label { font-size: var(--fs-sm); font-weight: 500; color: var(--dv-muted); }
.dv-cr .dp-trigger { width: 100%; min-width: 0; }
.dv-cr-hint { display: flex; align-items: flex-start; gap: 6px; min-height: 18px; margin: 12px 8px 0; font-size: 12.5px; line-height: 1.45; color: var(--dv-muted); }
.dv-cr-hint.is-error { font-weight: 600; color: var(--text); }
.dv-cr-hint svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.dv-cr-act { display: flex; justify-content: flex-end; gap: 8px; margin: 14px 8px 0; }
.dv-cr-act button { height: 34px; padding: 0 14px; border-radius: 10px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.dv-cr-act .btn-primary:disabled { opacity: .5; cursor: default; }

/* ── The hover and the (i) explainer (on <body>, outside .dv, so they carry its greys) ── */
.dv-tip, .dv-pop { position: fixed; z-index: 9999; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; box-shadow: 0 10px 28px rgba(15, 23, 42, .14); opacity: 0; pointer-events: none; transition: opacity .12s; }
[data-theme="dark"] .dv-tip, [data-theme="dark"] .dv-pop { box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
.dv-tip, .dv-pop, .dv-menu { --dv-muted: #5b6b82; --dv-open: #7a8aa3; --dv-tint: #b9cdf4; --dv-t-online: #1f46b3; --dv-t-hybrid: #4f78e3; --dv-t-inPerson: #98b2f2; }
[data-theme="dark"] .dv-tip, [data-theme="dark"] .dv-pop, [data-theme="dark"] .dv-menu { --dv-muted: #9aa6b6; --dv-open: #8794a6; --dv-tint: rgba(115, 153, 243, .28); --dv-t-online: #2557d6; --dv-t-hybrid: #7399f3; --dv-t-inPerson: #bccffa; }
.dv-tip { min-width: 132px; padding: 8px 12px; font-size: 12px; line-height: 1.45; }
.dv-tip.on { opacity: 1; }
.dv-tip-rows { display: grid; grid-template-columns: auto minmax(0, auto) auto; align-items: center; gap: 3px 8px; }
.dv-tip-rows span { color: var(--text); }
.dv-tip-rows em { font-style: normal; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.dv-tip-rows em:first-of-type { font-size: 13px; }
.dv-tip-sw { width: 14px; height: 0; border-top: 2px solid var(--primary); }
.dv-tip-sw--2 { border-top: 2px dashed var(--dv-open); }
.dv-tip .dv-tip-head { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 500; color: var(--dv-muted); }
.dv-tip-sq { width: 10px; height: 10px; border-radius: 3px; justify-self: center; }
.dv-tip-sq.sq-bar { background: var(--primary); } .dv-tip-sq.sq-tint { background: var(--dv-tint); }
[data-theme="dark"] .dv-tip-sq.sq-tint { box-shadow: inset 0 0 0 1.5px #7399f3; }
.dv-tip-sq.t-online, .dv-tip-sq.t-hybrid, .dv-tip-sq.t-inPerson { background: var(--t); }
.dv-tip-sq.sq-line { width: 14px; height: 0; border-radius: 0; border-top: 2px solid var(--primary); }
.dv-tip-rule, .dv-tip-gap { grid-column: 1 / -1; height: 1px; margin: 3px 0 1px; background: var(--border); }
.dv-tip > b { display: block; font-size: 13px; font-weight: 600; }
.dv-tip > span { display: block; color: var(--dv-muted); max-width: 300px; }
.dv-tip-rule ~ span { font-weight: 600; }
.dv-pop { width: 320px; padding: 14px 16px; font-size: var(--fs-sm); line-height: 1.5; }
.dv-pop.on { opacity: 1; pointer-events: auto; }
.dv-pop h4 { margin: 0 0 6px; font-size: var(--fs-base); font-weight: 600; }
.dv-pop p { margin: 0; color: var(--dv-muted); }
.dv-pop p + p { margin-top: 8px; color: var(--text); }

/* ── Narrower screens: by the dashboard's own width (the sidebar takes 246px of the window) ── */
@container (max-width: 940px) {
  .dv-charts > .dv-s6 { grid-column: span 12; }
}
@container (max-width: 860px) {
  .dv-kpis > .dv-s4 { grid-column: span 12; }
}
@media (prefers-reduced-motion: reduce) { .dv-tip, .dv-pop, .dv-skel { transition: none; animation: none; } }

/* ══ From lead to client (part 3b): one chevron strip, a rate on every seam, one detail panel at a time ══ */
.dv-funnel-row { margin-top: 20px; }
.dv-head-tools { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px 16px; }
.dv-status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text); white-space: nowrap; }
.dv-status svg { width: 16px; height: 16px; flex: none; }
.dv-status--none { font-weight: 500; color: var(--dv-muted); }
.dv-conv { position: absolute; top: 62px; z-index: 3; display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translate(-50%, -50%); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 6px 14px -6px rgba(15, 23, 42, .28); cursor: default; outline: none; }
[data-theme="dark"] .dv-conv { background: var(--surface-2); box-shadow: 0 0 0 1px var(--border), 0 6px 16px rgba(0, 0, 0, .45); }
.dv-conv:focus-visible { box-shadow: 0 0 0 2px var(--primary); }
.dv-conv--none { font-weight: 500; color: var(--dv-muted); }
.dv-fl .dv-card-head + .dv-fl-strip { margin-top: 4px; }
.dv-fl .dv-fl-strip { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; }
.dv-fl .dv-fl-chevs { position: relative; display: flex; flex: 1 1 240px; min-width: 0; }
.dv-fl .dv-fl-st { position: relative; flex: none; display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 0 20px; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dv-fl .dv-fl-st:focus-visible { outline: none; }
.dv-fl .dv-fl-shape { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.dv-fl .dv-fl-shape .f { fill: var(--dv-c0); pointer-events: visiblePainted; transition: filter .15s; }
.dv-fl .dv-fl-st--1 .f { fill: var(--dv-c1); }
.dv-fl .dv-fl-st--2 .f { fill: var(--dv-c2); }
.dv-fl .dv-fl-st--3 .f { fill: var(--primary); }
.dv-fl .dv-fl-shape .r { fill: none; stroke: var(--primary); stroke-width: 2; opacity: 0; }
.dv-fl .dv-fl-st:focus-visible .r { opacity: 1; }
.dv-fl .dv-fl-st:hover .f { filter: brightness(.965) saturate(1.06); }
[data-theme="dark"] .dv-fl .dv-fl-st:hover .f { filter: brightness(1.18); }
/* Wide: only the painted chevron takes a click, so the gap between two stays the page */
.dv-fl:not(.dv-fl--narrow) .dv-fl-chevs .dv-fl-st { pointer-events: none; }
.dv-fl .dv-fl-in { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; }
.dv-fl .dv-fl-lab { font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--dv-chev-ink); white-space: nowrap; }
.dv-fl .dv-fl-num { margin-top: 2px; font-size: 34px; line-height: 1.15; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.dv-fl .dv-fl-of { margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--dv-chev-ink); }
.dv-fl:not(.dv-fl--narrow) .dv-fl-of { display: none; } /* Clayton, 10/13: the extra line under Showed up looked off */
.dv-fl .dv-fl-pct { display: none; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--dv-chev-ink); }
.dv-fl .dv-fl-pct b { font-weight: 700; color: var(--text); }
.dv-fl .dv-fl-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; line-height: 1.4; font-weight: 500; color: var(--dv-chev-ink); white-space: nowrap; }
.dv-fl .dv-fl-more svg { width: 14px; height: 14px; flex: none; transition: transform .2s; }
.dv-fl .dv-fl-more .o { display: none; }
.dv-fl .is-open .dv-fl-more .o { display: inline; }
.dv-fl .is-open .dv-fl-more .c { display: none; }
.dv-fl .is-open .dv-fl-more svg { transform: rotate(180deg); }
.dv-fl .is-open .dv-fl-more { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.dv-fl .dv-fl-st--3, .dv-fl .dv-fl-st--3 .dv-fl-num, .dv-fl .dv-fl-st--3 .dv-fl-pct b { color: #fff; }
.dv-fl .dv-fl-st--3 .dv-fl-lab, .dv-fl .dv-fl-st--3 .dv-fl-pct, .dv-fl .dv-fl-st--3 .dv-fl-more, .dv-fl .dv-fl-st--3 .dv-fl-of { color: rgba(255, 255, 255, .9); }
/* Centred words (his ruling, 10/13), with name, number and See details on the same three lines in every chevron */
.dv-fl:not(.dv-fl--narrow) .dv-fl-st { justify-content: flex-start; padding-top: 22px; padding-bottom: 22px; }
.dv-fl:not(.dv-fl--narrow) .dv-fl-st .dv-fl-in { flex: 1 1 auto; align-items: center; text-align: center; }
.dv-fl:not(.dv-fl--narrow) .dv-fl-st .dv-fl-more { margin-top: auto; padding-top: 8px; }
.dv-fl .dv-fl-panel { position: relative; flex: 0 0 100%; order: 5; margin-top: 16px; padding: 18px 22px 20px; border-radius: 12px; background: var(--surface-2); }
.dv-fl .dv-fl-panel[hidden] { display: none; }
.dv-fl .dv-fl-caret { position: absolute; top: -6px; left: 40px; width: 14px; height: 14px; border-radius: 3px 0 0 0; background: var(--surface-2); transform: translateX(-50%) rotate(45deg); }
.dv-fl .dv-fl-ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.dv-fl .dv-fl-pl { margin: 3px 0 0; max-width: 62em; font-size: 15px; line-height: 1.5; color: var(--text); }
.dv-fl .dv-fl-pl b { font-weight: 650; font-variant-numeric: tabular-nums; }
.dv-fl .dv-fl-x { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 30px; margin: -2px -8px 0 0; padding: 0 10px 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--dv-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.dv-fl .dv-fl-x svg { width: 15px; height: 15px; }
.dv-fl .dv-fl-x:hover { background: var(--surface-hover); color: var(--text); }
.dv-fl .dv-fl-figs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.dv-fl .dv-fl-fig { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; min-width: 0; padding: 0 20px; border-left: 1px solid var(--border); }
.dv-fl .dv-fl-fig:first-child { padding-left: 0; border-left: 0; }
.dv-fl .dv-fl-fig:last-child { padding-right: 0; }
.dv-fl .dv-fl-fl { align-self: end; font-size: 13px; line-height: 1.5; font-weight: 500; color: var(--dv-muted); }
.dv-fl .dv-fl-fv { margin-top: 4px; font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.dv-fl .dv-fl-fv small { margin-left: 2px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--dv-muted); }
.dv-fl .dv-fl-fv.is-none { font-size: 18px; font-weight: 600; color: var(--dv-muted); line-height: 1.6; }
.dv-fl .dv-fl-fs { margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--dv-muted); }
.dv-fl .dv-fl-fs b { font-weight: 600; color: var(--text); }
.dv-fl .dv-fl-fs .dv-status { display: flex; align-items: flex-start; font-size: 12.5px; white-space: normal; }
.dv-fl .dv-fl-fs .dv-status svg { width: 15px; height: 15px; margin-top: 1px; }
.dv-fl .dv-fl-from { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.dv-fl .dv-fl-fromh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-bottom: 8px; font-size: var(--fs-sm); }
.dv-fl .dv-fl-fromh b { font-weight: 600; color: var(--text); }
.dv-fl .dv-fl-fromh span { flex-basis: 100%; color: var(--dv-muted); }
.dv-fl .dv-fl-fromnone { margin: 0; font-size: var(--fs-sm); color: var(--dv-muted); }
.dv-fl .dv-fl-fromrows { display: grid; gap: 2px; max-width: 640px; }
.dv-fl .dv-fl-fromrow { display: grid; grid-template-columns: minmax(0, 1fr) 160px 32px; align-items: center; gap: 14px; padding: 6px 0; font-size: var(--fs-sm); }
.dv-fl .dv-fl-fromrow .l { color: var(--text); }
.dv-fl .dv-fl-fromrow .l em { display: block; font-style: normal; color: var(--dv-muted); font-size: 12.5px; }
.dv-fl .dv-fl-fromrow i { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--primary) var(--w), var(--surface-2) var(--w)); }
.dv-fl .dv-fl-fromrow b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
@container (max-width: 560px) { .dv-fl .dv-fl-fromrow { grid-template-columns: minmax(0, 1fr) 72px 28px; } }
/* Narrow (under 600px): the steps stack as rounded rows, each panel under its row */
.dv-fl--narrow .dv-fl-strip { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
.dv-fl--narrow .dv-fl-chevs { display: contents; }
.dv-fl--narrow .dv-fl-shape, .dv-fl--narrow .dv-conv { display: none; }
.dv-fl--narrow .dv-fl-st { width: auto; height: auto; margin: 0; padding: 14px 18px; border-radius: 12px; background: var(--dv-c0); }
.dv-fl--narrow .dv-fl-st--1 { background: var(--dv-c1); }
.dv-fl--narrow .dv-fl-st--2 { background: var(--dv-c2); }
.dv-fl--narrow .dv-fl-st--3 { background: var(--primary); }
.dv-fl--narrow .dv-fl-st:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dv-fl--narrow .dv-fl-lab { white-space: normal; }
.dv-fl--narrow .dv-fl-pct { display: block; }
.dv-fl--narrow .dv-fl-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; }
.dv-fl--narrow .dv-fl-num { grid-column: 2; grid-row: 1 / span 6; margin: 0; font-size: 28px; text-align: right; }
.dv-fl--narrow .dv-fl-panel { margin-top: 4px; padding: 16px 16px 18px; }
.dv-fl--narrow .dv-fl-caret { left: 30px; }
.dv-fl--narrow .dv-fl-pl { font-size: 14px; }
.dv-fl--narrow .dv-fl-st[data-i="0"] { order: 2; } .dv-fl--narrow .dv-fl-panel[data-key="s0"] { order: 3; }
.dv-fl--narrow .dv-fl-st[data-i="1"] { order: 4; } .dv-fl--narrow .dv-fl-panel[data-key="s1"] { order: 5; }
.dv-fl--narrow .dv-fl-st[data-i="2"] { order: 6; } .dv-fl--narrow .dv-fl-panel[data-key="s2"] { order: 7; }
.dv-fl--narrow .dv-fl-st[data-i="3"] { order: 8; } .dv-fl--narrow .dv-fl-panel[data-key="s3"] { order: 9; }
.dv-fl--narrow .dv-fl-figs { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; margin-top: 14px; padding-top: 14px; }
.dv-fl--narrow .dv-fl-fig { grid-row: auto; grid-template-rows: none; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 0; border-left: 0; border-top: 1px solid var(--border); }
.dv-fl--narrow .dv-fl-fig:first-child { padding-top: 0; border-top: 0; }
.dv-fl--narrow .dv-fl-fig:last-child { padding-bottom: 0; }
.dv-fl--narrow .dv-fl-fv { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 20px; text-align: right; }
.dv-fl--narrow .dv-fl-fv small { display: block; margin: 0; font-size: 12.5px; }
.dv-fl--narrow .dv-fl-fv.is-none { font-size: 15px; }
.dv-fl--narrow .dv-fl-fl, .dv-fl--narrow .dv-fl-fs { grid-column: 1; align-self: start; }

/* A first load that failed */
.dv-failed { align-items: flex-start; gap: 14px; margin-top: 4px; }
.dv-failed p { margin: 0; color: var(--text); }
.dv-failed .btn-primary { height: 36px; padding: 0 16px; border-radius: 10px; font-weight: 600; cursor: pointer; }

/* ══ Cost and value of a client, and Refunds and failed payments (part 4) ══ */
.dv-value-row { margin-top: 20px; }
.dv-head-l { display: flex; align-items: center; gap: 6px; }
/* A row of boxes: label, the number alone, one short line (his ruling, 10/14) */
.dv-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dv-cell { display: flex; flex-direction: column; min-width: 0; padding: 0 16px; border-left: 1px solid var(--border); }
.dv-cell:first-child { padding-left: 0; border-left: 0; }
.dv-cell--wide { grid-column: span 2; }
.dv-cell--tip { cursor: default; border-radius: 4px; }
.dv-cell--tip:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.dv-cell .dv-label, .dv-stat .dv-label { font-size: var(--fs-sm); font-weight: 500; color: var(--dv-muted); }
.dv-cell .dv-value, .dv-stat .dv-value { margin-top: 4px; }
.dv-cell .dv-num, .dv-stat .dv-num { font-size: 26px; }
.dv-cell .dv-of, .dv-stat .dv-of { font-size: var(--fs-sm); }
.dv-cell .dv-sub { margin-top: 4px; font-size: 12.5px; line-height: 1.45; }
.dv-cell .dv-status { margin-top: 2px; white-space: normal; align-items: flex-start; }
.dv-cell .dv-status svg { margin-top: 1px; }
@container (min-width: 941px) and (max-width: 1060px) { .dv-cell { padding: 0 12px; } .dv-cell .dv-sub { font-size: 12px; } }
/* A chart under the boxes, with its own heading */
.dv-subhead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 24px 0 8px; padding-top: 18px; border-top: 1px solid var(--border); }
.dv-subhead > b { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.dv-empty { display: grid; place-items: center; min-height: 200px; padding: 16px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.dv-empty--short { min-height: 96px; }
.dv-empty .dv-status { white-space: normal; text-align: left; }
.dv-plotbox.dv-fill { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; }
svg.dv-plot .ln { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.dv-plot .pt { fill: var(--primary); stroke: var(--surface); stroke-width: 2; opacity: 0; }
svg.dv-plot .on .pt { opacity: 1; }
svg.dv-plot .dv-end { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
/* Dark: lines and their dots use the CRM's bright sapphire; bars stay #2557d6 (10/13) */
[data-theme="dark"] svg.dv-plot .ln { stroke: var(--accent-strong); }
[data-theme="dark"] svg.dv-plot .pt, [data-theme="dark"] svg.dv-plot .dv-end { fill: var(--accent-strong); }
/* Stacked figures */
.dv-stats { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.dv-stat { min-width: 0; padding: 14px 0 16px; border-top: 1px solid var(--border); }
.dv-stats > .dv-stat:first-child { padding-top: 0; border-top: 0; }
.dv-stat .dv-sub { margin-top: 4px; line-height: 1.45; }
.dv-stat .dv-link { font-size: inherit; }
.dv-trend { margin-top: auto; }
.dv-trend .dv-subhead { margin-top: 8px; }
/* The working-out hover: a short sum, top to bottom, two columns */
.dv-tip.dv-tip--calc { padding: 10px 14px; }
.dv-tip.dv-tip--calc .dv-tip-head { margin-bottom: 6px; }
.dv-tip.dv-tip--calc .dv-tip-rows { grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 4px; }
.dv-tip-note { max-width: 280px; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--border); color: var(--dv-muted); }
@container (max-width: 940px) {
  .dv-value-row > .dv-s8, .dv-value-row > .dv-s4 { grid-column: span 12; }
  .dv-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .dv-cell:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@container (max-width: 560px) {
  .dv-cells { grid-template-columns: minmax(0, 1fr); }
  .dv-cell { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .dv-cell:first-child { padding-top: 0; border-top: 0; }
  .dv-cell--wide { grid-column: auto; }
}

/* ══ Clients and Renewals (part 5) ══ */
.dv-clients-row { margin-top: 20px; }
/* How many of how many: a dot each under 20, a bar from 20 (open dots are the ones still to come) */
.dv-bar { position: relative; height: 8px; border-radius: 999px; background: var(--dv-track); }
.dv-bar > i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: var(--primary); }
.dv-dots { display: flex; flex-wrap: wrap; gap: 3px; max-width: 100%; }
.dv-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); }
.dv-dots i.o { background: transparent; box-shadow: inset 0 0 0 1.5px var(--dv-open); }
.dv-stat .dv-vis { margin-top: 8px; }
.dv-stat .dv-status { white-space: normal; align-items: flex-start; }
/* The client goal: an inner panel at the top of the Clients card */
.dv-goal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; padding: 16px 0; border-radius: 12px; background: var(--surface-2); }
.dv-goal-c { min-width: 0; padding: 0 20px; border-left: 1px solid var(--border); }
.dv-goal-c:first-child { border-left: 0; }
.dv-goal .dv-label { font-size: var(--fs-sm); font-weight: 500; color: var(--dv-muted); }
.dv-goal .dv-value { margin-top: 4px; align-items: baseline; }
.dv-goal .dv-num { font-size: 26px; }
.dv-goal .dv-of { font-size: var(--fs-sm); }
.dv-goal .dv-of--words { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.dv-goal .dv-sub { margin-top: 6px; font-size: 12.5px; line-height: 1.45; }
.dv-goal .dv-bar, .dv-goal .dv-dots { margin-top: 10px; }
.dv-goal .dv-bar { background: var(--surface); }
.dv-goal .dv-status { white-space: normal; align-items: flex-start; }
.dv-goal-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dv-goal-edit { font-size: 12.5px; }
.dv-goal-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.dv-goal-in { width: 72px; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; }
.dv-goal-in:focus { outline: none; border-color: var(--primary); }
.dv-goal-in[aria-invalid="true"] { border-color: var(--warning); }
.dv-goal .btn-primary, .dv-goal .btn-secondary { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.dv-goal .btn-primary:disabled, .dv-goal .btn-secondary:disabled { opacity: .6; cursor: default; }
.dv-goal-err { color: var(--text); }
/* Joined and left beside the three figures */
.dv-split-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 28px; flex: 1 1 auto; }
.dv-jl-col { display: flex; flex-direction: column; min-width: 0; }
.dv-jl-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.dv-jl-h .dv-label { font-size: var(--fs-sm); font-weight: 500; color: var(--dv-muted); }
.dv-plotbox[data-chart="jl"] { min-height: 200px; }
svg.dv-plot .bar-left { fill: var(--dv-open); transition: opacity .15s; }
[data-theme="dark"] svg.dv-plot .bar-left { fill: #5f6b7c; }
svg.dv-plot.is-hover .bar-left { opacity: .45; }
svg.dv-plot.is-hover .on .bar-left { opacity: 1; }
.dv-tip-sq.sq-left { background: var(--dv-open); }
/* Renewals: the money, the weeks, the Renewals page's steps */
.dv-rn > .dv-value { margin-top: 0; }
.dv-rn > .dv-value .dv-num { font-size: 30px; }
.dv-rn > .dv-sub { margin-top: 4px; font-size: var(--fs-sm); color: var(--dv-muted); }
.dv-rn > .dv-sub b { color: var(--text); font-weight: 600; }
.dv-rn-ph { margin-top: 16px; font-size: var(--fs-sm); font-weight: 500; color: var(--dv-muted); }
.dv-rn-plot { margin-top: 4px; }
.dv-rn-rows { margin-top: 10px; }
.dv-rn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(92px, auto); align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.dv-rn-row .dv-rn-l { color: var(--text); }
.dv-rn-row b { min-width: 40px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.dv-rn-row .dv-rn-m { text-align: right; color: var(--dv-muted); font-variant-numeric: tabular-nums; }
.dv-rn-row.is-none .dv-rn-l, .dv-rn-row.is-none b { color: var(--dv-muted); font-weight: 500; }
.dv-rn .dv-link svg { width: 14px; height: 14px; }
@media (pointer: coarse) { .dv-goal-edit, .dv-rn .dv-link { min-height: 44px; } }
@container (max-width: 940px) {
  .dv-clients-row > .dv-s8, .dv-clients-row > .dv-s4 { grid-column: span 12; }
}
@container (max-width: 700px) {
  .dv-goal { grid-template-columns: minmax(0, 1fr); padding: 4px 0; }
  .dv-goal-c { padding: 12px 18px; border-left: 0; border-top: 1px solid var(--border); }
  .dv-goal-c:first-child { border-top: 0; }
  .dv-split-card { grid-template-columns: minmax(0, 1fr); }
  .dv-split-card .dv-stats { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
}

/* ══ Today: the calendar's day list in a column on the right (10/16, his pick) ══
   The page grows by the column on a wide screen, so the cards keep their 1320px; the cards' own container rules read
   the numbers' column (.tdy-main); at a page of 1200px or less the day goes on top, its rows in columns. */
.dv-wrap.has-col { max-width: 1660px; }
.tdy-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.tdy-main { min-width: 0; container-type: inline-size; }
.tdy-side { position: sticky; top: 16px; min-width: 0; }
.tdy-side > .dv-skel { min-height: 320px; }
.tdy { padding: 18px 20px 14px; max-height: var(--tdy-max, calc(100vh - 32px)); }
.tdy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.tdy .c2-run-head { padding: 0; border-bottom: 0; flex: 1 1 auto; min-width: 0; } /* the summary wraps; Open calendar stays inside */
.tdy-head > .dv-link { flex: none; }
.tdy-head.is-failed .c2-run-sum, .tdy .c2-empty { display: none; }
.tdy .c2-run-day strong { font-size: 17px; }
.tdy .c2-run-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 0 0; }
.tdy .c2-item, .tdy .c2-buffer, .tdy .c2-now, .tdy .c2-offday { padding-left: 0; padding-right: 0; }
.tdy .c2-item { border-radius: 8px; }
.tdy .c2-buffer .b { height: auto; min-height: 14px; }
.tdy .c2-todo { width: 100%; margin: 4px 0 8px; }
.tdy .dv-link { white-space: nowrap; }
.tdy .dv-link svg { width: 14px; height: 14px; }
.tdy-note { margin: 10px 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
@media (pointer: coarse) { .tdy .dv-link { min-height: 44px; } }
/* 1200: beside the column, the numbers' column must stay over 860px, or the tiles stack one a row (final review 10/16) */
@container dv-page (max-width: 1200px) {
  .tdy-split { grid-template-columns: minmax(0, 1fr); }
  .tdy-side { position: static; order: -1; }
  .tdy-side > .dv-skel { min-height: 120px; }
  .tdy { max-height: none; }
  .tdy .c2-run-list { overflow: visible; columns: 260px; column-gap: 28px; }
  .tdy .c2-item, .tdy .c2-off, .tdy .c2-now, .tdy .c2-buffer { break-inside: avoid; }
  .tdy .c2-todo, .tdy .c2-offday { column-span: all; }
}
