/* =========================================================
   Work Order Manager: light, friendly, productivity-app look (shared with Scheduling Agent)
   Surfaces: white cards on a soft gray canvas
   Accent:   purple, used for actions and selection
   Shape:    rounded cards (16px), pill buttons and chips
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-2: #F9FAFC;
  --hover: #F1F2F7;
  --line: #E5E7EF;
  --line-2: #D6D9E3;
  --text: #1C1D24;
  --muted: #5D6170;
  --faint: #676B7B;
  --input-hover: #C3C7D4;
  --logo-a: #6F707C; --logo-b: #24252C;
  --switch-off: #D5D8E2;

  /* accent family: set from the chosen theme color by app.js */
  --accent: #6A58D6;
  --accent-ink: #4E3DB8;
  --accent-soft: #EFECFF;
  --accent-soft-2: #E4DFFF;
  --accent-line: #D7D0FB;
  --accent-wash: #FBFAFF;
  --on-accent: #FFFFFF;
  --glow1: #ECE8FF;
  --glow2: #E3F1FF;

  --ok: #1F8A55;   --ok-soft: #E4F5EC;  --ok-line: #CBEBD9;
  --warn: #A86200; --warn-soft: #FFF2DE; --warn-line: #F6DDB2; --warn-ink: #7A4A06;
  --bad: #C2384F;  --bad-soft: #FDE8EC; --bad-line: #F6C9D2;
  --under: #E4A23A;
  --off-bg: #F1F1F4; --win-bg: #EAF1FF; --win-line: #CFDDFA; --win-ink: #2C5DB0;
  --chip-bg: rgba(255,255,255,.85); --chip-line: rgba(0,0,0,.06);
  --slot-bg: rgba(255,255,255,.4); --slot-line: rgba(0,0,0,.16);
  --scrim: rgba(20, 22, 40, 0.28);
  --toast-bg: #22232B; --toast-fg: #FFFFFF;
  --no-bg: #3A3B45; --no-fg: #FFFFFF;

  /* shift and avatar colors */
  --p0-bg: #EFECFF; --p0-fg: #5442C2; --p0-bd: #D9D2FB;
  --p1-bg: #E3F5EA; --p1-fg: #24704A; --p1-bd: #C6E8D3;
  --p2-bg: #FFEEDD; --p2-fg: #9E5612; --p2-bd: #F8D9B6;
  --p3-bg: #E3EEFF; --p3-fg: #2B5BAE; --p3-bd: #C8DAF9;
  --p4-bg: #FFE7EF; --p4-fg: #AE3762; --p4-bd: #F7CADA;
  --p5-bg: #FFF6CF; --p5-fg: #806300; --p5-bd: #F0E19C;
  --p6-bg: #E2F5F7; --p6-fg: #1E6F7A; --p6-bd: #C2E6EA;
  --p7-bg: #F1F1F4; --p7-fg: #4A4D57; --p7-bd: #DDDEE4;

  --r-lg: 16px; --r: 12px; --r-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 22, 40, 0.05), 0 4px 14px rgba(20, 22, 40, 0.05);
  --shadow-lg: 0 10px 40px rgba(20, 22, 40, 0.16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --top: 60px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111217;
  --surface: #191A21;
  --surface-2: #1E1F27;
  --hover: #262732;
  --line: #2B2D38;
  --line-2: #393B48;
  --text: #ECEDF2;
  --muted: #A6A9B7;
  --faint: #878A99;
  --input-hover: #4A4D5C;
  --logo-a: #F0F0F4; --logo-b: #9A9AA6;
  --switch-off: #3A3C49;
  --ok: #5CCB8F;   --ok-soft: #173326;  --ok-line: #24503A;
  --warn: #F0B35A; --warn-soft: #362812; --warn-line: #5A4220; --warn-ink: #F6CF93;
  --bad: #F07A8E;  --bad-soft: #3A1A21; --bad-line: #5E2A35;
  --under: #E0A14A;
  --off-bg: #22232C; --win-bg: #1B2740; --win-line: #2A3B5E; --win-ink: #9DBDF5;
  --chip-bg: rgba(0,0,0,.22); --chip-line: rgba(255,255,255,.06);
  --slot-bg: rgba(0,0,0,.12); --slot-line: rgba(255,255,255,.18);
  --scrim: rgba(0, 0, 0, 0.5);
  --toast-bg: #ECEDF2; --toast-fg: #111217;
  --no-bg: #ECEDF2; --no-fg: #111217;
  --p0-bg: #262241; --p0-fg: #B9AEFF; --p0-bd: #393160;
  --p1-bg: #19302A; --p1-fg: #86D7AB; --p1-bd: #25473C;
  --p2-bg: #35261A; --p2-fg: #F4B27A; --p2-bd: #4F3824;
  --p3-bg: #1A2740; --p3-fg: #93B8F7; --p3-bd: #283B5F;
  --p4-bg: #36202A; --p4-fg: #F59EBD; --p4-bd: #522E3D;
  --p5-bg: #332D16; --p5-fg: #E9D27A; --p5-bd: #4C4322;
  --p6-bg: #172F33; --p6-fg: #85D3DD; --p6-bd: #23464C;
  --p7-bg: #24252D; --p7-fg: #B5B8C4; --p7-bd: #353744;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.55);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- buttons, inputs, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); font-weight: 600; font-size: 13.5px; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.btn-soft:hover { background: var(--accent-soft-2); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--bad); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; gap: 4px; }
.btn-icon { width: 36px; padding: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); width: 100%; min-width: 0;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:hover { border-color: var(--input-hover); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.num { width: 64px; text-align: center; }
.time { width: 112px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; border: 1px solid transparent; background: var(--hover); color: var(--muted); white-space: nowrap;
}
button.chip:hover { filter: brightness(.97); }
.chip-toggle { background: var(--surface); border-color: var(--line-2); color: var(--muted); }
.chip-toggle.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.chip .x { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-draft { background: var(--hover); color: var(--muted); }
.pill-live { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }

.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--switch-off); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--hover); border-radius: 999px; }
.seg button { height: 30px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20,22,40,.12); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.empty h3 { color: var(--text); font-size: 16px; }
.empty .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty .ico svg { width: 24px; height: 24px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.note svg { margin-top: 1px; color: var(--accent); }
.note-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.note-warn svg { color: var(--warn); }

/* ---------- app frame ---------- */
.frame { display: grid; grid-template-columns: 232px 1fr; grid-template-rows: var(--top) 1fr; height: 100vh; }
.topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 200px; text-decoration: none; color: inherit; }
.brand .mark { /* app icon: a soft tile with a fine gold rim */
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; position: relative;
  background: linear-gradient(155deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid rgba(201, 162, 79, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -6px 12px rgba(201, 162, 79, 0.07), 0 1px 2px rgba(20, 16, 40, 0.08), 0 4px 12px -4px rgba(201, 162, 79, 0.28);
}
.brand .mark svg { /* a hair of outline in the same gradient thickens the thin swashes so they stay crisp on ordinary screens */
  width: 31px; height: 31px; display: block; stroke: url(#od-grad); stroke-width: 2.6; stroke-linejoin: round; paint-order: stroke;
}
.co { display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--line); min-width: 0; }
.co img { height: 32px; max-width: 120px; object-fit: contain; display: block; }
.co span { font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.logo-box { width: 88px; height: 88px; border-radius: 16px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; background: var(--surface-2); overflow: hidden; flex: none; }
.logo-box img { max-width: 76px; max-height: 76px; object-fit: contain; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.swatch-custom { position: relative; overflow: hidden; background: conic-gradient(#e55, #eb5, #5c7, #5be, #85e, #e5b, #e55); }
.swatch-custom input { position: absolute; inset: -8px; opacity: 0; cursor: pointer; }
.phone-head .co-logo { height: 28px; max-width: 120px; object-fit: contain; display: block; margin-bottom: 6px; }
.matrix { border-collapse: separate; border-spacing: 4px; }
.matrix th { font-size: 11px; color: var(--faint); font-weight: 700; text-align: center; }
.matrix th.rowh { text-align: left; color: var(--text); font-size: 12.5px; padding-right: 6px; white-space: nowrap; }
.mx { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: transparent; }
.mx.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mx:disabled { opacity: .25; cursor: default; }
.mx svg { width: 15px; height: 15px; }
select.tsel { width: auto; min-width: 104px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.brand b { display: block; font-size: 15px; line-height: 1.1; }
.brand small { display: block; font-size: 11px; color: var(--faint); font-weight: 500; }
.top-spacer { flex: 1; }
.viewas { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.viewas select { width: auto; }

.sidenav { padding: 12px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.navi {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: none;
  font-weight: 600; font-size: 13.5px; color: var(--muted); text-align: left; width: 100%;
}
.navi:hover { background: var(--hover); color: var(--text); }
.navi.on { background: var(--accent-soft); color: var(--accent-ink); }
.navi .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; display: grid; place-items: center; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.nav-foot { margin-top: auto; padding: 12px 8px 4px; font-size: 11.5px; color: var(--faint); }

.main { overflow: auto; padding: 24px 28px 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-head p { color: var(--muted); }
.page-title { display: grid; gap: 2px; margin-right: auto; }

.weeknav { display: flex; align-items: center; gap: 4px; }
.weeknav .label { font-weight: 700; font-size: 15px; padding: 0 8px; white-space: nowrap; }

/* ---------- tables (spreadsheet feel) ---------- */
.table-card { overflow: hidden; }
.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl td { white-space: nowrap; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click:hover td { background: var(--surface-2); cursor: pointer; }
.tbl .name-cell { font-weight: 600; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; }
.who { display: flex; align-items: center; gap: 10px; }

/* ---------- settings ---------- */
.set-list { display: grid; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row .txt { flex: 1; display: grid; gap: 2px; }
.set-row .txt b { font-size: 14px; }
.set-row .txt span { color: var(--muted); font-size: 13px; }
.set-section { margin-bottom: 20px; }
.set-section > h2 { font-size: 15px; font-weight: 700; margin: 0 0 10px 4px; }
.slider-row { display: grid; grid-template-columns: 180px 1fr 28px; gap: 14px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.slider-row:first-child { border-top: 0; }
input[type=range] { accent-color: var(--accent); width: 100%; }

/* ---------- drawer, modal, popover ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; animation: fade .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); z-index: 41;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s ease-out;
}
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 17px; }
.drawer-head p { color: var(--muted); font-size: 13px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: grid; gap: 22px; align-content: start; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.sec h4 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.sec h4 .chip { text-transform: none; letter-spacing: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list { display: grid; gap: 6px; }
.li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.li .grow { flex: 1; min-width: 0; }
.li .grow b { display: block; font-size: 13.5px; }
.reasons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rs { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--hover); color: var(--muted); }
.rs.good { background: var(--ok-soft); color: var(--ok); }
.rs.bad { background: var(--bad-soft); color: var(--bad); }
.rank-num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }

.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal-head { padding: 20px 22px 8px; } .modal-head h2 { font-size: 18px; } .modal-head p { color: var(--muted); margin-top: 4px; }
.modal-body { padding: 12px 22px; display: grid; gap: 14px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.stat b { display: block; font-size: 20px; } .stat span { font-size: 12px; color: var(--muted); }

.pop { position: fixed; z-index: 45; width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px; display: grid; gap: 8px; animation: pop .12s ease-out; }
.pop-opt { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; border: 0; background: none; font-weight: 600; font-size: 13px; text-align: left; }
.pop-opt:hover, .pop-opt.on { background: var(--hover); }
.pop-opt i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.pop .times { display: flex; gap: 6px; align-items: center; padding: 0 4px; }
.pop .times .input { width: 100%; }
.pop label.chk { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); padding: 2px 6px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--toast-bg); color: var(--toast-fg); padding: 10px 16px; border-radius: 12px; font-weight: 500; font-size: 13.5px; box-shadow: var(--shadow-lg); z-index: 60; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.scrim, .drawer, .modal { animation-delay: var(--ad, 0ms); }
.still, .still .modal { animation: none !important; }
body:has(.drawer) #demo-bar, body:has(.modal) #demo-bar { display: none !important; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }

/* ---------- welcome + setup ---------- */
.onboard { min-height: 100vh; display: grid; place-items: start center; padding: 40px 16px 64px; background:
  radial-gradient(900px 500px at 10% -10%, var(--glow1), transparent 60%), radial-gradient(800px 500px at 110% 10%, var(--glow2), transparent 55%), var(--bg); }
.ob-card { width: min(780px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; }
.ob-head { padding: 28px 32px 8px; display: grid; gap: 6px; }
.ob-head .brand { margin-bottom: 14px; }
.ob-head h1 { font-size: 26px; letter-spacing: -0.02em; }
.ob-head p { color: var(--muted); font-size: 15px; }
.ob-body { padding: 18px 32px 8px; display: grid; gap: 16px; }
.ob-foot { padding: 18px 32px 28px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ob-foot .spacer { flex: 1; }
.steps { display: flex; gap: 6px; padding: 0 32px; }
.steps span { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.steps span.on { background: var(--accent); }
.step-label { padding: 18px 32px 0; font-size: 12px; font-weight: 700; color: var(--accent-ink); letter-spacing: .04em; text-transform: uppercase; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { text-align: left; padding: 18px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; gap: 6px; }
.choice:hover { border-color: var(--accent-line); background: var(--accent-wash); }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice b { font-size: 15px; } .choice span { color: var(--muted); font-size: 13px; }
.choice .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.q { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.q .txt { flex: 1; } .q .txt b { display: block; font-size: 14px; } .q .txt span { font-size: 12.5px; color: var(--muted); }
.yn { display: inline-flex; gap: 4px; }
.yn button { height: 32px; min-width: 52px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--muted); }
.yn button.on.yes { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.yn button.on.no { background: var(--no-bg); border-color: var(--no-bg); color: var(--no-fg); }
.edit-row { display: grid; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.edit-row .sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hrs { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.mode-tag { font-size: 13px; color: var(--muted); }

/* ---------- employee preview ---------- */
.emp-banner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 13px; grid-column: 1 / -1; }
.emp-stage { min-height: calc(100vh - var(--top)); display: grid; place-items: start center; padding: 28px 16px 48px; }
.phone { width: 390px; max-width: 100%; min-height: 720px; background: var(--surface); border-radius: 36px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; }
.phone-head { padding: 22px 20px 14px; border-bottom: 1px solid var(--line); }
.phone-head small { color: var(--faint); font-weight: 600; }
.phone-head h2 { font-size: 20px; }
.phone-body { flex: 1; padding: 16px; display: grid; gap: 12px; align-content: start; }
.phone-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--surface-2); }
.phone-tabs button { border: 0; background: none; padding: 10px 4px 12px; display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--faint); position: relative; }
.phone-tabs button.on { color: var(--accent); }
.phone-tabs .dot { position: absolute; top: 6px; left: 56%; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.my-shift { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid; }
.my-shift .d { width: 46px; text-align: center; } .my-shift .d b { display: block; font-size: 18px; line-height: 1.1; } .my-shift .d span { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.req-card { padding: 14px; border-radius: 16px; border: 1px solid var(--accent-line); background: var(--accent-wash); display: grid; gap: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .frame { grid-template-columns: 1fr; grid-template-rows: var(--top) auto 1fr; }
  .sidenav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .navi { width: auto; white-space: nowrap; height: 36px; }
  .nav-sep, .nav-foot { display: none; }
  .main { padding: 18px 14px 80px; }
  .brand small, .co img ~ span, .topbar.has-co .brand > span { display: none; }
  .co { padding-left: 10px; }
  .brand { min-width: 0; }
  .viewas span, .topbar .pill { display: none; }
  .brand b { font-size: 14px; }
  .topbar { gap: 10px; padding: 0 12px; }
  .grid2, .choice-grid, .stats { grid-template-columns: 1fr; }
  .ob-head, .ob-body, .ob-foot, .step-label { padding-left: 18px; padding-right: 18px; }
  .steps { padding: 0 18px; }
  .slider-row { grid-template-columns: 1fr 1fr 24px; }
}

/* ---------- plans and trial ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 12px; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--surface); display: grid; gap: 6px; align-content: start; }
.plan .price { font-size: 28px; font-weight: 700; letter-spacing: -.02em; } .plan .price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan p { margin: 0; color: var(--muted); font-size: 13px; }
.lock-wrap { position: fixed; inset: 0; z-index: 90; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; overflow: auto; }
.lock { width: min(560px, 100%); padding: 24px; } .lock h2 { margin: 0 0 6px; } .lock > p { margin: 0 0 4px; color: var(--muted); }
.plan { min-width: 0; overflow-wrap: anywhere; }

/* =========================================================
   Work Order Manager additions
   ========================================================= */
.wo-num { font-family: var(--mono); font-weight: 600; font-size: 12.5px; letter-spacing: -.01em; white-space: nowrap; }
.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.due { white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.overdue { color: var(--bad); font-weight: 700; }
.due.soon { color: var(--warn); font-weight: 600; }
.due.closed { color: var(--faint); }
.prio { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; }
.prio.rush { background: var(--bad-soft); color: var(--bad); }
.prio.high { background: var(--warn-soft); color: var(--warn-ink); }
.tag-sample { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--warn-soft); color: var(--warn-ink); padding: 2px 8px; border-radius: 999px; }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); cursor: pointer; }
.kpi:hover { border-color: var(--accent-line); }
.kpi b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi.bad b { color: var(--bad); } .kpi.warn b { color: var(--warn); }
.dash { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { padding: 16px 18px; }
.panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.panel h3 .spacer { flex: 1; }
.mini { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.mini:first-of-type { border-top: 0; }
.mini:hover .grow b { color: var(--accent); }
.mini .grow { flex: 1; min-width: 0; } .mini .grow b { font-size: 13px; display: block; } .mini .grow span { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbar { display: grid; grid-template-columns: 140px 1fr 36px; gap: 10px; align-items: center; font-size: 12.5px; padding: 5px 0; cursor: pointer; }
.sbar .track { height: 10px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.sbar .track i { display: block; height: 100%; border-radius: 999px; }
.sbar .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.feed { display: grid; gap: 0; }
.feed .ev { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.feed .ev:first-child { border-top: 0; }
.feed .ev b { color: var(--text); font-weight: 600; }
.feed .ev .when { margin-left: auto; white-space: nowrap; color: var(--faint); font-size: 11.5px; }

/* work order list */
.flt { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.flt .search { position: relative; flex: 1 1 260px; max-width: 420px; }
.flt .search svg { position: absolute; left: 12px; top: 10px; color: var(--faint); }
.flt .search .input { padding-left: 38px; }
.flt select.input { width: auto; max-width: 190px; }
.flt .spacer { flex: 1; }
kbd { font: 600 11px var(--mono); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th .arr { font-size: 10px; margin-left: 4px; color: var(--accent); }
.tbl td.cell-desc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tbl tr.sel td { background: var(--accent-wash); }
.tbl tr.late td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.tbl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.bulk { position: sticky; bottom: 12px; margin-top: 12px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 16px; background: var(--toast-bg); color: var(--toast-fg); box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.bulk .btn { background: transparent; color: inherit; border-color: rgba(255,255,255,.25); }
:root[data-theme="dark"] .bulk .btn { border-color: rgba(0,0,0,.25); }
.bulk select.input { width: auto; background: var(--surface); color: var(--text); }
.more-row { text-align: center; padding: 12px; }
.colpick { display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.colpick label { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.colpick label:hover { background: var(--hover); }

/* board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.bcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: grid; gap: 8px; min-height: 160px; align-content: start; }
.bcol.drop { border-color: var(--accent); background: var(--accent-wash); }
.bcol.nodrop { opacity: .55; }
.bcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-weight: 700; font-size: 13px; }
.bcol-head .n { margin-left: auto; color: var(--faint); font-weight: 600; }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; cursor: grab; text-align: left; box-shadow: 0 1px 2px rgba(20,22,40,.04); }
.bcard:hover { border-color: var(--accent-line); }
.bcard.dragging { opacity: .4; }
.bcard .top { display: flex; align-items: center; gap: 6px; }
.bcard .top .due { margin-left: auto; font-size: 12px; }
.bcard .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard .who-sm { font-size: 11.5px; color: var(--faint); }

/* order drawer */
.drawer.wide { width: min(780px, 100vw); }
.wo-title { display: grid; gap: 4px; flex: 1; min-width: 0; }
.wo-title .big-num { flex: none; white-space: nowrap; font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.wo-title .row { gap: 8px; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.status-row .lbl { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.btn.warnish { border-style: dashed; }
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.form-grid .c2 { grid-column: span 2; } .form-grid .c3 { grid-column: span 3; } .form-grid .c4 { grid-column: span 4; } .form-grid .c6 { grid-column: span 6; } .form-grid .c1 { grid-column: span 1; }
.field.err .input { border-color: var(--bad); }
.field .msg { font-size: 12px; color: var(--bad); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--faint); }
.field.locked .input { background: var(--surface-2); color: var(--muted); }
.ro-val { min-height: 38px; display: flex; align-items: center; padding: 0 2px; font-weight: 600; }
.items-tbl { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.items-tbl th { font-size: 12px; color: var(--muted); text-align: left; font-weight: 600; padding: 0 6px; }
.items-tbl td { padding: 0 4px; }
.items-tbl .input { height: 34px; }
.reason-box { padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); border: 1px solid var(--warn-line); display: grid; gap: 8px; }
.reason-box b { color: var(--warn-ink); font-size: 13px; }
.merge-note { padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.savebar { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.savebar .spacer { flex: 1; }
.savebar .chg { font-size: 12.5px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 -20px; padding: 0 20px; position: sticky; top: -18px; background: var(--surface); z-index: 2; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.tabs .n { font-size: 11px; color: var(--faint); margin-left: 4px; }

/* history */
.tl { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.tl-item:first-child { border-top: 0; }
.tl-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--muted); }
.tl-ico svg { width: 15px; height: 15px; }
.tl-ico.note { background: var(--accent-soft); color: var(--accent); }
.tl-ico.status { background: var(--ok-soft); color: var(--ok); }
.tl-ico.import { background: var(--win-bg); color: var(--win-ink); }
.tl-body { font-size: 13px; min-width: 0; }
.tl-body .meta { color: var(--faint); font-size: 12px; }
.tl-body .txt { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chg-list { display: grid; gap: 3px; margin-top: 4px; font-size: 12.5px; }
.chg-list .old { color: var(--faint); text-decoration: line-through; }
.chg-list .new { font-weight: 600; }
.chg-list .fld { color: var(--muted); font-weight: 600; }
.why { margin-top: 4px; font-size: 12.5px; color: var(--warn-ink); background: var(--warn-soft); padding: 4px 8px; border-radius: 8px; display: inline-block; }
.note-in { display: flex; gap: 8px; align-items: flex-start; }
.note-in textarea { min-height: 42px; }

/* files */
.files { display: grid; gap: 6px; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.file .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--hover); display: grid; place-items: center; color: var(--muted); flex: none; overflow: hidden; }
.file .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file .grow { flex: 1; min-width: 0; } .file .grow b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file .grow span { font-size: 12px; color: var(--muted); }
.file.old { opacity: .62; }
.revtag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); }
.file.old .revtag { background: var(--hover); color: var(--faint); }

/* import */
.imp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.imp-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.imp-steps span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--hover); color: var(--faint); }
.imp-steps span.on { background: var(--accent-soft); color: var(--accent-ink); }
.imp-steps span.done { color: var(--ok); background: var(--ok-soft); }
.drop { border: 2px dashed var(--line-2); border-radius: 20px; padding: 36px 20px; display: grid; justify-items: center; gap: 10px; text-align: center; background: var(--surface); }
.drop.over { border-color: var(--accent); background: var(--accent-wash); }
.drop .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.map-tbl td { vertical-align: top; }
.map-tbl .samp { color: var(--muted); font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-tbl select.input { min-width: 200px; }
.vgroup { display: grid; gap: 8px; }
.vrow { display: grid; grid-template-columns: minmax(140px, 1fr) 24px minmax(200px, 1.3fr) 60px; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.vrow .from { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .cnt { text-align: right; color: var(--faint); font-size: 12px; }
.vrow.attn { border-color: var(--warn-line); background: var(--warn-soft); }
.lvl { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.lvl.error { background: var(--bad-soft); color: var(--bad); } .lvl.warn { background: var(--warn-soft); color: var(--warn); } .lvl.info { background: var(--hover); color: var(--muted); }
.act { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.act.create { background: var(--ok-soft); color: var(--ok); } .act.update { background: var(--win-bg); color: var(--win-ink); } .act.skip { background: var(--hover); color: var(--faint); }
.issues { display: grid; gap: 3px; font-size: 12px; }
.fix { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.fix .input { height: 30px; font-size: 12.5px; width: 180px; }
.rpt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rpt .stat b { font-size: 26px; }
.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp td, .cmp th { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.cmp td.n { text-align: right; font-variant-numeric: tabular-nums; }

/* settings bits */
.st-row { display: grid; grid-template-columns: 28px minmax(140px, 1fr) 150px auto; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); }
.st-row:first-child { border-top: 0; }
.dotpick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; }
.flow-tbl { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.flow-tbl th { font-weight: 600; color: var(--muted); padding: 2px 4px; white-space: nowrap; }
.flow-tbl th.v { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; height: 110px; }
.fld-row { display: grid; grid-template-columns: minmax(140px, 1fr) 130px minmax(140px, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); }
.fld-row:first-child { border-top: 0; }
.numprev { font-family: var(--mono); font-size: 18px; font-weight: 700; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: inline-block; }

/* shop floor (phones and tablets) */
.floor { min-height: 100vh; background: var(--bg); }
.floor-wrap { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.floor-head { padding: 16px 16px 10px; display: flex; align-items: center; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.floor-head .co-logo { height: 30px; max-width: 110px; object-fit: contain; }
.floor-head h1 { font-size: 17px; }
.floor-head small { color: var(--faint); font-weight: 600; display: block; font-size: 12px; }
.floor-body { flex: 1; padding: 14px; display: grid; gap: 10px; align-content: start; }
.floor-tabs { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line); }
.floor-tabs button { border: 0; background: none; padding: 10px 4px 14px; display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--faint); }
.floor-tabs button.on { color: var(--accent); }
.fcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 6px; text-align: left; width: 100%; box-shadow: var(--shadow); }
.fcard.late { border-left: 4px solid var(--bad); }
.fcard .top { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.fcard, .cards > * { min-width: 0; }
.fcard .top .due { margin-left: auto; font-size: 13px; }
.fcard .big { font-size: 16px; font-weight: 700; }
.fcard .sub { color: var(--muted); font-size: 13px; }
.job { display: grid; gap: 12px; }
.job .hero { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 8px; }
.job .hero .big-num { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.job .kv2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.job .kv2 div span { display: block; font-size: 11.5px; color: var(--faint); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.job .kv2 div b { font-size: 15px; }
.bigbtns { display: grid; gap: 8px; }
.bigbtn { height: 56px; border-radius: 16px; font-size: 16px; font-weight: 700; border: 1px solid var(--line-2); background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 10px; }
.bigbtn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.bigbtn.hold { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); }
.bigbtn:disabled { opacity: .4; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-stage { min-height: calc(100vh - var(--top)); display: grid; place-items: start center; padding: 24px 16px 48px; background: var(--bg); grid-column: 1 / -1; }
.preview-phone { width: 400px; max-width: 100%; height: 780px; border-radius: 36px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: auto; background: var(--bg); }
.preview-phone .floor-wrap, .preview-phone .floor { min-height: 100%; }

/* travelers (print) */
#print-root { display: none; }
.trav { font: 12px/1.45 var(--font); color: #000; }
.trav-head { display: flex; align-items: flex-start; gap: 16px; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 12px; }
.trav-head .trav-co img { height: 36px; }
.trav-head .big-num { font: 700 28px var(--mono); }
.trav-head .qr { margin-left: auto; text-align: center; font-size: 9px; }
.trav-head .qr svg, .trav-head .qr img { width: 96px; height: 96px; display: block; }
.trav table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.trav th, .trav td { border: 1px solid #000; padding: 5px 7px; text-align: left; vertical-align: top; }
.trav th { background: #eee; font-weight: 700; width: 20%; }
.trav h3 { font-size: 13px; margin: 12px 0 6px; }
.trav .ops td { height: 30px; }
.trav-page { page-break-after: always; } .trav-page:last-child { page-break-after: auto; }
@media print {
  @page { size: letter portrait; margin: 12mm; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  body { background: #fff; }
}

@media (max-width: 1100px) { .dash { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
  .topbar .btn-sm { padding: 0 10px; }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kpi b { font-size: 24px; }
  .mini > span:last-child { min-width: 0 !important; }
  .mini .st { display: none; }
  .drawer-head .wo-title .row { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .c1, .form-grid .c2, .form-grid .c3, .form-grid .c4, .form-grid .c6 { grid-column: span 2; }
  .form-grid .half { grid-column: span 1; }
  .rpt { grid-template-columns: 1fr 1fr; }
  .vrow { grid-template-columns: 1fr; gap: 6px; } .vrow .arrow, .vrow .cnt { display: none; }
  .st-row { grid-template-columns: 28px 1fr; } .fld-row { grid-template-columns: 1fr 1fr; }
  .flt .search { max-width: none; }
  .tabs { top: -18px; }
}
.floor-head .mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.floor-head .mark svg { width: 26px; height: 26px; }
.cards { display: grid; gap: 10px; }
.input:disabled, select.input:disabled, textarea.input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.seg button:disabled { opacity: .55; cursor: not-allowed; }
.field > .seg { justify-self: start; }

/* ---------- AI helper ---------- */
.helper-fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; height: 48px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--text); color: var(--bg); font-weight: 600; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow-lg); }
.helper { position: fixed; right: 22px; bottom: 82px; width: 340px; z-index: 31; padding: 16px; display: grid; gap: 10px; }
.helper { max-height: min(640px, calc(100vh - 110px)); grid-template-rows: auto auto 1fr auto auto; width: 372px; }
.helper .chat { display: grid; gap: 8px; align-content: start; overflow-y: auto; min-height: 140px; max-height: 380px; padding: 2px 2px 4px; }
.helper .ex-btn { text-align: left; cursor: pointer; font: inherit; font-size: 13px; }
.helper .ex-btn:hover { border-color: var(--accent); color: var(--text); }
.helper .send-row { display: flex; gap: 8px; align-items: center; } .helper .send-row .input { flex: 1; min-width: 0; } .helper .send-row .btn { flex: none; }
.bub { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.bub.me { justify-self: end; background: var(--accent); color: var(--on-accent, #fff); border-bottom-right-radius: 5px; }
.bub.ai { justify-self: start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bub.typing { display: flex; gap: 4px; padding: 13px 14px; }
.bub.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.1s infinite ease-in-out; }
.bub.typing i:nth-child(2) { animation-delay: .15s; } .bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.prop { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface); display: grid; gap: 6px; font-size: 13px; }
.prop ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; } .prop li.bad { color: var(--muted); text-decoration: line-through; }
.helper .ex { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }


@media (max-width: 860px) { .helper { right: 12px; left: 12px; width: auto; } }
@media print { .helper-fab, .helper { display: none !important; } }
:root[data-theme="dark"] .brand .mark { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -8px 14px rgba(201, 162, 79, 0.08), 0 4px 14px -4px rgba(201, 162, 79, 0.3); }

/* ---------- setup: light or dark ---------- */
.mode-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-card { display: grid; gap: 8px; justify-items: start; padding: 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.mode-card:hover { border-color: var(--accent-line); }
.mode-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mode-card b { font-size: 13px; }
.mode-prev { width: 100%; height: 54px; border-radius: 9px; display: grid; grid-template-columns: 26% 1fr; grid-template-rows: 1fr 1fr; gap: 5px; padding: 7px; border: 1px solid rgba(0, 0, 0, 0.08); }
.mode-prev i { border-radius: 4px; display: block; }
.mode-prev i:first-child { grid-row: 1 / 3; }
.mode-light { background: #F6F7FB; } .mode-light i { background: #FFFFFF; box-shadow: 0 0 0 1px #E4E6EE; } .mode-light i:nth-child(2) { background: var(--accent); opacity: .85; box-shadow: none; }
.mode-dark { background: #111217; border-color: rgba(255, 255, 255, 0.06); } .mode-dark i { background: #1E2029; } .mode-dark i:nth-child(2) { background: var(--accent); opacity: .85; }
.mode-system { background: linear-gradient(90deg, #F6F7FB 0 50%, #111217 50% 100%); } .mode-system i { background: rgba(128, 132, 150, 0.35); } .mode-system i:nth-child(2) { background: var(--accent); opacity: .85; }
@media (max-width: 520px) { .mode-pick { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .mode-card { padding: 7px; } .mode-card b { font-size: 12px; } }
