/* =====================================================================
   Moving & Clearance — Management template
   Calm luxury: warm ivory, ink, champagne. One set of variables re-skins
   everything (presets: ink | forest | navy | bordeaux, light/dark).
   ===================================================================== */
@font-face { font-family: 'Plex Arabic'; src: url(../fonts/plex-arabic-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Arabic'; src: url(../fonts/plex-arabic-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Arabic'; src: url(../fonts/plex-arabic-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex Arabic'; src: url(../fonts/plex-arabic-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Plex Serif'; src: url(../fonts/plex-serif-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Serif'; src: url(../fonts/plex-serif-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --brand: #1D1B17; --brand-ink: #EDE6D8; --brand-muted: #9C9384; --brand-line: #2E2B26;
  --accent: #A8844F; --accent-2: #8A6A3A; --accent-soft: #F1E9DC; --on-accent: #FFFDF8;
  --bg: #F6F3EE; --surface: #FFFFFF; --surface-2: #FBF9F5; --surface-3: #F2EEE7;
  --text: #1D1B17; --text-2: #4A453D; --muted: #7A7366; --line: #E7E1D6; --line-2: #EFEAE1;
  --pos: #4E7A55; --neg: #A4473B; --warn: #B07A2A;
  --st-request: #8A93A0; --st-quote: #B8893B; --st-planned: #4F6A8A; --st-enroute: #3F7C74; --st-done: #5E7F55; --st-invoiced: #7A5C78; --st-overdue: #A4473B;
  --ty-move: #A8844F; --ty-clearance: #6B8A62; --ty-transport: #56708F; --ty-office: #7F6280; --ty-storage: #A0705A;
  --c1: #A8844F; --c2: #6B8A62; --c3: #56708F; --c4: #C08A73; --c5: #7F6280; --c6: #B7B0A3;
  --r: 14px; --r-sm: 10px; --r-xs: 7px;
  --sh-1: 0 1px 2px rgba(29,27,23,.04), 0 1px 1px rgba(29,27,23,.03);
  --sh-2: 0 10px 30px -12px rgba(29,27,23,.18), 0 2px 6px rgba(29,27,23,.05);
  --sh-3: 0 30px 60px -20px rgba(29,27,23,.35);
  --side-w: 256px; --top-h: 64px;
  --font: 'Plex Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Plex Serif', Georgia, serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
[data-preset=forest] { --brand: #1E2B25; --brand-line: #2C3B34; --accent: #A68A55; --accent-2: #86703F; --accent-soft: #EEEADF; --bg: #F3F2EC; --c1: #A68A55; --ty-move: #A68A55; }
[data-preset=navy] { --brand: #1A2233; --brand-line: #283246; --accent: #B49A6A; --accent-2: #8F7748; --accent-soft: #EFEBE2; --bg: #F4F3EF; --c1: #B49A6A; --ty-move: #B49A6A; }
[data-preset=bordeaux] { --brand: #2A1A1E; --brand-line: #3A282C; --accent: #B08D61; --accent-2: #8C6D44; --accent-soft: #F2EAE2; --bg: #F6F1EE; --c1: #B08D61; --ty-move: #B08D61; }
[data-mode=dark] {
  --brand: #0F0E0D; --brand-line: #24221F; --accent: #C9A86B; --accent-2: #DDBF85; --accent-soft: #2B261D; --on-accent: #17140F;
  --bg: #141311; --surface: #1C1B18; --surface-2: #211F1C; --surface-3: #282622;
  --text: #EEE9E0; --text-2: #CFC7B9; --muted: #9F978A; --line: #302D28; --line-2: #2A2824;
  --pos: #86B08A; --neg: #D98375; --warn: #D7A55A;
  --st-request: #9AA3AF; --st-quote: #D2A65A; --st-planned: #7E9CC0; --st-enroute: #6FB2A8; --st-done: #8DB384; --st-invoiced: #B08FAE; --st-overdue: #D98375;
  --ty-move: #C9A86B; --ty-clearance: #8DB384; --ty-transport: #7E9CC0; --ty-office: #B08FAE; --ty-storage: #C99A80;
  --c1: #C9A86B; --c2: #8DB384; --c3: #7E9CC0; --c4: #D9A08A; --c5: #B08FAE; --c6: #6F695F;
  --sh-1: 0 1px 2px rgba(0,0,0,.3); --sh-2: 0 12px 30px -12px rgba(0,0,0,.6); --sh-3: 0 30px 60px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}
[data-mode=dark][data-preset=forest] { --brand: #0E1411; --accent: #C2A46C; --c1: #C2A46C; --ty-move: #C2A46C; }
[data-mode=dark][data-preset=navy] { --brand: #0D111A; --accent: #CDB386; --c1: #CDB386; --ty-move: #CDB386; }
[data-mode=dark][data-preset=bordeaux] { --brand: #150D0F; --accent: #CBA67A; --c1: #CBA67A; --ty-move: #CBA67A; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; font: 400 15px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 .6em; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.flip { transform: scaleX(-1); }
[dir=rtl] .ic.flip { transform: none; }
[dir=rtl] .i-chev:not(.flip), [dir=rtl] .i-arrow { transform: scaleX(-1); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.up { color: var(--pos); font-weight: 600; } .down { color: var(--neg); font-weight: 600; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.w100 { width: 100%; }
.noscroll { overflow: hidden; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.boot { height: 100vh; display: grid; place-items: center; }
.boot span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sidebar ---------- */
.side { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side-w); background: var(--brand); color: var(--brand-ink); display: flex; flex-direction: column; z-index: 40; }
.brand { padding: 20px 20px 12px; }
.brand-link { display: block; }
.logo-ph { width: 200px; max-width: 100%; height: 60px; border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); gap: 1px; }
.logo-ph span { font-weight: 600; font-size: 13.5px; letter-spacing: .02em; }
.logo-ph small { font-size: 11px; opacity: .75; font-family: var(--font); }
.logo-img { max-height: 60px; width: auto; }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; scrollbar-width: thin; scrollbar-color: var(--brand-line) transparent; }
.nav-grp { margin-top: 14px; }
.nav-grp h6 { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-muted); padding: 0 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: color-mix(in srgb, var(--brand-ink) 82%, transparent); font-size: 14.5px; position: relative; transition: background .2s, color .2s; }
.nav a .ic { width: 19px; height: 19px; opacity: .85; }
.nav a:hover { background: color-mix(in srgb, var(--brand-ink) 6%, transparent); color: var(--brand-ink); }
.nav a.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: #fff; }
.nav a.on .ic { color: var(--accent); opacity: 1; }
.nav a.on::before { content: ''; position: absolute; inset-inline-start: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
[dir=rtl] .nav a.on::before { border-radius: 3px 0 0 3px; }
.nav-count { margin-inline-start: auto; font-style: normal; font-size: 11.5px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--brand-ink) 10%, transparent); }
.nav-count:empty { display: none; }
.nav-count.warn { background: color-mix(in srgb, var(--st-overdue) 70%, transparent); color: #fff; }
.side-foot { padding: 14px 20px 18px; border-top: 1px solid var(--brand-line); display: grid; gap: 10px; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding: 3px 10px; border-radius: 20px; justify-self: start; }
.demo-pill .ic { width: 14px; height: 14px; }
.co-name { font-size: 13px; font-weight: 600; display: grid; }
.co-name small { font-weight: 400; color: var(--brand-muted); font-size: 12px; }
.scrim { display: none; }

/* ---------- main + topbar ---------- */
.main { margin-inline-start: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 14px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line-2); }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 0 42px; outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.search .s-ic { position: absolute; inset-inline-start: 14px; top: 11px; color: var(--muted); display: flex; }
.search kbd { position: absolute; inset-inline-end: 10px; top: 9px; font: 500 11px var(--font); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--muted); background: var(--surface-2); }
.s-results { position: absolute; top: 46px; inset-inline: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-3); padding: 8px; max-height: 70vh; overflow: auto; z-index: 50; }
.s-results h6 { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px 4px; font-weight: 500; }
.s-results a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.s-results a:hover, .s-results a:focus { background: var(--surface-3); }
.s-results a span { flex: 1; display: grid; min-width: 0; }
.s-results small { color: var(--muted); }
.s-none { padding: 14px; color: var(--muted); margin: 0; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.me { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--line); }
[data-mode=dark] .me { color: var(--accent); }
.only-m, .icon-btn.only-m { display: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent; font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; background: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { background: color-mix(in srgb, var(--text) 86%, var(--accent)); }
[data-mode=dark] .btn.primary { background: var(--accent); color: var(--on-accent); }
[data-mode=dark] .btn.primary:hover { background: var(--accent-2); }
.btn.ghost { border-color: var(--line); background: var(--surface); color: var(--text); }
.btn.ghost:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--surface-2); }
.btn.danger { border-color: color-mix(in srgb, var(--neg) 45%, var(--line)); color: var(--neg); background: var(--surface); }
.btn.danger:hover { background: color-mix(in srgb, var(--neg) 8%, var(--surface)); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn small { opacity: .7; font-size: 11.5px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: border-color .2s, background .2s; }
.icon-btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 11px; gap: 2px; border: 1px solid var(--line-2); }
.seg button, .seg a { border: 0; background: none; height: 32px; min-width: 38px; padding: 0 11px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, color .2s; }
.seg .on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.seg.big button { height: 40px; padding: 0 18px; font-size: 14px; }
.seg.sm button { height: 28px; min-width: 32px; padding: 0 8px; }
.newmenu { position: relative; }
.menu { position: absolute; inset-inline-end: 0; top: 46px; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-3); padding: 6px; z-index: 60; animation: pop .16s var(--ease); }
.menu a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.menu a:hover { background: var(--surface-3); }
.menu a .ic { color: var(--accent); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- page ---------- */
.view { padding: 26px 28px 60px; max-width: 1480px; width: 100%; margin: 0 auto; outline: none; }
.view.enter { animation: enter .35s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
[dir=ltr] .page-head h1 { font-family: var(--display); font-weight: 500; font-size: 30px; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--sh-1); min-width: 0; }
.card.pad0 { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2 { font-size: 15.5px; font-weight: 600; }
.card-h.padh { padding: 18px 20px 0; }
.card.narrow { max-width: 760px; }
.link { color: var(--accent-2); font-size: 13.5px; font-weight: 500; }
[data-mode=dark] .link { color: var(--accent); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pill { font-size: 12px; background: var(--surface-3); border-radius: 20px; padding: 1px 10px; color: var(--text-2); }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.g-21 { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 18px; align-content: start; min-width: 0; }
section.card, .view > .card { margin-bottom: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 14px; box-shadow: var(--sh-1); display: grid; gap: 8px; min-width: 0; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset-inline-start: -46px; top: -46px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%); pointer-events: none; }
.kpi-h { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.kpi-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; flex: none; }
[data-mode=dark] .kpi-ic { color: var(--accent); }
.kpi-v { font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Decision E: numbers stay in the sans face (tabular, same as Arabic UI); serif only for headings */
.kpis.k6 .kpi-v { font-size: 22px; }
.kpi-f { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; color: var(--muted); min-height: 22px; }
.kpi-f small { font-size: 12.5px; }
.kpi.pos .kpi-v { color: var(--pos); } .kpi.neg .kpi-v { color: var(--neg); }
.spark { width: 96px; height: 28px; flex: none; }
.spark polyline { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ring { --p: 50; width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); -webkit-mask: radial-gradient(circle, transparent 9px, #000 10px); mask: radial-gradient(circle, transparent 9px, #000 10px); flex: none; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .ln { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart .ln.dash { stroke-dasharray: 5 5; stroke-width: 1.8; }
.chart .dot { stroke: var(--surface); stroke-width: 2; opacity: 0; transition: opacity .2s; }
.chart:hover .dot { opacity: 1; }
.chart .bar { transition: opacity .2s; }
.chart .bar:hover { opacity: .8; }
[dir=rtl] .chart { direction: ltr; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend.col { flex-direction: column; gap: 8px; margin: 0; flex: 1; min-width: 0; }
.legend.col li b { margin-inline-start: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.donut { display: flex; align-items: center; gap: 22px; }
.donut svg { width: 170px; height: 170px; flex: none; }
.donut .seg { transition: opacity .2s; } .donut .seg:hover { opacity: .8; }
.d-big { font-size: 20px; font-weight: 600; fill: var(--text); font-family: var(--font); }
.d-sm { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.hbars { display: grid; gap: 12px; }
.hb { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; align-items: center; gap: 12px; font-size: 13.5px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.hb-t { height: 8px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.hb-t i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transform-origin: inline-start; animation: grow .8s var(--ease); }
@keyframes grow { from { transform: scaleX(0); } }
.hb b { font-weight: 500; min-width: 44px; text-align: end; font-variant-numeric: tabular-nums; }
.week-strip .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day-cell { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 4px; background: var(--surface-2); transition: border-color .2s, transform .2s; min-width: 0; }
.day-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
.day-cell small { color: var(--muted); font-size: 12px; }
.day-cell b { font-size: 22px; font-weight: 600; line-height: 1; }
.day-cell em { font-style: normal; font-size: 12px; color: var(--text-2); }
.day-cell.today { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.dots { display: flex; gap: 3px; min-height: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; }
i.ty-move { background: var(--ty-move); } i.ty-clearance { background: var(--ty-clearance); } i.ty-transport { background: var(--ty-transport); } i.ty-office { background: var(--ty-office); } i.ty-storage { background: var(--ty-storage); }
.sched { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sched a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); transition: border-color .2s, background .2s; }
.sched a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--surface); }
.sched time { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 52px; display: grid; font-size: 15px; }
.sched time small { font-weight: 400; color: var(--muted); font-size: 12px; }
.s-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.s-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-main span { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-meta { display: flex; align-items: center; gap: 10px; flex: none; }
.truck-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.truck-tag .ic { width: 15px; height: 15px; color: var(--muted); }
.avs { display: inline-flex; }
.avs .avatar + .avatar { margin-inline-start: -7px; }
.avatar { --av: var(--accent); width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--av) 18%, var(--surface)); color: color-mix(in srgb, var(--av) 80%, var(--text)); font-size: 12.5px; font-weight: 600; border: 2px solid var(--surface); flex: none; letter-spacing: .02em; }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; border-width: 1.5px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px 3px 9px; border-radius: 20px; white-space: nowrap; --c: var(--muted); color: color-mix(in srgb, var(--c) 85%, var(--text)); background: color-mix(in srgb, var(--c) 13%, transparent); }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.st-request { --c: var(--st-request); } .st-quote { --c: var(--st-quote); } .st-planned { --c: var(--st-planned); } .st-enroute { --c: var(--st-enroute); } .st-done { --c: var(--st-done); } .st-invoiced { --c: var(--st-invoiced); } .st-overdue { --c: var(--st-overdue); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; border: 1px solid var(--line-2); }
.chip.warn { color: var(--warn); }
.chip[class*=ty-] { --t: var(--muted); background: color-mix(in srgb, var(--t) 11%, transparent); border-color: color-mix(in srgb, var(--t) 22%, transparent); color: color-mix(in srgb, var(--t) 80%, var(--text)); }
.ty-move { --t: var(--ty-move); } .ty-clearance { --t: var(--ty-clearance); } .ty-transport { --t: var(--ty-transport); } .ty-office { --t: var(--ty-office); } .ty-storage { --t: var(--ty-storage); }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.alerts a { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 10px; font-size: 13.5px; transition: background .2s; }
.alerts a:hover { background: var(--surface-3); }
.alerts a > .ic:first-child { color: var(--accent); }
.alerts li.warn a > .ic:first-child { color: var(--neg); }
.alerts span { flex: 1; }
.alerts .i-chev { width: 15px; color: var(--muted); }
.mini-resale .big { font-size: 26px; font-weight: 600; }


/* ---------- tables, filters, inputs ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; font-weight: 500; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl th.num { text-align: end; } .tbl th.c, .tbl td.c { text-align: center; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl.rows-link tbody tr { cursor: pointer; transition: background .15s; }
.tbl.rows-link tbody tr:hover { background: var(--surface-2); }
.tbl td a { font-weight: 500; }
.tbl.compact td { padding: 9px 4px; } .tbl.compact th { padding: 8px 4px; background: none; }
.tbl tfoot td, .tbl tfoot th { padding: 10px 16px; border-top: 1px solid var(--line); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); background: none; }
.tbl tfoot .grand td { font-size: 17px; font-weight: 600; border-top: 2px solid var(--text); }
.tbl tr.grp th { background: var(--surface-3); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); font-weight: 600; }
.tbl tr.grp th small { color: var(--muted); font-weight: 400; margin-inline-start: 6px; }
.route-c .arr { color: var(--muted); }
.row-acts { white-space: nowrap; text-align: end; }
.row-acts > * + * { margin-inline-start: 6px; }
.who { display: inline-flex; align-items: center; gap: 10px; }
.who > span:last-child { display: grid; }
.who small { color: var(--muted); font-size: 12px; }
.cat-tag { display: inline-flex; align-items: center; gap: 7px; }
.cat-tag .ic { width: 16px; height: 16px; color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; color: var(--text-2); transition: all .2s; }
.fchip .ic { width: 15px; height: 15px; color: var(--muted); }
.fchip em { font-style: normal; font-size: 11.5px; color: var(--muted); background: var(--surface-3); border-radius: 8px; padding: 0 6px; }
.fchip:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.fchip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.fchip.on em { background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); }
.fchip.on .ic { color: var(--bg); }
.frow { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.inp-ic { position: relative; display: flex; flex: 1; min-width: 200px; max-width: 360px; }
.inp-ic .ic { position: absolute; inset-inline-start: 12px; top: 11px; color: var(--muted); }
.inp-ic input { padding-inline-start: 38px !important; width: 100%; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) { height: 40px; border: 1px solid var(--line); background-color: var(--surface); border-radius: 10px; padding: 0 12px; outline: none; transition: border-color .2s, box-shadow .2s; min-width: 0; }
textarea { height: auto; padding: 10px 12px; width: 100%; resize: vertical; line-height: 1.5; }
:where(input, select, textarea):focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
select { appearance: none; -webkit-appearance: none; padding-inline-end: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-size: 5px 5px; background-repeat: no-repeat; background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px; cursor: pointer; }
[dir=rtl] select { background-position: 13px 17px, 18px 17px; }
input[type=date], input[type=time] { direction: ltr; }
[dir=rtl] input[type=date], [dir=rtl] input[type=time] { text-align: right; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty .ic { width: 34px; height: 34px; stroke-width: 1.2; color: color-mix(in srgb, var(--accent) 70%, var(--muted)); }
.empty p { margin: 0; }
.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 14px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); color: color-mix(in srgb, var(--accent) 75%, var(--text)); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, transparent) 0 10px, transparent 10px 20px), var(--surface-2); min-height: 120px; }
.ph .ic { width: 26px; height: 26px; stroke-width: 1.3; opacity: .85; }
.ph b { font-size: 13px; font-weight: 600; }
.ph small { font-size: 11.5px; opacity: .8; direction: ltr; }
.ph-sq { aspect-ratio: 1; min-height: 0; }
.ph-wide { aspect-ratio: 3/2; min-height: 0; }
.ph-sq.sm { aspect-ratio: 4/3; }
.ph-receipt { min-height: 90px; }

/* ---------- planning ---------- */
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-nav h2 { font-size: 18px; font-weight: 600; min-width: 0; flex: 0 1 auto; }
[dir=ltr] .cal-nav h2 { font-family: var(--display); font-weight: 500; font-size: 20px; }
.planner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
/* Decision D (NOTES.md): tray as a top strip so the full Mon–Sat board fits; side tray only on very wide screens */
.planner .tray-list { display: flex; overflow-x: auto; min-height: 96px; scrollbar-width: thin; }
.planner .tray-list .job-card { min-width: 220px; max-width: 260px; flex: none; }
.planner .tray-list .empty { width: 100%; padding: 16px; }
@media (min-width: 1680px) {
  .planner { grid-template-columns: 280px minmax(0, 1fr); }
  .planner .tray { position: sticky; top: calc(var(--top-h) + 14px); max-height: calc(100vh - var(--top-h) - 30px); }
  .planner .tray-list { display: grid; overflow-y: auto; overflow-x: hidden; }
  .planner .tray-list .job-card { min-width: 0; max-width: none; }
}
.tray { display: flex; flex-direction: column; padding: 16px; }
.tray .card-h { margin-bottom: 8px; }
.hint { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.hint .ic { width: 16px; height: 16px; margin-top: 2px; }
.tray-list { overflow-y: auto; display: grid; gap: 8px; padding: 4px; margin: 0 -4px; align-content: start; min-height: 120px; border-radius: 12px; border: 0 !important; }
.board-card { overflow: hidden; }
.crew-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--surface-2); }
.cb-l { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.cb-l select { height: 32px !important; font-size: 13px; background-position: calc(100% - 18px) 13px, calc(100% - 13px) 13px; }
[dir=rtl] .cb-l select { background-position: 13px 13px, 18px 13px; }
.crew-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.crew-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; cursor: grab; user-select: none; touch-action: none; }
[dir=rtl] .crew-chip { padding: 3px 4px 3px 10px; }
.crew-chip.busy { border-color: color-mix(in srgb, var(--st-planned) 40%, var(--line)); background: color-mix(in srgb, var(--st-planned) 8%, var(--surface)); }
.crew-chip.off { opacity: .45; text-decoration: line-through; }
.board-scroll { overflow-x: auto; scrollbar-width: thin; }
.board { min-width: 980px; }
.b-row { display: grid; grid-template-columns: 150px repeat(6, minmax(130px, 1fr)); border-bottom: 1px solid var(--line-2); }
.b-row:last-child { border-bottom: 0; }
.b-head { background: var(--surface-2); }
.b-lab { padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; font-weight: 600; border-inline-end: 1px solid var(--line-2); }
.b-lab > span { display: grid; } .b-lab small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.b-lab .ic { color: var(--accent); margin-top: 2px; }
.b-day { padding: 10px 12px; font-size: 13px; border-inline-end: 1px solid var(--line-2); }
.b-day:last-child { border-inline-end: 0; }
.b-day small { color: var(--muted); display: block; font-size: 11.5px; }
.b-day.today { background: var(--accent-soft); }
.cell { padding: 8px 8px 12px; display: grid; gap: 6px; align-content: start; min-height: 110px; border-inline-end: 1px solid var(--line-2); position: relative; transition: background .15s, box-shadow .15s; }
.cell:last-child { border-inline-end: 0; }
.cell.today { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.cell.full { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--neg) 5%, transparent) 0 8px, transparent 8px 16px); }
.cell.over { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }
.cell-load { position: absolute; inset-inline: 8px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.cell-load::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--l); background: color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 3px; }
.job-card { --t: var(--accent); background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--t); border-radius: 10px; padding: 8px 10px; display: grid; gap: 3px; cursor: grab; user-select: none; touch-action: none; font-size: 12.5px; box-shadow: var(--sh-1); transition: box-shadow .2s, transform .2s, border-color .2s; min-width: 0; }
.job-card:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.job-card.over { box-shadow: 0 0 0 2px var(--accent); }
.job-card b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.jc-top time { font-weight: 600; font-variant-numeric: tabular-nums; }
.jc-top .badge { font-size: 10.5px; padding: 1px 7px; }
.jc-top small .ic { width: 13px; height: 13px; vertical-align: -2px; margin-inline-end: 3px; }
.jc-crew { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.jc-crew .avatar + .avatar { margin-inline-start: -5px; }
.job-card.conflict { border-color: color-mix(in srgb, var(--neg) 50%, var(--line)); }
.warn-ic { color: var(--neg); margin-inline-start: auto; display: inline-flex; }
.warn-ic .ic { width: 15px; height: 15px; }
.drag-ghost { position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none; box-shadow: var(--sh-3) !important; opacity: .95; }
.dragging { opacity: .35; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.ty-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.ty-legend span { display: inline-flex; gap: 6px; align-items: center; }
.ty-legend i { width: 10px; height: 10px; border-radius: 3px; }
.m-head, .m-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.m-head span { padding: 10px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.m-cell { min-height: 112px; padding: 8px; border-inline-end: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; transition: background .15s; min-width: 0; }
.m-cell:nth-child(7n) { border-inline-end: 0; }
.m-cell:hover { background: var(--surface-2); }
.m-cell.out { opacity: .45; }
.m-cell.today .m-d { background: var(--text); color: var(--bg); }
.m-d { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.m-job { font-size: 11.5px; padding: 2px 6px; border-radius: 5px; background: color-mix(in srgb, var(--t) 13%, transparent); color: color-mix(in srgb, var(--t) 70%, var(--text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-inline-start: 2px solid var(--t); }
.m-more { font-size: 11px; color: var(--muted); padding-inline-start: 6px; }
.timeline { min-width: 860px; }
.tl-row { display: grid; grid-template-columns: 170px 1fr; border-bottom: 1px solid var(--line-2); min-height: 76px; }
.tl-hours { min-height: 36px; background: var(--surface-2); }
.tl-lab { padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 13.5px; border-inline-end: 1px solid var(--line-2); }
.tl-lab > span { display: grid; } .tl-lab small { font-weight: 400; color: var(--muted); font-size: 11.5px; } .tl-lab .ic { color: var(--accent); }
.tl-track { position: relative; background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px); background-size: calc(100% / 13) 100%; }
[dir=rtl] .tl-track { background-image: linear-gradient(to left, var(--line-2) 1px, transparent 1px); background-position: right top; }
.tl-hours .tl-track span { position: absolute; top: 9px; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
[dir=rtl] .tl-hours .tl-track span { transform: translateX(50%); }
.tl-hours .tl-track span:first-child { transform: none; padding-inline-start: 4px; }
.tl-hours .tl-track span:last-child { transform: translateX(-100%); }
[dir=rtl] .tl-hours .tl-track span:last-child { transform: translateX(100%); }
.tl-job { --t: var(--accent); position: absolute; top: 10px; bottom: 10px; border-radius: 9px; padding: 6px 10px; background: color-mix(in srgb, var(--t) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--t) 35%, transparent); border-inline-start: 3px solid var(--t); overflow: hidden; display: grid; align-content: center; font-size: 12px; transition: box-shadow .2s; }
.tl-job:hover { box-shadow: var(--sh-2); }
.tl-job b, .tl-job small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-job small { color: var(--muted); }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(240px, 1fr)); gap: 14px; padding-bottom: 8px; align-items: start; }
.k-col { background: var(--surface-3); border-radius: var(--r); padding: 10px; border: 1px solid var(--line-2); min-width: 0; }
.k-col header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; }
.k-col header em { font-style: normal; font-size: 12px; color: var(--muted); }
.k-col header small { margin-inline-start: auto; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.k-list { display: grid; gap: 8px; min-height: 200px; max-height: calc(100vh - 240px); overflow-y: auto; padding: 2px; border-radius: 10px; border: 0 !important; }
.k-card { padding: 10px 12px; gap: 5px; }
.k-card .jc-top b.num { font-size: 13px; }

/* ---------- job detail ---------- */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); padding: 0; margin: 0 0 18px; }
.stepper li { display: grid; justify-items: center; gap: 6px; position: relative; text-align: center; }
.stepper li::before { content: ''; position: absolute; top: 15px; inset-inline-start: calc(-50% + 18px); inset-inline-end: calc(50% + 18px); height: 2px; background: var(--line); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.cur::before { background: var(--accent); }
.stepper span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); z-index: 1; transition: all .3s; }
.stepper li.done span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stepper li.done span .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.stepper li.cur span { border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.stepper small { font-size: 12px; color: var(--muted); }
.stepper li.cur small { color: var(--text); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; transition: color .2s, border-color .2s; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 500; }
.tabs em { font-style: normal; font-size: 11.5px; background: var(--surface-3); border-radius: 8px; padding: 0 7px; color: var(--text-2); }
.addrs { display: grid; gap: 8px; }
.addr { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.addr > div { flex: 1; display: grid; gap: 1px; min-width: 0; }
.addr small { color: var(--muted); font-size: 12px; }
.addr span { color: var(--text-2); font-size: 13.5px; }
.addr-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: none; }
[data-mode=dark] .addr-ic { color: var(--accent); }
.addr .floor { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.addr .floor .ic { width: 15px; height: 15px; }
.addr-line { display: none; }
.facts { margin: 0; display: grid; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; align-items: center; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.facts dt .ic { width: 16px; height: 16px; }
.facts dd { margin: 0; text-align: end; font-weight: 500; min-width: 0; }
.facts.sm > div { padding: 7px 0; font-size: 13px; }
.facts .tot { border-top: 2px solid var(--text); border-bottom: 0; font-size: 16px; }
.avs-l { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.crew-mini { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border: 1px solid var(--line); border-radius: 20px; font-size: 12.5px; font-weight: 500; }
[dir=rtl] .crew-mini { padding: 2px 3px 2px 10px; }
.cust { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.cust > div { display: grid; } .cust small { color: var(--muted); }
.contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.contact li { display: flex; gap: 10px; align-items: center; min-width: 0; }
.contact li .ic { color: var(--accent); }
.contact a, .contact span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.contact a:hover { text-decoration: underline; }
.big-sm { font-size: 20px; font-weight: 600; }
.signed { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--pos) 8%, transparent); border: 1px solid color-mix(in srgb, var(--pos) 25%, transparent); margin: 6px 0 12px; }
.signed > .ic { color: var(--pos); }
.signed > div { display: grid; flex: 1; min-width: 0; } .signed small { color: var(--muted); }
.signed img { height: 44px; width: auto; max-width: 120px; background: #fff; border-radius: 6px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.prog { height: 8px; background: var(--surface-3); border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--pos))); border-radius: 6px; transition: width .5s var(--ease); }
.prog.sm { height: 5px; margin: 6px 0 10px; }
.stepper-i { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper-i button { border: 0; background: var(--surface-2); width: 28px; height: 28px; cursor: pointer; font-size: 15px; }
.stepper-i button:hover { background: var(--surface-3); }
.stepper-i b { min-width: 30px; text-align: center; font-weight: 500; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo figcaption { font-size: 12px; padding: 7px 10px; color: var(--muted); }
.photo-ph { aspect-ratio: 4/3; min-height: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; position: relative; }
.check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check.big { display: flex; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); transition: background .2s, border-color .2s; }
.check.big input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check.big .box { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; background: var(--surface); flex: none; transition: all .2s; }
.check.big .box .ic { width: 15px; height: 15px; stroke-width: 2.4; opacity: 0; transform: scale(.6); transition: all .2s var(--ease); color: #fff; }
.check.big.done { background: color-mix(in srgb, var(--pos) 6%, var(--surface-2)); }
.check.big.done .box { background: var(--pos); border-color: var(--pos); }
.check.big.done .box .ic { opacity: 1; transform: none; }
.check.big.done > span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.check.big input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.inline-add { display: flex; gap: 8px; margin-top: 12px; }
.inline-add input { flex: 1; }
.timeline-l { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline-l::before { content: ''; position: absolute; inset-inline-start: 6px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line); }
.timeline-l li { display: flex; gap: 16px; padding: 8px 0; position: relative; }
.timeline-l li > div { display: grid; gap: 1px; font-size: 14px; }
.timeline-l small { color: var(--muted); font-size: 12px; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); flex: none; margin-top: 4px; z-index: 1; }
.timeline-l li:first-child .tl-dot { background: var(--accent); }
.paid-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--pos); font-weight: 600; padding: 0 10px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.form.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field input, .field select { width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 13px; color: var(--text-2); font-weight: 500; padding: 0; margin-bottom: 8px; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checks .check { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.form-actions .muted { margin-inline-end: auto; font-size: 13px; }
.logo-prev { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-prev .logo-ph { background: var(--brand); }
.add-maint { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); align-items: end; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 40px; height: 23px; border-radius: 20px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
[dir=rtl] .sw::after { left: auto; right: 3px; }
.switch input:checked + .sw { background: var(--accent); }
.switch input:checked + .sw::after { transform: translateX(17px); }
[dir=rtl] .switch input:checked + .sw::after { transform: translateX(-17px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.num-in { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; height: 40px; transition: border-color .2s, box-shadow .2s; }
.num-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.num-in input { border: 0 !important; box-shadow: none !important; height: 38px !important; text-align: center; flex: 1; width: 40px; padding: 0 4px !important; background: none !important; -moz-appearance: textfield; border-radius: 0 !important; }
.num-in input::-webkit-outer-spin-button, .num-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-in .nb { border: 0; background: var(--surface-2); width: 34px; cursor: pointer; font-size: 17px; color: var(--text-2); flex: none; }
.num-in .nb:hover { background: var(--surface-3); color: var(--text); }
.num-in em { font-style: normal; font-size: 12px; color: var(--muted); display: grid; place-items: center; padding: 0 8px; background: var(--surface-2); border-inline-start: 1px solid var(--line-2); }
.num-in.plain input { text-align: start; padding: 0 12px !important; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.qform { display: grid; gap: 16px; }
.sect { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 20px; box-shadow: var(--sh-1); }
.sect > legend { float: inline-start; width: 100%; display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.sect > legend .ic { color: var(--accent); }
.sect > legend + * { clear: both; }
.sect .form + .switch, .sect .form + .switches { margin-top: 14px; }
.type-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.tp { position: relative; }
.tp input { position: absolute; opacity: 0; }
.tp span { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; text-align: center; cursor: pointer; background: var(--surface-2); transition: all .2s; height: 100%; }
.tp span .ic { width: 22px; height: 22px; color: var(--t); }
.tp input:checked + span { border-color: var(--t); background: color-mix(in srgb, var(--t) 10%, var(--surface)); box-shadow: 0 0 0 1px var(--t); font-weight: 600; }
.tp input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-size: 13px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 20px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; transition: all .2s; }
.chip-btn small { color: var(--muted); }
.chip-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.switches { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.custom-lines { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.custom-lines h4 { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 10px; }
.cl-row { display: grid; grid-template-columns: 1fr 80px 110px 38px; gap: 8px; margin-bottom: 8px; }
.summary { position: sticky; top: calc(var(--top-h) + 16px); padding: 20px; }
.sum-lines { list-style: none; margin: 0; padding: 0; display: grid; max-height: 46vh; overflow-y: auto; }
.sum-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.sum-lines li span { display: grid; }
.sum-lines small { color: var(--muted); font-size: 11.5px; }
.sum-lines b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-tot { margin: 12px 0 0; display: grid; gap: 4px; }
.sum-tot > div { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); }
.sum-tot dd { margin: 0; font-variant-numeric: tabular-nums; }
.sum-tot .grand { margin-top: 8px; padding-top: 12px; border-top: 2px solid var(--text); font-size: 22px; font-weight: 600; color: var(--text); }

.sum-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.sum-actions .primary { order: -1; grid-column: 1 / -1; height: 46px; font-size: 15px; }
.fine { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.fine a { text-decoration: underline; }
.warn-box { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); padding: 10px 12px; border-radius: 10px; }

/* ---------- modal + toast ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(20,18,15,.45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s; }
.modal-wrap.in { opacity: 1; } .modal-wrap.out { opacity: 0; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); background: var(--surface); border-radius: 18px; box-shadow: var(--sh-3); display: flex; flex-direction: column; transform: translateY(10px) scale(.985); transition: transform .25s var(--ease); border: 1px solid var(--line); }
.modal.wide { width: min(820px, 100%); }
.modal-wrap.in .modal { transform: none; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; gap: 12px; }
.modal header h2 { font-size: 18px; }
[dir=ltr] .modal header h2 { font-family: var(--display); font-weight: 500; }
.modal-body { padding: 12px 20px 18px; overflow-y: auto; }
.modal footer { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sign-sum { display: flex; gap: 12px; margin-bottom: 12px; }
.sign-sum > div { flex: 1; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; display: grid; }
.sign-sum small { color: var(--muted); font-size: 12px; } .sign-sum b { font-size: 16px; }
.pad-wrap { position: relative; margin: 12px 0; }
.sigpad { width: 100%; height: 190px; border-radius: 14px; border: 1.5px dashed var(--line); background: #FFFEFB; touch-action: none; display: block; cursor: crosshair; }
.pad-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #A69E90; pointer-events: none; font-size: 14px; transition: opacity .2s; }
.pad-clear { position: absolute; top: 8px; inset-inline-end: 8px; }
.pad-wrap::after { content: ''; position: absolute; inset-inline: 30px; bottom: 44px; border-bottom: 1px solid #DDD5C6; pointer-events: none; }
#toasts { position: fixed; bottom: 24px; left: 0; right: 0; z-index: 300; display: grid; gap: 8px; justify-items: center; pointer-events: none; padding: 0 12px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; box-shadow: var(--sh-3); font-size: 14px; animation: toast .3s var(--ease); transition: opacity .3s, transform .3s; max-width: min(520px, 92vw); }
.toast .ic { color: var(--accent); }
.toast.warn .ic { color: #E8A06A; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast { from { opacity: 0; transform: translateY(12px); } }

/* ---------- crew / fleet / resale / settings ---------- */
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.worker { display: grid; gap: 4px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.worker:hover, .truck:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--sh-2); }
.w-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.w-top > div { display: grid; flex: 1; min-width: 0; }
.w-top small { color: var(--muted); font-size: 12.5px; }
.dot-st { font-size: 11.5px; padding: 2px 9px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dot-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dot-st.free { color: var(--pos); background: color-mix(in srgb, var(--pos) 10%, transparent); }
.dot-st.busy { color: var(--st-planned); background: color-mix(in srgb, var(--st-planned) 10%, transparent); }
.dot-st.off { color: var(--muted); background: var(--surface-3); }
.w-hours { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.w-hours b { color: var(--text); font-weight: 500; }
.w-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.w-days span { text-align: center; font-size: 11px; padding: 3px 0; border-radius: 6px; background: var(--surface-3); color: var(--muted); overflow: hidden; }
.w-days span.on { background: color-mix(in srgb, var(--pos) 14%, transparent); color: var(--pos); }
.w-days span.leave { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.w-days span.today { outline: 1.5px solid var(--accent); }
.tbl.avail td { padding: 8px 10px; } .tbl.avail th { padding: 10px; }
.av-t { width: 38px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; display: inline-grid; place-items: center; color: var(--muted); font-size: 11px; transition: all .2s; }
.av-t.on { background: color-mix(in srgb, var(--pos) 14%, var(--surface)); color: var(--pos); border-color: color-mix(in srgb, var(--pos) 30%, var(--line)); }
.av-t.leave { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.av-t .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.profile .ph { margin-bottom: 16px; max-width: 220px; }
.plain { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; font-size: 14px; }
.plain li { display: flex; gap: 10px; align-items: center; }
.plain .ic { color: var(--accent); }
.files li { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; }
.files span { color: var(--muted); font-size: 13px; }
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.truck { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s, box-shadow .2s; }
.truck .ph { border-radius: 0; border: 0; border-bottom: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); }
.t-body { padding: 16px 18px; display: grid; gap: 10px; }
.t-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.t-h b { font-size: 16px; }
.plate { font: 600 12px/1 ui-monospace, Menlo, monospace; background: #F2C230; color: #111; padding: 5px 8px; border-radius: 4px; letter-spacing: .06em; border-left: 8px solid #2B4C9B; direction: ltr; white-space: nowrap; }
.t-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.item { padding: 12px; display: grid; gap: 10px; align-content: start; }
.it-b { display: grid; gap: 6px; min-width: 0; }
.it-b > b { font-size: 14px; }
.it-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.it-st { height: 34px !important; font-size: 13px; width: 100%; background-position: calc(100% - 18px) 14px, calc(100% - 13px) 14px; }
[dir=rtl] .it-st { background-position: 13px 14px, 18px 14px; }
.ch-marktplaats { --t: #C9802E; } .ch-facebook { --t: #4F6A8A; } .ch-fleamarket { --t: #7F6280; } .ch-thrift { --t: #6B8A62; } .ch-stort { --t: #8A8378; }
.chip[class*=ch-] { color: color-mix(in srgb, var(--t) 85%, var(--text)); background: color-mix(in srgb, var(--t) 11%, transparent); border-color: color-mix(in srgb, var(--t) 25%, transparent); }
.tip { display: flex; gap: 12px; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.tip .ic { color: var(--accent-2); width: 22px; height: 22px; flex: none; }
[data-mode=dark] .tip .ic { color: var(--accent); }
.tip p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.presets-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.preset { border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 14px; display: grid; gap: 10px; cursor: pointer; text-align: start; transition: all .2s; }
.preset.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.preset b { font-size: 13.5px; font-weight: 500; }
.sw3 { display: flex; height: 42px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-2); }
.sw3 i { flex: 1; } .sw3 i:first-child { flex: 2; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 14px; }
.steps li > span { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-weight: 600; flex: none; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

/* ---------- printable documents ---------- */
body.bare { background: var(--surface-3); }
.bare-view { padding: 24px 16px 60px; }
.print-bar { max-width: 820px; margin: 0 auto 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.doc { max-width: 820px; margin: 0 auto; background: #FFFEFB; color: #1D1B17; padding: 56px 60px; border-radius: 6px; box-shadow: var(--sh-2); font-size: 13.5px; }
.doc-h { display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; padding-bottom: 26px; border-bottom: 1px solid #E7E1D6; }
.doc-h .logo-ph { background: #F6F1E7; color: #8A6A3A; border-color: #CDB48A; }
.doc-co { display: grid; text-align: end; font-size: 12.5px; color: #5C564B; gap: 1px; }
.doc-co b { color: #1D1B17; font-size: 15px; }
.doc-title { display: flex; align-items: center; gap: 14px; margin: 30px 0 22px; }
.doc-title h1 { font-size: 32px; font-weight: 600; letter-spacing: -.01em; color: #1D1B17; }
[dir=ltr] .doc-title h1 { font-family: var(--display); font-weight: 500; }
.demo-stamp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #A4473B; border: 1px solid #A4473B; padding: 2px 8px; border-radius: 4px; }
.doc-meta { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.doc-meta .to { display: grid; gap: 1px; }
.doc-meta small, .doc-job small { color: #8A8274; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.doc-meta .to b { font-size: 15px; }
.doc-meta dl { margin: 0; display: grid; gap: 4px; min-width: 240px; }
.doc-meta dl div { display: flex; justify-content: space-between; gap: 20px; }
.doc-meta dt { color: #8A8274; } .doc-meta dd { margin: 0; font-weight: 500; }
.doc-job { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px; background: #F7F3EC; border-radius: 10px; padding: 16px 18px; margin-bottom: 24px; }
.doc-job > div { display: grid; gap: 2px; } .doc-job .w2 { grid-column: span 3; }
.doc-job b { font-weight: 500; } .doc-job b small { text-transform: none; letter-spacing: 0; }
.doc-lines { width: 100%; border-collapse: collapse; }
.doc-lines th { text-align: start; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: #8A8274; font-weight: 500; padding: 8px 6px; border-bottom: 1.5px solid #1D1B17; }
.doc-lines th.num { text-align: end; }
.doc-lines td { padding: 9px 6px; border-bottom: 1px solid #EEE8DD; }
.doc-tot { display: flex; justify-content: flex-end; margin-top: 14px; }
.doc-tot dl { margin: 0; min-width: 300px; display: grid; gap: 5px; }
.doc-tot dl div { display: flex; justify-content: space-between; gap: 20px; }
.doc-tot dd { margin: 0; font-variant-numeric: tabular-nums; }
.doc-tot .grand { border-top: 2px solid #1D1B17; padding-top: 9px; margin-top: 4px; font-size: 18px; font-weight: 600; }
.doc-pay { margin-top: 28px; padding: 16px 18px; border: 1px solid #E7E1D6; border-radius: 10px; position: relative; }
.paid-stamp { position: absolute; top: -14px; inset-inline-end: 18px; background: #4E7A55; color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 6px; letter-spacing: .04em; transform: rotate(-3deg); }
.doc-terms { margin-top: 28px; }
.doc-terms h3 { font-size: 13px; margin-bottom: 6px; }
.doc-terms p { color: #5C564B; font-size: 12.5px; }
.doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; }
.doc-sign > div { display: grid; gap: 6px; align-content: end; }
.doc-sign small { color: #8A8274; font-size: 11.5px; }
.doc-sign img { height: 70px; width: auto; max-width: 240px; }
.sign-line { display: block; height: 60px; border-bottom: 1px solid #1D1B17; }
.doc-sign span:last-child { font-size: 12px; color: #5C564B; }
.doc-f { margin-top: 40px; padding-top: 14px; border-top: 1px solid #E7E1D6; display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; font-size: 11.5px; color: #8A8274; }

/* ---------- crew field app ---------- */
.field-page { max-width: 560px; margin: 0 auto; padding: 0 0 40px !important; }
body.bare:has(.field-page) { background: var(--bg); }
.f-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--brand); color: var(--brand-ink); }
.f-back { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--brand-ink) 10%, transparent); }
.f-brand { flex: 1; display: flex; justify-content: center; min-width: 0; }
.f-brand .logo-ph { height: 40px; width: 150px; }
.f-brand .logo-ph small { display: none; }
.f-top .seg { background: color-mix(in srgb, var(--brand-ink) 10%, transparent); border-color: transparent; }
.f-top .seg button { color: var(--brand-muted); } .f-top .seg .on { background: var(--brand-ink); color: var(--brand); }
.f-hero { background: var(--brand); color: var(--brand-ink); padding: 6px 20px 30px; border-radius: 0 0 24px 24px; display: grid; gap: 6px; }
.f-hero small { color: var(--brand-muted); }
.f-hero h1 { font-size: 26px; font-weight: 600; }
[dir=ltr] .f-hero h1 { font-family: var(--display); font-weight: 500; }
.f-hero p { margin: 4px 0 0; color: var(--accent); font-size: 14px; }
.f-who { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.f-who .ic { color: var(--accent); }
.f-who select { flex: 1; background-color: color-mix(in srgb, var(--brand-ink) 8%, transparent) !important; color: var(--brand-ink); border-color: var(--brand-line) !important; }
.f-who select option { color: #1D1B17; }
.f-list { display: grid; gap: 14px; padding: 16px; margin-top: -14px; }
.f-job { --t: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 14px; box-shadow: var(--sh-2); border-top: 4px solid var(--t); }
.f-job header { display: flex; gap: 12px; align-items: center; }
.f-job header time { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.f-job header > div { flex: 1; display: grid; min-width: 0; }
.f-job header small { color: var(--muted); font-size: 12.5px; }
.f-addr { display: grid; gap: 8px; }
.f-addr a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.f-addr a > .ic:first-child { color: var(--accent); }
.f-addr a > .ic:last-child { color: var(--muted); }
.f-addr span { flex: 1; display: grid; font-size: 14px; min-width: 0; }
.f-addr small { color: var(--muted); font-size: 11.5px; }
.f-addr em { font-style: normal; color: var(--muted); font-size: 12px; }
.f-acts { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; }
.f-acts .btn { height: 48px; padding: 0 8px; }
.done-tag { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--pos); font-weight: 500; font-size: 13.5px; }
.f-check summary { cursor: pointer; font-weight: 600; padding: 4px 0; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.f-check summary::-webkit-details-marker { display: none; }
.f-check summary::after { content: '+'; color: var(--muted); margin-inline-start: auto; }
.f-check[open] summary::after { content: '−'; }
.f-check .checklist { margin-top: 10px; }
.f-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.f-photos img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.f-foot { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.f-foot .btn { flex: 1; height: 46px; }
.f-note { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 12.5px; padding: 0 20px; }
.f-note .ic { width: 16px; height: 16px; margin-top: 2px; }

/* ---------- responsive ---------- */
.bottom { display: none; }
@media (max-width: 1280px) {
  .kpis.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .builder { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1100px) {
  :root { --side-w: 0px; }
  .side { width: 280px; transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--sh-3); visibility: hidden; }
  [dir=rtl] .side { transform: translateX(100%); }
  .nav-open .side { transform: none !important; visibility: visible; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(20,18,15,.4); z-index: 35; animation: fade .2s; }
  .only-m, .icon-btn.only-m { display: inline-grid; }
  .g-21, .g-12 { grid-template-columns: minmax(0, 1fr); }
  .planner { grid-template-columns: minmax(0, 1fr); }
  .tray { position: static; max-height: none; }
  .tray-list { display: flex; overflow-x: auto; min-height: 96px; }
  .tray-list .job-card { min-width: 200px; }
  .tray-list .empty { width: 100%; padding: 16px; }
  .builder { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@keyframes fade { from { opacity: 0; } }
@media (max-width: 767px) {
  body { font-size: 14.5px; }
  .top { padding: 0 12px; gap: 8px; height: 58px; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .search input { padding: 0 12px 0 38px; height: 38px; }
  [dir=rtl] .search input { padding: 0 38px 0 12px; }
  .search .s-ic { inset-inline-start: 12px; top: 10px; }
  .top-actions { gap: 6px; }
  .top-actions .seg.lang, .me { display: none; }
  .newmenu .btn span { display: none; }
  .newmenu .btn { width: 38px; padding: 0; }
  .view { padding: 18px 14px 96px; }
  .page-head { margin-bottom: 16px; align-items: flex-start; }
  .page-head h1, [dir=ltr] .page-head h1 { font-size: 23px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .page-actions .seg { width: 100%; }
  .page-actions .seg a, .page-actions .seg button { flex: 1; }
  .card { padding: 16px; }
  .kpis, .kpis.k3, .kpis.k6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-v { font-size: 22px; }
  .kpis.k6 .kpi-v { font-size: 19px; }
  .kpi-h { font-size: 12.5px; gap: 8px; }
  .kpi-ic { width: 28px; height: 28px; }
  .spark { width: 56px; }
  .kpis.k3 > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .g-2 { grid-template-columns: minmax(0, 1fr); }
  .donut { flex-direction: column; align-items: stretch; }
  .donut svg { align-self: center; }
  .week-strip .days { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .day-cell { min-width: 92px; scroll-snap-align: start; }
  .sched a { flex-wrap: wrap; gap: 8px 12px; }
  .s-meta { width: 100%; justify-content: space-between; padding-inline-start: 66px; }
  .bottom { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom a, .bottom button { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); padding: 4px 0; background: none; border: 0; cursor: pointer; min-width: 0; }
  .bottom span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bottom .ic { width: 22px; height: 22px; }
  .bottom a.on { color: var(--text); }
  .bottom a.on .ic { color: var(--accent); }
  .filters { flex-direction: column; align-items: stretch; }
  .fchips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .fchip { flex: none; }
  .frow { justify-content: stretch; }
  .frow select { flex: 1; }
  .inp-ic { max-width: none; min-width: 100%; }
  .tbl.cardify thead { display: none; }
  .tbl.cardify, .tbl.cardify tbody { display: block; }
  .tbl.cardify tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
  .tbl.cardify td { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; text-align: start; min-width: 0; white-space: normal; }
  .tbl.cardify td[data-l]::before { content: attr(data-l); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .tbl.cardify td.row-acts { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 6px; }
  .tbl.cardify td.row-acts > * + * { margin: 0; }
  .tbl.cardify td.row-acts:empty { display: none; }
  .stepper small { font-size: 10.5px; }
  .stepper span { width: 28px; height: 28px; font-size: 12px; }
  .stepper li::before { top: 13px; }
  .form.g2, .form.g3, .form.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form .span2 { grid-column: 1 / -1; }
  .type-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sect { padding: 16px; }
  .cl-row { grid-template-columns: 1fr 60px 84px 38px; }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .presets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(6, 82vw); scroll-snap-type: x mandatory; }
  .k-col { scroll-snap-align: start; }
  .modal-wrap { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .hide-s { display: none; }
  .crew-grid, .fleet-grid { grid-template-columns: minmax(0, 1fr); }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .addr { padding: 10px; gap: 10px; }
  .facts > div { flex-wrap: wrap; }
  .m-cell { min-height: 70px; padding: 4px; }
  .m-job { font-size: 0; padding: 0; height: 5px; border-radius: 3px; border: 0; background: var(--t); }
  .m-head span { padding: 8px 2px; text-align: center; font-size: 10.5px; }
  .doc { padding: 26px 18px; }
  .doc-h, .doc-meta { flex-direction: column; gap: 14px; }
  .doc-co { text-align: start; }
  .doc-job { grid-template-columns: 1fr 1fr; } .doc-job .w2 { grid-column: span 2; }
  .doc-sign { grid-template-columns: 1fr; gap: 20px; }
  .doc-tot dl, .doc-meta dl { min-width: 0; width: 100%; }
  .doc-lines { font-size: 12px; }
  .doc-lines td, .doc-lines th { padding: 7px 3px; }
  .doc-lines td.num { white-space: normal; }
  .cal-nav h2 { font-size: 16px; flex: 1; }
  .cal-nav .btn { display: none; }
  .hb { grid-template-columns: minmax(70px, 30%) 1fr auto; gap: 8px; font-size: 12.5px; }
  .sum-actions { grid-template-columns: 1fr; }
  .sign-sum { flex-direction: column; }
}
@media (max-width: 380px) {
  .kpi-v { font-size: 20px; }
  .f-acts { grid-template-columns: 1fr 1fr; } .f-acts > :nth-child(2) { grid-column: 1 / -1; order: -1; }
  .type-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .items { grid-template-columns: minmax(0, 1fr); }
  .form.g2, .form.g3, .form.g4 { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .side, .top, .bottom, .no-print, .page-actions, #toasts, .scrim { display: none !important; }
  .main { margin: 0 !important; }
  body, body.bare { background: #fff !important; color: #000; }
  .bare-view { padding: 0 !important; }
  .doc { box-shadow: none !important; max-width: none; padding: 0; border-radius: 0; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .view { padding: 0; max-width: none; }
  @page { size: A4; margin: 16mm; }
}
a[href^="tel:"]:not(.btn), bdi.ltr, .ltr { direction: ltr; unicode-bidi: isolate; }
