/* Flamant CRM — design system. LIGHT ("day") theme by default; the dark theme applies only
   when the user chooses it (html[data-theme="dark"]). Mobile-first. */
:root {
  --bg: #f4f5f8; --card: #ffffff; --subtle: #f0f2f6; --field: #ffffff; --hover: #eceef3;
  --chip: #e9ecf3; --chip-ink: #3d4557; --line: #d9dde6; --ink: #1c1f27; --muted: #626b7d;
  --accent: #4c5fd5; --accent-ink: #3b4bb8; --accent-soft: #e9ecfb; --accent-line: #c5cbf1;
  --ok: #1a7f37; --ok-soft: #e3f4e8; --warn: #9a6700; --warn-soft: #fff4d6;
  --bad: #cf222e; --bad-soft: #ffe9e7; --info: #0969da; --info-soft: #e1effe;
  --promo: #6e40c9; --promo-soft: #efe7fb; --net-bg: #e2f6ea; --net-key: #1a7f37;
  --s1: #3987e5; --s2: #d95926; --grid: #e3e5ea; --axis: #c8ccd4; --tick: #6b7280;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20,24,40,.06), 0 4px 14px rgba(20,24,40,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --nav-w: 232px; --rail-w: 68px; --tabbar-h: 60px; --header-h: 56px;
  --tap: 44px; --on-accent: #ffffff;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #101219; --card: #181b23; --subtle: #1d212a; --field: #1d212a; --hover: #20242f;
  --chip: #252a36; --chip-ink: #aeb6c8; --line: #282c38; --ink: #e9ebf2; --muted: #949bad;
  --accent: #8e99ee; --accent-ink: #b9c1f5; --accent-soft: #222741; --accent-line: #343c63;
  --ok: #5ec98f; --ok-soft: #14301f; --warn: #e0a565; --warn-soft: #32240f;
  --bad: #ef8b82; --bad-soft: #351b18; --info: #6fb6e0; --info-soft: #122736;
  --promo: #b79bea; --promo-soft: #251d38; --net-bg: #0e2a1c; --net-key: #7fcfa4;
  --grid: #2c2c2a; --axis: #383835; --tick: #898781;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
  --on-accent: #101219;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.45 var(--font); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.25; font-weight: 650; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: 1fr; grid-template-rows: var(--header-h) 1fr; min-height: 100vh; min-height: 100dvh; }
.topbar {
  grid-row: 1; position: sticky; top: 0; z-index: 30; height: var(--header-h);
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 750; font-size: 17px; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.topbar .brand .logo { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #8e99ee, #d95926); display: inline-block; }
.topbar .grow { flex: 1; }
.topbar .title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: #fff; background: var(--accent-line); flex: 0 0 auto; letter-spacing: .5px;
}
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.sidenav { display: none; }
.main { grid-row: 2; padding: 14px 12px calc(var(--tabbar-h) + 16px); max-width: 1240px; width: 100%; margin: 0 auto; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); display: flex; background: var(--card); border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11px; font-weight: 600; min-height: var(--tabbar-h); text-decoration: none;
}
.tabbar a .ico { font-size: 20px; line-height: 1; }
.tabbar a.active { color: var(--accent); }
.tabbar a .badge { position: absolute; margin-left: 26px; margin-top: -4px; }
.tabbar a { position: relative; }

@media (min-width: 900px) {
  .app { grid-template-columns: var(--nav-w) 1fr; grid-template-rows: var(--header-h) 1fr; }
  .topbar { grid-column: 1 / -1; padding: 0 18px; }
  .sidenav {
    grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 2px;
    padding: 14px 10px; border-right: 1px solid var(--line); position: sticky; top: var(--header-h);
    height: calc(100vh - var(--header-h)); overflow: auto; background: var(--bg);
  }
  .sidenav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
    color: var(--chip-ink); font-weight: 600; font-size: 14px; text-decoration: none;
  }
  .sidenav a .ico { width: 22px; text-align: center; font-size: 17px; }
  .sidenav a:hover { background: var(--hover); color: var(--ink); }
  .sidenav a.active { background: var(--accent-soft); color: var(--accent-ink); }
  .sidenav .sep { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 4px; }
  .sidenav .spacer { flex: 1; }
  .sidenav .foot { font-size: 11px; color: var(--muted); padding: 8px 12px; }
  .main { grid-column: 2; padding: 22px 26px 40px; }
  .tabbar { display: none; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .app { grid-template-columns: var(--rail-w) 1fr; }
  .sidenav { padding: 12px 8px; }
  .sidenav a { justify-content: center; padding: 12px 0; }
  .sidenav a .txt, .sidenav .sep, .sidenav .foot { display: none; }
}

/* ---------- cards, tiles, sections ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.card + .card, .section + .section { margin-top: 12px; }
.card.pad-0 { padding: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 22px; font-weight: 750; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.good { background: var(--net-bg); border-color: transparent; } .kpi.good .v { color: var(--net-key); }
.kpi.warn .v { color: var(--warn); } .kpi.bad .v { color: var(--bad); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: 84px; cursor: pointer;
}
.tile:hover { border-color: var(--accent-line); background: var(--hover); text-decoration: none; }
.tile .ico { font-size: 22px; } .tile .t { font-weight: 650; } .tile .d { font-size: 12px; color: var(--muted); }
.page-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.page-h h1 { margin: 0; flex: 1; min-width: 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; }
.empty .ico { font-size: 34px; margin-bottom: 8px; }

/* ---------- buttons, chips, pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap);
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.btn.bad, .btn.danger { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.btn.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent-ink); }
.btn.sm { min-height: 34px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn.xs { min-height: 28px; padding: 2px 8px; font-size: 12px; border-radius: 7px; }
.btn.lg { min-height: 52px; font-size: 16px; padding: 10px 20px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: var(--tap); }
.btn.sm.icon { width: 34px; }
.btn.xs.icon { width: 28px; }
.btngroup { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.btngroup .btn { border: 0; border-radius: 0; min-height: 38px; }
.btngroup .btn + .btn { border-left: 1px solid var(--line); }
.btngroup .btn.active { background: var(--accent); color: var(--on-accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px;
  background: var(--chip); color: var(--chip-ink); font-weight: 600; font-size: 13px; border: 1px solid transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--accent-line); }
.chip.active, .chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-line); }
.chip.active::before, .chip[aria-pressed="true"]::before { content: "✓"; font-weight: 800; }
.chip.active .code, .chip[aria-pressed="true"] .code { color: #fff; opacity: .9; }
.chip.lg { min-height: var(--tap); font-size: 14px; padding: 8px 16px; }
.chip .code { font-family: var(--mono); font-size: 11px; opacity: .8; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.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.muted, .pill.na { background: var(--chip); color: var(--chip-ink); }
.pill.promo { background: var(--promo-soft); color: var(--promo); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; }
.badge.zero { display: none; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--chip); color: var(--chip-ink); font-family: var(--mono); }

/* ---------- forms ---------- */
label.f, .f { display: block; margin-bottom: 10px; }
.f > span, .lbl { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: var(--tap); width: 100%; outline: none; -webkit-appearance: none; appearance: none;
}
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; -webkit-appearance: auto; appearance: auto; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--muted); opacity: .8; }
input:disabled, select:disabled { opacity: .6; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { min-height: 80px; resize: vertical; }
input.money, input[inputmode="decimal"] { font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 600; }
.money-wrap { position: relative; }
.money-wrap::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.money-wrap input { padding-left: 26px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
.check input { flex: 0 0 auto; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.err { color: var(--bad); font-size: 13px; }
.form-err { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 13px; }
.form-ok { background: var(--ok-soft); color: var(--ok); padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 13px; }
.fields { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 640px) { .fields.cols2 { grid-template-columns: 1fr 1fr; } .fields.cols3 { grid-template-columns: 1fr 1fr 1fr; } }
.ac { position: relative; }
.ac-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 240px; overflow: auto; }
.ac-list div { padding: 10px 12px; cursor: pointer; min-height: 40px; display: flex; justify-content: space-between; gap: 8px; }
.ac-list div:hover, .ac-list div.active { background: var(--hover); }
.ac-list .sub { color: var(--muted); font-size: 12px; }
.code-input { letter-spacing: .5em; text-align: center; font-size: 24px; font-family: var(--mono); }

/* ---------- tables (scroll on small screens, sticky first column) ---------- */
.tbl-wrap { overflow: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
table.tbl th, table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
table.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: var(--subtle); position: sticky; top: 0; z-index: 1; }
table.tbl th.num, table.tbl td.num { text-align: right; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr.click { cursor: pointer; }
table.tbl tbody tr.click:hover { background: var(--hover); }
table.tbl tr.total td { font-weight: 750; background: var(--subtle); }
table.tbl tr.void td { opacity: .55; text-decoration: line-through; }
table.tbl td.wrap { white-space: normal; }
table.tbl.sticky-first th:first-child, table.tbl.sticky-first td:first-child { position: sticky; left: 0; background: var(--card); z-index: 2; }
table.tbl.sticky-first th:first-child { z-index: 3; background: var(--subtle); }
table.tbl th.sortable { cursor: pointer; user-select: none; }
table.tbl th.sortable.asc::after { content: " ▲"; } table.tbl th.sortable.desc::after { content: " ▼"; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 12px; color: var(--muted); }

/* ---------- desk cards ---------- */
.order { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.order + .order { margin-top: 10px; }
.order.open { border-left: 4px solid var(--warn); }
.order.paid { border-left: 4px solid var(--ok); }
.order.partial { border-left: 4px solid var(--info); }
.order.void { opacity: .55; }
.order.void .o-client { text-decoration: line-through; }
.order .o-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order .o-client { font-weight: 750; font-size: 16px; flex: 1; min-width: 0; }
.order .o-tech { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--chip-ink); }
.order .o-lines { margin: 8px 0 6px; display: grid; gap: 3px; font-size: 14px; }
.order .o-line { display: flex; justify-content: space-between; gap: 10px; }
.order .o-line .n { color: var(--ink); }
.order .o-line .a { font-variant-numeric: tabular-nums; }
.order .o-line.pay .n { color: var(--muted); }
.order .o-line.pay .a { color: var(--ok); }
.order .o-sum { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 6px; }
.order .o-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.order .o-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.order .o-actions .btn { flex: 1 1 auto; }
@media (min-width: 720px) { .order .o-actions .btn { flex: 0 0 auto; } }
.desk-add { position: sticky; top: calc(var(--header-h) + 6px); z-index: 5; }
.day-foot { position: sticky; bottom: calc(var(--tabbar-h) + 8px); z-index: 5; display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-around; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-top: 12px; box-shadow: var(--shadow); font-size: 12px; color: var(--muted); }
@media (min-width: 900px) { .day-foot { bottom: 10px; } }
.day-foot b { display: block; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.report-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
@media (min-width: 640px) { .report-btns { grid-template-columns: repeat(4, 1fr); } }
.report-btns .btn { min-height: 48px; }

/* ---------- dialogs (bottom sheet on phones) ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.dialog { background: var(--card); width: 100%; max-height: 92vh; max-height: 92dvh; overflow: auto; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border: 1px solid var(--line); box-shadow: var(--shadow); animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.dialog h2 { margin-bottom: 12px; }
.dialog .d-actions { display: flex; gap: 8px; margin-top: 14px; }
.dialog .d-actions .btn { flex: 1; }
.dialog .d-close { position: absolute; right: 10px; top: 10px; }
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 20px; }
  .dialog { width: min(560px, 100%); border-radius: 16px; padding: 22px; position: relative; }
  .dialog.wide { width: min(860px, 100%); }
}
.preview { background: var(--subtle); border-radius: 10px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; }
.preview .l { display: flex; justify-content: space-between; gap: 10px; }
.preview .l.big { font-weight: 750; font-size: 15px; }
.toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 14px); z-index: 60; display: flex; flex-direction: column; gap: 6px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
@media (min-width: 900px) { .toast-host { bottom: 20px; } }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: up .15s ease-out; pointer-events: auto; }
.toast.ok { background: var(--ok); color: #0a1f12; }
.toast.bad { background: var(--bad); color: #2a0d0b; }
.menu { position: absolute; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 180px; padding: 6px; }
.menu button { display: flex; width: 100%; text-align: left; gap: 8px; align-items: center; padding: 10px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; min-height: 40px; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--bad); }

/* ---------- misc ---------- */
.note { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.progress { height: 6px; background: var(--chip); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }
.matrix td .check { justify-content: center; min-height: 36px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow: auto; }
.week-day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 12px; }
.week-day .d { font-weight: 700; margin-bottom: 4px; }
.week-day .t { color: var(--muted); }
.loading { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--subtle), var(--hover), var(--subtle)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; min-height: 60px; }
@keyframes sk { to { background-position: -200% 0; } }
.qr { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; }
.qr svg { display: block; width: 180px; height: 180px; }
.sig { font-family: var(--mono); font-size: 13px; word-break: break-all; background: var(--subtle); padding: 8px 10px; border-radius: 8px; }
.split { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.w13 { grid-template-columns: 1fr 2fr; } }
.approve-box { text-align: center; padding: 18px; }
.approve-box .btn { min-width: 220px; }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px 14px; }
.auth .box { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px; box-shadow: var(--shadow); }
.auth .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; margin-bottom: 4px; }
.auth .brand .logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #8e99ee, #d95926); }
.auth .sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.auth .foot { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth .lang { position: fixed; top: 12px; right: 12px; }

@media print {
  .topbar, .sidenav, .tabbar, .toolbar, .btn, .day-foot, .report-btns { display: none !important; }
  body { background: #fff; color: #000; }
  .main { padding: 0; max-width: none; }
  .card, .tbl-wrap, .kpi { border-color: #ccc; box-shadow: none; background: #fff; }
  table.tbl { min-width: 0; }
}

/* ---------- shell additions (core.js: topbar, banners, lock, menus, forms) ---------- */
.dialog { position: relative; }
.topbar .brand { color: inherit; text-decoration: none; }
.topbar .brand .txt { display: none; }
@media (min-width: 640px) { .topbar .brand .txt { display: inline; } }
.topbar .title { flex: 1; min-width: 0; }
.topbar .loc select { min-height: 36px; padding: 6px 30px 6px 10px; width: auto; font-weight: 600; font-size: 13px; border-radius: 8px; }
.topbar .avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; display: inline-flex; border-radius: 50%; }
.topbar .avatar-btn:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.banners:empty { display: none; }
.banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; font-weight: 600; background: var(--warn-soft); color: var(--warn); }
.banner.info { background: var(--info-soft); color: var(--info); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner .grow { flex: 1; min-width: 0; }
.banner a, .banner .btn { color: inherit; }
.banner .btn.sm { border-color: currentColor; background: transparent; }
.overlay.lock { z-index: 70; }
.lock .dialog { text-align: center; }
.lock .avatar.lg { margin: 0 auto 8px; }
.lock input { text-align: center; }
.menu.pop { position: fixed; z-index: 55; }
.menu .sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu button .ico { width: 22px; text-align: center; flex: 0 0 auto; }
.menu button.active { color: var(--accent-ink); background: var(--accent-soft); }
.menu .lbl-row { padding: 6px 12px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sheet-menu .btn { justify-content: flex-start; font-size: 15px; }
.sheet-menu .btn.active { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.sheet-menu .btn .ico { width: 24px; text-align: center; }
.more-tiles .tile { min-height: 72px; align-items: center; text-align: center; }
.checklist { display: grid; gap: 4px; }
.checklist .ci { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; }
.checklist .ci .ico { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--chip); color: var(--chip-ink); flex: 0 0 auto; }
.checklist .ci.done .ico { background: var(--ok-soft); color: var(--ok); }
.checklist .ci.done { color: var(--muted); }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: var(--mono); font-size: 15px; }
.codes div { background: var(--subtle); padding: 8px 10px; border-radius: 8px; text-align: center; letter-spacing: .04em; }
.masked { display: flex; gap: 8px; align-items: center; }
.masked .cur { font-family: var(--mono); flex: 0 0 auto; padding: 0 4px; color: var(--muted); letter-spacing: .08em; white-space: nowrap; }
.cert { font-size: 13px; color: var(--muted); background: var(--subtle); padding: 10px 12px; border-radius: 10px; }
.cert ol { margin: 6px 0 0; padding-left: 18px; }
.center { text-align: center; }
.view-error { text-align: center; padding: 30px 12px; }
.view-error .ico { font-size: 34px; margin-bottom: 8px; }
.period .row input[type="date"] { width: auto; min-width: 150px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.kv .k { color: var(--muted); }
.devices .dev { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.devices .dev:last-child { border-bottom: 0; }
.devices .dev .grow { flex: 1; min-width: 0; }
.devices .dev .sub { font-size: 12px; color: var(--muted); }
.field-bad { border-color: var(--bad) !important; }
.file-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file-row input[type="file"] { flex: 1; min-width: 0; padding: 8px; }

/* ---------- settings + inventory (views/settings.js, views/inventory.js) ---------- */
.subnav { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 0 8px; margin-bottom: 10px; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav .chip { flex: 0 0 auto; text-decoration: none; }
.subnav .chip .ico { font-size: 14px; }
.settings-body .card + .card { margin-top: 12px; }
.setting { padding: 8px 0; border-top: 1px solid var(--line); }
.setting .check { align-items: flex-start; }
.setting .check input { margin-top: 2px; }
.setting-l { font-weight: 600; }
.setting .help { margin-left: 30px; }
.sticky-save { position: sticky; bottom: calc(var(--tabbar-h) + 8px); z-index: 4; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .sticky-save { bottom: 10px; } }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.mailbody { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 13px; background: var(--subtle); padding: 10px 12px; border-radius: 10px; max-height: 50vh; overflow: auto; margin: 0; }
table.tbl.audit tr.open td { background: var(--hover); }
table.tbl.audit tr.detail td { white-space: normal; background: var(--subtle); }
pre.json { margin: 0; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.restore-steps { margin: 0; padding-left: 20px; font-size: 14px; }
.restore-steps li { margin-bottom: 6px; }
table.tbl b.low { color: var(--warn); }
.moves .pos { color: var(--ok); } .moves .neg { color: var(--bad); }
.preview.field-bad { color: var(--bad); }
@media (max-width: 639px) { .toolbar input[type="search"] { max-width: none !important; flex: 1 1 100%; } }

/* ---------- people & access (views/people.js) ---------- */
.people-sub { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.people-sub .chip { text-decoration: none; }
.people-sub .chip .badge { margin-left: 6px; }
.ob-dots { display: inline-flex; gap: 3px; }
.ob-dots i { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-style: normal; font-weight: 700; background: var(--chip); color: var(--chip-ink); }
.ob-dots i.on { background: var(--ok-soft); color: var(--ok); }
.loc-checks { display: flex; gap: 4px 16px; flex-wrap: wrap; }
table.tbl.matrix th.c, table.tbl.matrix td.c { text-align: center; }
table.tbl.matrix tr.grp td { background: var(--subtle); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
table.tbl.matrix td.ceil { opacity: .35; }
table.tbl.matrix td .chips { flex-wrap: nowrap; }
table.tbl.matrix td.wrap div.muted { max-width: 360px; }
table.tbl.shift-grid th.c, table.tbl.shift-grid td.c { text-align: center; padding: 4px 2px; }
table.tbl.shift-grid th .wd { font-size: 9px; opacity: .7; }
table.tbl.shift-grid th.we, table.tbl.shift-grid td.we { background: var(--subtle); }
table.tbl.shift-grid th.today { color: var(--accent-ink); }
table.tbl.shift-grid .cell { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 700; color: var(--ok); }
table.tbl.shift-grid .cell.on { background: var(--ok-soft); border-color: transparent; }
table.tbl.shift-grid .cell:hover { border-color: var(--accent-line); }
.reveal-box { background: var(--subtle); padding: 10px 12px; border-radius: 10px; }

/* ---------- reports module (views/reports.js) ---------- */
.rep-subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.rep-subnav .btn.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.rep-toolbar { align-items: flex-start; }
.rep-toolbar .period { flex: 1 1 auto; min-width: 0; }
.rep-export { flex-wrap: nowrap; }
.rep-basis, .rep-hint { font-size: 12px; margin: -4px 0 10px; }
.rep-stepper { flex-wrap: nowrap; }
.rep-stepper-label { font-weight: 650; min-width: 0; white-space: nowrap; }
.rep-tech-select { width: auto; min-width: 160px; min-height: 36px; padding: 6px 30px 6px 10px; font-size: 13px; }
.rep-month { width: auto; min-height: 36px; padding: 6px 10px; font-size: 13px; }
table.tbl tr.sub td { color: var(--muted); font-size: 12.5px; background: color-mix(in srgb, var(--subtle) 60%, transparent); }
table.tbl.sticky-first tr.sub td:first-child { background: var(--card); }
.rep-sub { padding-left: 10px; }
.rep-bad { color: var(--bad); } .rep-ok { color: var(--ok); }
.rep-day + .rep-day { margin-top: 12px; }
.sheet { margin-top: 12px; }
.sheet-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sheet-h h2 { margin-bottom: 2px; }
.sheet-brand { font-weight: 750; color: var(--muted); }
.sheet-day { margin-top: 10px; }
.sheet-day-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sheet-day-h h3 { margin: 0; }
.sheet-day-h .muted { font-size: 12px; }
.sheet-empty { font-size: 13px; padding: 4px 0 2px; }
.sheet-totals { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sheet-totals .kv { max-width: 420px; }
.cost-head { display: none; }
.cost-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cost-row:last-child { border-bottom: 0; }
.cost-row input, .cost-row select { min-height: 40px; }
.cost-row .btn.icon { justify-self: end; }
@media (min-width: 720px) {
  .cost-head { display: grid; grid-template-columns: 2fr 130px 2fr 110px 44px; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-bottom: 4px; }
  .cost-row { grid-template-columns: 2fr 130px 2fr 110px 44px; gap: 8px; align-items: center; }
  .cost-row .btn.icon { justify-self: stretch; }
}
.rep-approve { margin: 12px 0; }
.rep-approve-status { margin-bottom: 8px; font-size: 15px; }
.rep-approve-btns { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 640px) { .rep-approve-btns { grid-template-columns: 2fr 1fr; } }
.rep-diffs { display: grid; gap: 4px; margin-top: 8px; }
.rep-diff { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.rep-diff .k { color: var(--muted); }
.rep-diff s { color: var(--muted); }
@media print {
  .rep-subnav, .rep-basis, .page-h, .banners, .rep-approve, .kpis { display: none !important; }
  .sheet { page-break-after: always; break-after: page; margin: 0 0 12px; border: 0; padding: 0; }
  .sheet:last-child { page-break-after: auto; break-after: auto; }
  .sheet .tbl-wrap { border: 1px solid #ccc; overflow: visible; }
  table.tbl th { background: #eee; color: #000; position: static; }
  table.tbl td, table.tbl th { border-bottom: 1px solid #ddd; white-space: normal; }
  .sheet-brand { color: #000; }
  .rep-sheets .sheet .btn { display: none; }
}
/* core fix (people module): .main is a grid item; without min-width:0 a wide table inside
   .tbl-wrap widens the whole layout viewport on phones instead of scrolling inside the wrap */
.main { min-width: 0; }
/* reports: wide report tables must scroll inside .tbl-wrap, not widen the page (grid item min-width fix) */
.app > .main, .view, .view-host { min-width: 0; max-width: 100%; }
/* grid tracks are minmax(auto,1fr): without min-width:0 a wide table / chip row inside a scroll
   container still widens the whole column on phones (core fix, appended by the settings module) */
.app > .topbar, .app > .main, .app > .sidenav { min-width: 0; }

/* ---------- desk module (views/desk.js, views/clients.js, views/_ordercard.js) ---------- */
.desk-head .page-h { align-items: center; }
/* register form: the client suggestions flow between the name row and the technician chips instead of overlaying them */
.reg-form .ac > .ac-list { position: static; margin: -4px 0 10px; box-shadow: none; }
.reg-form .f.phone { max-width: 260px; }
.date-step { display: inline-flex; gap: 4px; align-items: center; }
.date-step input[type="date"] { width: auto; min-width: 150px; min-height: 40px; padding: 6px 10px; }
.date-step .btn.icon { width: 40px; min-height: 40px; }
.reg-form .reg-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.reg-form .reg-row .grow { flex: 1 1 220px; min-width: 0; }
.reg-form .reg-row .price { flex: 0 0 140px; }
.reg-form .f { margin-bottom: 8px; }
.reg-form .row .btn.lg { flex: 1 1 auto; }
@media (min-width: 640px) { .reg-form .row .btn.lg { flex: 0 0 auto; min-width: 180px; } }
.desk-add { margin-bottom: 12px; }
/* phones: the "+ Register" FAB is a child of the sticky day footer and hovers above its right edge */
.fab { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 25; box-shadow: var(--shadow); border-radius: 999px; padding: 0 22px; white-space: nowrap; }
.day-foot:has(.fab) { margin-top: 74px; }
.desk-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }
.desk-filter .grow { flex: 1 1 200px; }
.desk-filter input { min-height: 40px; }
.desk-lists .section + .section { margin-top: 18px; }
.badge.count { background: var(--chip); color: var(--chip-ink); font-size: 12px; height: 20px; min-width: 20px; vertical-align: middle; }
.badge.count.ok { background: var(--ok-soft); color: var(--ok); }
.order .o-client small { font-weight: 500; font-size: 12px; margin-left: 4px; }
.order .o-tech .code { font-family: var(--mono); font-size: 12px; background: var(--chip); padding: 1px 6px; border-radius: 6px; }
.order .o-line.void { text-decoration: line-through; opacity: .55; }
.order .o-line.refund .a { color: var(--bad); }
.order .o-line.click { cursor: pointer; border-radius: 6px; }
.order .o-line.click:hover { background: var(--hover); }
.order .o-line .a { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.order .o-line .n { min-width: 0; overflow-wrap: anywhere; }
.order .o-x { opacity: .55; color: var(--muted); }
.order .o-x:hover { opacity: 1; color: var(--bad); }
.order .o-line.small { font-size: 12px; }
.order .o-sum .bal b { color: var(--warn); }
.order .o-note { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: pre-wrap; }
.order .o-flags { margin-top: 6px; display: grid; gap: 4px; }
.order .o-flag { font-size: 13px; background: var(--warn-soft); color: var(--warn); padding: 6px 10px; border-radius: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.order .o-flag.done { background: var(--subtle); color: var(--muted); }
.order .o-flag .btn { margin-left: auto; }
.order.compact { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; min-height: var(--tap); }
.order.compact + .order { margin-top: 6px; }
.order.compact .o-client { font-size: 14px; font-weight: 650; flex: 1 1 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order.compact .o-tech { font-family: var(--mono); font-size: 12px; background: var(--chip); padding: 1px 6px; border-radius: 6px; }
.order.compact .a { font-weight: 650; }
.order.compact .o-methods { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.order.compact:hover { background: var(--hover); }
.order.compact:focus-visible { outline: 2px solid var(--accent); }
.order.new { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { background: var(--accent-soft); border-color: var(--accent); } 100% { background: var(--card); } }
.day-foot .stat { text-align: center; min-width: 70px; }
.day-foot .stat.warn b { color: var(--warn); }
.day-foot .closed-info { text-align: left; }
.day-foot .btn { align-self: center; }
.pay-preview { margin-top: 6px; }
.pay-preview .l .err, .help.err, .err { color: var(--bad); }
.dialog .note.warn { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.sheet-form .reg-form .reg-row { flex-direction: column; align-items: stretch; }
.sheet-form .reg-form .reg-row .price { flex: 1 1 auto; }
@media (max-width: 639px) {
  .reg-form .reg-row { flex-direction: column; align-items: stretch; }
  .reg-form .reg-row .price { flex: 1 1 auto; }
  .desk-head .page-h h1 { width: 100%; }
  .date-step { width: 100%; }
  .date-step input[type="date"] { flex: 1; }
  .day-foot { gap: 6px; padding: 6px 8px; font-size: 11px; }
  .day-foot .stat { min-width: 52px; }
  .day-foot .stat b { font-size: 13px; }
  .order.compact .o-methods { display: none; }
  .order.compact .o-caret { display: none; }
  .main:has(.fab) { padding-bottom: calc(var(--tabbar-h) + 80px); }
}
@media print { .fab, .desk-filter, .desk-add, .desk-head .date-step { display: none !important; } }
/* desk: the phone "Add registration" sheet keeps Register / Retail sale in view while the form scrolls (finding 48) */
@media (max-width: 639px) {
  .dialog.sheet-form .d-actions { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); background: var(--card); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin-bottom: calc(-16px - env(safe-area-inset-bottom)); z-index: 1; }
}
/* desk: when the name row stacks (phone widths, register sheet) the 220 px flex basis must not become a HEIGHT */
.sheet-form .reg-form .reg-row .grow { flex: 1 1 auto; }
@media (max-width: 639px) { .reg-form .reg-row .grow { flex: 1 1 auto; } }
/* phone touch targets (≥ 44 px, docs/FRONTEND.md): order-card action row, ✕ void buttons, dialog chips */
@media (max-width: 639px) {
  .order .o-actions .btn.sm { min-height: var(--tap); }
  .order .btn.o-x { width: var(--tap); min-height: var(--tap); margin: -8px -8px -8px 0; }
  .dialog .chip { min-height: var(--tap); }
}

/* ---------- super admin "view as" banner ---------- */
.banner.banner-imp { background: var(--promo-soft); color: var(--promo); border: 1px solid var(--accent-line); }

/* ---------- payouts (views/payouts.js, My week payout card) ---------- */
.payout-card .kv { margin-top: 4px; }
.payout-card .payout-foot { margin-top: 12px; }
.payouts table.tbl td.wrap { min-width: 180px; max-width: 260px; }
.payouts .page-h h1 a { text-decoration: none; }

/* ---------- simple mode: desk (A) ---------- */
/* docs/SIMPLE-UI.md — every role except the super admin; html[data-simple] is set by core.js (App.simple()) or the desk view */
html[data-simple] .dialog.sheet-form .d-actions .btn.ghost { flex: 0 0 auto; }
html[data-simple] .order .o-actions .btn.primary.lg { flex: 1 1 100%; }
html[data-simple] .order .o-actions .btn.icon { flex: 0 0 auto; min-width: var(--tap); min-height: var(--tap); }
html[data-simple] .simple-head h1 { font-size: 22px; }
.chips.field-bad { outline: 2px solid var(--bad); outline-offset: 4px; border-radius: 10px; }
details.desk-more { margin: 4px 0 8px; }
details.desk-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: var(--tap); display: flex; align-items: center; list-style: none; }
details.desk-more > summary::-webkit-details-marker { display: none; }
details.desk-more > summary::before { content: '▸'; margin-right: 6px; }
details.desk-more[open] > summary::before { content: '▾'; }
a.desk-link { color: var(--accent); text-decoration: underline; cursor: pointer; display: inline-block; min-height: 32px; line-height: 32px; font-size: 14px; }
/* payment sheet: four big method buttons in a 2×2 grid; "Other…" reveals the rest (A7) */
.pay-methods .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-methods .chip { min-height: 48px; justify-content: center; font-size: 15px; }
.pay-methods .more-methods { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-methods .other-row { margin-top: 8px; align-items: center; flex-wrap: wrap; gap: 8px; }
.pay-simple .f { margin-bottom: 8px; }
.pay-simple .card-line { margin: -2px 0 8px; }
/* no layout jumps (A10): blocks above the sheet's buttons keep their height while hidden */
html[data-simple] .vhidden { visibility: hidden !important; pointer-events: none; }
html[data-simple] .pay-preview { min-height: 3.2em; }
.pay-preview .l .ok { color: var(--ok); }
/* close day (A15): the expected cash as a hero number */
.preview .l.big.hero { flex-direction: column; align-items: flex-start; gap: 2px; }
.preview .l.big.hero .num { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* order card: "No technician — tap to choose" pill (A4) and plain compact rows (A16) */
.pill.o-tech-pick { cursor: pointer; border: 0; font: inherit; font-size: 12px; font-weight: 600; min-height: 28px; }
.order.compact .o-tech.name { font-family: inherit; }
.order.compact.simple-row { cursor: default; flex-wrap: wrap; }
.order.compact.simple-row .o-date { font-weight: 650; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.order.compact.simple-row .o-client { font-weight: 500; flex: 1 1 160px; white-space: normal; }
.order.compact.simple-row .o-methods { max-width: none; white-space: normal; }
/* footer sentence (A14) and the busy-day filter (A13) */
.day-foot .stat.simple { flex: 1 1 auto; text-align: left; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.day-foot .stat.simple b { display: inline; font-size: 20px; }
.day-foot .stat.simple.warn b:last-child { color: var(--warn); }
.desk-filter.simple .filter-techs { flex: 1 1 100%; }
.desk-filter.simple .desk-link { align-self: center; }
/* clients (A17): tap rows */
.client-rows { display: flex; flex-direction: column; gap: 6px; }
.client-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.client-row:hover { background: var(--hover); }
.client-row:focus-visible { outline: 2px solid var(--accent); }
.client-row .name { flex: 1 1 160px; font-size: 15px; }
.client-row .sub { font-size: 13px; flex: 1 1 180px; text-align: right; }
.client-row .chev { font-size: 18px; }
@media (max-width: 639.98px) {
  .client-row { flex-wrap: wrap; }
  .client-row .sub { text-align: left; flex: 1 1 100%; }
  .client-row .chev { display: none; }
  .order.compact.simple-row .o-methods { display: block; }
}

/* ---------- simple mode: shell + owner (C) ---------- */
/* docs/SIMPLE-UI.md — html[data-simple] is set by core.js (App.simple()): every role except the super admin */
html[data-simple] .chip { min-height: var(--tap); }
html[data-simple] .order .o-actions .btn { min-height: 48px; }
html[data-simple] .f > span, html[data-simple] .lbl { font-size: 13.5px; }
html[data-simple] .kpi .v { font-size: 22px; }
html[data-simple] .day-foot .stat b { font-size: 20px; }
html[data-simple] .btn.lg { min-height: 48px; font-size: 15px; }
html[data-simple] .btn.lg.block { min-height: 52px; width: 100%; }
/* text-link buttons ("Custom…", "Show filters", "All reports") */
.link { background: none; border: 0; color: var(--accent-ink); text-decoration: underline; min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 4px; cursor: pointer; font: inherit; font-weight: 600; }
.link.active { text-decoration: none; background: var(--accent-soft); border-radius: 8px; padding: 0 10px; }
.period-row { align-items: center; flex-wrap: wrap; gap: 8px; }
/* "More…" blocks (forms, extra fields, breakdowns) */
details.more > summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; min-height: var(--tap); display: flex; align-items: center; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '▸'; margin-right: 6px; }
details.more[open] > summary::before { content: '▾'; }
details.more.card > summary { margin: -4px 0; }
details.more .details-body { margin-top: 10px; }
/* home (C8): three big cards + preset buttons */
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.home-card { display: flex; flex-direction: column; gap: 8px; }
.home-card .home-card-h { display: flex; align-items: center; gap: 8px; }
.home-card .home-card-h .ico { font-size: 22px; }
.home-card h2 { font-size: 17px; margin: 0; }
.home-card p { margin: 0; font-size: 14px; }
.home-card .btn { margin-top: auto; align-self: flex-start; min-width: 140px; }
.home-more { gap: 8px; }
.preset-btns { gap: 8px; }
.preset-btns .btn { justify-content: flex-start; text-align: left; }
/* banners (C6): the muted "+n more to do" line */
.banner.banner-more { background: transparent; border: 0; padding: 2px 0 0; font-size: 13px; }
.banner.banner-more a { color: var(--muted); text-decoration: underline; }
/* people (C11): one row per person */
.person-rows { display: flex; flex-direction: column; gap: 6px; }
.person-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.person-row:hover { background: var(--hover); }
.person-row .name { font-weight: 650; font-size: 15px; }
/* wizard (C12, C18): step dots and panels */
.wizard-steps { display: flex; gap: 6px; align-items: center; }
.wizard-steps .dot { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.wizard-steps .dot.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.wizard-steps .dot.done { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.wizard .wz-nav { margin-top: 4px; }
.wizard .wz-nav .btn { min-width: 120px; }
.dialog.wizard .wizard-step { margin-bottom: 8px; font-size: 13px; }
/* settings (C15, C16): service rows and the Basics/Advanced cards */
.svc-rows { display: flex; flex-direction: column; }
.svc-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.svc-row.inactive .name { color: var(--muted); }
.svc-row .name { font-size: 15px; }
.svc-row .price .money-wrap { width: 120px; }
.advanced details.more.card { padding-top: 10px; padding-bottom: 10px; }
/* profile (C17): tap rows */
.card.rows { padding-top: 4px; padding-bottom: 4px; }
.row-tap { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.card.rows .row-tap:last-child { border-bottom: 0; }
.row-tap .chev { font-size: 20px; color: var(--muted); }
label.check.row-tap { border-bottom: 0; font-weight: 600; }
.profile-simple .devices .dev { font-size: 14px; }
@media (max-width: 1023px) {
  html[data-simple] .btn.lg.primary { min-height: 52px; }
  html[data-simple] .home-card .btn { align-self: stretch; }
  html[data-simple] .svc-row { flex-wrap: wrap; }
}
@media (max-width: 639.98px) {
  .page-h { flex-wrap: wrap; }
  .page-h h1 { flex: 1 1 100%; }
  .page-h .muted { flex: 1 1 100%; }
  .home-cards { grid-template-columns: 1fr; }
  .wizard .wz-nav .btn { min-width: 0; flex: 1 1 auto; }
}

/* ---------- simple mode: reports + payouts (B) ---------- */
/* Gated on the view root (.rep.simple / .payouts.simple, set by the views) or html[data-simple] (core). Append only. */
.rep .rep-subnav.simple { align-items: center; gap: 8px; }
.rep .rep-subnav.simple .chip { min-height: var(--tap); padding: 8px 16px; font-size: 15px; text-decoration: none; }
.rep .rep-more, .rep-toolbar .rep-more { min-height: var(--tap); width: var(--tap); font-size: 20px; }
.rep-toolbar .rep-stepper.simple { flex: 1 1 100%; justify-content: space-between; }
.rep-stepper.simple .btn.icon { min-height: 48px; width: 48px; font-size: 22px; }
.rep-stepper.simple .rep-stepper-label { display: flex; flex-direction: column; align-items: center; text-align: center; white-space: normal; flex: 1 1 auto; }
.rep-stepper.simple .l1 { font-size: 18px; font-weight: 750; }
.rep-stepper.simple .l2 { font-size: 13px; font-weight: 500; }
.rep.simple .rep-cols { justify-content: flex-end; margin-bottom: 6px; }
.rep .link, .payouts .link { color: var(--accent-ink); text-decoration: underline; cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 600; }
.rep details.more, .payouts details.more { margin-top: 10px; }
.rep details.more > summary, .payouts details.more > summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; min-height: var(--tap); display: flex; align-items: center; }
.rep details.more[open] > summary { margin-bottom: 8px; }
/* hero (B5) + to-do cards (B12) */
.week-hero { text-align: center; padding: 20px 16px; }
.week-hero .k { font-size: 15px; color: var(--muted); font-weight: 600; }
.week-hero .v { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; color: var(--net-key); }
.week-hero .s { font-size: 14px; font-weight: 600; }
.week-hero .line { font-size: 13px; margin-top: 8px; }
.week-hero details.more { text-align: left; }
.week-hero details.more > summary { justify-content: center; }
.rep-todo { margin-bottom: 10px; }
.rep-todo .k { font-weight: 650; margin-bottom: 8px; }
.rep-todo .btn { min-height: 48px; }
/* approve box (B10) */
.rep-approve.simple { padding: 14px; }
.rep-approve.simple .btn { min-width: 0; }
.rep-wrong-row { margin-top: 10px; text-align: center; }
/* day list (B8) */
.week-list { display: grid; gap: 8px; }
.week-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.week-row:hover { border-color: var(--accent-line); }
.week-row .wr-main { flex: 1 1 auto; min-width: 0; }
.week-row .wr-1 { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 15px; }
.week-row .wr-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.week-row .wr-2 { font-size: 13px; margin-top: 2px; }
.week-row .wr-flag { min-height: 48px; min-width: 48px; flex: 0 0 auto; }
.sheet.simple .sheet-day-h .muted { font-size: 13px; }
.rep.simple .print-only, html[data-simple] .rep .print-only { display: none; }
@media print { .print-only { display: block !important; } }
.rep-empty-days { font-size: 13px; margin: 10px 0; }
.rep-flags .rep-flag { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
/* cards: by tech on phones (B19), cash-flow days (B20), Today / Week (B2) */
.rep-cards .rep-card { padding: 12px 14px; }
.rep-card.click { cursor: pointer; }
.rep-card.click:hover { border-color: var(--accent-line); }
.rep-card.future { opacity: .55; }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rc-head.click { cursor: pointer; }
.rc-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 15px; }
.rc-pay { text-align: right; flex: 0 0 auto; }
.rc-pay .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.rc-pay .v { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--net-key); }
.rc-big { font-size: 20px; font-variant-numeric: tabular-nums; }
.rc-line { font-size: 13px; margin-top: 6px; }
.rc-status { margin-top: 6px; }
.cash-day details.more { margin-top: 6px; }
.cash-day .kv { max-width: 420px; }
.day-cards .money-card { text-align: center; padding: 18px 16px; margin-bottom: 10px; }
.day-cards .money-card .k { font-size: 14px; color: var(--muted); font-weight: 600; }
.day-cards .money-card .v { font-size: 36px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--net-key); margin: 2px 0; }
.day-cards .money-card .line { font-size: 14px; margin-top: 6px; }
.day-cards .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* payouts (B11, B22, B24) */
.payout-card.simple { text-align: center; padding: 18px 16px; }
.payout-card.simple .pc-status { margin-bottom: 8px; font-size: 15px; }
.payout-card.simple .pc-big { font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--net-key); }
.payout-card.simple .pc-week { font-size: 13px; margin-top: 2px; }
.payout-card.simple .note { text-align: left; margin-top: 10px; }
.payout-card.simple .rep-approve-btns.simple { grid-template-columns: 1fr; }
.payout-card.simple details.more { text-align: left; }
.payout-card.simple details.more > summary { justify-content: center; }
.payouts.simple .payout-summary { font-size: 15px; margin: 0 0 10px; }
.payouts.simple .payout-pills { margin-bottom: 10px; }
.payout-lines .payout-line { padding: 12px 14px; }
.pl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pl-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 15px; }
.pl-pay { text-align: right; flex: 0 0 auto; }
.pl-pay .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.pl-pay .v { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--net-key); }
.pl-line { font-size: 13px; margin-top: 6px; }
.pl-status { margin-top: 6px; }
.pl-note { margin-top: 8px; text-align: left; }
.pl-actions { margin-top: 10px; }
.pl-actions .btn { min-height: var(--tap); }
.payout-bar { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.payout-bar .btn.grow { flex: 1 1 auto; min-height: 52px; }
.payout-bar .btn.ghost { flex: 0 0 auto; min-height: var(--tap); }
.payout-review { padding: 14px; }
.payout-review .pr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.payout-review .pr-pay { text-align: right; }
.payout-review .pr-pay .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.payout-review .pr-pay .v { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--net-key); }
.payout-review .btn.lg { margin-top: 10px; text-decoration: none; }
.payouts.simple details.more { margin: 0 0 12px; }
@media (max-width: 639.98px) {
  .payout-bar { flex-wrap: wrap; }
  .payout-bar .btn.grow { flex: 1 1 100%; order: -1; }
  .payout-bar .btn.ghost { flex: 1 1 100%; }
}
/* B: phone polish — the stepper shares its row with ⋯, three tiles keep their figures, the big payout line stays on one line */
.rep-toolbar .rep-stepper.simple { flex: 1 1 auto; }
@media (max-width: 639.98px) {
  .day-cards .kpi { padding: 10px 10px; }
  .day-cards .kpi .v { font-size: 18px; }
  .payout-card.simple .pc-big { font-size: 26px; }
}
.day-cards .kpi .v { white-space: normal; overflow: visible; text-overflow: clip; letter-spacing: -.02em; word-break: break-word; }
/* B: on phones the three Today / Week tiles keep their whole figure (outranks html[data-simple] .kpi .v) */
@media (max-width: 639.98px) { html[data-simple] .rep .day-cards .kpi .v, .rep.simple .day-cards .kpi .v { font-size: 18px; } }

/* ---------- desk checks (docs/DESK-CHECKS-SPEC.md): add sheet, gift certificates, pay several checks, end of day ---------- */
/* the Add sheet: three big choices on top (Service / Gift certificate / Product) */
.add-types .chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.add-types .chip { min-height: 48px; justify-content: center; font-size: 15px; }
.add-simple .add-row { margin-top: 10px; align-items: center; }
.add-simple .add-row .grow { flex: 1 1 auto; }
.add-simple .added-line { color: var(--ok); font-weight: 600; margin: 4px 0; }
.add-dense .added-line { color: var(--ok); font-weight: 600; margin-top: 6px; }
/* gift certificate: common amounts as chips above the amount box */
.gift-fields .gift-amounts .chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.gift-fields .gift-amounts .chip { min-height: 44px; justify-content: center; }
/* "Also pay for…": rows with checkboxes, one small Tip box per extra check */
.pay-group { margin: 2px 0 8px; }
.pay-group .pg-list { display: flex; flex-direction: column; }
.pay-group .pg-row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 4px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.pay-group .pg-row input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 auto; }
.pay-group .pg-row .grow { flex: 1 1 auto; min-width: 0; }
.pay-group .pg-tips, .pg-boxes .pg-tips { margin-top: 8px; display: grid; gap: 6px; }
.pay-group .pg-tip .money-wrap, .pg-boxes .pg-tip .money-wrap { max-width: 160px; }
.pg-same { border: 1px solid var(--line); border-left: 3px solid var(--accent, #4f5bd5); border-radius: 10px; padding: 8px 12px 4px; margin: 4px 0 10px; }
.pg-same .pg-h { font-weight: 600; font-size: 14px; }
.pg-same .pg-row:last-child { border-bottom: 0; }
/* the desk's ⋯ (Close day… for the owner / super admin) and the register row with Gift certificate */
.desk-head .desk-more-btn { min-width: var(--tap); min-height: var(--tap); }
html[data-simple] .dialog.sheet-form .d-actions { flex-wrap: wrap; }
html[data-simple] .dialog.sheet-form .d-actions .btn.primary { flex: 1 1 100%; order: -1; }
.gift-sheet .gift-fields { margin-bottom: 8px; }
/* End of day page (#/profile/endofday) */
.eod .preview .l.big.hero .num { font-size: 36px; }
.eod .btn.lg.block { margin-top: 12px; }
.close-confirm p { margin-bottom: 10px; font-size: 15px; }
@media (max-width: 639.98px) {
  .gift-fields .gift-amounts .chips { grid-template-columns: repeat(2, 1fr); }
  .pay-group .pg-tip .money-wrap, .pg-boxes .pg-tip .money-wrap { max-width: none; }
}

/* ✏️ Edit check (desk.js editVisit) */
.ev-form .ev-part { margin: 0 0 10px; padding: 10px 12px; }
.ev-form .ev-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.ev-form .ev-head select { max-width: 280px; }
.ev-form .ev-sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 6px 0 4px; }
.ev-form .ev-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 6px; align-items: center; margin: 4px 0; }
.ev-form .ev-row.pay { grid-template-columns: 130px 105px 95px minmax(0, 1fr) auto; }
.ev-form .ev-row input, .ev-form .ev-row select { width: 100%; min-width: 0; }
.ev-form .ev-removed { opacity: .45; text-decoration: line-through; }
.ev-form .ev-totals { padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); margin: 6px 0 10px; line-height: 1.8; }
@media (max-width: 640px) {
  .ev-form .ev-row.pay { grid-template-columns: 1fr 1fr; }
  .ev-form .ev-row.pay input[type=text]:not(.money) { grid-column: 1 / -1; }
}

/* Mixed payment (desk.js paymentDialog): one row per method */
.mix-box .mix-row { display: grid; grid-template-columns: 150px 120px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; margin: 4px 0; }
.mix-box .mix-row select, .mix-box .mix-row input { width: 100%; min-width: 0; }
.mix-box .mix-row input.hidden { display: none; }
.mix-box .mix-sum.err { color: var(--bad); font-weight: 600; }
@media (max-width: 640px) { .mix-box .mix-row { grid-template-columns: 1fr 1fr auto; } .mix-box .mix-row > span { grid-column: 1 / -1; } }

/* ---- Unpaid services (views/unpaid.js) and the "still owes" note */
.up-sum { padding: 10px 14px; border-radius: 10px; margin: 6px 0 12px; font-weight: 600; }
.up-sum.bad { background: var(--bad-bg, #fdecec); color: var(--bad, #b42318); }
.up-sum.ok { background: var(--ok-bg, #eaf7ee); color: var(--ok, #177245); }
.up-list { padding: 0; overflow: hidden; }
.up-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.up-row:last-child { border-bottom: 0; }
.up-row .up-when { display: flex; gap: 6px; width: 100%; font-size: 13px; }
.up-row .up-who { min-width: 0; }
.up-row .up-who .pill { margin-left: 6px; }
.up-row .up-owes { font-weight: 700; color: var(--bad, #b42318); font-variant-numeric: tabular-nums; }
.up-row.today .up-owes { color: var(--warn, #b54708); }
.up-today { margin-top: 10px; }
@media (min-width: 640px) {
  .up-row { flex-wrap: nowrap; gap: 12px; }
  .up-row .up-when { flex-direction: column; gap: 0; width: auto; min-width: 110px; }
}
.owes-note { margin: 8px 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--bad-bg, #fdecec); border: 1px solid rgba(180, 35, 24, .25); color: var(--bad, #b42318); font-size: 14px; }
.owes-note .owes-h { font-weight: 700; margin-bottom: 4px; }
.owes-note .owes-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; color: var(--text, #1d2433); }
.owes-note .owes-row .grow { flex: 1 1 auto; min-width: 0; }

/* ---- ↶ Undo (views/_undo.js): one button, always bottom-left */
.undo-fab { position: fixed; left: 14px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); z-index: 45; display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--text, #1d2433);
  box-shadow: 0 6px 18px rgba(20, 24, 40, .14), 0 1px 3px rgba(20, 24, 40, .08); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease; }
.undo-fab:hover { box-shadow: 0 8px 22px rgba(20, 24, 40, .18), 0 1px 3px rgba(20, 24, 40, .1); }
.undo-fab:active { transform: scale(.94); }
.undo-fab[aria-expanded="true"] { background: var(--accent, #4f5bd5); color: #fff; border-color: transparent; }
.undo-ico { display: inline-flex; line-height: 0; }
.undo-row .btn .undo-ico.sm { margin-right: 4px; }
.undo-panel { position: fixed; left: 14px; bottom: calc(var(--tabbar-h) + 60px + env(safe-area-inset-bottom)); z-index: 46; width: min(380px, calc(100vw - 28px));
  max-height: min(70vh, 520px); overflow: auto; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(20, 24, 40, .22); animation: undo-in .16s ease-out; }
@keyframes undo-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.undo-h { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.undo-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.undo-row:last-child { border-bottom: 0; }
.undo-row .grow { flex: 1 1 auto; min-width: 0; }
.undo-row .undo-text { font-weight: 600; font-size: 14px; }
.undo-row.undone .undo-text { text-decoration: line-through; color: var(--muted, #667085); }
.undo-row .undo-why { color: var(--warn, #b54708); margin-top: 2px; }
.undo-empty { padding: 16px 14px; }
@media (min-width: 900px) {           /* no bottom menu (tabbar) from here: the corner itself */
  .undo-fab { bottom: calc(14px + env(safe-area-inset-bottom)); height: 40px; padding: 0 14px 0 12px; }
  .undo-panel { bottom: calc(64px + env(safe-area-inset-bottom)); }
}
.undo-fab .undo-lbl { display: none; }
@media (min-width: 640px) { .undo-fab .undo-lbl { display: inline; } }
@media (prefers-reduced-motion: reduce) { .undo-panel { animation: none; } .undo-fab { transition: none; } }

/* ========== design refresh (owner, Sep 28): calmer colours with clearer contrast, soft depth, a compact menu,
   a clear "press" on every button, smooth pop-ups, the guided steps and the folded "Paid today" ========== */
:root {
  --bg: #f3f4f8; --card: #ffffff; --subtle: #f5f6fa; --hover: #eef0f6; --chip: #eceef5; --chip-ink: #2f3647;
  --line: #e1e4ec; --ink: #141824; --muted: #596175;
  --accent: #4f46e5; --accent-ink: #4338ca; --accent-soft: #eef0ff; --accent-line: #c9cdfb;
  --ok: #15803d; --ok-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fff4de; --bad: #d92d20; --bad-soft: #fdecea;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .14);
  --shadow-lift: 0 2px 4px rgba(16, 24, 40, .06), 0 14px 32px -12px rgba(16, 24, 40, .22);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --nav-w: 200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] { --accent: #a5b4fc; --accent-ink: #c7d0fe; --ring: 0 0 0 3px rgba(165, 180, 252, .3); }
body { letter-spacing: -.005em; }
h1 { font-size: 23px; letter-spacing: -.02em; font-weight: 700; }
h2 { letter-spacing: -.01em; }

/* cards & rows */
.card, .order { border-color: var(--line); box-shadow: var(--shadow); }
.order { transition: box-shadow .18s var(--ease), transform .18s var(--ease), background .15s; }
.order.compact:hover { box-shadow: var(--shadow-lift); }
.topbar { background: color-mix(in srgb, var(--card) 82%, transparent); }
.topbar .brand .logo { box-shadow: 0 2px 8px -2px rgba(79, 70, 229, .45); }

/* the menu: compact, still readable */
@media (min-width: 900px) {
  .sidenav { padding: 10px 8px; gap: 1px; }
  .sidenav a { gap: 9px; padding: 7px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 600; position: relative;
    transition: background .15s, color .15s; }
  .sidenav a .ico { width: 20px; font-size: 15px; }
  .sidenav a.active { background: var(--accent-soft); color: var(--accent-ink); }
  .sidenav a.active::before { content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
  .sidenav .sep { padding: 12px 10px 3px; font-size: 10px; }
  .sidenav .foot { padding: 6px 10px 56px; }
  .main { padding: 20px 24px 40px; }
}

/* buttons: a clear press — a quick shrink, then back; the primary one glows */
.btn { transition: transform .12s var(--ease), box-shadow .15s var(--ease), background .15s, border-color .15s, filter .15s; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 100%);
  box-shadow: 0 1px 2px rgba(67, 56, 202, .25), 0 6px 16px -8px rgba(67, 56, 202, .6); }
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 2px 4px rgba(67, 56, 202, .25), 0 10px 22px -10px rgba(67, 56, 202, .7); }
.btn.primary:active:not(:disabled) { box-shadow: 0 0 0 4px var(--accent-soft), 0 1px 2px rgba(67, 56, 202, .3); }
.btn.ghost:hover { background: var(--accent-soft); }
.chip { transition: transform .12s var(--ease), background .15s, color .15s, box-shadow .15s, border-color .15s; }
.chip:active { transform: scale(.94); }
.chip.active, .chip[aria-pressed="true"] { animation: chip-pop .24s var(--ease); box-shadow: 0 0 0 2px var(--accent-line), 0 6px 14px -8px rgba(67, 56, 202, .6); }
@keyframes chip-pop { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
input:focus, select:focus, textarea:focus { box-shadow: var(--ring); border-color: var(--accent); }

/* pop-ups: fade the page, lift the card */
.overlay { background: rgba(15, 18, 30, .5); backdrop-filter: blur(2px); animation: ov-in .16s ease-out; }
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
.dialog { box-shadow: 0 24px 64px -16px rgba(15, 18, 30, .45); border-color: transparent; }
@media (min-width: 640px) {
  .dialog { animation: dlg-in .2s var(--ease); }
}
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* guided steps (views/_guide.js): the step to do now is lit, the next ones dimmed (Profile → Guided steps) */
html[data-guide] .guide .g-step { position: relative; transition: opacity .25s var(--ease), filter .25s var(--ease), box-shadow .25s var(--ease), background .25s; border-radius: 12px; }
html[data-guide] .guide .g-step:not(.btn) { padding: 8px 10px; margin-left: -10px; margin-right: -10px; }
/* the step to do now: a light-green panel with a green frame and a "Step N" badge; the steps after it clearly faded */
html[data-guide] .guide .g-dim { opacity: .3; filter: grayscale(.7); }
html[data-guide] .guide .g-dim:hover, html[data-guide] .guide .g-dim:focus-within { opacity: .85; filter: none; }
html[data-guide] .guide .btn.g-dim { opacity: .75; filter: none; }      /* a button never looks switched off because of the guide */
html[data-guide] .guide .g-done { opacity: .9; }
html[data-guide] .guide .g-on { background: #dcfce7; box-shadow: inset 0 0 0 2px #22c55e; animation: g-glow 1.8s ease-out infinite; }
html[data-guide] .guide .g-on > span:first-child, html[data-guide] .guide .g-on .f > span:first-child { color: #166534; font-weight: 700; }
html[data-guide] .guide .g-step.g-on:not(.btn)::after { content: "Step " attr(data-gstep); position: absolute; top: -9px; right: 12px; padding: 1px 9px; border-radius: 999px;
  background: #16a34a; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 2px 6px -2px rgba(22, 101, 52, .5); }
html[data-guide] .guide .btn.g-on { box-shadow: 0 0 0 3px #22c55e; }
html[data-guide] .guide .btn.primary.g-on { background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%); border-color: #16a34a; color: #fff; }
:root[data-theme="dark"] .guide .g-on { background: rgba(34, 197, 94, .16) !important; }
:root[data-theme="dark"] .guide .g-on > span:first-child, :root[data-theme="dark"] .guide .g-on .f > span:first-child { color: #86efac !important; }
@keyframes g-glow { 0% { box-shadow: inset 0 0 0 2px #22c55e, 0 0 0 0 rgba(34, 197, 94, .45); }
  70% { box-shadow: inset 0 0 0 2px #22c55e, 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: inset 0 0 0 2px #22c55e, 0 0 0 0 rgba(34, 197, 94, 0); } }

/* "Paid today" folded under its header, compact rows inside */
.paid-today { margin-top: 14px; }
.paid-today > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); user-select: none;
  transition: box-shadow .15s var(--ease); }
.paid-today > summary::-webkit-details-marker { display: none; }
.paid-today > summary::before { content: "▸"; color: var(--muted); transition: transform .18s var(--ease); display: inline-block; }
.paid-today[open] > summary::before { transform: rotate(90deg); }
.paid-today > summary:hover { box-shadow: var(--shadow-lift); }
.paid-today .pt-title { font-weight: 700; font-size: 16px; }
.paid-today .grow { flex: 1 1 auto; }
.paid-today .pt-money { font-variant-numeric: tabular-nums; color: var(--ok); }
.paid-today .pt-list { margin-top: 6px; animation: ov-in .18s ease-out; }
.paid-today .order.compact { padding: 5px 10px; min-height: 38px; box-shadow: none; border-radius: 10px; }
.paid-today .order.compact + .order { margin-top: 4px; }
.paid-today .order.compact .o-client { font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .chip, .order, .dialog, .overlay, .paid-today .pt-list, html[data-guide] .guide .g-step { transition: none; animation: none; }
  .chip.active, .chip[aria-pressed="true"], html[data-guide] .guide .g-on { animation: none; }
}

/* check money in plain words (owner, Sep 28): "Client paid $148.45 · ✓ Fully paid", then what it is made of */
.o-money { margin-top: 8px; }
.o-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 12px; border-radius: 10px; font-size: 15px; }
.o-headline b { font-size: 17px; font-variant-numeric: tabular-nums; }
.o-headline.ok { background: var(--ok-soft); color: var(--ok); }
.o-headline.owes { background: var(--warn-soft); color: var(--warn); }
.o-headline .o-state { font-weight: 700; }
.o-money .o-sum { margin-top: 6px; }
.o-line.pay .o-pay-head { font-weight: 650; }
.o-line.pay .o-pay-eq { color: var(--muted); }

/* 📜 Change log (views/changelog.js) */
.cl-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 6px 0 10px; }
.cl-day { margin: 16px 0 6px; font-size: 14px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.cl-list { padding: 0; overflow: hidden; }
.cl-row { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cl-row:last-child { border-bottom: 0; }
.cl-row.click { cursor: pointer; transition: background .15s; }
.cl-row.click:hover { background: var(--hover); }
.cl-time { flex: 0 0 64px; font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.cl-body { min-width: 0; }
.cl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cl-marks { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.cl-lines { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; }
.cl-lines li { margin: 1px 0; }
.cl-reason { margin-top: 4px; font-size: 13px; font-style: italic; color: var(--chip-ink); }
.cl-bar .ds-step { display: inline-flex; align-items: center; gap: 6px; }
.cl-bar .ds-step .lbl { font-weight: 650; min-width: 130px; text-align: center; white-space: nowrap; }
html[data-guide] .guide .g-on .chip:not(.active):not([aria-pressed="true"]) { background: #fff; border-color: #bbf7d0; }
html[data-guide] .guide .g-on input { border-color: #86efac; }

/* step tips (views/_guide.js): one short line on the step to do now; every step in grey when the highlights are off */
.g-tip { display: none; font-size: 12.5px; line-height: 1.35; margin: 2px 0 6px; color: var(--muted); font-weight: 500; }
html[data-tips] .g-tip.show { display: block; }
html[data-tips][data-guide] .g-tip.now { color: #166534; font-weight: 650; }
:root[data-theme="dark"][data-tips][data-guide] .g-tip.now { color: #86efac; }
.d-actions + .g-tip, .g-tip + .d-actions { margin-top: 8px; }

/* 💡 / 💬 switches: bottom of the left menu, the phone's More sheet, Profile */
.g-switches { display: flex; flex-direction: column; gap: 2px; }
.g-switch { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--chip-ink); user-select: none; position: relative; }
.g-switch:hover { background: var(--hover); }
.g-switch .ico { width: 20px; text-align: center; font-size: 14px; }
.g-switch .txt { flex: 1 1 auto; }
.g-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.g-switch .knob { width: 32px; height: 18px; border-radius: 999px; background: var(--line); position: relative; flex: 0 0 auto; transition: background .18s var(--ease); }
.g-switch .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.g-switch input:checked + .knob { background: #16a34a; }
.g-switch input:checked + .knob::after { transform: translateX(14px); }
.g-switch input:focus-visible + .knob { box-shadow: var(--ring); }
.g-switches.side { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
.g-switches.more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.g-switches.profile .g-switch { padding-left: 0; font-size: 14px; }
@media (min-width: 900px) and (max-width: 1099px) { .g-switches.side .txt { display: none; } .g-switches.side .g-switch { justify-content: center; padding: 6px 0; } }

/* ---- Desk sheet check (super admin, Oct 5): red = differs from / added from the paper desk sheet, yellow = edited by admin */
.order.dk-red { box-shadow: inset 7px 0 0 #b00000, inset 0 0 0 2px #b00000; background: #ffd0cb; }
.order.dk-yellow { box-shadow: inset 4px 0 0 #d9a400; background: color-mix(in srgb, #fff3bf 55%, var(--card, #fff)); }
.dk-mark { border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; font-size: 13px; }
.dk-mark.red { background: #b00000; color: #fff; font-weight: 600; }
.dk-mark.yellow { background: #fff3bf; color: #6b5200; }
.dk-mark .cl-lines { margin: 4px 0 0; padding-left: 18px; }
.dk-row.dk-red { box-shadow: inset 7px 0 0 #b00000; background: #ffd0cb; }
.dk-row.dk-yellow { box-shadow: inset 4px 0 0 #d9a400; background: color-mix(in srgb, #fff3bf 45%, transparent); }
.dk-row { flex-wrap: wrap; align-items: center; }
.dk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dk-row .cl-body { flex: 1 1 260px; }
.dk-day { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order.dk-purple { box-shadow: inset 7px 0 0 #5b1fa8, inset 0 0 0 2px #5b1fa8; background: #e4d0ff; }
.dk-mark.purple { background: #5b1fa8; color: #fff; font-weight: 600; }
.dk-row.dk-purple { box-shadow: inset 7px 0 0 #5b1fa8; background: #e4d0ff; }

/* ========== technician colours per salon (owner, Oct 8) ========== */
.order .o-tech.coloured { padding: 2px 8px; border-radius: 8px; }
.tech-table .tech-band { padding: 2px 10px; border-radius: 8px; display: inline-block; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); vertical-align: -2px; }
.swatch.big { width: 22px; height: 22px; margin-right: 8px; }
.colour-rows { display: flex; flex-direction: column; gap: 6px; }
.colour-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 10px; border-radius: 10px; }
.colour-row .who { display: inline-flex; align-items: center; min-width: 180px; }
.colour-row .pick { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.palette { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.palette .sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.palette .sw.on { border-color: var(--ink, #222); transform: scale(1.12); }
.colour-row .custom input[type=color] { width: 34px; height: 26px; border: 1px solid var(--line); border-radius: 6px; padding: 0 2px; background: transparent; cursor: pointer; }
.chip.tinted.active { outline: 2px solid var(--ink, #222); outline-offset: -2px; }

/* ========== client notes (owner, Oct 8) ========== */
.cn { position: relative; display: inline-block; margin-left: 4px; vertical-align: middle; }
.cn-ico { border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 14px; line-height: 1; padding: 1px 3px; border-radius: 6px; }
.cn-ico.add { opacity: .35; font-size: 13px; }
.cn:hover .cn-ico.add, .cn-ico.add:focus-visible { opacity: 1; background: var(--chip); }
.cn-pop { display: none; position: absolute; left: 0; top: 100%; z-index: 30; min-width: 220px; max-width: 320px; padding: 8px 10px; background: var(--card, #fff); color: var(--ink, #222);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); font-size: 13px; font-weight: 500; white-space: pre-wrap; text-align: left; cursor: default; }
.cn-pop .cn-text { display: block; margin-bottom: 6px; }
.cn.has:hover .cn-pop, .cn.open .cn-pop { display: block; }
.order.compact .cn-ico { font-size: 12px; }

/* ========== desk tables: sort, move, drag (owner, Oct 8) ========== */
.tech-table td.row-actions { white-space: normal; }
.tech-table .row-actions-wrap { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 6px; }
.tech-table .row-tools { display: inline-flex; gap: 2px; vertical-align: middle; }
.tech-table .row-tools .btn.xs.icon { min-width: 30px; min-height: 30px; padding: 0 4px; }
.tech-table .drag-handle { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; font-size: 15px; letter-spacing: -1px; }
.tech-table .drag-handle:active { cursor: grabbing; }
.tech-table tr.dragging { opacity: .5; background: var(--chip); }
.sort-chips .chip { font-size: 12px; }
.moves-strip .move-row { padding: 4px 0; cursor: pointer; font-size: 13px; }
.order .o-moves { margin-top: 4px; }
.week-row .wr-3 { margin-top: 4px; }
body.row-dragging, body.row-dragging * { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }
.tech-table tbody tr[data-id] { touch-action: pan-y; }
.tech-table tbody tr[data-id], .tech-table tbody tr[data-id] * { -webkit-user-drag: none; }
.tech-table tbody tr[data-id] td:first-child { user-select: none; -webkit-user-select: none; }
.tech-table tbody.drop-target { outline: 2px dashed var(--accent, #5b1fa8); outline-offset: -2px; }
.drag-ghost { position: fixed; z-index: 1000; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--card, #fff); color: var(--ink, #222);
  box-shadow: 0 10px 28px rgba(0,0,0,.22); border: 1px solid var(--line); font-size: 14px; white-space: nowrap; transform: rotate(-2deg); }
.tech-table tr.dragging > td { background: var(--chip); }
.tech-table tr.dragging { outline: 2px dashed var(--accent, #5b1fa8); outline-offset: -2px; }
@keyframes row-dropped { 0% { background: rgba(91,31,168,.22); } 100% { background: transparent; } }
.tech-table tr.dropped > td { animation: row-dropped 600ms ease-out; }
.tech-table .tbl.tinted tbody tr[data-id] > td { background: rgba(255,255,255,.45); }
.tech-table .tbl.tinted tbody tr[data-id]:hover > td { background: rgba(255,255,255,.7); }
.tech-table .tbl.tinted tbody tr.dragging > td { background: rgba(255,255,255,.25); }
.tech-table .tbl.tinted thead th { border-bottom: 1px solid rgba(0,0,0,.08); }
.btn.st-btn { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; padding-top: 4px; padding-bottom: 4px; }
.btn.st-btn .st-note { font-size: 10px; font-weight: 500; opacity: .75; text-transform: lowercase; }
.o-line .st-note { font-size: 12px; font-weight: 500; }
.reg-st .chip { white-space: normal; }
.ev-row.st .st-note { font-size: 12px; white-space: nowrap; }
.chip.st-chip { flex-direction: column; line-height: 1.15; gap: 0; }
.chip.st-chip .st-lbl { display: flex; flex-direction: column; align-items: center; }
.chip.st-chip .st-note { font-size: 10px; font-weight: 500; opacity: .75; }
.chip.st-chip.active { background: #e8f5e9; border-color: #2e7d32; color: #1b5e20; }
.chip.room-dots { min-width: 34px; padding: 0 8px; font-weight: 700; }
.ev-row.room .st-note { white-space: nowrap; }
.ev-row.room .money { max-width: 120px; }
/* the service grid (owner, Oct 9): Same time / Private room span two columns, every button the same height */
.add-types .chips { grid-auto-rows: 1fr; grid-auto-flow: dense; align-items: stretch; }
.add-types .chips .chip { min-height: 56px; height: 100%; box-sizing: border-box; }
.add-types .chips .chip.st-chip { grid-column: span 2; }
.add-types .chips .chip.st-chip .st-lbl { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0 6px; }
.add-types .chips .chip.st-chip .st-note { flex-basis: 100%; }
.add-types .chips .chip.room-dots { min-width: 0; }
@media (max-width: 480px) { .add-types .chips .chip.st-chip { grid-column: span 2; } }
.add-types .chips .chip.room-dots .st-lbl { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.add-types .chips .chip.room-dots .st-note { font-size: 10px; font-weight: 500; opacity: .75; }
.pay-total { text-align: center; margin: 10px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--chip); }
.pay-total b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.pay-total small { display: block; font-size: 13px; font-weight: 600; color: var(--muted, #666); }
.pay-total small.ok { color: var(--ok, #2e7d32); }
.pay-total small.warn { color: var(--warn-ink, #8a5a00); }
.mix-row .charge-note { color: var(--ink, #222); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.palette.two-rows { flex-direction: column; gap: 4px; }
.palette .sw { position: relative; }
.palette .sw.used { opacity: .55; }
.palette .sw .sw-used { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.7); }
/* Old Style desk: dragging a visit cell (owner, Oct 9) */
.ds-grid td.v { touch-action: pan-y; -webkit-user-drag: none; }
.ds-grid td.ds-dragging { opacity: .45; outline: 2px dashed var(--accent, #5b1fa8); outline-offset: -2px; }
.ds-grid td.ds-drop { outline: 3px solid var(--accent, #5b1fa8); outline-offset: -3px; }
.ds-grid th.ds-col-head { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.ds-grid th.ds-dragging { opacity: .5; }
.ds-grid th.ds-drop { outline: 3px solid var(--accent, #5b1fa8); outline-offset: -3px; }
.tech-table .row-move { font-size: 12px; opacity: .75; }
.ds-grid td.cl .cn { margin-left: 2px; }
.ds-grid td.cl .cn-ico { font-size: 12px; padding: 0 2px; }
.ds-grid td.cl .cn-pop { font-size: 12px; min-width: 180px; }
.ds-zoom { margin-left: auto; }
.ds-zoom .lbl { min-width: 48px; font-variant-numeric: tabular-nums; }
