/* Theme tokens mirror the Discount Media Walls CRM (shadcn/ui "neutral"). */
:root {
  --background: oklch(100% 0 0);
  --foreground: oklch(14.5% 0 0);
  --card: oklch(100% 0 0);
  --primary: oklch(20.5% 0 0);
  --primary-foreground: oklch(98.5% 0 0);
  --secondary: oklch(97% 0 0);
  --muted: oklch(97% 0 0);
  --muted-foreground: oklch(55.6% 0 0);
  --accent: oklch(97% 0 0);
  --destructive: oklch(57.7% .245 27.325);
  --border: oklch(92.2% 0 0);
  --input: oklch(92.2% 0 0);
  --ring: oklch(70.8% 0 0);
  --sidebar: oklch(98.5% 0 0);
  --sidebar-foreground: oklch(14.5% 0 0);
  --sidebar-accent: oklch(97% 0 0);
  --sidebar-border: oklch(92.2% 0 0);
  --radius: .625rem;
  --gold: #c9a06a;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  /* tinted status colours (tailwind 500 @ 15%) */
  --sky: oklch(68.5% .169 237.323); --emerald: oklch(69.6% .17 162.48); --amber: oklch(76.9% .188 70.08);
  --violet: oklch(60.6% .25 292.717); --indigo: oklch(58.5% .233 277.117); --teal: oklch(70.4% .14 182.503); --rose: oklch(64.5% .246 16.439);
  --tint-fg-sky: oklch(39.1% .09 240.876); --tint-fg-emerald: oklch(26.2% .051 172.552); --tint-fg-amber: oklch(27.9% .077 45.635);
  --tint-fg-violet: oklch(28.3% .141 291.089); --tint-fg-indigo: oklch(25.7% .09 281.288); --tint-fg-teal: oklch(27.7% .046 192.524); --tint-fg-rose: oklch(27.1% .105 12.094);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: oklch(14.5% 0 0); --foreground: oklch(98.5% 0 0); --card: oklch(20.5% 0 0);
    --primary: oklch(92.2% 0 0); --primary-foreground: oklch(20.5% 0 0); --secondary: oklch(26.9% 0 0);
    --muted: oklch(26.9% 0 0); --muted-foreground: oklch(70.8% 0 0); --accent: oklch(26.9% 0 0);
    --destructive: oklch(70.4% .191 22.216); --border: oklch(100% 0 0 / .1); --input: oklch(100% 0 0 / .15); --ring: oklch(55.6% 0 0);
    --sidebar: oklch(20.5% 0 0); --sidebar-foreground: oklch(98.5% 0 0); --sidebar-accent: oklch(26.9% 0 0); --sidebar-border: oklch(100% 0 0 / .1);
    --tint-fg-sky: oklch(95.1% .026 236.824); --tint-fg-emerald: oklch(95% .052 163.051); --tint-fg-amber: oklch(96.2% .059 95.617);
    --tint-fg-violet: oklch(94.3% .029 294.588); --tint-fg-indigo: oklch(93% .034 272.788); --tint-fg-teal: oklch(95.3% .051 180.801); --tint-fg-rose: oklch(94.1% .03 12.58);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: oklch(14.5% 0 0); --foreground: oklch(98.5% 0 0); --card: oklch(20.5% 0 0);
  --primary: oklch(92.2% 0 0); --primary-foreground: oklch(20.5% 0 0); --secondary: oklch(26.9% 0 0);
  --muted: oklch(26.9% 0 0); --muted-foreground: oklch(70.8% 0 0); --accent: oklch(26.9% 0 0);
  --destructive: oklch(70.4% .191 22.216); --border: oklch(100% 0 0 / .1); --input: oklch(100% 0 0 / .15); --ring: oklch(55.6% 0 0);
  --sidebar: oklch(20.5% 0 0); --sidebar-foreground: oklch(98.5% 0 0); --sidebar-accent: oklch(26.9% 0 0); --sidebar-border: oklch(100% 0 0 / .1);
  --tint-fg-sky: oklch(95.1% .026 236.824); --tint-fg-emerald: oklch(95% .052 163.051); --tint-fg-amber: oklch(96.2% .059 95.617);
  --tint-fg-violet: oklch(94.3% .029 294.588); --tint-fg-indigo: oklch(93% .034 272.788); --tint-fg-teal: oklch(95.3% .051 180.801); --tint-fg-rose: oklch(94.1% .03 12.58);
  color-scheme: dark;
}

