:root {
  --bg: #F3F6F4;
  --surface: #FFFFFF;
  --surface-2: #ECF1EE;
  --surface-3: #E2E9E5;
  --ink: #1D2320;
  --ink-2: #4F5953;
  --ink-3: #7E8983;
  --line: #DCE4DF;
  --line-2: #C3CFC8;
  --brand: #2B5748;
  --brand-hover: #234839;
  --brand-ink: #FFFFFF;
  --brand-soft: #DCEDE4;
  --brand-soft-ink: #24503F;
  --mint: #C6E8D6;
  --mint-deep: #9FD2B8;
  --leaf: #8FB3A5;
  --good: #2C7A4B; --good-soft: #E0F1E6;
  --warn: #9A5F0C; --warn-soft: #FBEED6;
  --bad: #AF3A2F;  --bad-soft: #F9E2DE;
  --info: #2D5F9C; --info-soft: #E2EBF7;
  --shadow: 0 1px 2px rgba(20,40,30,.06), 0 8px 24px rgba(20,40,30,.08);
  --shadow-lg: 0 24px 64px rgba(15,35,25,.22);
  --radius: 12px;
  --radius-sm: 8px;
  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Albert Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --svc-res: #008300; --svc-res-soft: #E1F2E1;
  --svc-deep: #2A78D6; --svc-deep-soft: #E3EEFB;
  --svc-com: #E34948; --svc-com-soft: #FCE6E6;
  --svc-win: #1BAF7A; --svc-win-soft: #DFF5EC;
  --svc-move: #4A3AA7; --svc-move-soft: #E9E6F7;
  --svc-post: #EDA100; --svc-post-soft: #FCF1D6;
  --svc-bnb: #E87BA4; --svc-bnb-soft: #FBE7EF;
  --chart-grid: #E5EBE7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1311; --surface: #171C19; --surface-2: #1D2420; --surface-3: #252E29;
    --ink: #E6ECE8; --ink-2: #A9B5AE; --ink-3: #7A867F; --line: #28312C; --line-2: #36413B;
    --brand: #86C4A9; --brand-hover: #9ED3BB; --brand-ink: #0D1A14; --brand-soft: #1B3129; --brand-soft-ink: #A7DCC4;
    --good: #6CC592; --good-soft: #17301F; --warn: #E0A64A; --warn-soft: #33260F; --bad: #EE8577; --bad-soft: #3A1B17; --info: #8AB4EC; --info-soft: #172639;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --svc-res: #008300; --svc-res-soft: #15291A; --svc-deep: #3987E5; --svc-deep-soft: #15243A;
    --svc-com: #E66767; --svc-com-soft: #3A1C1C; --svc-win: #199E70; --svc-win-soft: #122C23;
    --svc-move: #9085E9; --svc-move-soft: #231F3F; --svc-post: #C98500; --svc-post-soft: #33270C; --svc-bnb: #D55181; --svc-bnb-soft: #3A1A27;
    --chart-grid: #26302B;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1311; --surface: #171C19; --surface-2: #1D2420; --surface-3: #252E29;
  --ink: #E6ECE8; --ink-2: #A9B5AE; --ink-3: #7A867F; --line: #28312C; --line-2: #36413B;
  --brand: #86C4A9; --brand-hover: #9ED3BB; --brand-ink: #0D1A14; --brand-soft: #1B3129; --brand-soft-ink: #A7DCC4;
  --good: #6CC592; --good-soft: #17301F; --warn: #E0A64A; --warn-soft: #33260F; --bad: #EE8577; --bad-soft: #3A1B17; --info: #8AB4EC; --info-soft: #172639;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --svc-res: #008300; --svc-res-soft: #15291A; --svc-deep: #3987E5; --svc-deep-soft: #15243A;
  --svc-com: #E66767; --svc-com-soft: #3A1C1C; --svc-win: #199E70; --svc-win-soft: #122C23;
  --svc-move: #9085E9; --svc-move-soft: #231F3F; --svc-post: #C98500; --svc-post-soft: #33270C; --svc-bnb: #D55181; --svc-bnb-soft: #3A1A27;
  --chart-grid: #26302B;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
#root { min-height: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
#root { min-height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.caps { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -.01em; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide-mobile { }
@media (max-width: 760px) { .hide-mobile { display: none !important; } }
@media (min-width: 761px) { .only-mobile { display: none !important; } }

/* ---------- buttons ---------- */
a.btn { text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 13.5px; line-height: 1.1; background: var(--surface); color: var(--ink); transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.soft { background: var(--brand-soft); color: var(--brand-soft-ink); }
.btn.soft:hover { filter: brightness(.97); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.plain { background: transparent; color: var(--ink-2); padding: 6px 8px; }
.btn.plain:hover { background: var(--surface-2); color: var(--ink); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 13px 18px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: none; background: transparent; color: var(--ink-2); position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.badge-dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill svg { width: 12px; height: 12px; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand-soft-ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.svc { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.svc i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h3 { font-size: 15px; font-weight: 700; }
.section-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title { font-family: var(--f-display); font-weight: 500; font-size: 30px; letter-spacing: -.015em; line-height: 1.1; }
.page-sub { color: var(--ink-2); margin-top: 4px; }
.list { display: flex; flex-direction: column; }
.list > .li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.list > .li:first-child { border-top: none; }
.list > .li.click { cursor: pointer; }
.list > .li.click:hover { background: var(--surface-2); }
.empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 22px 16px; text-align: center; color: var(--ink-2); font-size: 13px; background: var(--surface); }
.note { border-radius: 10px; padding: 10px 12px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.note.info { background: var(--info-soft); color: var(--info); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note.good { background: var(--good-soft); color: var(--good); }
.note.brand { background: var(--brand-soft); color: var(--brand-soft-ink); }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; background: var(--brand-soft); color: var(--brand-soft-ink); }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 52px; height: 52px; font-size: 17px; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }

/* stat tiles */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat .label svg { width: 14px; height: 14px; color: var(--ink-3); }
.stat .value { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.stat .delta { font-size: 12px; font-weight: 600; }
.stat .delta.up { color: var(--good); }
.stat .delta.down { color: var(--bad); }
.stat .sub { font-size: 12px; color: var(--ink-3); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.input, .select, .textarea { width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; font-size: 14px; }
.textarea { min-height: 70px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.error { border-color: var(--bad); }
.err { font-size: 12px; color: var(--bad); font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; padding: 3px 0; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.toggle { position: relative; width: 40px; height: 23px; border-radius: 99px; background: var(--line-2); border: none; flex: none; transition: background .15s; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle.on { background: var(--brand); }
.toggle.on::after { left: 20px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.seg button svg { width: 14px; height: 14px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.stepper button { border: none; background: var(--surface-2); width: 36px; height: 38px; font-size: 18px; font-weight: 600; }
.stepper span { min-width: 42px; text-align: center; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip svg { width: 13px; height: 13px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
table.t tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; background: rgba(12, 28, 20, .42); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s ease; }
.dialog { background: var(--bg); border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100% - 20px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: rise .18s ease; }
.dialog.wide { max-width: 760px; }
.dialog-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.dialog-h h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; }
.dialog-b { padding: 4px 20px 20px; overflow-y: auto; }
.dialog-f { padding: 12px 20px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.drawer-overlay { justify-content: flex-end; padding: 0; align-items: stretch; }
.drawer { background: var(--bg); width: min(560px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .2s ease; }
@media (max-width: 760px) {
  .overlay:not(.drawer-overlay) { align-items: flex-end; padding: 0; }
  .dialog { border-radius: 18px 18px 0 0; max-height: 92%; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .drawer { width: 100%; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 120; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 11px 14px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow-lg); animation: rise .2s ease; pointer-events: auto; }
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast b { display: block; font-size: 12.5px; }
.toast span { opacity: .8; }

/* ---------- admin shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; overflow-y: auto; }
.brandmark { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.mono { width: 34px; height: 36px; background: var(--ink); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; flex: none; }
.brandmark b { font-family: var(--f-display); font-weight: 500; font-size: 18px; display: block; line-height: 1.1; }
.brandmark small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; border: none; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 13.5px; width: 100%; text-align: left; }
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.on { background: var(--brand-soft); color: var(--brand-soft-ink); }
.nav-item .count { margin-left: auto; background: var(--bad); color: #fff; font-size: 10.5px; border-radius: 99px; padding: 1px 7px; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 6px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 10px; padding: 10px 24px; border-bottom: 1px solid var(--line); }
.search-btn { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; color: var(--ink-3); font-size: 13px; text-align: left; }
.search-btn svg { width: 15px; height: 15px; }
.search-btn kbd { margin-left: auto; font-family: inherit; font-size: 11px; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; }
.content { padding: 24px 24px 60px; width: 100%; max-width: 1240px; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 18px 16px calc(90px + env(safe-area-inset-bottom, 0px)); }
  .topbar { padding: 10px 16px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; }
  .tabbar button { border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); padding: 4px 8px; position: relative; min-width: 56px; }
  .tabbar button svg { width: 21px; height: 21px; }
  .tabbar button.on { color: var(--brand); }
  .page-title { font-size: 25px; }
}
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-grid button { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.more-grid button svg { width: 20px; height: 20px; color: var(--brand); }

/* ---------- attention inbox ---------- */
.inbox-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); cursor: pointer; background: none; border-left: none; border-right: none; border-bottom: none; width: 100%; text-align: left; }
.inbox-item:first-child { border-top: none; }
.inbox-item:hover { background: var(--surface-2); }
.inbox-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.inbox-ico svg { width: 16px; height: 16px; }

/* ---------- job rows ---------- */
.job { display: flex; gap: 12px; align-items: stretch; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.job:first-child { border-top: none; }
.job:hover { background: var(--surface-2); }
.job .bar { width: 4px; border-radius: 2px; flex: none; }
.job .time { width: 52px; flex: none; font-weight: 700; font-size: 13px; }
.job .time small { display: block; font-weight: 500; color: var(--ink-3); font-size: 11.5px; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; padding-bottom: 4px; }
.cal-day { min-height: 92px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 5px; display: flex; flex-direction: column; gap: 3px; text-align: left; cursor: pointer; min-width: 0; }
.cal-day:hover { border-color: var(--line-2); }
.cal-day.out { opacity: .45; }
.cal-day.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-day.sel { background: var(--brand-soft); }
.cal-day.blocked { background: repeating-linear-gradient(135deg, var(--bad-soft) 0 6px, var(--surface) 6px 12px); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.cal-num { font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.cal-num svg { width: 12px; height: 12px; color: var(--bad); }
.cal-ev { font-size: 10.5px; font-weight: 600; border-radius: 5px; padding: 2px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); border-left: 3px solid; }
.cal-more { font-size: 10.5px; color: var(--ink-3); font-weight: 600; padding-left: 4px; }
@media (max-width: 760px) {
  .cal-day { min-height: 58px; padding: 4px 3px; }
  .cal-ev { font-size: 0; padding: 0; height: 6px; border-left: none; border-radius: 3px; }
  .cal-more { font-size: 9.5px; padding: 0; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend i.block { border-radius: 2px; width: 12px; background: repeating-linear-gradient(135deg, var(--bad-soft) 0 3px, var(--surface) 3px 6px); border: 1px solid var(--bad); }

/* dispatch board */
.board { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.board-inner { min-width: 860px; }
.board-row { display: grid; grid-template-columns: 170px 1fr; border-top: 1px solid var(--line); min-height: 64px; }
.board-row:first-child { border-top: none; }
.board-who { padding: 10px 12px; display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--line); position: sticky; left: 0; background: var(--surface); z-index: 2; }
.board-track { position: relative; }
.board-hours { display: grid; grid-template-columns: 170px 1fr; border-bottom: 1px solid var(--line); }
.board-hours .ticks { position: relative; height: 28px; }
.board-hours .ticks span { position: absolute; top: 7px; font-size: 11px; color: var(--ink-3); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.board-grid { position: absolute; inset: 0; pointer-events: none; }
.board-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--chart-grid); }
.board-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 1; }
.board-job { position: absolute; top: 8px; bottom: 8px; border-radius: 8px; padding: 5px 8px; font-size: 11.5px; overflow: hidden; cursor: pointer; border: none; text-align: left; color: var(--ink); border-left: 4px solid; }
.board-job b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-job span { color: var(--ink-2); white-space: nowrap; }
.board-off { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 8px, var(--surface-2) 8px 16px); display: grid; place-items: center; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--surface-2); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.lane-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; font-weight: 700; font-size: 13px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left; }
.kcard:hover { border-color: var(--line-2); box-shadow: var(--shadow); }

/* photos */
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.upload { display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 12px; color: var(--brand); font-weight: 600; font-size: 12.5px; cursor: pointer; background: var(--surface); }
.upload svg { width: 15px; height: 15px; }
.upload input { display: none; }

/* charts */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--f-body); }
.chart .val { fill: var(--ink-2); font-weight: 600; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 5; box-shadow: var(--shadow); }
.chart-tip b { display: block; }
.hbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; gap: 2px; }
.hbar > div { height: 100%; }

/* ---------- landing ---------- */
.landing { min-height: 100vh; min-height: 100dvh; background: radial-gradient(120% 90% at 50% 0%, #DDF3E7 0%, var(--mint) 45%, var(--mint-deep) 100%); color: #1D2320; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; gap: 22px; }
.landing-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.landing-logo { width: 212px; max-width: 70%; filter: drop-shadow(0 16px 30px rgba(30,70,50,.18)); }
.landing-tag { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; font-weight: 600; color: #34574A; text-align: center; }
.portal-btns { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.portal-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.72); color: #1D2320; text-align: left; backdrop-filter: blur(6px); transition: transform .15s, background .15s, box-shadow .15s; box-shadow: 0 2px 10px rgba(30,70,50,.08); }
.portal-btn:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(30,70,50,.16); }
.portal-btn .pi { width: 44px; height: 44px; border-radius: 12px; background: #1F3A30; color: #CFEBDD; display: grid; place-items: center; flex: none; }
.portal-btn .pi svg { width: 21px; height: 21px; }
.portal-btn b { display: block; font-size: 16px; }
.portal-btn small { color: #4E6158; font-size: 12.5px; }
.portal-btn .chev { margin-left: auto; color: #6D8378; }
.landing-foot { font-size: 11.5px; color: #3F5E51; text-align: center; max-width: 360px; }
.landing-foot button { background: none; border: none; color: #1F3A30; text-decoration: underline; font-weight: 600; padding: 0; font-size: inherit; }
.sparkle { width: 14px; height: 14px; color: var(--leaf); }

/* ---------- app (staff/client) shell ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; align-items: center; }
.app-head { width: 100%; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.app-head-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.app-body { width: 100%; max-width: 640px; padding: 18px 16px calc(96px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; }
.app-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; }
.app-tabs-in { display: flex; justify-content: space-around; width: 100%; max-width: 640px; }
.app-tabs button { border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 4px 6px; min-width: 60px; position: relative; }
.app-tabs button svg { width: 21px; height: 21px; }
.app-tabs button.on { color: var(--brand); }
.hello { font-family: var(--f-display); font-size: 28px; font-weight: 500; line-height: 1.1; }
.hero-card { border-radius: 18px; padding: 18px; background: var(--brand); color: var(--brand-ink); display: flex; flex-direction: column; gap: 10px; }
.hero-card .muted-on { opacity: .8; font-size: 13px; }
.hero-card .big { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.hero-card .btn { background: color-mix(in srgb, var(--brand-ink) 16%, transparent); color: var(--brand-ink); }
.timer { font-size: 34px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.wizard-steps { display: flex; gap: 4px; }
.wizard-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.wizard-steps i.on { background: var(--brand); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.opt:hover { border-color: var(--line-2); }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt .grow b { display: block; font-size: 14px; }
.opt .grow small { color: var(--ink-2); font-size: 12px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot { border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 4px; font-weight: 700; font-size: 13px; }
.slot.on { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.slot:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.date-pill { flex: none; width: 58px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.date-pill small { font-size: 10.5px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.date-pill b { font-size: 18px; }
.date-pill.on { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.date-pill.on small { color: inherit; opacity: .85; }
.date-pill:disabled { opacity: .35; cursor: not-allowed; background: repeating-linear-gradient(135deg, var(--surface) 0 5px, var(--surface-2) 5px 10px); }
.price-sum { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.price-sum .row { justify-content: space-between; }
.price-sum .total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.star-row { display: flex; gap: 2px; }
.star-row svg { width: 16px; height: 16px; }
.star-btn { background: none; border: none; padding: 2px; color: #D39A1C; }
.star-btn svg { width: 28px; height: 28px; }
.who-list { display: flex; flex-direction: column; gap: 8px; }
.who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.75); text-align: left; color: #1D2320; width: 100%; }
.who:hover { background: #fff; }
.who small { color: #4E6158; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.search-results { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.sr { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; border: none; background: none; width: 100%; text-align: left; }
.sr:hover, .sr.on { background: var(--surface-2); }
.sr svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.demo-flag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 2px 7px; }

/* status picker: text-sending buttons are marked */
.status-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 520px) { .status-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-label { overflow-wrap: anywhere; }
.sp-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 9px 8px; min-width: 0; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; }
.sp-btn:hover { border-color: var(--line-2); }
.sp-btn.texts { border-style: solid; border-color: color-mix(in srgb, var(--info) 45%, var(--line)); }
.sp-btn.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.sp-label { font-weight: 700; font-size: 13px; }
.sp-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; border-radius: 99px; padding: 2px 7px; background: var(--info-soft); color: var(--info); }
.sp-tag svg { width: 11px; height: 11px; }
.sp-tag.off { background: var(--surface-2); color: var(--ink-3); text-decoration: line-through; }
.sp-tag.none { background: transparent; color: var(--ink-3); padding-left: 0; font-weight: 600; }

/* ---------- v7: windows, surcharges, terms, gift cards, supplies ---------- */
.slot-grid.wide { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.dp-tag { margin-top: 3px; font-size: 9.5px; font-weight: 800; line-height: 1; padding: 2px 4px; border-radius: 4px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.dp-tag.up { background: var(--warn-soft, #fdf0d8); color: var(--warn); }
.dp-tag.save { background: var(--good-soft); color: var(--good); }
.dp-tag.static { margin-top: 0; }
.date-pill.on .dp-tag { background: rgba(255,255,255,.22); color: inherit; }
.link-btn { border: none; background: none; padding: 0; color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; font-weight: 700; }
.terms-text { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.55; max-height: 55vh; overflow-y: auto; }
.terms-text p { margin: 0; }
.gift-card { border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; color: #12352b; background: linear-gradient(135deg, #bfeedd 0%, #e4f7ef 55%, #fff 100%); box-shadow: 0 8px 24px rgba(18,53,43,.12); }
.seg.sm button { padding: 5px 10px; font-size: 12px; }
.seg button.on.lvl-low { background: var(--warn); color: #fff; }
.seg button.on.lvl-out { background: var(--bad); color: #fff; }
.seg button.on.lvl-ok { background: var(--good); color: #fff; }
.announce { border-left: 4px solid var(--brand); }
.claim-mode { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.claim-mode button { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; cursor: pointer; color: var(--ink); }
.claim-mode button svg { width: 20px; height: 20px; grid-row: span 2; color: var(--ink-3); margin-top: 1px; }
.claim-mode button span { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.claim-mode button.on { border-color: var(--brand); background: var(--brand-soft); }
.claim-mode button.on svg { color: var(--brand); }

/* v8: booking questions */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 6px; }
.thumb-x { position: relative; display: inline-block; }
.thumb-x button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 11px; border: none; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; }
.thumb-x button svg { width: 13px; height: 13px; }
.chip.sm { padding: 4px 9px; font-size: 11.5px; }
.toast.bad { background: var(--bad); color: #fff; }
/* live: sign-in */
.login-form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.landing .link-btn { color: #1F3A30; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
