/* ── Driver Shifts screen (spec 24 Sep 2026 rev. 27 Sep; mock Driver Shifts.dc.html) ──
   Shares the drivers-pattern shell (drv-*). Tokens only — dark is the source
   of truth; light remaps through the :root[data-theme="light"] tokens. The
   Orqi surface is the one exception: navy with a teal/indigo glow in light,
   a surface one step lighter than the page (never white) in dark. */
:root {
  --shf-orqi-bg: #161B25;            /* dark: one step lighter than --bg */
  --shf-orqi-text: #E8ECF4;
  --shf-orqi-dim: #9AA6BF;
  --shf-orqi-dim2: #8E9AB3;
  --shf-orqi-teal: #00D4AA;
  --shf-orqi-teal-ink: #06281F;
  --shf-orqi-indigo: #7C8CFF;
  --shf-orqi-amber: #F0A020;
  --shf-orqi-line: rgba(255,255,255,.07);
}
:root[data-theme="light"] {
  --shf-orqi-bg: #0B1324;            /* light: navy — never inverted to white */
}

.shf-page { min-height: 0; }
.shf-scroll { padding: 10px 30px 90px; }
.shf-empty { padding: 56px 20px; text-align: center; font-size: 13.5px; color: var(--text-mid); line-height: 1.6; }
.shf-headrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; row-gap: 10px; margin-bottom: 18px; }
.shf-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.shf-search { display: flex; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 9px; padding: 0 10px; width: 148px; height: 32px; flex-shrink: 0; }
/* QA 19 Oct #6: a <div> as on Drivers (the global label rule pushed it 6 px up); the
   input drops the global 8px 12px padding so its text sits on the 32 px centre line. */
.shf-search { margin: 0; box-sizing: border-box; }
.shf-search input { background: none; border: none; outline: none; color: var(--text); font-size: 12.5px; width: 100%; min-width: 0; padding: 0; height: 100%; }
.shf-select { height: 32px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 0 8px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; width: auto; font-family: inherit; }
.shf-select.small { height: auto; padding: 5px 8px; font-size: 12px; border-radius: 6px; }
.shf-sitepill { display: inline-flex; align-items: center; gap: 6px; height: 32px; margin: 0; box-sizing: border-box; background: var(--surface-2); border: 1px solid rgba(var(--accent-rgb),.35); border-radius: 8px; padding: 0 4px 0 10px; flex-shrink: 0; cursor: pointer; }
.shf-sitepill > span { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.shf-sitepill select { background: none; border: none; outline: none; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0 4px; }
.shf-filterrow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; row-gap: 8px; }
.shf-vsep { width: 1px; height: 22px; background: var(--border); flex: none; }
.shf-reset { font-size: 12px; color: var(--text-dim); cursor: pointer; }
.shf-reset:hover { color: var(--text); }
.shf-count { font: 10.5px var(--fm); color: var(--accent); background: rgba(var(--accent-rgb),.12); border-radius: 20px; padding: 1px 7px; }
.shf-count.amber { color: var(--amber); background: rgba(var(--amber-rgb),.12); }
.shf-backdrop { position: fixed; inset: 0; z-index: 25; }
.drv-iconbtn.on { background: var(--surface-2); }
.drv-primary.disabled, .shf-darkbtn.disabled { background: var(--text-quiet); cursor: not-allowed; box-shadow: none; }
.drv-primary.danger { background: var(--danger); box-shadow: none; }
.drv-chip.ov { background: rgba(var(--indigo-rgb),.12); color: var(--indigo-soft); }

/* date navigation */
.shf-datenav { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 8px; height: 32px; overflow: hidden; }
.shf-datebtn { width: 28px; height: 100%; border: none; background: none; display: flex; align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer; padding: 0; }
.shf-datebtn:hover, .shf-datemain:hover { background: var(--surface-3); }
.shf-datemain { height: 100%; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); background: none; padding: 0 10px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-dim); font-family: inherit; }
.shf-datelabel { font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
.shf-datesub { font: 11px var(--fm); color: var(--text-dim); white-space: nowrap; }
.shf-datepop { position: absolute; left: 0; top: 36px; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 20px 50px rgba(var(--shadow-rgb),calc(.7*var(--shadow-k))); display: flex; overflow: hidden; z-index: 30; }
.shf-presets { width: 132px; flex: none; border-right: 1px solid var(--border); padding: 7px; }
.shf-preset { display: block; width: 100%; text-align: left; border: none; padding: 7px 9px; border-radius: 6px; font-size: 12.5px; cursor: pointer; color: var(--text-soft); background: none; white-space: nowrap; font-family: inherit; }
.shf-preset:hover { background: var(--surface-4); }
.shf-preset.on { color: var(--accent); background: rgba(var(--accent-rgb),.10); }
.shf-cal { padding: 11px 13px 12px; }
.shf-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 12.5px; font-weight: 600; }
.shf-cal-nav { width: 22px; height: 22px; border-radius: 5px; border: none; background: none; display: flex; align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer; padding: 0; }
.shf-cal-nav:hover { background: var(--surface-4); }
.shf-cal-grid { display: grid; grid-template-columns: repeat(7, 28px); gap: 2px; }
.shf-cal-dow { margin-bottom: 4px; }
.shf-cal-dow span { font-size: 10px; color: var(--text-quiet); text-align: center; }
.shf-cal-day { height: 26px; border-radius: 5px; border: none; display: flex; align-items: center; justify-content: center; font: 11.5px var(--fm); cursor: pointer; padding: 0; color: var(--text); background: transparent; }
.shf-cal-day:hover { background: var(--surface-4); }
.shf-cal-day.today { color: var(--accent); }
.shf-cal-day.in { background: rgba(var(--accent-rgb),.12); }
.shf-cal-day.edge { background: var(--accent); color: var(--accent-ink); }
.shf-cal-foot { display: flex; align-items: center; gap: 7px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-dim); }