* { box-sizing: border-box; border-color: var(--border); }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--sidebar); color: var(--foreground);
  font: 14px/1.5 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted-foreground); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.link { color: var(--foreground); font-weight: 500; text-decoration: none; text-underline-offset: 4px; }
.link:hover { text-decoration: underline; }
.ic { width: 16px; height: 16px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell: inset sidebar ---------- */
.app { display: flex; min-height: 100dvh; }
.sidebar {
  width: 16rem; flex: none; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
  background: var(--sidebar); color: var(--sidebar-foreground); transition: width .2s ease;
}
.sb-head { padding: 8px; border-bottom: 1px solid color-mix(in oklab, var(--sidebar-border) 80%, transparent); }
.sb-foot { padding: 8px; border-top: 1px solid color-mix(in oklab, var(--sidebar-border) 80%, transparent); position: relative; }
.sb-content { flex: 1; overflow: auto; display: flex; flex-direction: column; padding: 8px; }
.sb-group + .sb-group { margin-top: auto; }
.sb-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border-radius: 6px; border: 0;
  background: transparent; color: inherit; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-align: left;
}
.sb-btn:hover { background: var(--sidebar-accent); }
.sb-btn.active { background: var(--sidebar-accent); font-weight: 500; }
.sb-btn.lg { height: 48px; padding: 8px; }
.sb-btn .ic { width: 16px; height: 16px; }
.nav { display: grid; gap: 4px; }
.logo { width: 32px; height: 32px; flex: none; border-radius: 8px; background: #000; display: grid; place-items: center; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 8px; background: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 500; }
.sb-text { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.sb-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app.collapsed .sidebar { width: 3rem; }
.app.collapsed .sb-text, .app.collapsed .sb-label, .app.collapsed .sb-chev { display: none; }
.app.collapsed .sb-btn { justify-content: center; padding: 0; }
.app.collapsed .sb-btn.lg { padding: 8px 0; }

.inset {
  flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--background);
  margin: 8px 8px 8px 0; border-radius: 12px; box-shadow: var(--shadow-sm); min-height: calc(100dvh - 16px);
}
.topbar { display: flex; align-items: center; gap: 8px; height: 56px; flex: none; padding: 0 24px; border-bottom: 1px solid var(--border); }
.vsep { width: 1px; height: 16px; background: var(--border); margin-right: 8px; }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted-foreground); min-width: 0; flex-wrap: wrap; }
.crumbs a { text-decoration: none; transition: color .15s; }
.crumbs a:hover { color: var(--foreground); }
.crumbs .cur { color: var(--foreground); }
.crumbs .ic { width: 14px; height: 14px; }
.content { display: flex; flex-direction: column; gap: 24px; padding: 24px; width: 100%; }

.scrim { display: none; }
@media (max-width: 767px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; width: 18rem !important; box-shadow: var(--shadow-lg); }
  .app.mobile-open .sidebar { transform: none; }
  .app.mobile-open .scrim { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / .5); z-index: 55; }
  .app.collapsed .sb-text, .app.collapsed .sb-label { display: grid; }
  .inset { margin: 0; border-radius: 0; box-shadow: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px; gap: 16px; }
  .crumbs .hide-sm { display: none; }
}

/* ---------- menus ---------- */
.menu {
  position: absolute; z-index: 80; min-width: 14rem; background: var(--card); color: var(--foreground); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow-lg); padding: 4px; display: grid; gap: 1px;
}
.menu .mi { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; font-size: 14px; cursor: pointer; border: 0; background: none; color: inherit; font-family: inherit; text-align: left; text-decoration: none; }
.menu .mi:hover { background: var(--accent); }
.menu .mi.danger { color: var(--destructive); }
.menu .ml { padding: 6px 8px; font-size: 12px; color: var(--muted-foreground); }
.menu .sep { height: 1px; background: var(--border); margin: 4px -4px; }
.menu .mi .count { margin-left: auto; color: var(--muted-foreground); font-variant-numeric: tabular-nums; font-size: 12px; }
.menu .mi .chk { width: 16px; }

