/* Jewel Field CRM UI 2026 Phase B1: Home, Dashboard, Reports. Loads after design.css; uses its tokens. Logical properties only. */
/*KPI strip + grid*/
.kpi-strip{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(min-width:761px){.kpi-strip{grid-template-columns:repeat(4,minmax(0,1fr))}.kpi-strip .kpi-value{font-size:26px}}
html:root .kpi{display:flex;flex-direction:column;gap:2px;min-height:96px;padding:14px 16px;text-align:start;font:inherit;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1);transition:box-shadow var(--t),transform var(--t),border-color var(--t)}
html:root button.kpi{cursor:pointer}
html:root button.kpi:hover{box-shadow:var(--sh-2);transform:translateY(-1px);border-color:var(--line-strong)}
html:root button.kpi:active{transform:scale(.98)}
.kpi-label{font-size:13px;font-weight:600;color:var(--muted)}
.kpi-value{font-size:26px;font-weight:650;letter-spacing:-.02em;line-height:1.15;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;margin-top:2px}
.kpi-sub{font-size:13px;color:var(--muted);margin-top:auto}
.kpi.ok .kpi-sub{color:var(--success-ink)}.kpi.warn .kpi-sub{color:var(--warning-ink)}.kpi.bad .kpi-sub{color:var(--danger-ink)}
.kpi.bad .kpi-value{color:var(--danger-ink)}
.kpi-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
html:root .kpi-grid.metric-grid{gap:12px}
.kpi-grid>*{min-width:0}
html:root .kpi-grid .metric{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px;min-height:104px}
html:root .kpi-grid .metric small{font-size:13px;font-weight:600;color:var(--muted);line-height:1.3}
html:root .kpi-grid .metric .num{font-size:26px;overflow-wrap:anywhere;margin-top:0}
html:root .kpi-grid .metric .tag{margin-top:auto;max-width:100%;white-space:normal}
.kpi-grid:not([class*=kpi-n]){grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
@media(max-width:960px){html:root .home-kpis{order:2;margin:0}html:root .home-pipeline{order:3}}
@media(max-width:760px){.kpi-strip .kpi-value{font-size:22px}.kpi-strip .kpi-sub{display:none}html:root .kpi-strip .kpi{min-height:0;padding:10px 14px}.home-date{display:none}html:root .kpi-grid[class*=kpi-n]{grid-template-columns:repeat(2,minmax(0,1fr))}
.kpi-grid[class*=kpi-n]>:last-child:nth-child(odd){grid-column:1/-1}
html:root .kpi-grid .metric .num{font-size:22px}}
@media(min-width:761px){.kpi-n3{grid-template-columns:repeat(3,minmax(0,1fr))}
.kpi-n4,.kpi-n5,.kpi-n6{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:761px) and (max-width:899px){.kpi-n5>:last-child:nth-child(odd){grid-column:1/-1}}
@media(min-width:900px){.kpi-n6{grid-template-columns:repeat(3,minmax(0,1fr))}
.kpi-n5{grid-template-columns:repeat(6,minmax(0,1fr))}.kpi-n5>*{grid-column:span 2}.kpi-n5>:nth-child(n+4){grid-column:span 3}}
@media(min-width:1000px){.kpi-n4{grid-template-columns:repeat(4,minmax(0,1fr))}}
/*HOME*/
html:root .home-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
@media(min-width:961px){html:root .home-grid{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr)}}
.home-hero{align-items:flex-start;gap:8px 16px;margin-bottom:4px}
.home-hero h2{font-size:20px;margin:0}
.home-date{margin:2px 0 0;font-size:14px}
.home-hero-meta{font-size:13px;font-weight:600;padding:4px 10px;background:var(--surface-2);border-radius:999px;white-space:nowrap}
html:root .home-today .home-primary{width:100%;min-height:52px;margin:14px 0 12px;font-size:17px;border-radius:var(--r);box-shadow:0 1px 2px rgba(15,118,110,.35),0 6px 16px rgba(15,118,110,.18)}
html:root.dark .home-today .home-primary{box-shadow:var(--hl)}
@media(min-width:961px){html:root .home-today .home-primary{width:auto;min-width:240px}}
html:root .home-today button.home-next{display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 16px;align-items:center;width:100%;margin:0 0 10px;padding:9px 16px;background:var(--accent-soft);border:1px solid var(--accent);border-radius:var(--r);text-align:start}
html:root .home-today button.home-next:hover{background:var(--accent-soft);box-shadow:var(--sh-2)}
.home-next .time{color:var(--accent-ink);font-weight:650;font-size:15px;line-height:1.35;padding-inline-end:16px;border-inline-end:1px solid var(--accent)}
.home-next small:first-child{color:var(--accent-ink);font-weight:600;letter-spacing:.05em;font-size:12px}
.home-next b{display:block;font-size:16px}
p.home-next{margin:0 0 16px;padding:12px 14px;background:var(--surface-2);border-radius:var(--r)}
html:root .home-today h3{margin:8px 0 0;font-size:13px;font-weight:650;letter-spacing:.04em;color:var(--muted)}
.home-actions{margin-top:4px}
html:root .home-today .appointment-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0;border-bottom:1px solid var(--line)}
html:root .home-today .appointment-row:last-child{border-bottom:0}
html:root .home-today .appointment-row .appointment{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:2px 12px;padding:10px 12px 10px 8px;margin-inline:-8px;width:auto}
html:root .home-today .appointment .time{font-size:13px;font-weight:650;color:var(--ink-2);white-space:nowrap}
html:root .home-today .appointment-row .appointment b{display:flex;align-items:center;gap:8px;font-size:15px;overflow-wrap:anywhere}
html:root .home-today .appointment small{display:block;color:var(--muted);overflow-wrap:anywhere}
html:root .home-today .appointment>.tag{display:inline-flex;white-space:nowrap}
html:root .rtl .home-today .appointment-row .appointment{grid-template-columns:84px minmax(0,1fr) auto}
.act-ico{display:inline-grid!important;place-items:center;flex:none;width:24px;height:24px;margin:0!important;border-radius:7px;background:var(--surface-2);color:var(--ink-2);opacity:1!important}
.act-ico svg{width:14px;height:14px}
html:root .home-today .action-done-btn{width:44px;height:44px;min-height:44px;margin:0;padding:0;border-radius:999px;font-size:16px}
@media(max-width:520px){html:root .home-today .appointment-row .appointment{grid-template-columns:56px minmax(0,1fr);gap:4px 10px}
html:root .home-today .appointment>.tag{grid-column:2;justify-self:start;font-size:12px;white-space:normal}}
.home-secondary-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px;padding-top:16px;border-top:1px solid var(--line)}
.home-secondary-actions .text-button{margin-inline-start:auto}
.home-pipeline-total{margin:8px 0 4px;font-size:20px;font-weight:650;letter-spacing:-.01em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.home-pipeline-total b{font-weight:650}
.home-pipeline .row{align-items:center}
.home-pipeline h2{margin:0}
.home-offline{margin-bottom:16px}
html:root .setup-checklist{border:1px solid var(--line);margin-top:16px}
.setup-checklist>summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;cursor:pointer;list-style:none;min-height:44px}
.setup-checklist>summary::-webkit-details-marker{display:none}
.setup-checklist .setup-progress{flex:1 0 100%;order:3;display:block;height:8px;margin:2px 0 6px}
.setup-checklist .setup-steps{margin-top:14px}
@media(min-width:761px){.setup-checklist .setup-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
html:root .setup-step{padding:12px;background:var(--surface-2);border-radius:var(--r)}
html:root .setup-dot{width:24px;height:24px;background:var(--surface);border:1px solid var(--line-strong)}
html:root .setup-dot.done{border-color:transparent}
/*DASHBOARD*/
.dashboard-scope-note{margin:0 0 12px}
html:root .stage-card h2,html:root .target-card h2{margin:0 0 14px}
.insights-split{align-items:start}
.funnel{display:flex;flex-direction:column;gap:16px}
.funnel-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;align-items:baseline;margin-bottom:6px}
.funnel-head b{font-size:14px;font-weight:600}
.funnel-count{font-size:15px;font-weight:650;font-variant-numeric:tabular-nums;text-align:end}
.funnel-amt{grid-column:1/-1;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.funnel-amt:empty{display:none}
@media(min-width:521px){.funnel-head{grid-template-columns:minmax(0,1fr) 32px auto}.funnel-amt{grid-column:auto;text-align:end;min-width:110px}}
.funnel-track{height:12px;border-radius:999px;background:var(--surface-2);overflow:hidden}
.funnel-bar{height:100%;border-radius:999px;background:var(--accent);opacity:calc(.55 + var(--i,0)*.11);transform-origin:left center}
.rtl .funnel-bar{transform-origin:right center}
.empty-mini{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:12px;color:var(--muted);text-align:center}
.empty-mini p{margin:0}
.target-none button{margin-top:12px}
.target-card .empty-ill{display:block;color:var(--muted);margin-bottom:8px}
.target-row{display:grid;grid-template-columns:88px minmax(0,1fr);gap:16px;align-items:center}
.target-row+.target-row,.target-card>div+div .target-row:first-child{margin-top:16px}
.target-row+.target-row{padding-top:16px;border-top:1px solid var(--line)}
.ring{--p:0;position:relative;display:grid;place-items:center;width:88px;height:88px;border-radius:50%;background:conic-gradient(var(--accent) calc(var(--p)*1%),var(--surface-2) 0)}
.ring::before{content:"";position:absolute;inset:10px;border-radius:50%;background:var(--surface)}
.ring span{position:relative;font-size:17px;font-weight:650;font-variant-numeric:tabular-nums}
html:root .target-row .target{margin:0;font-size:15px;font-weight:650;color:var(--ink);display:block;overflow-wrap:anywhere}
.target-left{font-size:13px;color:var(--muted);margin-top:2px}
.target-left b{color:var(--ink);font-weight:600}
html:root .target-row .progress{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.target-card>.sub{margin-top:14px}
/*REPORTS*/
.reports>.card,.reports>.grid,.reports>.kpi-grid{margin-top:0;margin-bottom:16px}
.reports h3{font-size:17px;margin:0 0 4px}
.reports .report-heading{margin-bottom:16px}
html:root .report-toolbar{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 16px;padding:16px;align-items:end}
html:root .report-toolbar .report-presets{grid-column:1/-1}
.seg{display:inline-flex;flex-wrap:wrap;gap:2px;padding:3px;background:var(--surface-2);border-radius:var(--r);border:1px solid var(--line);max-width:100%}
html:root .seg .secondary{min-height:36px;padding:0 14px;background:transparent;border:1px solid transparent;box-shadow:none;border-radius:9px;color:var(--ink-2);white-space:nowrap}
html:root .seg .secondary:hover{background:transparent;color:var(--ink)}
html:root .seg .secondary.active{background:var(--surface);border-color:var(--line-strong);box-shadow:var(--sh-1);color:var(--accent-ink);font-weight:700}
@media(max-width:760px){html:root .report-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
html:root .report-toolbar>.field:nth-child(n+4){grid-column:1/-1}
.seg{display:flex}.seg .secondary{flex:1 1 auto}html:root .seg .secondary{min-height:44px}}
@media(max-width:400px){html:root .report-toolbar{grid-template-columns:minmax(0,1fr)}html:root .report-toolbar>.field:nth-child(n){grid-column:auto}}
.chart-legend{display:flex;gap:16px;margin:12px 0 4px;font-size:13px;font-weight:600;color:var(--ink-2)}
.chart-legend span{display:inline-flex;align-items:center;gap:6px}
.lg{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--accent)}
.lg.v,:root .bar.v{background:var(--info-ink)}.lg.m,:root .bar.m{background:var(--success-ink)}
.rep-bars{display:flex;flex-direction:column}
.rep-row{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:12px 0;border-top:1px solid var(--line)}
.rep-row:first-child{border-top:0}
.rep-name b{display:block;font-size:15px}
.rep-name small{display:block;color:var(--muted)}
@media(min-width:761px){.rep-row{grid-template-columns:minmax(0,260px) minmax(0,1fr);align-items:center;gap:20px}}
.rep-track{display:flex;flex-direction:column;gap:6px}
.bar-line{display:flex;align-items:center;gap:10px}
.bar-wrap{flex:1;height:10px;border-radius:999px;background:var(--surface-2);overflow:hidden}
.bar{height:100%;border-radius:999px;background:var(--accent);transform-origin:left center}
.rtl .bar{transform-origin:right center}
.bar-val{width:36px;text-align:end;font-size:13px;font-weight:650;font-variant-numeric:tabular-nums}
html:root .reports .report-table-wrap{background:none;max-height:min(62vh,540px);overflow:auto;margin-top:8px;border:1px solid var(--line);border-radius:var(--r)}
html:root .reports .report-table-wrap .table{display:table;width:100%;min-width:640px;border-collapse:separate;border-spacing:0}
html:root .reports .report-table-wrap .table th{position:sticky;top:0;z-index:2;white-space:nowrap}
html:root .reports .report-table-wrap .table th:first-child{z-index:3}
html:root .reports .report-table-wrap .table td{height:52px;padding:12px 14px}
html:root .reports .report-table-wrap .table th{padding:12px 14px}
html:root .reports .report-table-wrap .table tbody tr:last-child td{border-bottom:0}
html:root .reports .report-breakdown>div{padding:14px 16px}
/*Motion: only on page entry, first 8 items, transform+opacity*/
@keyframes ins-up{from{opacity:0;transform:translateY(6px)}}
@keyframes ins-grow{from{transform:scaleX(0)}}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>*{animation:ins-up 140ms var(--ease) both}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>:nth-child(2){animation-delay:35ms}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>:nth-child(3){animation-delay:70ms}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>:nth-child(4){animation-delay:105ms}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>:nth-child(5){animation-delay:140ms}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>:nth-child(6){animation-delay:175ms}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>:nth-child(7){animation-delay:210ms}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>:nth-child(8){animation-delay:245ms}
main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>:nth-child(n+9){animation:none}
main.view-enter :is(.funnel-bar,.bar){animation:ins-grow 220ms var(--ease) 60ms both}
@media(prefers-reduced-motion:reduce){main.view-enter :is(.kpi-grid,.kpi-strip,.home-actions,.funnel,.rep-bars)>*{animation:none}
main.view-enter :is(.funnel-bar,.bar){animation:none}
html:root button.kpi:hover{transform:none}}
@media print{html:root .reports .report-table-wrap{max-height:none;overflow:visible}
html:root .reports .report-table-wrap .table th{position:static}
.kpi-grid>*,.kpi-strip>*,.funnel-bar,.bar{animation:none!important}
.seg{display:none}}
/*Currency stack (KPI values): one currency per line, secondary lines smaller*/
.cur-stack{display:flex;flex-direction:column;gap:2px;align-items:flex-start;max-width:100%}
.cur-line{display:block;line-height:1.15}
.cur-line.sec{font-size:.64em;font-weight:600;color:var(--ink-2);letter-spacing:0}
.home-pipeline-total{display:flex;flex-wrap:wrap;align-items:flex-end;gap:4px 12px;margin:6px 0}
.home-pipeline-total>b{font-size:22px;font-weight:650;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.cur-count{font-size:14px;color:var(--muted);padding-bottom:2px}
/*Reports drill-in*/
html:root .reports tr.report-row{cursor:pointer}
html:root .reports tr.report-row:hover td{background:var(--surface-2)}
html:root .reports tr.report-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.drill-sheet{max-height:min(62vh,520px);overflow:auto;margin:8px 0 4px;overscroll-behavior:contain}
.drill-kv>div{align-items:flex-start}
.drill-kv dd{overflow-wrap:anywhere;min-width:0}
.drill-kv .cur-stack{align-items:flex-end}
.drill-kv .cur-line.sec{font-size:.85em}
.drill-h{margin:16px 0 8px;font-size:13px;font-weight:650;letter-spacing:.04em;color:var(--muted)}
.drill-note{white-space:pre-wrap;overflow-wrap:anywhere;padding:12px 14px;background:var(--surface-2);border-radius:var(--r);color:var(--ink);font-size:15px;line-height:1.5}
.drill-sheet .gps-badge+small{display:inline-block;margin-top:4px}
/*ACTIVITY TARGETS (migration 076): rep progress tiles + manager card*/
.act-card h2,.act-card h3{margin:0}
.act-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:12px}
html:root .act-home{grid-column:1/-1}
@media(max-width:960px){html:root .act-home{order:1}}
html:root .act-dash{margin-bottom:16px}
.act-item{display:flex;flex-direction:column;gap:6px;min-width:0;padding:14px 16px;background:var(--surface-2);border-radius:var(--r)}
.act-top,.act-cell-head,.act-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.act-period{font-size:13px;font-weight:600;color:var(--muted)}
.act-count{font-size:15px;color:var(--ink-2);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.act-count b{font-size:22px;font-weight:650;letter-spacing:-.02em;color:var(--ink)}
.act-pct{font-size:13px;font-weight:600;color:var(--muted);margin-inline-start:6px}
.act-chip{white-space:normal;text-align:center}
.act-bar{height:8px;border-radius:999px;background:var(--line);overflow:hidden}
.act-bar i{display:block;height:100%;border-radius:999px;background:var(--accent);min-width:0}
.act-bar i.ok{background:var(--accent)}
.act-bar i.done{background:var(--success-ink)}
.act-bar i.behind{background:var(--warning-ink)}
.act-foot{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.act-manage .row{margin-bottom:8px}
.act-reps{display:flex;flex-direction:column}
.act-rep{display:grid;grid-template-columns:minmax(0,180px) minmax(0,1fr);gap:8px 16px;align-items:start;padding:14px 0;border-top:1px solid var(--line)}
.act-rep:first-child{border-top:0}
.act-rep-name{font-size:15px;overflow-wrap:anywhere;padding-top:12px}
.act-cells{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;min-width:0}
html:root .act-cell{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0;min-height:44px;padding:12px 14px;font:inherit;text-align:start;color:var(--ink);background:var(--surface-2);border:1px solid transparent;border-radius:var(--r);cursor:pointer;transition:border-color var(--t),box-shadow var(--t)}
html:root .act-cell:hover{border-color:var(--line-strong);box-shadow:var(--sh-1)}
.act-cell-head{font-size:13px;font-weight:600;color:var(--muted);align-items:flex-start}
@media(max-width:760px){.act-rep{grid-template-columns:minmax(0,1fr)}.act-rep-name{padding-top:0}.act-cells{grid-template-columns:minmax(0,1fr)}}
.act-form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:480px){.act-form-row{grid-template-columns:minmax(0,1fr);gap:0}}
@media(prefers-reduced-motion:no-preference){.act-bar i{transition:width .22s cubic-bezier(.2,.8,.2,1)}}
@media(max-width:760px){.act-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.act-item{padding:12px}.act-item .act-top{flex-wrap:wrap;gap:4px}.act-item .act-count b{font-size:20px}.act-items>:last-child:nth-child(odd){grid-column:1/-1}}
/* First-run guidance + empty pipeline (Home) */
html:root .home-getstarted{padding:20px 16px 12px}
html:root .home-getstarted .empty-state{border:0;padding:0 0 14px;gap:4px}
html:root .home-getstarted .empty-state svg{color:var(--accent)}
html:root .home-getstarted .empty-state .sub{margin:0}
html:root .gs-steps{list-style:none;margin:0;padding:0;display:grid;gap:8px}
html:root .gs-step{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r)}
html:root .gs-step.current{background:var(--accent-soft);border-color:var(--accent)}
html:root .gs-step.done .gs-text b{text-decoration:line-through;text-decoration-color:var(--line-strong)}
html:root .gs-step .setup-dot{margin-top:0;width:28px;height:28px;font-size:13px;color:var(--ink-2)}
html:root .gs-step.current .setup-dot{border-color:var(--accent);color:var(--accent)}
html:root .gs-step .setup-dot.done{color:#fff}
html:root .gs-text{display:grid;gap:2px;min-width:0}
html:root .gs-text b{font-size:15px;overflow-wrap:anywhere}
html:root .gs-text small{font-size:13px}
html:root .gs-step button{min-height:44px;white-space:nowrap}
@media(max-width:520px){html:root .gs-step{grid-template-columns:auto minmax(0,1fr)}html:root .gs-step>button,html:root .gs-step>.tag{grid-column:2;justify-self:start}}
html:root .home-pipeline-empty{margin-top:8px;padding:20px 16px}
/* Team today (manager Home + Reports) */
.team-pulse .row{align-items:baseline}
.pulse-chips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}
.pulse-chip{min-height:44px;padding:8px 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2);color:inherit;font:inherit;cursor:pointer}
.pulse-chip b{font-variant-numeric:tabular-nums}
.pulse-chip.amber{border-color:var(--amber);background:color-mix(in srgb,var(--amber) 14%,transparent)}
.pulse-chip.red{border-color:var(--red);background:color-mix(in srgb,var(--red) 12%,transparent)}
.pulse-list{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.pulse-row{display:grid;grid-template-columns:12px minmax(0,auto) 1fr;align-items:center;gap:10px;padding:8px 2px;border-top:1px solid var(--line)}
.pulse-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pulse-row .sub{text-align:end;font-size:13px}
.pulse-dot{width:10px;height:10px;border-radius:50%;background:var(--muted,#999)}
.pulse-row.active .pulse-dot{background:var(--success-ink,#16a34a)}
.pulse-row.quiet .pulse-dot{background:var(--amber,#d97706)}
.pulse-row.idle .pulse-dot{background:var(--red,#dc2626)}
@media (max-width:520px){.pulse-row{grid-template-columns:12px 1fr}.pulse-row .sub{grid-column:2;text-align:start}}
.target-bar{height:8px;border-radius:999px;background:var(--surface-2);overflow:hidden;margin:6px 0 2px}
.target-bar i{display:block;height:100%;border-radius:inherit;background:var(--success-ink)}
.target-missing .text-button{min-height:32px}
/* Report filters: presets always visible; dates and selects fold away on phones. */
.report-more{grid-column:1/-1;min-width:0}
.report-more-body .field{margin:0;min-width:0}
.report-more-body .field input,.report-more-body .field select{width:100%;max-width:100%;box-sizing:border-box}
.report-more>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;font-weight:600;color:var(--accent)}
.report-more-body{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin-top:8px}
@media (min-width:721px){.report-more{display:block;grid-column:1/-1}.report-more>summary{display:none}.report-more-body{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}.report-more-body .field{margin:0}}
/* Reports: jump-to-section chips */
.report-jump{position:sticky;top:0;z-index:5;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:8px 2px;margin:0 0 12px;background:var(--bg);-webkit-mask-image:linear-gradient(90deg,#000 92%,transparent)}
.report-jump::-webkit-scrollbar{display:none}
.report-jump-chip{flex:0 0 auto;min-height:44px;padding:8px 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:inherit;font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}
.report-jump-chip:hover{border-color:var(--accent)}
@media (pointer:coarse){.report-jump-chip{min-height:44px}}
@media print{.report-jump{display:none}}
button.pulse-row{width:100%;font:inherit;color:inherit;background:none;border:0;border-top:1px solid var(--line);cursor:pointer;text-align:start;min-height:44px}
button.pulse-row:hover{background:var(--surface-2)}
.pulse-list li:first-child button.pulse-row{border-top:0}
.rep-filter-chip{display:inline-flex;align-items:center;gap:10px;margin:6px 0 0;padding:4px 6px 4px 12px;border-radius:999px;background:color-mix(in srgb,var(--accent) 12%,transparent)}
.delta{display:inline-block;font-size:12px;font-weight:650;margin:2px 0 4px;font-variant-numeric:tabular-nums}
.delta small{font-weight:500;opacity:.75}
.delta.up{color:var(--success-ink)}.delta.down{color:var(--red)}.delta.flat{color:var(--muted,#888)}
.dq-row{border-top:1px solid var(--line);padding:8px 0}
.dq-row summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;list-style:none}
.dq-row summary::-webkit-details-marker{display:none}
.dq-count-btn{display:flex;align-items:center;gap:6px;flex-wrap:wrap;width:100%;min-height:44px;padding:6px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface,transparent)}
.dq-row summary:hover .dq-count-btn,.dq-row summary:focus-visible .dq-count-btn{border-color:var(--primary,currentColor)}
.dq-chev{margin-inline-start:auto;font-size:20px;line-height:1;transition:transform .15s}
[dir=rtl] .dq-chev{transform:scaleX(-1)}
.dq-row[open] .dq-chev{transform:rotate(90deg)}
.dq-list{margin:6px 0 0;padding-inline-start:18px;display:grid;gap:3px;font-size:14px}
/* Report multi-select filters + active-filter chips (rep territory) */
.report-multi{position:relative}
.multi-filter>summary{min-height:44px;display:flex;align-items:center;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer;list-style:none}
.multi-filter>summary::-webkit-details-marker{display:none}
.multi-list{display:grid;gap:2px;max-height:240px;overflow:auto;margin-top:6px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.multi-filter{position:relative}
.multi-filter>summary{justify-content:space-between;gap:8px}
.multi-filter>summary::after{content:'▾';opacity:.6;flex:none}
/* The option list floats under the control (a compact dropdown) instead of pushing the page down. */
.multi-filter[open]>.multi-list{position:absolute;inset-inline:0;top:calc(100% + 4px);z-index:30;margin-top:0;max-height:min(260px,50vh);box-shadow:0 12px 32px rgba(0,0,0,.18)}
.multi-opt{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 6px;cursor:pointer;margin:0}
.multi-opt input{width:20px;height:20px;flex:none}
.report-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px}
.report-chips .rep-filter-chip{margin:0}
.report-chips .text-button,.rep-filter-chip .text-button{min-height:44px;min-width:44px}
.territory-line{margin:6px 0 0;font-size:.85em;color:var(--muted,inherit);opacity:.85}
.territory-line b{font-weight:600}

/* ── 087 support requests + supervisor visits ── */
.support-card .sr-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}
.sr-list{display:grid;gap:10px}
.sr-row{display:grid;gap:10px;padding:12px;border:1px solid var(--line);border-radius:var(--r,12px);background:var(--surface-2)}
.sr-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:4px}
.sr-title{display:block;overflow-wrap:anywhere}
.sr-reason{margin:6px 0 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.sr-note{margin:6px 0 0;color:var(--danger-ink,inherit)}
.sr-actions{display:flex;flex-wrap:wrap;gap:8px}
.sr-actions button{min-height:44px;min-width:44px}
.sr-client{margin:0 0 12px;overflow-wrap:anywhere}
.sr-closed{margin-top:12px}
.sr-closed summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}
.sr-closed .sr-list{margin-top:8px}
.sr-timeline{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.sr-timeline li{padding-inline-start:12px;border-inline-start:3px solid var(--line)}
.sr-timeline p{margin:2px 0 0;overflow-wrap:anywhere}
.sup-attached{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:6px}
.sup-history .sup-visit{margin-top:10px}
.sa-table td,.sa-table th{white-space:nowrap}
.sa-table td.sa-warn{color:var(--danger-ink,inherit);font-weight:700}
.sa-clients summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
.sa-clients ul{margin:0 0 8px;padding-inline-start:18px;white-space:normal}
@media(min-width:720px){.sr-row{grid-template-columns:minmax(0,1fr) auto;align-items:start}.sr-actions{justify-content:flex-end;max-width:360px}}

.metric-period{font-weight:600;color:var(--muted);font-size:1em}
.funnel-amt .funnel-cur{display:block}
/* Report section chips: the row starts at the reading edge and the fade is on the far side (Arabic starts at the right, so the last chip is not cut off). */
.report-jump{padding-inline-end:28px;scroll-padding-inline:2px 28px;-webkit-overflow-scrolling:touch}
html[dir="rtl"] .report-jump{justify-content:flex-start;-webkit-mask-image:linear-gradient(270deg,#000 92%,transparent);mask-image:linear-gradient(270deg,#000 92%,transparent)}

/* Report period chips (phones/tablets): one horizontally scrolling row, fade at the trailing edge, last chip clears the floating + button. */
@media(max-width:760px){
  .report-presets{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-inline-end:76px;scroll-padding-inline:8px 76px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 48px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 48px),transparent)}
  .report-presets::-webkit-scrollbar{display:none}
  html[dir="rtl"] .report-presets{-webkit-mask-image:linear-gradient(270deg,#000 calc(100% - 48px),transparent);mask-image:linear-gradient(270deg,#000 calc(100% - 48px),transparent)}
  html:root .report-presets .secondary{flex:0 0 auto;white-space:nowrap}
}

/* Sticky section bar sits below the sticky page header; current section highlighted. */
.report-jump{top:var(--hdr-h,0px);z-index:14}
.report-jump-chip.active,.report-jump-chip[aria-current="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink);font-weight:700}
.metric .num.num-text{font-size:15px;font-weight:650;line-height:1.3;margin-top:8px}
.offers-decided{margin:8px 0 4px;font-size:14px}

/* v68: section jumps never leave the pinned bar over a section top; Updating chip; sticky rep-name column; amount suffix on the approved tile */
#view :is(section,article)[id]{scroll-margin-top:calc(var(--hdr-h,0px) + var(--jump-h,48px) + 12px)}
.updating-chip{display:inline-block;margin-inline-start:10px;padding:2px 10px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:12px;font-weight:600;vertical-align:middle}
.updating-chip[hidden]{display:none}
.metric .num .num-suffix{font-size:14px;font-weight:600;color:var(--muted);margin-inline-start:6px}
@media(max-width:760px){
  html:root .reports .report-table-wrap{overflow-x:auto}
  html:root .reports .report-table-wrap .table.rep-table th:first-child,html:root .reports .report-table-wrap .table.rep-table td:first-child{position:sticky;inset-inline-start:0;z-index:2;background:var(--surface);box-shadow:1px 0 0 var(--line)}
  html:root .reports .report-table-wrap .table.rep-table th:first-child{z-index:4}
}
.offers-block{margin:12px 0}
.offers-block h4{margin:0 0 4px;font-size:14px}
.offers-block .offers-decided{margin:4px 0}

/* Sidebar "Phone reminders" row: wraps to two lines instead of clipping (Arabic is longer). */
.side .nav-item.nav-item-secondary:has(.push-nav-text){height:auto;min-height:40px;padding-block:7px;align-items:flex-start;text-align:start;white-space:normal}
.side .nav-item .push-nav-text{min-width:0;flex:1;white-space:normal;line-height:1.35;overflow-wrap:anywhere}
/* Empty-state KPI tile: big "0", the sentence as a small caption. */
.metric .kpi-caption{display:block;margin-top:2px;line-height:1.35}
/* Small "?" help tip beside a KPI label */
.help-tip{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-inline-start:6px;padding:0;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--muted);font:600 11px/1 inherit;cursor:pointer;vertical-align:middle}
.help-tip:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.act-rep .act-coach{grid-column:2;justify-self:start;min-height:44px}
.act-gaps{margin-top:12px;border-top:1px solid var(--line);padding-top:10px;display:grid;gap:8px}
.act-gap{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.act-gap .act-rep-name{padding-top:0}
.report-today-hint{margin:8px 0 0}
@media (max-width:640px){.act-rep .act-coach{grid-column:1}}

.bar-lbl{flex:0 0 64px;font-size:12px;color:var(--muted)}

.help-tip{width:24px;height:24px;color:var(--ink-2);border-color:var(--ink-2)}.help-tip:hover{background:var(--surface-2)}.help-tip svg{display:block}