/* plan row + KPIs */
.shf-planrow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 0 2px; margin-bottom: 12px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }   /* no clipping: the change-log popover hangs out of it (T10) */
/* plan freshness → change log (T10) */
.shf-planlog-wrap { position: relative; min-width: 0; }
.shf-planlogbtn { background: none; border: none; padding: 0; font: 12px var(--fn); color: var(--text-muted); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: var(--border-3); }
.shf-planlogbtn:hover { color: var(--text); }
.shf-planlogbtn.stale { color: var(--amber); text-decoration-color: rgba(var(--amber-rgb),.6); }
.shf-planlog { position: absolute; top: calc(100% + 8px); left: -10px; z-index: 30; width: 340px; max-width: calc(100vw - 24px); max-height: min(70vh, 520px); overflow-y: auto; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: 0 12px 32px rgba(var(--shadow-rgb),calc(.5*var(--shadow-k))); padding: 10px 14px 10px; white-space: normal; }
.shf-planlog-head { font: 600 10.5px var(--fn); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.shf-planlog-line { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 12.5px; color: var(--text); }
.shf-planlog-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: none; transform: translateY(-1px); }
.shf-planlog-dot.bk { background: var(--blue2); }
.shf-planlog-text { flex: 1; min-width: 0; line-height: 1.4; }
.shf-planlog-meta { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.shf-planlog-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-dim); line-height: 1.4; }
.shf-planlog-foot span { flex: 1; }
.shf-planlog-empty { font-size: 12.5px; color: var(--text-muted); padding: 4px 0 2px; }
.shf-planpill { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; }
.shf-linkbtn { background: none; border: none; padding: 0 4px; font: 500 12px var(--fn); color: var(--text-muted); cursor: pointer; }
.shf-linkbtn:hover { color: var(--text); }
.shf-linkbtn.accent { color: var(--accent); font-weight: 600; font-size: 11.5px; padding: 0; }
.shf-linkbtn.danger { color: var(--danger); font-weight: 600; font-size: 12.5px; padding: 8px 0; }
.shf-runbtn { display: flex; align-items: center; gap: 5px; background: none; border: 1px solid rgba(var(--accent-rgb),.35); border-radius: 6px; padding: 0 9px; height: 26px; font: 600 12px var(--fn); color: var(--accent); cursor: pointer; }
.shf-runbtn:hover { background: rgba(var(--accent-rgb),.08); }
.shf-runbtn[disabled] { opacity: .6; cursor: default; }
.shf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-bottom: 14px; }
.shf-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 2px rgba(var(--shadow-rgb),calc(.2*var(--shadow-k))); padding: 14px 16px 12px; min-width: 0; }
.shf-kpi:hover { border-color: var(--border-3); }
.shf-kpi-l { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.shf-kpi-v { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 8px; }
.shf-kpi-d { font-size: 11.5px; margin-top: 8px; line-height: 1.45; min-height: 33px; text-wrap: pretty; }

/* Orqi strip */
.shf-orqi { position: relative; overflow: hidden; background: var(--shf-orqi-bg); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 10px 16px; margin-bottom: 4px; color: var(--shf-orqi-text); box-shadow: 0 8px 24px rgba(11,19,36,.18); }
.shf-orqi-glow { position: absolute; pointer-events: none; }
.shf-orqi-glow.a { left: -60px; top: -70px; width: 260px; height: 180px; background: radial-gradient(closest-side, rgba(0,212,170,.28), transparent 70%); }
.shf-orqi-glow.b { right: -40px; top: -90px; width: 300px; height: 200px; background: radial-gradient(closest-side, rgba(99,120,255,.22), transparent 70%); }
.shf-orqi-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; font-size: 12.5px; }
.shf-orqi-sum { color: var(--shf-orqi-dim); }
.shf-orqi-link { background: none; border: none; padding: 4px 6px; font: 600 11.5px var(--fn); color: var(--shf-orqi-teal); cursor: pointer; }
.shf-orqi-btn { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 7px; padding: 4px 10px; font: 600 11.5px var(--fn); color: #FFFFFF; cursor: pointer; white-space: nowrap; }
.shf-orqi-btn:hover { background: rgba(255,255,255,.14); }
.shf-orqi-apply { background: var(--shf-orqi-teal); border: none; border-radius: 7px; padding: 5px 11px; font: 600 11.5px var(--fn); color: var(--shf-orqi-teal-ink); cursor: pointer; white-space: nowrap; }
.shf-orqi-apply:hover { background: #2BE3BE; }
.shf-orqi-dismiss { background: none; border: none; padding: 4px 6px; font: 11.5px var(--fn); color: #7F8BA5; cursor: pointer; }
.shf-orqi-dismiss:hover { color: #FFFFFF; }
.shf-sug { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--shf-orqi-line); flex-wrap: wrap; position: relative; }
.shf-sug-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 6px; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.shf-sug-t { font-size: 12.5px; font-weight: 500; color: #F2F5FA; }
.shf-sug-w { font-size: 12px; color: var(--shf-orqi-dim2); margin-top: 2px; line-height: 1.45; }

/* shared row bits */
.shf-av { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.shf-rowhead { padding: 8px 14px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.shf-rowname { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.shf-rowmeta { display: block; font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shf-status { display: inline-block; font-size: 10.5px; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.shf-ovchip { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; background: rgba(var(--indigo-rgb),.12); color: var(--indigo-soft); white-space: nowrap; }
.shf-group { display: grid; grid-template-columns: 220px minmax(0, 1fr); border-bottom: 1px solid var(--border-soft); }
.shf-grouphead { padding: 9px 14px 5px; font-size: 10.5px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; display: flex; gap: 8px; align-items: baseline; }
.shf-grouphead span { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-low); font-size: 11px; }

/* Day timeline */
.shf-day { min-width: 900px; }
.shf-drow { display: grid; grid-template-columns: 220px minmax(0, 1fr); border-bottom: 1px solid var(--border-soft); min-height: 44px; }
.shf-drow:hover { background: var(--row-hover); }
.shf-drow.head { border-bottom: 1px solid var(--border); min-height: 0; }
.shf-drow.head:hover { background: none; }
.shf-hours { display: grid; grid-template-columns: repeat(24, 1fr); padding: 6px 0 8px; }
.shf-hours span { font: 10px var(--fm); color: var(--text-low); padding-left: 4px; border-left: 1px solid var(--border-soft); }
.shf-lane { position: relative; min-height: 44px; }
.shf-lanegrid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(24, 1fr); pointer-events: none; }
.shf-lanegrid span { border-left: 1px solid var(--border-soft); }
.shf-now { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--danger); opacity: .7; pointer-events: none; }
.shf-offlabel { position: absolute; left: 12px; top: 0; bottom: 0; display: flex; align-items: center; font-size: 11.5px; color: var(--text-low); }
.shf-bar { position: absolute; top: 7px; height: 30px; background: var(--surface-3); border: 1px solid var(--border-2); border-left: 3px solid var(--text-low); border-radius: 7px; padding: 0; cursor: pointer; overflow: hidden; text-align: left; font-family: inherit; color: var(--text); }
.shf-bar:hover { filter: brightness(1.08); }
.shf-bar.on { background: rgba(var(--accent-rgb),.10); border-color: rgba(var(--accent-rgb),.35); }
.shf-bar.off { background: rgba(var(--danger-rgb),.05); border-color: rgba(var(--danger-rgb),.3); }
.shf-bar.open { background: rgba(var(--amber-rgb),.05); border: 1px dashed var(--amber); border-left: 3px solid var(--amber); }
.shf-bar.implicit { background: rgba(var(--blue2-rgb),.08); border-color: rgba(var(--blue2-rgb),.35); border-left: 3px solid var(--blue2); }
.shf-bar.band { background: repeating-linear-gradient(135deg, var(--border-soft) 0 6px, transparent 6px 12px); border-color: transparent; cursor: default; }
.shf-bar.flash, .shf-wchip.flash, .shf-tr.flash { animation: shf-flash 3.5s ease-out; }
@keyframes shf-flash { 0%, 50% { background: rgba(var(--accent-rgb),.22); border-color: var(--accent); } 100% { } }
.shf-bar-label { position: relative; display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 8px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.shf-bar-tag { font-size: 9px; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; background: var(--glass); color: var(--text-muted); }
.shf-trip { position: absolute; top: 0; bottom: 0; background: rgba(var(--accent-rgb),.28); }
.shf-bar.on .shf-trip { background: rgba(var(--accent-rgb),.45); }
.shf-break { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--border-3) 0 3px, transparent 3px 6px); }
.shf-demand { display: grid; grid-template-columns: repeat(24, 1fr); align-items: end; height: 54px; gap: 2px; padding: 0 1px 6px; border-bottom: 1px dashed var(--border-2); }
.shf-demand > div { position: relative; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.shf-dem-cap { width: 100%; border: 1px dashed rgba(var(--blue2-rgb),.55); border-bottom: none; border-radius: 2px 2px 0 0; position: absolute; left: 0; bottom: 0; }
.shf-dem-bar { width: 100%; background: rgba(var(--accent-rgb),.55); border-radius: 2px 2px 0 0; position: relative; }
.shf-dem-bar.over { background: var(--amber); }
.shf-dem-legend { display: flex; gap: 14px; padding: 5px 10px 0; font-size: 10.5px; color: var(--text-dim); }
.shf-dem-legend span, .shf-legend span, .shf-mlegend span { display: flex; align-items: center; gap: 5px; }
.shf-dem-legend i, .shf-mlegend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.shf-mlegend { display: flex; gap: 12px; align-items: center; font-size: 11px; color: var(--text-dim); }
.shf-mlegend i { width: 10px; height: 10px; border-radius: 3px; }

/* Week roster */
.shf-week { min-width: 960px; }
.shf-wrow { display: grid; grid-template-columns: 220px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border-soft); }
.shf-wrow:hover { background: var(--row-hover); }
.shf-wrow.head { border-bottom: 1px solid var(--border); }
.shf-wrow.head:hover, .shf-wrow.openrow:hover { background: none; }
.shf-wrow.openrow { background: rgba(var(--amber-rgb),.04); }
.shf-wday { padding: 10px 10px 8px; border: none; border-left: 1px solid var(--border-soft); background: none; text-align: left; cursor: pointer; font-family: inherit; color: var(--text); }
.shf-wday:hover { background: var(--row-hover); }
.shf-wday.today { background: rgba(var(--accent-rgb),.05); }
.shf-wday-l { font-size: 12px; font-weight: 600; }
.shf-wday.today .shf-wday-l { color: var(--accent); }
.shf-wday-s { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.shf-wcell { padding: 6px; border-left: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 4px; min-height: 40px; min-width: 0; }
.shf-wcell.today { background: rgba(var(--accent-rgb),.03); }
.shf-wchip { border: 1px solid var(--border-2); border-left: 3px solid var(--text-low); background: var(--surface-3); border-radius: 6px; padding: 5px 8px; font: 500 11.5px var(--fn); color: var(--text); cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shf-wchip:hover { filter: brightness(1.08); }
.shf-wchip.on { background: rgba(var(--accent-rgb),.10); }
.shf-wchip.off { background: rgba(var(--danger-rgb),.05); color: var(--danger); }
.shf-wchip.open { border: 1px dashed var(--amber); background: none; color: var(--amber); }
.shf-wchip.dim { border-color: var(--border-2); background: var(--surface-2); color: var(--text-dim); cursor: default; }
.shf-wadd { border: none; background: none; height: 22px; border-radius: 6px; color: transparent; cursor: pointer; font-size: 14px; }
.shf-wcell:hover .shf-wadd { color: var(--text-quiet); background: var(--surface-2); }
.shf-wtotal { padding: 9px 10px; border-left: 1px solid var(--border-soft); font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Month heatmap */
.shf-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.shf-mdow { font-size: 11.5px; font-weight: 500; color: var(--text-dim); padding: 0 4px; }
.shf-mcell { text-align: left; border: 1px solid var(--border-2); background: var(--surface); border-radius: 9px; padding: 9px 10px; min-height: 78px; cursor: pointer; font-family: inherit; color: var(--text); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.shf-mcell:hover { border-color: var(--border-4); }
.shf-mcell.today { background: rgba(var(--accent-rgb),.05); border-color: rgba(var(--accent-rgb),.4); }
.shf-mdate { font: 600 11.5px var(--fm); }
.shf-mdate.today { color: var(--accent); }
.shf-mopen { font: 9.5px var(--fm); color: var(--amber); border: 1px dashed var(--amber); border-radius: 4px; padding: 0 4px; }
.shf-mbar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.shf-mbar > div { height: 100%; }
.shf-mline { font-size: 11px; color: var(--text-mid); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Table */
.shf-table { border-top: 1px solid var(--border); }
.shf-thead { display: flex; align-items: center; padding: 0 14px; height: 38px; border-bottom: 1px solid var(--border); font-size: 11.5px; font-weight: 500; color: var(--text-dim); }
.shf-th { flex: none; position: relative; height: 100%; display: flex; align-items: center; padding-right: 10px; cursor: grab; }
.shf-th.drag { background: rgba(var(--accent-rgb),.08); }
.shf-th-sort { display: flex; align-items: center; gap: 5px; cursor: pointer; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shf-tr { display: flex; align-items: center; padding: 0 14px; height: 52px; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; color: var(--text-soft); }
.shf-tr:hover { background: var(--row-hover); }
.shf-tr.sel { background: rgba(var(--accent-rgb),.04); }
.shf-td { flex: none; min-width: 0; padding-right: 10px; display: flex; align-items: center; }
.shf-tdriver { display: flex; align-items: center; gap: 10px; background: none; border: none; padding: 0; text-align: left; cursor: pointer; min-width: 0; font-family: inherit; color: var(--text); width: 100%; }
.shf-ttext { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.shf-ttext.mono { font: 11.5px var(--fm); }

/* Open shifts */
.shf-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; padding-top: 12px; }
.shf-slot { background: var(--surface); border: 1.5px dashed rgba(var(--amber-rgb),.45); border-radius: 10px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.shf-slot-head { background: linear-gradient(180deg, rgba(var(--amber-rgb),.09), rgba(var(--amber-rgb),.03)); padding: 14px 18px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; border-bottom: 1px dashed rgba(var(--amber-rgb),.3); }
.shf-slot-what { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.shf-slot-when { font: 12px var(--fm); color: var(--text-muted); margin-top: 3px; }
.shf-slot-body { padding: 12px 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.shf-cands { background: linear-gradient(135deg, rgba(var(--accent-rgb),.07), rgba(var(--blue2-rgb),.07)); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px 6px; }
.shf-cands-h { font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.shf-cand { display: flex; align-items: center; gap: 10px; padding: 6px 0; width: 100%; background: none; border: none; text-align: left; font-family: inherit; color: var(--text); }
button.shf-cand { cursor: pointer; border-radius: 6px; padding: 6px; }
button.shf-cand:hover { background: var(--surface-2); }
.shf-other { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 6px; margin: 4px 0 6px; }
.shf-other input { width: 100%; height: 28px; border: none; background: var(--surface); border-radius: 6px; padding: 0 8px; font-size: 12px; font-family: inherit; color: var(--text); outline: none; margin-bottom: 4px; }
.shf-assignbtn { background: var(--surface); border: 1px solid rgba(var(--accent-rgb),.4); border-radius: 6px; padding: 4px 9px; font: 600 11.5px var(--fn); color: var(--accent); cursor: pointer; white-space: nowrap; }
.shf-assignbtn:hover { background: var(--accent); color: var(--accent-ink); }
.shf-pubbtn { flex: 1; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 7px; padding: 6px 10px; font: 600 11.5px var(--fn); cursor: pointer; }
.shf-pubbtn.done { background: var(--surface-2); color: var(--text-muted); border-color: var(--border-2); cursor: default; }
.shf-rmbtn { background: none; border: 1px solid var(--border-2); border-radius: 7px; padding: 6px 10px; font: 11.5px var(--fn); color: var(--text-muted); cursor: pointer; }
.shf-rmbtn:hover { color: var(--danger); border-color: rgba(var(--danger-rgb),.3); }

/* Footer */
.shf-foot { position: sticky; bottom: 0; background: var(--bg); flex-wrap: wrap; white-space: nowrap; z-index: 10; row-gap: 6px; }
.shf-legend { display: flex; gap: 14px; align-items: center; overflow: hidden; }
.shf-legend i { width: 14px; height: 9px; border-radius: 2px; display: inline-block; }
.shf-demtoggle { display: flex; align-items: center; gap: 7px; background: none; border: none; padding: 0; cursor: pointer; font: 12px var(--fn); color: var(--text-dim); }

/* Drawer (record surface) */
.shf-drawer { display: flex; flex-direction: column; min-height: 100%; }
.shf-drawer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; align-items: start; max-width: 1120px; }
/* QA 4 Oct #24: the shift form's save bar is a .drv-savebar under the scroller (as in Vehicles). */
.shf-scroll.rec { padding-bottom: 24px; }
.shf-pickbox { border: 1px solid var(--border-2); background: var(--surface-2); border-radius: 8px; padding: 6px 8px; display: flex; gap: 6px; flex-wrap: wrap; min-height: 40px; align-items: center; }
.shf-pickbox.err { border-color: rgba(var(--danger-rgb),.55); }
.shf-drvpill { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 3px 4px; font-size: 12.5px; font-weight: 500; }
.shf-x { width: 16px; height: 16px; border: none; background: none; color: var(--text-dim); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; }
.shf-x:hover { color: var(--danger); }
.shf-addbtn { display: flex; align-items: center; gap: 6px; border: 1px dashed var(--border-3); background: none; border-radius: 6px; padding: 5px 9px; font: 12px var(--fn); color: var(--text-muted); cursor: pointer; }
.shf-addbtn:hover { border-color: rgba(var(--accent-rgb),.5); color: var(--accent); }
.shf-pop { position: absolute; left: 0; top: calc(100% + 6px); background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: 0 18px 46px rgba(var(--shadow-rgb),calc(.6*var(--shadow-k))); padding: 6px; z-index: 50; }
.shf-pop input[type=text] { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 12.5px; border-radius: 6px; padding: 7px 9px; margin: 2px 0 5px; outline: none; }
.shf-timegrid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.shf-stepper { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border-2); background: var(--surface-2); border-radius: 8px; height: 38px; padding: 0 4px; }
.shf-stepper > span { flex: 1; text-align: center; font-size: 13px; font-weight: 500; white-space: nowrap; }
.shf-stepper > button { width: 26px; height: 26px; border: none; background: none; color: var(--text-muted); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 5px; }
.shf-stepper > button:hover { background: var(--surface-3); }
.shf-time { height: 38px; padding: 0 11px; font-variant-numeric: tabular-nums; }
.shf-selbtn { height: 38px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; text-align: left; }
.shf-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.shf-seg > button { height: 28px; padding: 0 12px; border: none; border-radius: 6px; background: transparent; color: var(--text-muted); font: 500 12.5px var(--fn); cursor: pointer; white-space: nowrap; }
.shf-seg > button.on { background: var(--surface-4); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(var(--shadow-rgb),calc(.4*var(--shadow-k))); }
.shf-chip { border: 1px solid var(--border-2); background: var(--surface); color: var(--text-muted); border-radius: 20px; padding: 5px 11px; font: 12px var(--fn); cursor: pointer; white-space: nowrap; }
.shf-chip.on { border-color: var(--accent); background: rgba(var(--accent-rgb),.10); color: var(--accent); }
.shf-chip.small { height: 24px; padding: 0 9px; font-size: 11.5px; font-weight: 600; border-radius: 12px; }
.shf-switchbtn { display: flex; align-items: center; gap: 7px; background: none; border: none; padding: 0; font: 11.5px var(--fn); color: var(--text-muted); cursor: pointer; }
.drv-toggle.indigo.on { background: rgba(var(--indigo-rgb),.5); }
.drv-toggle.indigo.on .knob { background: var(--indigo); }
button.drv-toggle { border: none; cursor: pointer; padding: 0; }
.shf-breakrow { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-2); background: var(--surface-2); border-radius: 8px; padding: 5px 8px 5px 10px; }
.shf-breakrow input { width: 58px; background: none; border: none; outline: none; font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; font-family: inherit; }
.shf-breakswatch { width: 14px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(135deg, var(--border-3) 0 3px, transparent 3px 6px); border: 1px solid var(--border-3); flex: none; }
.shf-daytoggle { flex: 1; height: 30px; border: 1px solid var(--border-2); border-radius: 7px; background: var(--surface); color: var(--text-muted); font: 600 11.5px var(--fn); cursor: pointer; }
.shf-daytoggle.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.shf-radio { display: flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; font: 12.5px var(--fn); color: var(--text-muted); cursor: pointer; }
.shf-radio.on { color: var(--text); }
.shf-ring { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border-4); display: flex; align-items: center; justify-content: center; flex: none; }
.shf-ring > span { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.on > .shf-ring { border-color: var(--accent); }
.on > .shf-ring > span { background: var(--accent); }
.shf-checkbtn { display: flex; align-items: center; gap: 8px; margin-top: 10px; background: none; border: none; padding: 0; font: 12.5px var(--fn); color: var(--text); cursor: pointer; }
.shf-ovrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.shf-conflicts { border: 1px solid rgba(var(--blue2-rgb),.25); background: rgba(var(--blue2-rgb),.04); border-radius: 11px; padding: 14px 16px; }
.shf-conflicts.err { border-color: rgba(var(--danger-rgb),.3); background: rgba(var(--danger-rgb),.04); }
.shf-conflicts.warn { border-color: rgba(var(--amber-rgb),.3); background: rgba(var(--amber-rgb),.05); }
.shf-cf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.shf-cfgroup { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 0; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; color: var(--text); }
.shf-darkbtn { background: var(--text); color: var(--bg); border: none; border-radius: 8px; padding: 0 12px; height: 32px; font: 600 12.5px var(--fn); cursor: pointer; white-space: nowrap; }
.shf-scopeopt { display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 1px solid var(--border-2); background: var(--surface); border-radius: 9px; padding: 10px 12px; cursor: pointer; font-family: inherit; color: var(--text); }
.shf-scopeopt.on { border-color: rgba(var(--accent-rgb),.45); background: rgba(var(--accent-rgb),.06); }

/* Estimate modal */
.shf-estdlg { width: min(94vw, 720px); max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 16px; padding: 20px 22px 16px; }
.shf-stepn { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-4); color: var(--text-dim); font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.shf-stepn.on { background: var(--text); color: var(--bg); }
.shf-profile { display: grid; grid-template-columns: 3px minmax(0, 1fr); gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 12px 12px; }
.shf-prow1 { display: grid; grid-template-columns: minmax(0, 1fr) 64px 112px 20px; gap: 10px; align-items: end; }
.shf-prow2 { display: grid; grid-template-columns: minmax(0, 1.5fr) 132px minmax(120px, 1fr); gap: 10px; align-items: start; }
.shf-plabel { font-size: 10.5px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; display: block; }
.shf-pinput { height: 30px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-size: 12px; border-radius: 7px; padding: 0 8px; font-family: inherit; min-width: 0; width: 100%; outline: none; }
.shf-pinput.mono { text-align: center; font-family: var(--fm); padding: 0 4px; }
.shf-addprofile { background: none; border: 1px dashed var(--border-3); border-radius: 10px; height: 34px; width: 100%; font: 600 12px var(--fn); color: var(--accent); cursor: pointer; }
.shf-addprofile:hover { background: rgba(var(--accent-rgb),.04); }
.shf-estchip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-soft); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px 3px 7px; }
.shf-estrow { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; }
.shf-badge { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-muted); white-space: nowrap; }
.shf-badge.short { background: rgba(var(--danger-rgb),.09); color: var(--danger); }
.shf-progress { margin: 14px auto 0; width: 160px; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.shf-progress > div { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s; }
/* Estimate result (6 Oct): plain-text close, shift bars, facts, suggestions */
.shf-closex { background: none; border: none; padding: 2px 6px; font: 400 20px/1 var(--fn); color: var(--text-dim); cursor: pointer; border-radius: 6px; flex: none; }
.shf-closex:hover { color: var(--text); background: var(--surface-3); }
.shf-unitrow { display: grid; grid-template-columns: 26px minmax(0, 1fr) 160px; gap: 10px; align-items: center; }
.shf-unitn { font-family: var(--fm); font-size: 11px; color: var(--text-dim); }
.shf-unittrack { position: relative; height: 14px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.shf-unittrack > div { position: absolute; top: 0; bottom: 0; border-radius: 4px; opacity: .85; }
.shf-unittext { font-size: 11.5px; color: var(--text-soft); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.shf-estfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; }
.shf-suggest { display: flex; align-items: center; gap: 10px; border: 1px dashed rgba(var(--amber-rgb), .35); border-radius: 8px; padding: 7px 8px 7px 12px; font-size: 12px; color: var(--text-soft); min-height: 26px; }
.shf-suggestbtn { background: none; border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 6px; height: 26px; padding: 0 10px; font: 600 11.5px var(--fn); color: var(--accent); cursor: pointer; white-space: nowrap; flex: none; }
.shf-suggestbtn:hover { background: rgba(var(--accent-rgb), .06); }

/* Narrow screens (Brave on DeX: shrinkable columns, dvh) */
@media (max-width: 700px) {
  .drv-head, .shf-scroll { padding-left: 16px; padding-right: 16px; }
  .drv-ask { width: 100%; }
  .shf-timegrid { grid-template-columns: 1fr 1fr; }
  .shf-prow1, .shf-prow2 { grid-template-columns: 1fr 1fr; }
  .shf-unitrow { grid-template-columns: 26px minmax(0, 1fr); }
  .shf-unittext { grid-column: 2; text-align: left; }
  .shf-suggest { flex-wrap: wrap; }
  .shf-datepop { flex-direction: column; }
  .shf-presets { width: auto; border-right: none; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; }
  .shf-legend { display: none; }
}

/* Open shifts › Show route (T8h): the planned day of an estimate-born open shift */
.shf-planline { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.shf-planline-t { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); }
.shf-routebtn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid rgba(var(--accent-rgb),.35); background: none; color: var(--accent); font: 600 12px var(--fn); cursor: pointer; }
.shf-routebtn:hover, .shf-routebtn.on { background: rgba(var(--accent-rgb),.08); }
.shf-route { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 2px rgba(var(--shadow-rgb),calc(.2*var(--shadow-k))); padding: 14px 18px 16px; margin-top: 12px; scroll-margin-top: 12px; }
.shf-rt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-width: 0; flex-wrap: wrap; }
.shf-rt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue2); flex: none; }
.shf-rt-dot.sm { width: 6px; height: 6px; }
.shf-rt-title { font-size: 14px; font-weight: 600; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shf-rt-note { font-size: 11.5px; color: var(--text-dim); }
.shf-rt-x { background: none; border: none; color: var(--text-dim); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.shf-rt-x:hover { color: var(--text); }
.shf-rt-body { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 16px; }
.shf-rt-list { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; min-width: 0; }
.shf-rt-row { display: flex; align-items: baseline; gap: 10px; text-align: left; background: none; border: none; border-radius: 6px; padding: 6px 8px; cursor: pointer; font: 12.5px var(--fn); color: var(--text); min-width: 0; }
.shf-rt-row:hover { background: var(--surface-2); }
.shf-rt-row.on { background: rgba(var(--blue2-rgb),.10); }
.shf-rt-n { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); color: var(--text-muted); font: 600 10.5px var(--fm); display: inline-flex; align-items: center; justify-content: center; flex: none; align-self: center; }
.shf-rt-row.on .shf-rt-n { background: var(--text); color: var(--bg); }
.shf-rt-time { font: 11.5px var(--fm); color: var(--text-dim); white-space: nowrap; flex: none; }
.shf-rt-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shf-rt-shared { color: var(--text-dim); }
.shf-rt-empty { font-size: 12.5px; color: var(--text-dim); padding: 8px; }
/* QA 19 Oct #16: the day navigator (dayMap.js) sits under the map inside the
   panel; the column keeps the panel's height (the list's 420 px), the map
   takes what the navigator leaves. */
.shf-rt-mapcol { display: flex; flex-direction: column; gap: 8px; min-width: 0; height: 420px; }
.shf-rt-mapslot { flex: 1; min-height: 200px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--map-bg, var(--surface-2)); }
.shf-rt-daynav:empty { display: none; }
.shf-rt-map { width: 100%; height: 100%; }
/* map marks: classes on Leaflet paths / divIcons so colours come from the theme */
.shf-rt-map .leaflet-tile { filter: grayscale(85%) brightness(.62) contrast(1.15) sepia(6%) hue-rotate(178deg) saturate(120%); }
:root[data-theme="light"] .shf-rt-map .leaflet-tile { filter: grayscale(70%) saturate(.6); }
@media (max-width: 760px) {
  .shf-rt-body { grid-template-columns: minmax(0, 1fr); }
  .shf-rt-list { max-height: 200px; order: 2; }
  .shf-rt-mapcol { height: auto; }
  .shf-rt-mapslot { flex: none; height: 300px; }
  .shf-rt-note { flex-basis: 100%; }
}

/* Loading over a grid that stays on screen (QA 18 Oct part 2 #9). */
.shf-progress { position: sticky; top: 0; left: 0; right: 0; height: 2px; margin-bottom: -2px; z-index: 6; overflow: hidden; background: rgba(var(--accent-rgb), .12); }
.shf-progress::after { content: ''; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--accent); animation: shf-progress 1.1s ease-in-out infinite; }
@keyframes shf-progress { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .shf-progress::after { animation: none; left: 0; width: 100%; opacity: .5; } }

/* Shift form fields with an Override switch (QA 18 Oct part 2 #18): off = a
   disabled field showing the driver's value, on = a picker (indigo border). */
.shf-ovhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.shf-switchbtn.on { color: var(--indigo-soft); }
.shf-field { width: 100%; max-width: 420px; min-height: 38px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); font: 12.5px var(--fn); text-align: left; cursor: default; min-width: 0; }
.shf-field.on { border-color: rgba(var(--indigo-rgb), .55); background: var(--surface); color: var(--text); cursor: pointer; }
.shf-field.on:hover { border-color: var(--indigo); }
.shf-field.err { border-color: var(--danger); }
.shf-field:disabled { opacity: 1; }
.shf-field-main { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.shf-field:not(.on) .shf-field-main { font-weight: 400; }
.shf-field-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: 12px; }
.shf-field.on .shf-field-meta + svg, .shf-field.on .shf-field-main + svg { margin-left: auto; }
.shf-rule { padding: 10px 0; border-top: 1px solid var(--border-soft); }
.shf-rule:first-of-type { border-top: none; }
.shf-vshort { flex: none; min-width: 58px; font: 500 12px var(--fm); color: var(--text); }

/* Shift extensions in the Orqi strip (stage 4.2): suggestions + applied history */
.shf-ext-hist { position: relative; border-top: 1px solid var(--shf-orqi-line); padding-top: 6px; margin-top: 2px; }
.shf-ext-hist .shf-orqi-link { padding-left: 0; }
.shf-ext-line { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; font-size: 12px; }
.shf-ext-text { flex: 1; min-width: 0; color: var(--shf-orqi-dim); }
.shf-ext-meta { flex: none; font: 11px var(--fm); color: var(--shf-orqi-dim2); }
.shf-orqi-apply:disabled, .shf-orqi-btn:disabled { opacity: .5; cursor: default; }