/* ---------- primitives ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.section { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 16px; display: grid; gap: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.spacer { flex: 1; }

.page-head { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) { .page-head { flex-direction: row; align-items: flex-start; justify-content: space-between; } }
.page-head p { margin-top: 4px; color: var(--muted-foreground); font-size: 14px; }

/* detail layout (matches DMW detail-page-layout) */
.detail { max-width: 72rem; width: 100%; margin: 0 auto; display: grid; gap: 24px; }
.detail-cols { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) { .detail-cols { grid-template-columns: minmax(0, 1fr) 20rem; } }
.detail-cols > div, .detail-cols > aside { display: grid; gap: 16px; align-content: start; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; flex: none;
  border-radius: 8px; border: 1px solid var(--border); background: var(--background); color: var(--foreground); box-shadow: var(--shadow-xs);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent); }
.btn.primary { background: var(--primary); color: var(--primary-foreground); border-color: transparent; box-shadow: none; }
.btn.primary:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn .ic { width: 16px; height: 16px; }
.btn.outline { background: var(--background); color: var(--foreground); border-color: var(--border); box-shadow: var(--shadow-xs); }
:root[data-theme="dark"] .btn:not(.primary):not(.ghost):not(.secondary):not(.destructive) { background: color-mix(in oklab, var(--input) 30%, transparent); border-color: var(--input); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.primary):not(.ghost):not(.secondary):not(.destructive) { background: color-mix(in oklab, var(--input) 30%, transparent); border-color: var(--input); } }
.btn.outline:hover, .btn.ghost:hover { background: var(--accent); }
.btn.secondary { background: var(--secondary); color: var(--foreground); border-color: transparent; box-shadow: none; }
.btn.secondary:hover { background: color-mix(in oklab, var(--secondary) 80%, var(--foreground) 5%); }
.btn.ghost { background: transparent; color: var(--foreground); border-color: transparent; box-shadow: none; }
.btn.destructive { background: var(--destructive); color: #fff; border-color: transparent; }
.btn.danger { background: transparent; color: var(--destructive); border-color: var(--border); }
.btn.danger:hover { background: color-mix(in oklab, var(--destructive) 10%, transparent); }
.btn.sm { height: 32px; padding: 0 12px; gap: 6px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.xs.icon { width: 28px; height: 28px; padding: 0; }

label.field { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
label.field > span, .field > span { font-size: 14px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--input);
  background: transparent; color: var(--foreground); font: inherit; font-size: 14px; outline: none; box-shadow: var(--shadow-xs);
  transition: box-shadow .15s, border-color .15s;
}
:root[data-theme="dark"] .input { background: color-mix(in oklab, var(--input) 30%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .input { background: color-mix(in oklab, var(--input) 30%, transparent); } }
select.input { padding-right: 28px; }
select.input option { background: var(--card); color: var(--foreground); }
textarea.input { height: auto; min-height: 80px; padding: 8px 12px; resize: vertical; }
.input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
.input::placeholder { color: var(--muted-foreground); }
.input.lg { height: 48px; font-size: 16px; }
.input.big { height: 48px; font-size: 18px; font-weight: 500; }
.search-wrap { position: relative; }
.search-wrap > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.search-wrap .input { padding-left: 36px; }
@media (max-width: 767px) { .input, select.input, textarea.input { font-size: 16px; } }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--muted); color: var(--muted-foreground); border: 1px solid transparent; }
.badge.outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.t-sky { background: color-mix(in oklab, var(--sky) 15%, transparent); color: var(--tint-fg-sky); }
.t-emerald { background: color-mix(in oklab, var(--emerald) 15%, transparent); color: var(--tint-fg-emerald); }
.t-amber { background: color-mix(in oklab, var(--amber) 15%, transparent); color: var(--tint-fg-amber); }
.t-violet { background: color-mix(in oklab, var(--violet) 15%, transparent); color: var(--tint-fg-violet); }
.t-indigo { background: color-mix(in oklab, var(--indigo) 15%, transparent); color: var(--tint-fg-indigo); }
.t-teal { background: color-mix(in oklab, var(--teal) 15%, transparent); color: var(--tint-fg-teal); }
.t-rose { background: color-mix(in oklab, var(--rose) 15%, transparent); color: var(--tint-fg-rose); }
.t-destructive { background: color-mix(in oklab, var(--destructive) 15%, transparent); color: var(--destructive); }
.t-muted { background: var(--muted); color: var(--muted-foreground); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* toolbar above list tables */
.toolbar { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .toolbar { flex-direction: row; align-items: center; flex-wrap: wrap; } }
.toolbar .search-wrap { flex: 1; min-width: 16rem; max-width: 28rem; }
.toolbar .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-btn { position: relative; }
.filter-btn .btn { font-weight: 400; }
.filter-btn .btn .val { font-weight: 500; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--background); font: inherit; font-size: 13px; font-weight: 500; color: var(--foreground); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-xs); }
.chip:hover { background: var(--accent); }
.chip.on { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.chip .n { color: var(--muted-foreground); font-weight: 400; margin-left: 4px; }
.chip.on .n { color: inherit; opacity: .7; }

.seg { display: inline-flex; background: var(--muted); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; }
.seg button.on { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }
.navgroup { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--border); border-radius: 8px; }
.navgroup button { height: 34px; width: 34px; border: 0; background: transparent; color: var(--foreground); display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.navgroup button:hover { background: var(--accent); }
.navgroup .lbl { min-width: 11rem; padding: 0 8px; text-align: center; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }

.table-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; height: 40px; padding: 0 12px; font-weight: 500; color: var(--foreground); white-space: nowrap; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover td { background: color-mix(in oklab, var(--muted) 50%, transparent); }
.tbl tr.click { cursor: pointer; }
.tbl .empty-row td { height: 96px; text-align: center; color: var(--muted-foreground); }
.pager { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border); padding: 12px 16px; font-size: 14px; color: var(--muted-foreground); }
@media (min-width: 640px) { .pager { flex-direction: row; align-items: center; justify-content: space-between; } }

