/* Team workspace (supervisor / sales manager / area manager / admin). Mobile first, logical properties so RTL needs no overrides. */
.nav-badge{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--red,#dc2626);color:#fff;font-size:12px;font-weight:700;line-height:20px;text-align:center;margin-inline-start:auto;font-variant-numeric:tabular-nums}
.mobile-nav .nav-item .nav-badge{position:absolute;top:2px;inset-inline-end:calc(50% - 26px);margin:0;min-width:18px;height:18px;line-height:18px;font-size:11px;padding:0 5px}
.team{display:grid;gap:16px}
.team>h2{margin:0}
.team-head{align-items:flex-start}
.team-jump{position:sticky;top:0;z-index:5}
.team-section{margin:0;scroll-margin-top:72px}
.team-section .row{align-items:flex-start}
.team-section h4{margin:14px 0 6px;font-size:13px;display:flex;align-items:center;gap:8px}
.team-chips{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.team-chips .pulse-chip,.team-filters .pulse-chip{min-height:44px;padding:8px 12px}
.pulse-chip.on{border-color:var(--blue,#0e7490);background:color-mix(in srgb,var(--blue,#0e7490) 14%,transparent);font-weight:700}
.team-need-list{display:grid;gap:12px;margin-top:6px}
.team-need{border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;gap:10px;background:var(--surface,transparent)}
.team-need-main{display:grid;gap:4px;min-width:0}
.team-need-main small{display:block;color:var(--muted);overflow-wrap:anywhere}
.team-need-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.team-need-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.team-need-actions .approval-block{flex-basis:100%}
.team-need-support{padding:10px}
.team-need-support .sr-row{border:0;padding:0}
.team-list{list-style:none;margin:0;padding:0;display:grid}
.team-row{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:10px 2px;border:0;border-top:1px solid var(--line);background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}
.team-row-static{cursor:default}
.team-row-main{display:grid;gap:2px;min-width:0;flex:1}
.team-row-main b,.team-row-main small{overflow-wrap:anywhere}
.team-row:hover{background:color-mix(in srgb,var(--blue,#0e7490) 6%,transparent)}
.team-row .tag{flex:none}
.team-tap{cursor:pointer}
.team-tap:focus-visible{outline:3px solid rgba(23,107,135,.38);outline-offset:2px}
.team-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.team-stat{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:grid;gap:2px;min-width:0}
.team-stat small{color:var(--muted)}
.team-stat b{font-size:20px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.team-stat .team-money{font-size:15px}
.team-stat .delta{font-size:13px;margin-inline-start:4px}
.team-search{margin:12px 0 0}
.team-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;align-items:end;margin:8px 0}
.team-filters .field{margin:0}
.team-deal-list{display:grid}
.team-deal{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;width:100%;padding:12px 2px;border:0;border-top:1px solid var(--line);background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}
.team-deal:hover{background:color-mix(in srgb,var(--blue,#0e7490) 6%,transparent)}
.team-deal-main,.team-deal-side{display:grid;gap:3px;min-width:0}
.team-deal-main small,.team-deal-side b{overflow-wrap:anywhere}
.team-deal-side{justify-items:end;text-align:end;flex:none;max-width:46%}
.team-tags{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.team-empty{margin:12px 0 0}
.team-visits{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.team-visits li{border-inline-start:3px solid var(--cyan,#22d3ee);padding-inline-start:10px}
.team-offer{margin:0}
.team-home .home-secondary-actions{margin-top:12px}
.tag.team-nofilter{font-weight:600;opacity:.85}
@media (min-width:720px){
  .team-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
  .team-filters{grid-template-columns:repeat(4,minmax(0,auto))}
  .team-need{grid-template-columns:minmax(0,1fr) auto;align-items:start}
  .team-need-support{display:block}
  .team-need-actions{justify-content:flex-end;max-width:260px}
}

/* Menu "Targets & coaching" lands on the section and flashes it. */
html:root .jump-highlight{outline:2px solid var(--blue);outline-offset:3px;box-shadow:0 0 0 6px rgba(14,116,144,.15);transition:box-shadow .3s}
.team-history{list-style:none;margin:0;padding:0;display:grid;gap:8px}.team-history li{padding-inline-start:10px;border-inline-start:3px solid var(--line)}.team-history li[data-history=approved],.team-history li[data-history=offer-approved]{border-color:var(--green)}.team-history li[data-history=returned],.team-history li[data-history=offer-returned]{border-color:var(--amber)}

/* Commercial offers card: the per-rep table is always painted (own surface, ink text, real row height). */
html:root #commercial-offers-report .report-table-wrap{background:var(--surface);margin:12px 0;min-height:56px;max-height:none}
html:root #commercial-offers-report .report-table-wrap .table td{color:var(--ink);opacity:1;visibility:visible;height:auto;min-height:44px}
html:root #commercial-offers-report .seg{margin-top:12px}
.approvals-hist-row .team-row-main b{font-weight:700}
.approvals-hist-row .team-row-main small{font-weight:400}

/* v73: Commercial offers card is compact, its tiles flow evenly (no lone 5th tile), the stage is a muted line. */
html:root #commercial-offers-report .offers-block{margin:8px 0}
html:root #commercial-offers-report .offers-cur{margin-top:6px}
html:root #commercial-offers-report .offers-cur>h4{margin:0 0 6px}
html:root #commercial-offers-report .offers-cur .kpi-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
html:root #commercial-offers-report .offers-cur .kpi-grid .metric{min-height:0;padding:12px;gap:2px}
html:root #commercial-offers-report .commercial-offer-row{padding-block:8px}
html:root #commercial-offers-report .follow-up-list{gap:6px}
html:root #commercial-offers-report .seg{margin:8px 0}
html:root #commercial-offers-report [data-offer-stage]{display:block;margin-top:2px}
.targets-page>.card{margin-bottom:16px}

/* v73: Reports tables never capture the wheel (the page scrolls); wide ones scroll sideways only, and the two report tables stack so every column fits. */
html:root .reports .report-table-wrap{max-height:none;overflow-y:visible;overflow-x:auto}
html:root .reports .report-table-wrap .table td,html:root .reports .report-table-wrap .table th{padding:10px 10px}
html:root .reports .report-table-wrap .table td{height:auto}
html:root .reports .report-table-wrap .table th{white-space:normal;vertical-align:bottom}
@media(min-width:1024px){html:root .reports .report-grid{grid-template-columns:minmax(0,1fr)}html:root .reports .report-table-wrap .table{min-width:0}}
/* Coaching notes: author + date on their own consistently formatted line */
html:root .coaching-note-meta{display:block;margin-top:4px}
/* Reports > Visit & check-in activity: from 1024px up the table always fits its card (long text wraps, coaching is an icon button). */
@media(min-width:1024px){
  html:root .reports .report-table-wrap .table.visit-activity-table{min-width:0;width:100%;table-layout:auto}
  html:root .reports .visit-activity-table td{white-space:normal;overflow-wrap:anywhere;word-break:normal;vertical-align:middle}
  html:root .reports .visit-activity-table th{white-space:normal}
  html:root .reports .visit-activity-table td.gps-cell{min-width:0}
  html:root .reports .visit-activity-table td.gps-cell .gps-badge{white-space:normal}
  html:root .reports .visit-activity-table .coach-cell{width:1%;white-space:nowrap;text-align:center;padding-inline:6px}
}
.team-row-go{margin-inline-start:auto;font-size:13px;white-space:nowrap;color:var(--primary,inherit)}
[dir=rtl] .team-row-go [aria-hidden]{display:inline-block;transform:scaleX(-1)}

/* Scorecard sparkline + rep comparison (v76) */
.sparkline{vertical-align:middle;color:var(--accent,currentColor)}
.team-compare th,.team-compare td{text-align:start;white-space:nowrap}
.team-compare th .text-button{font:inherit;font-weight:600;padding:4px 0;min-height:32px}
@media (max-width:760px),(pointer:coarse){.team-compare th .text-button{min-height:44px;padding:8px 0}}
.home-updating{margin:0 0 8px}

/* Manager depth: forecast, coverage filters, target pace, stuck limits */
.fc-list .fc-row{align-items:flex-start}
.fc-row[disabled]{opacity:.55;cursor:default}
.fc-amts{display:grid;gap:2px;justify-items:end;text-align:end;font-weight:650;flex:none}
.fc-total{font-weight:700;background:color-mix(in srgb,var(--blue,#0e7490) 5%,transparent)}
.fc-hold{display:flex;align-items:center;gap:8px;min-height:40px;font-size:14px;margin:0 0 8px}
.fc-hold input{width:20px;height:20px}
.coverage-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;align-items:end;margin:10px 0}
.coverage-controls label{display:grid;gap:4px;font-size:12px;color:var(--muted)}
.coverage-controls select{min-height:44px;width:100%}
.coverage-controls .secondary{min-height:44px}
.stuck-days-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.stuck-days-field input{width:100%;min-height:44px}
.target-pace{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:4px}
.target-why{display:block;margin-top:2px}