.kpi { padding: 16px 20px; }
.kpi .label { font-size: 14px; color: var(--muted-foreground); }
.kpi .value { font-size: 24px; font-weight: 600; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.bar { height: 8px; background: var(--muted); border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; background: var(--primary); border-radius: 4px; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted-foreground); font-size: 14px; }
.empty .ic { width: 32px; height: 32px; opacity: .5; margin-bottom: 8px; }

.dl { display: grid; gap: 10px; font-size: 14px; margin: 0; }
.dl > div { display: grid; gap: 2px; }
.dl dt { color: var(--muted-foreground); font-size: 13px; }
.dl dd { margin: 0; }

/* ---------- calendar (DMW style) ---------- */
.cal-toolbar { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .cal-toolbar { flex-direction: row; align-items: center; justify-content: space-between; } }
.wk { max-height: min(70vh, 720px); overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.wk-inner { min-width: calc(3.5rem + 49rem); }
.wk-head { position: sticky; top: 0; z-index: 30; display: flex; border-bottom: 1px solid var(--border); background: var(--background); }
.wk-gutter { width: 3.5rem; flex: none; border-right: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 20%, var(--background)); position: relative; }
.wk-days { display: flex; flex: 1; min-width: 0; }
.wk-dh { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-right: 1px solid var(--border); }
.wk-dh:last-child { border-right: 0; }
.wk-dh.today { background: color-mix(in oklab, var(--primary) 5%, var(--background)); }
.wk-dh .dn { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
.wk-dh .dd { margin-top: 2px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.wk-dh.today .dn, .wk-dh.today .dd { color: var(--foreground); font-weight: 700; }
.wk-dh .cnt { margin-top: 2px; border-radius: 6px; background: var(--muted); padding: 1px 6px; font-size: 11px; font-weight: 500; color: var(--muted-foreground); }
.wk-body { display: flex; }
.wk-col { position: relative; flex: 1; min-width: 0; border-right: 1px solid var(--border); background: var(--background); }
.wk-col:last-child { border-right: 0; }
.wk-col.today { background: color-mix(in oklab, var(--primary) 3%, var(--background)); }
.wk-line { position: absolute; left: 0; right: 0; border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent); pointer-events: none; }
.wk-slot { position: absolute; left: 0; right: 0; cursor: pointer; }
.wk-slot:hover { background: color-mix(in oklab, var(--muted) 40%, transparent); }
.wk-time { position: absolute; right: 6px; font-size: 11px; color: var(--muted-foreground); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.wk-now { position: absolute; left: 0; right: 0; z-index: 20; border-top: 2px solid var(--primary); pointer-events: none; }
.wk-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.ev { position: absolute; overflow: hidden; border-radius: 6px; border: 1px solid; text-align: left; box-shadow: var(--shadow-sm); padding: 4px 6px; font-size: 12px; line-height: 1.25; cursor: pointer; z-index: 10; }
.ev b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev span { display: block; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev:hover { box-shadow: var(--shadow-lg); z-index: 15; }
.ev.faded { opacity: .5; text-decoration: line-through; }
.e-violet { background: color-mix(in oklab, var(--violet) 15%, var(--background)); color: var(--tint-fg-violet); border-color: color-mix(in oklab, var(--violet) 30%, transparent); }
.e-indigo { background: color-mix(in oklab, var(--indigo) 15%, var(--background)); color: var(--tint-fg-indigo); border-color: color-mix(in oklab, var(--indigo) 30%, transparent); }
.e-amber { background: color-mix(in oklab, var(--amber) 15%, var(--background)); color: var(--tint-fg-amber); border-color: color-mix(in oklab, var(--amber) 30%, transparent); }
.e-teal { background: color-mix(in oklab, var(--teal) 15%, var(--background)); color: var(--tint-fg-teal); border-color: color-mix(in oklab, var(--teal) 30%, transparent); }
.e-rose { background: color-mix(in oklab, var(--rose) 15%, var(--background)); color: var(--tint-fg-rose); border-color: color-mix(in oklab, var(--rose) 30%, transparent); }
.e-sky { background: color-mix(in oklab, var(--sky) 15%, var(--background)); color: var(--tint-fg-sky); border-color: color-mix(in oklab, var(--sky) 30%, transparent); }
.e-muted { background: var(--muted); color: var(--foreground); border-color: var(--border); }

.mo { overflow: hidden; border-radius: 8px; border: 1px solid var(--border); background: var(--border); }
.mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.mo-grid > * { min-width: 0; }
.mo-dn { background: color-mix(in oklab, var(--muted) 40%, var(--background)); padding: 8px 4px; text-align: center; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
.mo-cell { min-height: 104px; background: var(--background); padding: 6px; text-align: left; cursor: pointer; display: grid; align-content: start; gap: 4px; }
.mo-cell:hover { background: color-mix(in oklab, var(--muted) 40%, var(--background)); }
.mo-cell.out { background: color-mix(in oklab, var(--muted) 15%, var(--background)); color: var(--muted-foreground); }
.mo-cell.today { background: color-mix(in oklab, var(--primary) 5%, var(--background)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--primary) 25%, transparent); }
.mo-day { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.mo-day .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 500; }
.mo-cell.today .mo-day .n { background: var(--primary); color: var(--primary-foreground); }
.mo-ev { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; border: 1px solid; padding: 1px 4px; font-size: 11px; line-height: 1.3; box-shadow: var(--shadow-xs); }

/* ---------- product cards ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.pcard { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; box-shadow: var(--shadow-xs); transition: box-shadow .15s, border-color .15s; }
.pcard:hover { box-shadow: var(--shadow-sm); }
.pcard.in { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.pimg { aspect-ratio: 1; background: #fff; display: grid; place-items: center; overflow: hidden; position: relative; }
.pimg img { width: 100%; height: 100%; object-fit: contain; }
.pimg .ph { color: #b5b5b5; width: 42%; height: 42%; }
.pimg .ph .ic, .pimg .ph svg { width: 100%; height: 100%; }
.pimg > svg { width: 100%; height: 100%; }
.pimg .tag { position: absolute; left: 8px; top: 8px; font-size: 10.5px; font-weight: 500; background: rgb(255 255 255 / .92); color: #737373; padding: 1px 6px; border-radius: 6px; border: 1px solid #e5e5e5; }
.pbody { padding: 10px 12px 12px; display: grid; gap: 4px; flex: 1; }
.pname { font-size: 13px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcode { font-size: 11.5px; color: var(--muted-foreground); font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pprice { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.pqty { position: absolute; right: 8px; top: 8px; background: var(--primary); color: var(--primary-foreground); border-radius: 999px; min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; font-weight: 600; font-size: 12px; }

.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--card); text-align: left; padding: 0; font: inherit; color: inherit; box-shadow: var(--shadow-xs); }
.swatch.on { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.swatch .sw { aspect-ratio: 4/3; display: block; }
.swatch .sw svg { display: block; width: 100%; height: 100%; }
.swatch .meta { display: block; padding: 8px 10px; font-size: 12px; line-height: 1.35; }
.swatch .meta b { display: block; font-weight: 500; font-size: 13px; }

/* ---------- wizard ---------- */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
@media (max-width: 1060px) { .wizard { grid-template-columns: minmax(0, 1fr); } }
.steps { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { flex: none; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--background); cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--muted); font-size: 12px; font-weight: 600; }
.step.on { color: var(--foreground); border-color: var(--foreground); }
.step.on .n, .step.done .n { background: var(--primary); color: var(--primary-foreground); }
.side-sticky { position: sticky; top: 16px; display: grid; gap: 16px; }
.wiz-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

.room-svg { width: 100%; height: auto; display: block; background: var(--muted); }
.wall-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .wall-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wall-btn { border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: 10px; text-align: left; font: inherit; color: inherit; cursor: pointer; display: grid; gap: 6px; box-shadow: var(--shadow-xs); }
.wall-btn.on { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.wall-btn .sw { height: 46px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); background: var(--muted); }
.wall-btn .sw svg { width: 100%; height: 100%; display: block; }

.lines { display: grid; }
.line { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.line:last-child { border-bottom: 0; }
.line .th { width: 44px; height: 44px; border-radius: 8px; background: #fff; border: 1px solid var(--border); overflow: hidden; display: grid; place-items: center; }
.line .th img { width: 100%; height: 100%; object-fit: contain; }
.line .th .ic { width: 60%; height: 60%; color: #b5b5b5; }
.line .th.swt svg { width: 100%; height: 100%; }
.line .nm { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--input); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-xs); }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; color: var(--foreground); font-size: 16px; cursor: pointer; }
.qty button:hover { background: var(--accent); }
.qty input { width: 44px; height: 32px; border: 0; border-left: 1px solid var(--input); border-right: 1px solid var(--input); text-align: center; background: transparent; color: var(--foreground); font: inherit; font-weight: 500; }
.totals { display: grid; gap: 6px; font-size: 14px; }
.totals .t { display: flex; justify-content: space-between; gap: 12px; }
.totals .grand { font-size: 18px; font-weight: 600; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }

/* ---------- modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgb(0 0 0 / .5); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal { background: var(--background); border: 1px solid var(--border); border-radius: 12px; width: min(32rem, 100%); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(60rem, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px 8px; position: sticky; top: 0; background: var(--background); z-index: 1; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 8px 24px 20px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 20px; position: sticky; bottom: 0; background: var(--background); flex-wrap: wrap; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { background: var(--card); color: var(--foreground); border: 1px solid var(--border); padding: 12px 16px; border-radius: 8px; font-size: 14px; box-shadow: var(--shadow-lg); animation: fade .15s; min-width: 16rem; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.activity { display: grid; gap: 14px; }
.activity .a { display: grid; grid-template-columns: 10px 1fr; gap: 10px; font-size: 13.5px; }
.activity .a .dot { margin-top: 7px; background: var(--muted-foreground); opacity: .5; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--muted); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph button { position: absolute; top: 6px; right: 6px; }

.sig { border: 1px dashed var(--border); border-radius: 8px; background: #fff; touch-action: none; width: 100%; height: 160px; display: block; }
.alert { border-radius: 8px; border: 1px solid; padding: 12px 16px; font-size: 14px; }
.alert.amber { border-color: color-mix(in oklab, var(--amber) 40%, transparent); background: color-mix(in oklab, var(--amber) 10%, transparent); color: var(--tint-fg-amber); }
.alert.primary { border-color: color-mix(in oklab, var(--primary) 30%, transparent); background: color-mix(in oklab, var(--primary) 5%, transparent); }

/* ---------- customer presentation / print ---------- */
.present { max-width: 980px; width: 100%; margin: 0 auto; }
.present .hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 800px) { .present .hero { grid-template-columns: 1fr; } }
.present .group { margin-top: 28px; }
.present .group > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); margin-bottom: 10px; font-weight: 500; }
.present .items { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.present .item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-xs); }
.present .item .pimg { aspect-ratio: 4/3; }
.present .item .b { padding: 10px 12px; font-size: 13.5px; display: grid; gap: 3px; }

@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  body, .inset { background: #fff; color: #000; margin: 0; box-shadow: none; }
  .content { padding: 0; }
  .card, .present .item { box-shadow: none; break-inside: avoid; }
}

/* ---------- bathroom survey ---------- */
.phases { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.phases::-webkit-scrollbar { display: none; }
.phase { flex: none; display: grid; gap: 6px; }
.phase-name { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); padding-left: 2px; }
.phase-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.qgrid { display: grid; gap: 20px; }
.q { display: grid; gap: 8px; }
.q > .ql { font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.q > .ql .hint { font-weight: 400; font-size: 13px; color: var(--muted-foreground); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--background); color: var(--foreground); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: var(--shadow-xs); display: inline-flex; align-items: center; gap: 8px; }
.opt:hover { background: var(--accent); }
.opt.on { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.opt .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .15); flex: none; }
.opt.flag.on { background: color-mix(in oklab, var(--amber) 22%, var(--background)); color: var(--tint-fg-amber); border-color: color-mix(in oklab, var(--amber) 50%, transparent); }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-title h2 { display: flex; align-items: center; gap: 8px; }
.sec-title .ic { width: 18px; height: 18px; color: var(--muted-foreground); }
.inline-num { display: flex; align-items: center; gap: 8px; }
.inline-num .input { width: 130px; }

.plan { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.checks { display: grid; gap: 8px; }
.chk-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; font-size: 13.5px; line-height: 1.4; align-items: start; }
.chk-row .ic { width: 18px; height: 18px; margin-top: 1px; }
.chk-row.warn .ic { color: oklch(66.6% .179 58.318); }
.chk-row.stop .ic { color: var(--destructive); }
.chk-row.info .ic { color: var(--sky); }
.chk-row.ok .ic { color: var(--emerald); }

.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.zone { border: 1px solid var(--border); border-radius: 10px; background: var(--card); padding: 10px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; display: grid; gap: 4px; box-shadow: var(--shadow-xs); }
.zone:hover { background: var(--accent); }
.zone.on { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.zone .zt { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.zone .zs { font-size: 12px; color: var(--muted-foreground); }
.need { display: flex; flex-wrap: wrap; gap: 6px; }
.need button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--border); background: transparent; color: var(--muted-foreground); font: inherit; font-size: 13px; cursor: pointer; }
.need button.have { border-style: solid; color: var(--tint-fg-emerald); background: color-mix(in oklab, var(--emerald) 12%, transparent); border-color: color-mix(in oklab, var(--emerald) 35%, transparent); }
.need button .ic { width: 14px; height: 14px; }
.pcard.nofit { opacity: .55; }
.pcard .fit { position: absolute; left: 8px; bottom: 8px; }
.work { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.work:last-child { border-bottom: 0; }
.work input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.why { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.budget { display: grid; gap: 6px; }
.budget .bar { height: 10px; position: relative; overflow: visible; }
.budget .bar .mark { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--foreground); }
.pcard .cqty { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; border: 1px solid var(--input); border-radius: 8px; overflow: hidden; margin-top: 4px; }
.pcard .cqty button { width: 36px; height: 34px; border: 0; background: var(--muted); color: var(--foreground); font-size: 16px; font-weight: 600; cursor: pointer; display: grid; place-items: center; }
.pcard .cqty button:hover { background: var(--accent); }
.pcard .cqty .ic { width: 14px; height: 14px; }
.pcard .cqty span { min-width: 26px; text-align: center; font-weight: 600; font-size: 13px; }
.pqty .ic { width: 14px; height: 14px; }
/* badges sitting on product photos always have a white background behind them */
.pimg .fit { font-weight: 600; }
.pimg .fit.ok { background: #dcfce7; color: #14532d; border: 1px solid #bbf7d0; }
.pimg .fit.no { background: #fee2e2; color: #7f1d1d; border: 1px solid #fecaca; }

/* ---------- sign in (matches the DMW login) ---------- */
.auth-page { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 48px 16px; background: var(--background); }
.auth-box { width: 100%; max-width: 24rem; display: grid; gap: 24px; }
.auth-brand { display: grid; justify-items: center; text-align: center; gap: 16px; }
.auth-brand h1 { font-size: 24px; letter-spacing: -.025em; }
.auth-brand p { font-size: 14px; margin-top: 4px; }
.auth-logo { width: 80px; height: 80px; border-radius: 12px; background: #000; overflow: hidden; box-shadow: var(--shadow-sm); }
.auth-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-card { padding: 24px; display: grid; gap: 16px; }
.auth-card h2 { font-size: 16px; }
.auth-card .btn.primary { width: 100%; }
.auth-card .btn.ghost { justify-self: center; color: var(--muted-foreground); font-weight: 400; }
.auth-error { border-color: color-mix(in oklab, var(--destructive) 40%, transparent); background: color-mix(in oklab, var(--destructive) 8%, transparent); color: var(--destructive); }

/* ---------- sync status in the sidebar footer ---------- */
.sync { display: flex; align-items: center; gap: 8px; padding: 4px 8px 8px; font-size: 12px; color: var(--muted-foreground); }
.sync .dot { width: 7px; height: 7px; }
.sync.ok .dot { background: var(--emerald); }
.sync.busy .dot { background: var(--amber); }
.sync.off .dot { background: var(--muted-foreground); }
.sync.err .dot { background: var(--destructive); }
.app.collapsed .sync span:not(.dot) { display: none; }

/* ---------- layout plan editor ---------- */
.plan-wrap { background: var(--background); border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.plan-edit { width: 100%; max-height: 62vh; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.plan-edit .plan-item:hover rect { filter: brightness(.97); }

/* ---------- AI render panel ---------- */
.render-media { position: relative; background: var(--muted); }
.render-media > img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.render-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: color-mix(in oklab, var(--background) 70%, transparent); font-size: 14px; font-weight: 500; backdrop-filter: blur(2px); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--foreground); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ---------- layout: wall + position picker ---------- */
.place-list { display: grid; gap: 4px; }
.place-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.place-choices { display: grid; gap: 8px; }
.place-row:last-child { border-bottom: 0; }
.place-name { display: grid; gap: 2px; }
.place-row .opt { min-height: 36px; padding: 0 12px; font-size: 13px; }
@media (max-width: 900px) { .place-row { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* ---------- send dialog ---------- */
.send-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.send-grid .btn.primary:first-child:nth-last-child(4) { grid-column: 1 / -1; }
@media (max-width: 520px) { .send-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- orders & purchase orders ---------- */
.po-build .th { width: 40px; height: 40px; flex: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; }
.po-build .th img, .po-build .th > svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.po-build .th .ic { width: 60%; height: 60%; color: #b5b5b5; }
.po-build tr.on-po td { color: var(--muted-foreground); background: color-mix(in oklab, var(--muted) 40%, transparent); }
.po-build select.input { min-width: 150px; }
.po-list { display: grid; gap: 8px; }
.po-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 10px; background: var(--background); }

/* collapsible surveyor checks (internal — hidden from customers by default) */
.chk-toggle { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.chk-toggle h2 { flex: 1; margin: 0; }
.chk-toggle .chev { display: grid; place-items: center; color: var(--muted-foreground); }
.chk-toggle .chev .ic, .chk-toggle .chev svg { width: 16px; height: 16px; }
.chk-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.chk-toggle + .checks { margin-top: 10px; }
.checks[hidden] { display: none; }

/* package parts checklist (Suite step) */
.zone .zs.ok { color: var(--tint-fg-emerald); }
.parts { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.part { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 4px 6px 4px 4px; background: var(--card); }
.part.on { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.part-main { all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; cursor: pointer; border-radius: 8px; min-height: 44px; }
.part-main:focus-visible { outline: 2px solid var(--ring); }
.part-ic { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.part-ic .ic, .part-ic svg { width: 15px; height: 15px; }
.part.todo .part-ic { background: color-mix(in oklab, var(--amber) 18%, transparent); color: var(--tint-fg-amber); }
.part.done .part-ic { background: color-mix(in oklab, var(--emerald) 16%, transparent); color: var(--tint-fg-emerald); }
.part.opt .part-ic { background: var(--muted); color: var(--muted-foreground); }
.part-txt { display: grid; gap: 1px; min-width: 0; }
.part-txt b { font-weight: 600; font-size: 14px; }
.part-txt .xs { color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.part.todo .part-txt .xs { color: var(--tint-fg-amber); }
.part .btn { flex: none; }
@media (max-width: 560px) { .part { flex-wrap: wrap; } .part .btn { margin-left: 44px; } }

/* door position slider (Layout step) */
.door-slide { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.door-slide input[type=range] { width: 100%; accent-color: var(--foreground); height: 32px; }

/* renameable scope-of-works lines */
.work-name { height: 34px; font-weight: 500; padding: 0 8px; }

/* package checklist (Review step) */
.pkg { display: grid; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pkg-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr); gap: 12px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 13.5px; }
.pkg-row:first-child { border-top: 0; }
.pkg-row.miss { background: color-mix(in oklab, var(--amber) 10%, transparent); }
.pkg-l { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.pkg-l .ic, .pkg-l svg { width: 15px; height: 15px; flex: none; color: var(--tint-fg-emerald); }
.pkg-row.miss .pkg-l .ic, .pkg-row.miss .pkg-l svg { color: var(--tint-fg-amber); }
@media (max-width: 560px) { .pkg-row { grid-template-columns: 1fr; gap: 2px; } }
