/* Shop colour scheme (Settings > Look) - Avant's own colours until a shop picks others. */
:root { --n1: #00e5ff; --n2: #2979ff; --n3: #8c52ff; --n1-rgb: 0, 229, 255; --n1-dark: #007e8c; }

/* PC CRM - Avant look (2026-10-20, Aaron: "this design [the old program's layout] but with our
   killer scheme, buttons, light and dark mode, futuristic, and all the cool charts").
   Colours are Avant's own (theme_windows.go): navy + glowing cyan in dark mode, white + teal in light.
   Status colours come from Settings > Statuses through --sc on each element. */

html[data-theme="dark"], html:not([data-theme]) {
  color-scheme: dark;
  --bg: #070c16;
  --bg-glow: radial-gradient(1100px 520px at 78% -12%, rgba(var(--n1-rgb), .10), transparent 60%),
             radial-gradient(900px 600px at -10% 110%, rgba(140, 82, 255, .10), transparent 60%);
  --top: #0b1324;
  --top-brand: #050811;
  --side: #08101e;
  --side-box: #0b1324;
  --card: #0e1729;
  --card2: #111c33;
  --card3: #15213b;
  --line: #1c2740;
  --line2: #16213a;
  --text: #e6edf7;
  --muted: #9aa8c0;
  --dim: #6b7891;
  --accent: var(--n1);
  --accent-2: var(--n2);
  --violet: var(--n3);
  --on-accent: #04141c;
  --amber: #f5b83d;
  --green: #86efac;
  --red: #fca5a5;
  --track: #16223a;
  --input: #0a1222;
  --hover: #13203a;
  --box-h-bg: linear-gradient(90deg, #13203a, #0f192e);
  --box-h-fg: #cfe8f3;
  --bar: #0b1324;
  --bar-fg: #cfe0ef;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px rgba(var(--n1-rgb), .28), 0 0 18px rgba(var(--n1-rgb), .22);
  --ok-bg: #0b3a26; --ok-bd: #1f6b52; --ok-fg: #b8f5cf;
  --err-bg: #4a1212; --err-bd: #7f2a2a; --err-fg: #fecaca;
  --warn-bg: #2a2008; --warn-bd: #8a6a1c; --warn-fg: #fdf3d6;
  --info-bg: #0e2a33; --info-bd: #155e6e; --info-fg: #c7f3fb;
  --sc-text: #fff;
  --sc-mix: 22%;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6f9;
  --bg-glow: radial-gradient(1100px 520px at 78% -12%, rgba(var(--n1-rgb), .07), transparent 60%);
  --top: #ffffff;
  --top-brand: #0f1b2d;
  --side: #e6ecf2;
  --side-box: #0f1b2d;
  --card: #ffffff;
  --card2: #eef3f7;
  --card3: #e4ebf2;
  --line: #d5dee7;
  --line2: #e4eaf0;
  --text: #0f1b2d;
  --muted: #52627a;
  --dim: #7a8696;
  --accent: var(--n1-dark);
  --accent-2: var(--n2);
  --violet: var(--n3);
  --on-accent: #ffffff;
  --amber: #8a5300;
  --green: #146c43;
  --red: #a3263a;
  --track: #e4eaf0;
  --input: #ffffff;
  --hover: #eef5f8;
  --box-h-bg: linear-gradient(90deg, #2a3648, #364459);
  --box-h-fg: #ffffff;
  --bar: #1c2738;
  --bar-fg: #e8eef6;
  --shadow: 0 6px 18px rgba(15, 27, 45, .10);
  --glow: 0 0 0 1px rgba(var(--n1-rgb), .35), 0 0 10px rgba(var(--n1-rgb), .15);
  --ok-bg: #dff5e7; --ok-bd: #7cc59a; --ok-fg: #14532d;
  --err-bg: #fce6ea; --err-bd: #e8b4bc; --err-fg: #7a1c2c;
  --warn-bg: #fff1d6; --warn-bd: #e2b65c; --warn-fg: #5c3a00;
  --info-bg: #e3f4f5; --info-bd: #9fd3d8; --info-fg: #0b4a52;
  --sc-text: #fff;
  --sc-mix: 14%;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--text); background: var(--bg-glow), var(--bg); background-attachment: fixed;
  display: flex; flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 9px; letter-spacing: .2px; }
h1 .i { color: var(--accent); width: 22px; height: 22px; }
h2 { font-size: 17px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -4px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small, small { font-size: 12px; }
.pre { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.pad { padding: 12px; }
.pad-t { padding-top: 10px; }
.pad-b { margin-bottom: 12px; }
.bad { color: var(--red); font-weight: 600; }
.warn { color: var(--amber); font-weight: 600; }
.good { color: var(--green); font-weight: 600; }
[hidden] { display: none !important; }
code { font-family: Consolas, "Cascadia Mono", monospace; background: var(--card2); border: 1px solid var(--line); padding: 0 5px; border-radius: 4px; font-size: 12.5px; }
::selection { background: rgba(var(--n1-rgb), .35); }

/* ---------- demo banner ---------- */
.demo-banner {
  background: repeating-linear-gradient(45deg, #f5b83d 0 14px, #f7c862 14px 28px);
  color: #2b1d00; font-weight: 800; font-size: 11.5px; text-align: center; padding: 3px; letter-spacing: 1px; text-transform: uppercase;
}
.demo-banner.test-copy { background: repeating-linear-gradient(45deg, #f97316 0 14px, #fb923c 14px 28px); color: #1f0d00; }

/* ---------- top bar (The old program layout, Avant look) ---------- */
.topbar {
  display: flex; align-items: stretch; height: 48px; flex: none; position: relative; z-index: 30;
  background: var(--top); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(var(--n1-rgb), .08), var(--shadow);
}
.store-btn {
  width: var(--side-w, 296px); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: var(--top-brand); color: #fff; border: 0; cursor: pointer; text-align: left;
  border-right: 1px solid var(--line); position: relative; overflow: hidden;
}
.store-btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--n1), var(--n2), var(--n3)); box-shadow: 0 0 10px var(--n1); }
.store-btn .i { width: 22px; height: 22px; color: var(--n1); }
.brand-word { font: 800 19px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: 2.5px; text-transform: uppercase;
  background: linear-gradient(90deg, var(--n1), var(--n2) 55%, var(--n3)); -webkit-background-clip: text; background-clip: text; color: transparent;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; filter: drop-shadow(0 0 6px rgba(var(--n1-rgb), .35)); }
/* The tabs never push anything off the bar: when they don't all fit, app.js switches the bar
   to icons only (names on hover), and Settings stays pinned at the end if they still need to scroll. */
.tabs { display: flex; align-items: stretch; min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.topbar.tabs-tight .tabs a { padding: 0 8px; gap: 5px; font-size: 12.5px; }
.topbar.tabs-tight .search input { width: 130px; }
.topbar.tabs-compact .tabs a { padding: 0 11px; }
.topbar.tabs-compact .tabs a span { display: none; }
.tabs a.tab-settings { position: sticky; right: 0; background: var(--top); border-left: 1px solid var(--line2); }
.tabs a.tab-settings:hover { background: var(--hover); }
.tabs a {
  display: flex; align-items: center; gap: 7px; padding: 0 14px; color: var(--muted); font-weight: 600; font-size: 13.5px;
  border-right: 1px solid var(--line2); border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s;
}
.tabs a:hover { background: var(--hover); color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); background: linear-gradient(180deg, transparent, rgba(var(--n1-rgb), .08)); }
html[data-theme="dark"] .tabs a.on { text-shadow: 0 0 10px rgba(var(--n1-rgb), .55); }
.search { display: flex; align-items: center; margin: 0 auto; padding: 0 12px; flex: none; }
.search input { width: clamp(120px, 13vw, 220px); padding: 7px 10px; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; background: var(--input); color: var(--text); font: inherit; }
.search button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 0 8px 8px 0; background: var(--card2); cursor: pointer; color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
.who { display: flex; align-items: center; gap: 8px; padding-right: 10px; }
.who form { margin: 0; }
.round-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--card2); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 800; transition: box-shadow .15s, border-color .15s; }
.round-btn:hover { border-color: var(--accent); box-shadow: var(--glow); }
.problem-btn { color: #f59e6a; border-color: rgba(245, 158, 106, .45); }
.round-btn .i { width: 18px; height: 18px; }
.round-btn.clocked-in { color: #22c55e; border-color: rgba(34, 197, 94, .7); box-shadow: 0 0 10px rgba(34, 197, 94, .45); }
.tc-table td, .tc-table th { text-align: center; }
.tc-table td:first-child, .tc-table th:first-child { text-align: left; }
.tc-table tr.tc-total td { font-weight: 700; border-top: 2px solid var(--line); }
.tc-in { color: #22c55e; font-weight: 700; }
.list-color { width: 42px; height: 30px; padding: 2px; border-radius: 6px; }
.list-body { flex: 1 1 320px; min-width: 200px; }
.quick-picks { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 8px 14px 0; }
.quick-picks .lbl { margin: 0; }
.pill.ord-to_order { --sc: #d97706; }
.pill.ord-ordered { --sc: #3b82f6; }
.pill.ord-received { --sc: #16a34a; }
.pill.ord-done, .pill.ord-cancelled { --sc: #64748b; }
.tc-punch { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.tc-punch .lbl { margin: 0; }
.tc-punch input[type=datetime-local] { max-width: 210px; }
.user { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); padding: 0 4px; }
.user .i { color: var(--accent); }

/* menus (theme, ticket toolbar) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; z-index: 50; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow), var(--glow);
}
.menu-pop.left { left: 0; right: auto; }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--text);
  font: 500 13.5px inherit; text-align: left; border-radius: 7px; cursor: pointer; text-decoration: none;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--hover); text-decoration: none; }
.menu-pop .i { color: var(--accent); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 5px 2px; }
.menu-pop .tick { margin-left: auto; color: var(--accent); visibility: hidden; }
html[data-theme-choice="light"] [data-theme-set="light"] .tick,
html[data-theme-choice="dark"] [data-theme-set="dark"] .tick,
html[data-theme-choice="auto"] [data-theme-set="auto"] .tick,
html:not([data-theme-choice]) [data-theme-set="auto"] .tick { visibility: visible; }
html[data-theme="light"] .ic-moon, html[data-theme="dark"] .ic-sun, html:not([data-theme]) .ic-sun { display: none; }

/* ---------- shell ---------- */
:root { --side-w: 296px; }
.shell { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--side-w) 1fr; }
.main { overflow-y: auto; padding: 18px 20px 70px; min-width: 0; }
.bare-main { flex: 1; overflow-y: auto; padding: 20px; }
body.side-toggled .shell { grid-template-columns: 1fr; }
body.side-toggled .side { display: none; }

/* ---------- left column (The old program's status column) ---------- */
.side { background: var(--side); overflow-y: auto; padding: 10px 10px 40px; border-right: 1px solid var(--line); }
.side-top { background: var(--side-box); border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 10px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02); }
.chip { min-width: 34px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 7px;
  color: #fff; font-weight: 800; font-size: 12.5px; text-decoration: none; background: var(--sc); box-shadow: 0 0 10px color-mix(in srgb, var(--sc) 55%, transparent), inset 0 -2px 0 rgba(0, 0, 0, .25); }
.chip:hover { text-decoration: none; filter: brightness(1.15); }
/* each square says what it counts (Aaron didn't know what the numbers meant) */
.side-top .chip { height: auto; min-height: 26px; padding: 3px 8px; justify-content: flex-start; gap: 6px; font-weight: 700; font-size: 11.5px; line-height: 1.15; max-width: 100%; }
.side-top .chip b { font-weight: 900; font-size: 13px; }
.side-top .chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.all { --sc: #334155; box-shadow: none; }
.panel { margin-bottom: 12px; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--sc) 16%, var(--side));
  border: 1px solid color-mix(in srgb, var(--sc) 55%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--sc) 20%, transparent); }
html[data-theme="light"] .panel { background: color-mix(in srgb, var(--sc) 70%, #fff); box-shadow: none; }
.panel-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 11px; color: #fff; font-weight: 700; font-size: 15px;
  text-decoration: none; background: linear-gradient(90deg, var(--sc), color-mix(in srgb, var(--sc) 70%, #000)); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.panel-h:hover { text-decoration: none; filter: brightness(1.08); }
.badge { background: rgba(255, 255, 255, .92); color: color-mix(in srgb, var(--sc) 80%, #000); border-radius: 10px; padding: 0 8px; font-size: 12px; line-height: 20px; font-weight: 800; text-shadow: none; }
.panel-b { padding: 7px; }
.card { display: grid; grid-template-columns: 38px 1fr 30px; gap: 4px 9px; background: var(--card); border-radius: 8px; padding: 8px; margin-bottom: 7px;
  color: var(--text); border: 1px solid var(--line2); position: relative; }
.card.overdue { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.brand { width: 38px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font: 900 10.5px/1 "Segoe UI", sans-serif;
  letter-spacing: .3px; color: var(--text); background: var(--card2); border: 1px solid var(--line); overflow: hidden; text-transform: none; }
.brand .i { width: 20px; height: 20px; color: var(--muted); }
.card-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-name { font-weight: 700; font-size: 14.5px; color: var(--text); text-decoration: none; border-bottom: 2px solid var(--sc); padding-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-name:hover { text-decoration: none; color: var(--accent); }
.card-line { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.card-line .i { width: 14px; height: 14px; color: var(--dim); }
.card-line.late { color: var(--amber); font-weight: 600; }
.card-go { grid-row: 1 / span 2; grid-column: 3; align-self: center; width: 30px; height: 30px; border-radius: 6px; background: var(--sc); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 10px color-mix(in srgb, var(--sc) 60%, transparent); }
.card-go .i { width: 17px; height: 17px; stroke-width: 2.6; }
.card-go:hover { filter: brightness(1.15); text-decoration: none; }
.card details { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.card details summary { list-style: none; cursor: pointer; width: 22px; color: var(--dim); }
.card details summary::-webkit-details-marker { display: none; }
.card details[open] summary .i { transform: rotate(180deg); }
.card details div { padding: 4px 2px 0; }
.pri { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .4px; }
.pri-rush { background: #e11d48; } .pri-high { background: #f97316; } .pri-medium { background: #eab308; color: #231a00; } .pri-low { background: #64748b; }
.empty { color: var(--dim); font-size: 12px; padding: 4px 6px 6px; }
.more { display: block; text-align: center; background: #05080f; color: #fff; border-radius: 7px; padding: 7px; font-weight: 700; font-size: 12.5px; border: 1px solid rgba(255, 255, 255, .08); }
.old { color: rgba(255, 255, 255, .78); font-size: 11.5px; text-align: center; padding-top: 4px; font-style: italic; }
html[data-theme="light"] .old { color: #1f2937; }
.recent { margin-top: 6px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.recent-h { background: #05080f; color: #fff; padding: 9px 12px; font-weight: 700; font-size: 15px; border-bottom: 2px solid; border-image: linear-gradient(90deg, var(--n1), var(--n3)) 1; }
.recent-row { display: grid; grid-template-columns: 62px 1fr 30px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line2); color: var(--text); text-decoration: none; }
.recent-row:hover { background: var(--hover); text-decoration: none; }
.recent-nums { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); }
.recent-nums .i { width: 13px; height: 13px; }
.recent-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-dark { width: 28px; height: 28px; border-radius: 6px; background: #05080f; color: #fff; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .12); }
html[data-theme="light"] .go-dark { background: #0f1b2d; }

/* ---------- page parts ---------- */
.page-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.flash { padding: 10px 13px; border-radius: 9px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.flash.ok { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); }
.flash.err { background: var(--err-bg); border-color: var(--err-bd); color: var(--err-fg); }
.flash.info { background: var(--info-bg); border-color: var(--info-bd); color: var(--info-fg); }
.flash.warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow); }
.box-h { display: flex; align-items: center; gap: 8px; background: var(--box-h-bg); color: var(--box-h-fg); padding: 9px 14px; font-weight: 700; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .7px; border-bottom: 1px solid var(--line); position: relative; }
.box-h::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--n1), var(--n3)); }
.box-h .i { color: var(--accent); }
html[data-theme="light"] .box-h .i { color: var(--n1); }
.box-h .muted-h { font-weight: 500; opacity: .7; font-size: 11.5px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.box-h .legend { margin-left: auto; font-weight: 500; font-size: 11.5px; display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; }
.box-link { margin-left: auto; color: var(--box-h-fg); font-weight: 500; font-size: 12px; opacity: .85; text-transform: none; letter-spacing: 0; display: flex; gap: 4px; align-items: center; }
.box-b { padding: 14px; }
.cols, .wo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cols3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: stretch; }
.col { min-width: 0; }
.step { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--n1), var(--n2)); color: #04141c; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.section-bar { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; margin-bottom: 16px; color: #fff; font-weight: 700; font-size: 16px;
  background: linear-gradient(90deg, var(--sc, var(--n2)), color-mix(in srgb, var(--sc, var(--n2)) 60%, #000)); box-shadow: 0 0 18px color-mix(in srgb, var(--sc, var(--n2)) 35%, transparent); }

/* dashboard tiles (The old program's three tiles) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.tile-b { padding: 14px 16px; }
.tile-b .row { font-size: 15.5px; font-weight: 700; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.n { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-f { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 11px 16px; font-weight: 700; font-size: 13px; letter-spacing: .3px; }
.tile-f .i { width: 24px; height: 24px; }
.t-blue { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.t-red { background: linear-gradient(90deg, #e11d48, #fb7185); }
.t-green { background: linear-gradient(90deg, #059669, #34d399); }
.t-violet { background: linear-gradient(90deg, #7c3aed, #c026d3); }
.n.blue { color: #38bdf8; } .n.red { color: #fb7185; } .n.green { color: #34d399; } .n.violet { color: #b18cff; }
html[data-theme="light"] .n.blue { color: #1d5fd1; } html[data-theme="light"] .n.red { color: #be123c; }
html[data-theme="light"] .n.green { color: #047857; } html[data-theme="light"] .n.violet { color: #6d28d9; }

/* charts */
.chart { display: block; width: 100%; height: auto; }
.chart text { font-family: "Segoe UI", system-ui, sans-serif; }
.g-ring { fill: none; stroke: var(--accent); stroke-width: 1; }
.g-track { fill: none; stroke: var(--track); stroke-width: 16; stroke-linecap: round; }
.g-seg { animation: seg-in .5s both; }
.g-tip { filter: drop-shadow(0 0 6px var(--n3)); }
.g-tick { stroke: var(--dim); stroke-width: 2; }
.g-tl { fill: var(--dim); font-size: 10px; text-anchor: middle; }
.g-val { fill: var(--text); font-size: 44px; font-weight: 800; text-anchor: middle; }
html[data-theme="dark"] .g-val { filter: drop-shadow(0 0 10px rgba(var(--n1-rgb), .45)); }
.g-unit { fill: var(--muted); font-size: 13px; text-anchor: middle; letter-spacing: .5px; }
.g-cap { fill: var(--muted); font-size: 12px; text-anchor: middle; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }
@keyframes seg-in { from { opacity: 0; } to { opacity: 1; } }
.eq-floor { stroke: var(--line); stroke-width: 1; }
.eq-off { fill: var(--track); }
.eq-on { filter: drop-shadow(0 0 3px rgba(var(--n1-rgb), .35)); }
html[data-theme="light"] .eq-on { filter: none; }
.eq-peak { fill: #e6f7ff; filter: drop-shadow(0 0 4px var(--n1)); }
html[data-theme="light"] .eq-peak { fill: #0f1b2d; filter: none; }
.eq-v { fill: var(--text); font-size: 11px; font-weight: 700; text-anchor: middle; }
.eq-l { fill: var(--dim); font-size: 10px; text-anchor: middle; }
.eq-col { animation: rise .7s both; transform-origin: bottom; transform-box: fill-box; }
@keyframes rise { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: scaleY(1); } }
.grid { stroke: var(--line2); stroke-width: 1; }
.ax { fill: var(--dim); font-size: 10.5px; }
.ax-y { text-anchor: end; }
.ax-x { text-anchor: end; }
.area-line { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 1.6s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.d-track { fill: none; stroke: var(--track); }
.d-val { fill: var(--text); font-size: 38px; font-weight: 800; text-anchor: middle; }
.d-sub { fill: var(--muted); font-size: 11px; text-anchor: middle; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.chart-wrap { padding: 12px 14px 8px; }
.gauge-wrap { display: flex; flex-direction: column; align-items: center; padding: 8px 10px 4px; }
.gauge-wrap .chart { max-width: 290px; }
.legend-list { display: flex; flex-direction: column; gap: 5px; padding: 0 16px 14px; font-size: 12.5px; }
.legend-list a, .legend-list div { display: flex; align-items: center; gap: 8px; color: var(--text); }
.legend-list i { width: 10px; height: 10px; border-radius: 3px; background: var(--sc); box-shadow: 0 0 6px var(--sc); flex: none; }
.legend-list b { margin-left: auto; font-variant-numeric: tabular-nums; }
.lg-in, .lg-out { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.lg-in { background: var(--n1); } .lg-out { background: #34d399; }
.leds { padding: 12px 16px; display: flex; flex-direction: column; gap: 9px; }
.led-row { display: grid; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 10px; font-size: 12.5px; }
.led-row .lbl-t { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-row .lbl-t .i { color: var(--muted); width: 16px; height: 16px; }
.led { display: flex; gap: 2px; height: 14px; }
.led span { flex: 1; border-radius: 2px; background: var(--track); }
.led span.on { background: var(--c); box-shadow: 0 0 5px color-mix(in srgb, var(--c) 70%, transparent); }
html[data-theme="light"] .led span.on { box-shadow: none; }
.led-row b { text-align: right; font-variant-numeric: tabular-nums; }
.now-list { list-style: none; margin: 0; padding: 6px 16px 14px; }
.now-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line2); gap: 10px; }
.now-list li:last-child { border-bottom: 0; }
.now-list b { font-size: 16px; font-variant-numeric: tabular-nums; }
.box-foot { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #334155, #475569); }
html[data-theme="dark"] .box-foot { background: linear-gradient(90deg, #1e293b, #334155); }
.box-foot .i { width: 22px; height: 22px; }

/* tables */
table { border-collapse: collapse; }
.kv { width: 100%; }
.kv th { text-align: left; width: 40%; color: var(--muted); font-weight: 500; padding: 8px 14px; vertical-align: top; border-bottom: 1px solid var(--line2); }
.kv td { padding: 8px 14px; border-bottom: 1px solid var(--line2); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kv select, .kv input { margin: 0 !important; }
.grid-t, table.grid { width: 100%; }
table.grid th { text-align: left; background: var(--card2); color: var(--muted); font-size: 11.5px; font-weight: 700; padding: 9px 11px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .5px; }
table.grid td { padding: 9px 11px; border-top: 1px solid var(--line2); vertical-align: top; }
table.grid tbody tr:hover td { background: var(--hover); }
table.grid.compact td { padding: 7px 11px; }
table.grid tfoot th { background: var(--card2); border-top: 2px solid var(--line); }
table.grid .right, table.grid th.right { text-align: right; }
.row-late td { background: color-mix(in srgb, var(--red) 10%, transparent) !important; }
.empty-row { color: var(--muted); text-align: center; padding: 24px !important; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--text);
  background: color-mix(in srgb, var(--sc) var(--sc-mix), transparent); border: 1px solid var(--sc); }
html[data-theme="dark"] .pill { box-shadow: 0 0 8px color-mix(in srgb, var(--sc) 35%, transparent); }
.st { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid; }
.st-open { color: #38bdf8; border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .1); }
.st-paid, .st-accepted { color: #34d399; border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .1); }
.st-void { color: var(--dim); border-color: var(--line); text-decoration: line-through; }
.st-declined { color: #fb7185; border-color: rgba(251, 113, 133, .5); background: rgba(251, 113, 133, .1); }
html[data-theme="light"] .st-open { color: #1d5fd1; } html[data-theme="light"] .st-paid, html[data-theme="light"] .st-accepted { color: #047857; }
html[data-theme="light"] .st-declined { color: #be123c; }
.st.on-dark { background: rgba(255, 255, 255, .92); color: #0f1b2d; border-color: transparent; text-decoration: none; }

/* toolbar + segmented buttons */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg a { padding: 7px 15px; color: var(--muted); border-right: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.seg a:last-child { border-right: 0; }
.seg a.on { background: linear-gradient(90deg, var(--n1), var(--n2)); color: #04141c; }
html[data-theme="light"] .seg a.on { background: var(--accent); color: #fff; }
.inline-search { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-search input { width: 290px; max-width: 100%; }
.jump { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }

/* ticket page (The old program work order) */
.wo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 16px; color: #fff; border-radius: 12px 12px 0 0; font-size: 19px; font-weight: 700;
  background: linear-gradient(90deg, var(--sc, var(--n2)), color-mix(in srgb, var(--sc, var(--n2)) 62%, #000)); box-shadow: 0 0 22px color-mix(in srgb, var(--sc, var(--n2)) 35%, transparent); text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.wo-head .i { width: 24px; height: 24px; }
.wo-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wo-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-num { display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .22); padding: 3px 12px; border-radius: 8px; font-size: 21px; font-variant-numeric: tabular-nums; border: 1px solid rgba(255, 255, 255, .25); }
.wo-bar { display: flex; flex-wrap: wrap; align-items: center; background: var(--bar); border-radius: 0 0 12px 12px; margin-bottom: 16px; border: 1px solid var(--line); border-top: 0; }
.wo-bar > a, .wo-bar > form > button, .wo-bar > details > summary { display: flex; align-items: center; gap: 6px; color: var(--bar-fg); padding: 9px 13px; border: 0;
  border-right: 1px solid rgba(255, 255, 255, .07); background: none; font: 600 13px inherit; cursor: pointer; text-decoration: none; }
.wo-bar > a:hover, .wo-bar > form > button:hover, .wo-bar > details > summary:hover { background: rgba(var(--n1-rgb), .1); color: #fff; text-decoration: none; }
.wo-bar > form { margin: 0; }
.wo-bar .hl { background: linear-gradient(90deg, #059669, #34d399) !important; color: #fff; }
.wo-bar .caret { opacity: .7; font-size: 10px; }
.status-form { margin-left: auto !important; display: flex; align-items: center; gap: 6px; padding: 5px 10px; color: var(--bar-fg); font-weight: 600; font-size: 13px; }
.status-form select { display: inline-block; width: auto; margin: 0; padding: 4px 8px; border-radius: 6px; }
.phone-card { display: flex; align-items: center; gap: 14px; }
.phone-badge { width: 46px; height: 60px; border-radius: 8px; background: linear-gradient(180deg, var(--n2), #1d4ed8); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 14px rgba(41, 121, 255, .45); }
.phone-badge .i { width: 26px; height: 26px; }
.cust-card { display: flex; flex-direction: column; gap: 5px; }
.big-name { font-size: 17px; font-weight: 800; }
.addr { display: flex; gap: 6px; }
.problem { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tagchip { display: inline-block; background: var(--card2); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 1px 10px; font-size: 12px; text-decoration: none; margin: 1px 2px; }
.tagchip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tagchip small { opacity: .7; }
.cred { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line2); }
.cred:last-child { border-bottom: 0; }
.cred-ico { width: 36px; height: 36px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.cred b { display: block; font-size: 12.5px; }
.secret summary { cursor: pointer; color: var(--accent); list-style: none; font-size: 13px; }
.secret summary::-webkit-details-marker { display: none; }
.secret code { font-size: 15px; color: var(--amber); }
.notes { list-style: none; margin: 10px 0 0; padding: 0; }
.note { border-left: 3px solid var(--line); padding: 7px 11px; margin-bottom: 8px; background: var(--card2); border-radius: 0 8px 8px 0; }
.note-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 2px; }
.note-k { font-weight: 800; color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .5px; }
.n-customer { border-left-color: #34d399; }
.n-status { border-left-color: var(--n1); }
.n-system { border-left-color: var(--dim); }
.n-note { border-left-color: #f5b83d; }
/* work order message log */
.n-msg-sent { border-left-color: #34d399; }
.n-msg-logged { border-left-color: #22d3ee; }
.n-msg-test { border-left-color: #f5b83d; }
.n-msg-failed { border-left-color: var(--red); }
/* work order scans / installs / actions */
.n-act-scan { border-left-color: #22d3ee; }
.n-act-installed { border-left-color: #34d399; }
.n-act-removed { border-left-color: #f5b83d; }
.n-act-action { border-left-color: var(--n1); }
/* work order job timers */
.timer-run { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--n1); background: color-mix(in srgb, var(--n1) 12%, var(--card)); margin-bottom: 8px; }
.timer-live { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 92px; }
.timer-row { display: flex; align-items: center; gap: 10px; padding: 6px 11px; border-bottom: 1px solid var(--line); }
.timer-row .grow, .timer-run .grow { flex: 1; min-width: 80px; }
/* work order photos & files */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 10px; }
.att { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card2); display: flex; flex-direction: column; }
.att-img { width: 100%; height: 115px; object-fit: cover; display: block; background: #0a1222; }
.att-file { display: flex; align-items: center; gap: 6px; padding: 18px 10px; text-decoration: none; }
.att-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-cap { padding: 6px 9px; font-size: 12px; }
.att-cap form { margin-top: 3px; }
.claim-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px 16px; }
/* sticky wall + sticky notes */
.sticky-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sticky { border-top: 6px solid var(--sc); border-radius: 10px; background: var(--card); box-shadow: 0 2px 10px rgba(0, 0, 0, .14); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.sticky-type { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--sc); }
.sticky-note { font-size: 14px; }
.sticky-meta { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
.sticky-meta a { display: inline-flex; align-items: center; gap: 4px; }
.sticky-btns { display: flex; gap: 8px; }
.sticky-line { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.sticky-line .grow { flex: 1; min-width: 0; }
.sticky-line.done { opacity: .55; }
.sticky-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); flex: none; }
/* reports */
.rep-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.rep-range .lbl { margin-bottom: 0; }
.rep-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.rep-tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.rep-n { font-size: 26px; font-weight: 800; }
.rep-l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.sw.in { background: var(--n1); } .sw.done { background: #34d399; }
.rep-weeks { display: flex; align-items: flex-end; gap: 6px; height: 140px; overflow-x: auto; padding-bottom: 4px; }
.rep-week { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 34px; }
.rep-wbars { display: flex; align-items: flex-end; gap: 2px; height: 110px; }
.rep-wbar { width: 11px; border-radius: 3px 3px 0 0; min-height: 2px; }
.rep-wbar.in { background: var(--n1); } .rep-wbar.done { background: #34d399; }
.rep-wlbl { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.canned-row { padding: 12px 14px; border-top: 1px solid var(--line); }
.canned-del { padding: 0 14px 10px; margin-top: -6px; }
/* Settings > Lists */
.list-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.list-edit { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 220px; margin: 0; flex-wrap: wrap; }
.list-edit input[name="name"] { flex: 1 1 160px; min-width: 140px; width: auto; }
.list-edit select, .list-edit input[type="time"] { width: auto; flex: none; }
.list-edit label.small { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.narrow-in { width: 56px; }
.list-off input[name="name"] { opacity: .5; text-decoration: line-through; }
/* service reminders */
.rem-msg { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.rem-msg > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rem-msg input { margin-top: 3px; flex: none; }
.rem-move { display: flex; gap: 6px; margin-bottom: 6px; }
.add-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
.add-row h3 { margin: 0; font-size: 15px; }
.cart-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; font-weight: 700; cursor: pointer; list-style: none;
  background: linear-gradient(90deg, rgba(132, 204, 22, .22), rgba(132, 204, 22, .08)); color: var(--text); border-bottom: 1px solid rgba(132, 204, 22, .45); }
html[data-theme="light"] .cart-bar { background: #e6f2c6; color: #3f4d10; }
.cart-bar::-webkit-details-marker { display: none; }
details[open] > .cart-bar .i-chev { transform: rotate(180deg); }
.dock { position: sticky; bottom: -70px; margin: 16px -20px -70px; padding: 9px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--top) 88%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0, 0, 0, .25); z-index: 5; }
.dock b { display: flex; align-items: center; gap: 6px; }
.dock .dock-icons { margin-left: auto; display: flex; gap: 6px; }
.dock .dock-icons a { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--card2); border: 1px solid var(--line); color: var(--c, var(--accent)); }
.dock .dock-icons a:hover { box-shadow: 0 0 10px color-mix(in srgb, var(--c, var(--n1)) 60%, transparent); border-color: var(--c, var(--accent)); }

/* forms */
.lbl { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 11px; font-weight: 600; }
.lbl small { color: var(--dim); font-weight: 400; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=color])), :where(select), :where(textarea) {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font: 14px/1.35 inherit; color: var(--text); background: var(--input); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
input[type=color] { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); }
.inline-search input, .inline-search select { display: inline-block; width: auto; margin-top: 0; }
.inline-search input { width: 290px; }
.grid2, .grid3 { display: grid; gap: 0 14px; grid-template-columns: repeat(2, 1fr); }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.narrow { width: 80px !important; }
.mono { font-family: Consolas, "Cascadia Mono", monospace !important; font-size: 12px !important; word-break: break-all; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--line); background: var(--card2); color: var(--text);
  font: 600 13.5px/1.2 inherit; cursor: pointer; text-decoration: none; white-space: nowrap; transition: box-shadow .15s, border-color .15s, filter .15s; }
.btn:hover { border-color: var(--accent); box-shadow: var(--glow); text-decoration: none; }
.btn.primary { background: linear-gradient(90deg, var(--n1), var(--n2)); border-color: transparent; color: #04141c; box-shadow: 0 0 14px rgba(var(--n1-rgb), .35); }
.btn.primary .i { color: #04141c; }
.btn.primary:hover { filter: brightness(1.1); box-shadow: 0 0 22px rgba(var(--n1-rgb), .55); }
html[data-theme="light"] .btn.primary { background: var(--accent); color: #fff; box-shadow: none; }
html[data-theme="light"] .btn.primary .i { color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 11px; font-size: 12.5px; }
.btn.big { padding: 12px 26px; font-size: 16px; }
.link { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.link.danger { color: var(--red); }
.form-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.row-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0; }
.row-gap select { display: inline-block; width: auto; margin-top: 0; }
.check { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card2); cursor: pointer; font-size: 13px; color: var(--text); }
.check:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card2)); }
.check.agree { display: flex; margin: 14px 0 6px; padding: 11px 13px; font-size: 14.5px; font-weight: 700; background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.checks { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.inline { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline input { display: inline-block !important; width: 130px !important; margin: 0 !important; padding: 5px 8px !important; }
.add-line { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px; border-top: 1px solid var(--line2); background: var(--card2); }
.add-line .lbl { margin-bottom: 0; }
.add-line .grow { flex: 1; min-width: 220px; }
.add-line .lbl.narrow { width: 90px; }
.add-line .check { margin-bottom: 2px; }
/* invoice/quote live price lookup (Amazon/eBay) */
.price-lookup { padding: 12px 14px; border-top: 1px solid var(--line2); background: var(--card2); }
.pl-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.pl-bar .lbl { margin-bottom: 0; } .pl-bar .grow { flex: 1; min-width: 220px; }
.pl-results { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.pl-note { color: var(--muted); font-size: 12.5px; }
.pl-row { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.pl-row.pl-sample { border-style: dashed; opacity: .9; }
.pl-src { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); min-width: 52px; }
.pl-ttl { flex: 1; min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-price { font-weight: 800; }

/* check-in form, the old program style rows */
.fr { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 7px 16px; }
.fr > label:first-child, .fr > .fl { color: var(--muted); font-weight: 600; font-size: 13px; }
.fr input:not([type=checkbox]):not([type=radio]), .fr select { max-width: 380px; margin: 0; }
.fr textarea { max-width: 560px; margin: 0; }
.fr + .fr { border-top: 1px dashed var(--line2); }
.fr .opts { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.fr .opts label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; cursor: pointer; }
.fr .help { color: var(--accent); font-size: 12px; font-weight: 600; display: block; margin-top: 3px; }
.sub-h { padding: 14px 16px 4px; font-size: 18px; font-weight: 700; color: var(--muted); }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 7px; max-width: 720px; }
.acc { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card2); cursor: pointer; font-weight: 600; font-size: 13px; }
.acc .i { width: 22px; height: 22px; color: var(--accent); }
.acc input { position: absolute; opacity: 0; pointer-events: none; }
.acc:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card2)); box-shadow: var(--glow); }
.prob-grid { display: grid; grid-template-columns: repeat(2, minmax(200px, 1fr)); gap: 6px 18px; max-width: 620px; }
.prob-grid label { display: flex; gap: 7px; align-items: center; color: #38bdf8; font-weight: 600; font-size: 13px; cursor: pointer; }
html[data-theme="light"] .prob-grid label { color: #1d5fd1; }
.picked { display: flex; align-items: center; gap: 12px; padding: 11px 13px; background: var(--info-bg); border: 1px solid var(--info-bd); border-radius: 10px; }
.picked > .i { width: 28px; height: 28px; color: var(--accent); }
.picked > div { flex: 1; }
.results { border: 1px solid var(--line); border-radius: 10px; max-height: 300px; overflow-y: auto; margin: 2px 0 10px; box-shadow: var(--shadow); background: var(--card); }
.res { display: block; padding: 9px 13px; border-bottom: 1px solid var(--line2); color: var(--text); text-decoration: none; }
.res:hover { background: var(--hover); text-decoration: none; }
.res b { display: block; }
.res small { color: var(--muted); }
.res-empty { padding: 10px 13px; color: var(--muted); }
.find-row { padding: 14px 16px 6px; }
.dev-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; padding: 6px 16px 10px; }
.radio-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card2); }
.radio-card:has(input:checked) { border-color: var(--accent); box-shadow: var(--glow); }
.radio-card .i { width: 26px; height: 26px; color: var(--accent); }
.radio-card span { display: flex; flex-direction: column; min-width: 0; }
.radio-card small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terms { white-space: pre-wrap; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; max-height: 220px; overflow-y: auto; font-size: 13px; margin-bottom: 8px; }
.submit-bar { display: flex; justify-content: flex-start; gap: 12px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--card2); }

/* invoices */
.overdue-bar { background: linear-gradient(90deg, #e11d48, #f43f5e); color: #fff; font-weight: 700; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; box-shadow: 0 0 18px rgba(225, 29, 72, .35); }
.overdue-bar a { color: #fff; text-decoration: underline; }
.cart-h { background: linear-gradient(90deg, rgba(132, 204, 22, .25), rgba(132, 204, 22, .06)); color: var(--text); font-weight: 700; padding: 9px 14px; border-bottom: 1px solid rgba(132, 204, 22, .45); }
html[data-theme="light"] .cart-h { background: #e6f2c6; color: #3f4d10; }
.lines td { vertical-align: middle; }
.lines form { margin: 0; }
.totals { margin: 10px 14px 14px auto; min-width: 330px; }
.totals th { text-align: right; font-weight: 500; color: var(--muted); padding: 4px 16px; }
.totals td { text-align: right; padding: 4px 0; min-width: 110px; font-variant-numeric: tabular-nums; }
.totals .grand th, .totals .grand td { font-size: 17px; font-weight: 800; color: var(--text); border-top: 1px solid var(--line); padding-top: 8px; }
.totals .owed td { color: var(--red); }
.totals .small th, .totals .small td { font-size: 12px; color: var(--muted); }

/* settings */
.switch-row { display: flex; align-items: flex-start; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--line2); cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: none; width: 44px; height: 24px; border-radius: 12px; background: var(--track); border: 1px solid var(--line); position: relative; transition: background .15s, box-shadow .15s; margin-top: 2px; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.switch-row input:checked + .switch { background: linear-gradient(90deg, var(--n1), var(--n2)); box-shadow: 0 0 12px rgba(var(--n1-rgb), .45); }
html[data-theme="light"] .switch-row input:checked + .switch { background: var(--accent); box-shadow: none; }
.switch-row input:checked + .switch::after { left: 22px; }
.switch-row input:focus-visible + .switch { box-shadow: var(--glow); }
.switch-row span:last-child { display: flex; flex-direction: column; }
.switch-row small { color: var(--muted); font-size: 12.5px; }

/* Logo - always shown whole (contain), never cropped or recoloured */
.corner-logo { height: 32px; max-width: 150px; object-fit: contain; flex: none; }
.logo-previews { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.logo-tile { width: 220px; height: 110px; border-radius: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; gap: 4px; }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; min-height: 0; }
.logo-tile.dark { background: #070c16; }
.logo-tile.light { background: #ffffff; }
.logo-tile.receipt { background: #fff; filter: grayscale(1); }
.logo-tile small { color: #555; font-size: 10.5px; }
.login-logo { text-align: center; margin-bottom: 14px; }
.login-logo img { max-width: 240px; max-height: 90px; object-fit: contain; }

/* Settings > Devices */
.dev-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.dev-state { padding: 3px 10px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.dev-state.ok { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); }
.dev-state.bad { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
/* check-in start, like the old program's */
.start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: end; }
.start-grid input[data-start-q] { font-size: 17px; padding: 11px 13px; }
.start-results { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; padding: 0 16px 16px; }
.start-results .res { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  margin-bottom: 6px; background: var(--card2); color: var(--text); text-decoration: none; }
.start-results .res:hover { border-color: var(--n1); box-shadow: 0 0 12px rgba(var(--n1-rgb), .35); text-decoration: none; }
.res-new { background: color-mix(in srgb, var(--n1) 14%, var(--card2)) !important; font-size: 15px; }
.res-tag { min-width: 70px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.res-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.res-who small, .res-cust-h small { color: var(--muted); }
.res-go { color: #22c55e; font-size: 18px; }
.res-cust { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.res-cust-h { background: var(--side); padding: 7px 12px; display: flex; flex-direction: column; color: #fff; }
.res-cust .res { margin: 6px; }
@media (max-width: 900px) { .start-grid, .start-results { grid-template-columns: 1fr; } }
.import-bar { height: 14px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 10px; }
.import-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--n1), var(--n2)); box-shadow: 0 0 12px rgba(var(--n1-rgb), .6); }
.table-wrap { overflow-x: auto; }
.import-map td { vertical-align: middle; }
.import-map select { min-width: 220px; }
.warn-text { color: var(--warn-fg); }
.bad-text { color: var(--err-fg); }
.ok-text { color: var(--ok-fg); font-weight: 600; }
.dev-state.info { background: var(--info-bg); border-color: var(--info-bd); color: var(--info-fg); }
details.adv > summary { cursor: pointer; list-style: none; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::after { content: "▸"; margin-left: auto; opacity: .7; }
details.adv[open] > summary::after { content: "▾"; }
.sigpanel.inline { margin-top: 10px; max-width: 640px; display: block; }
.sig-status { margin-bottom: 8px; font-weight: 600; font-size: 13px; }
.sig-status.ok { color: var(--green); } .sig-status.bad { color: var(--amber); }
.sig-box { background: #fff; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.sig-box canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; }
.sig-box img { max-width: 100%; display: block; }
.sig-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Settings > Look */
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.look-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); cursor: pointer; }
.look-card input { position: absolute; opacity: 0; pointer-events: none; }
.look-card:has(input:checked) { border-color: var(--accent); box-shadow: var(--glow); }
.look-card:has(input:checked) b::after { content: "  ✓"; color: var(--accent); }
.look-sw { height: 26px; border-radius: 7px; box-shadow: 0 0 12px rgba(0, 0, 0, .25); }
.look-custom input[type=color] { width: 40px; height: 28px; }

/* touch view (The old program's big-card bench screen) */
.touch-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.touch-top .grow { flex: 1; }
.tbtn { padding: 10px 16px; border-radius: 10px; font-weight: 800; color: #fff; background: var(--sc); text-decoration: none; box-shadow: 0 0 12px color-mix(in srgb, var(--sc) 50%, transparent); border: 2px solid transparent; }
.tbtn.on { border-color: #fff; }
.tbtn:hover { text-decoration: none; filter: brightness(1.12); }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; position: relative; box-shadow: var(--shadow); display: flex; flex-direction: column;
  border-top: 3px solid var(--sc); }
.tcard:hover { box-shadow: var(--shadow), 0 0 18px color-mix(in srgb, var(--sc) 35%, transparent); }
.ttag { position: absolute; top: 10px; left: 10px; background: var(--sc); color: #fff; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 6px; }
.tbody { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; padding: 38px 16px 14px; flex: 1; }
.tdev { width: 140px; height: 104px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--sc) 30%, transparent), transparent 70%); position: relative; }
.tdev .i { width: 84px; height: 84px; stroke-width: 1.2; color: var(--text); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--sc) 60%, transparent)); }
.tdev .brand { position: absolute; bottom: 4px; right: 4px; }
/* device pictures (our own drawings: style + brand in plain letters) */
.dart { display: inline-flex; line-height: 0; }
.dart svg { width: 100%; height: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.dart-lg { width: 136px; }
.dart-md { width: 74px; }
.dart-sm { width: 46px; }
.dart-sm svg { filter: none; }
.brand.brand-art { width: 52px; height: 36px; padding: 1px; background: var(--card2); }
.card:has(.brand-art) { grid-template-columns: 52px 1fr 30px; }
.wo-title .dart { flex: none; }
.tinfo { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.tinfo .tname { font-weight: 800; font-size: 17px; }
.tinfo .tnums { color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; justify-content: center; }
.tinfo .tnums .i { width: 14px; height: 14px; }
.tinfo .tcred { font-size: 13px; margin-top: 6px; }
.tfoot { display: flex; gap: 16px; padding: 9px 14px; background: var(--card2); border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
.tfoot a { display: flex; align-items: center; gap: 5px; color: var(--muted); }

/* login */
body.bare { background: radial-gradient(900px 500px at 70% 10%, rgba(var(--n1-rgb), .14), transparent 60%), radial-gradient(800px 600px at 10% 100%, rgba(140, 82, 255, .14), transparent 60%), #050811; }
.login-card { max-width: 390px; margin: 9vh auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 28px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45), var(--glow); }
.login-card.wide { max-width: 470px; }
.login-card .btn.big { width: 100%; justify-content: center; margin-top: 8px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-brand .i { width: 42px; height: 42px; color: var(--accent); filter: drop-shadow(0 0 8px rgba(var(--n1-rgb), .6)); }
.login-brand b { display: block; font-size: 18px; }
.login-brand small { color: var(--muted); }
body.bare .flash { max-width: 470px; margin: 20px auto 0; }

/* dialogs */
.dlg { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; max-width: 560px; width: calc(100% - 30px); background: var(--card); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .5), var(--glow); }
.dlg::backdrop { background: rgba(3, 6, 12, .65); backdrop-filter: blur(3px); }
.dlg p { margin: 0 0 10px; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.dlg h2 .i { color: var(--accent); width: 22px; height: 22px; }

/* ---------- smaller screens (tablet at the counter, phone) ---------- */
@media (max-width: 1500px) {
  .tabs a { padding: 0 11px; }
  .user span { display: none; }
}
@media (max-width: 1200px) {
  .wo-cols, .cols { grid-template-columns: 1fr; }
  .cols3 { grid-template-columns: 1fr 1fr; }
  .tabs a span { display: none; }
}
@media (max-width: 900px) {
  :root { --side-w: 280px; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; z-index: 40; top: 48px; bottom: 0; left: 0; width: var(--side-w); box-shadow: 4px 0 30px rgba(0, 0, 0, .5); }
  body.side-toggled .side { display: block; }
  body.side-toggled .shell { grid-template-columns: 1fr; }
  .store-btn { width: auto; max-width: 40vw; }
  .tabs { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .search { display: none; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .cols3 { grid-template-columns: 1fr; }
  .main { padding: 12px 12px 70px; }
  .fr { grid-template-columns: 1fr; gap: 4px; }
  .led-row { grid-template-columns: 100px 1fr 30px; }
  .dock { margin: 16px -12px -70px; padding: 8px 12px; }
}
@media (max-width: 560px) {
  .store-btn { max-width: 40vw; padding: 0 10px; gap: 6px; }
  .store-btn .i { width: 18px; height: 18px; }
  .corner-logo { height: 26px; max-width: 90px; }
  .brand-word { font-size: 15px; letter-spacing: 1px; }
  .who { gap: 5px; padding-right: 6px; }
  .user { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .tabs a { padding: 0 9px; }
  .totals { min-width: 0; width: 100%; }
  .prob-grid { grid-template-columns: 1fr; }
  .tbody { grid-template-columns: 1fr; }
  .tdev { margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .g-seg, .eq-col, .area-line { animation: none; stroke-dashoffset: 0; }
}

.avant-key { font-family: ui-monospace, Consolas, monospace; font-size: 30px; font-weight: 800; letter-spacing: 4px; margin: 6px 0 12px; user-select: all; }
/* Command Center: Apollo-style job buttons (always the dark mission-control look) */
.cc { --cc-bg: #060b16; background: radial-gradient(circle at 20% 0%, #10203a 0%, var(--cc-bg) 60%); color: #dbe7ff;
  border-radius: 14px; padding: 16px; border: 1px solid #1b2a46; min-height: 60vh; }
.cc:fullscreen { border-radius: 0; padding: 24px; overflow: auto; }
.cc-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.cc-top h1 { margin: 0; font-size: 22px; color: #e8f1ff; display: flex; align-items: center; gap: 8px; }
.cc-tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.cc-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-lg { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; padding: 3px 8px; border-radius: 6px;
  border: 2px solid var(--cc); color: var(--cc); background: rgba(0, 0, 0, .3); }
.cc-status { font-size: 13px; color: #8ea6cf; margin: 4px 0 12px; font-family: ui-monospace, Consolas, monospace; }
.cc-empty { color: #8ea6cf; text-align: center; padding: 40px 10px; }
.look-working { --cc: #3b82f6; } .look-done { --cc: #22c55e; } .look-problem { --cc: #ef4444; }
.look-needs_you { --cc: #f59e0b; } .look-quiet { --cc: #6b7280; } .look-idle { --cc: #3b82f6; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
.cc-btn { position: relative; aspect-ratio: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 10px; border-radius: 16px; cursor: pointer; color: #eef4ff; font: inherit; text-align: center;
  background: linear-gradient(160deg, #1a2438, #0b111d 70%); border: 3px solid var(--cc);
  box-shadow: 0 0 0 4px #05080f, 0 0 0 6px #2a364d, inset 0 2px 0 rgba(255, 255, 255, .08), inset 0 -10px 24px rgba(0, 0, 0, .5), 0 0 22px -4px var(--cc);
  transition: transform .12s; }
.cc-btn:hover { transform: translateY(-2px); }
.cc-btn:active { transform: translateY(1px); }
.cc-btn:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
.cc-cust { font-size: 12.5px; color: #a9bcdd; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1em; }
.cc-num { font-family: ui-monospace, Consolas, "Courier New", monospace; font-weight: 800; font-size: 34px; letter-spacing: 2px; line-height: 1;
  color: #fff; text-shadow: 0 0 12px var(--cc); }
.cc-lcd { width: 100%; overflow: hidden; background: #02050b; border: 1px solid #22314d; border-radius: 6px; padding: 6px 8px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .9); }
.cc-lcd-t { display: inline-block; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 14px; font-weight: 700;
  color: var(--cc); text-shadow: 0 0 6px var(--cc); }
.cc-lcd-t.scroll { animation: cc-marquee var(--dur, 6s) ease-in-out infinite alternate; }
@keyframes cc-marquee { 0%, 15% { transform: translateX(0); } 85%, 100% { transform: translateX(var(--dist)); } }
.cc-bar { width: 100%; height: 6px; border-radius: 3px; background: #0d1626; overflow: hidden; }
.cc-bar i { display: block; height: 100%; background: var(--cc); box-shadow: 0 0 8px var(--cc); transition: width .6s; }
.cc-foot { font-size: 11px; color: #7f93b6; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-btn.look-working { animation: cc-pulse 2.4s ease-in-out infinite; }
@keyframes cc-pulse { 50% { box-shadow: 0 0 0 4px #05080f, 0 0 0 6px #2a364d, inset 0 2px 0 rgba(255, 255, 255, .08), inset 0 -10px 24px rgba(0, 0, 0, .5), 0 0 34px 2px var(--cc); } }
.cc-btn.flash { animation: cc-flash .9s steps(2, jump-none) infinite; }
@keyframes cc-flash { 0% { background: linear-gradient(160deg, #1a2438, #0b111d 70%); } 100% { background: var(--cc); } }
.cc-btn.flash .cc-num { text-shadow: 0 0 6px #000; }
.cc-btn.flash .cc-cust, .cc-btn.flash .cc-foot { color: #fff; text-shadow: 0 1px 3px #000; }
.cc .btn.ghost { color: #dbe7ff; border-color: #3a4a68; }
.cc-btn.look-quiet .cc-num { color: #b7c0cf; text-shadow: none; }
.cc-panel { max-width: 760px; width: calc(100% - 24px); border: 2px solid #2a364d; border-radius: 14px; padding: 16px 18px; }
.cc-p-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 18px; }
.cc-p-now { margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: #02050b; color: var(--cc); border: 2px solid var(--cc);
  font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 16px; }
.cc-p-q { margin: 10px 0; padding: 10px 12px; border-radius: 8px; border: 2px solid #f59e0b; background: rgba(245, 158, 11, .1); }
.cc-p-qt { font-weight: 700; margin-bottom: 8px; white-space: pre-wrap; }
.cc-p-choices, .cc-p-btns, .cc-p-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.cc-panel .btn:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(1); box-shadow: none; }
.cc-pairs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cc-pair { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px;
  border: 2px solid #f59e0b; background: rgba(245, 158, 11, .14); color: #fde7c2; animation: cc-pairglow 1.6s ease-in-out infinite; }
.cc-pair .grow { flex: 1; min-width: 200px; }
@keyframes cc-pairglow { 50% { box-shadow: 0 0 18px -2px #f59e0b; } }
.cc-p-screen { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; margin: 8px 0; }
.cc-p-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.cc-p-cols h4 { margin: 6px 0; font-size: 13px; }
.cc-p-list { list-style: none; margin: 0; padding: 0; font-size: 12.5px; max-height: 220px; overflow: auto; }
.cc-p-list li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.cc-p-list li.look-problem { color: #ef4444; } .cc-p-list li.look-needs_you { color: #d97706; }
@media (max-width: 640px) {
  .cc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cc-num { font-size: 26px; }
  .cc-p-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-btn.look-working, .cc-lcd-t.scroll { animation: none; }
}

/* ---- Help Center, Show me tours and the welcome tour (beta-0.32) ---- */
.dlg-btns { flex-wrap: wrap; }
.help-q { width: min(520px, 100%); padding: 10px 13px; font-size: 15px; }
.help-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 14px; align-items: start; }
.help-group { margin: 0; }
.help-list { padding: 4px 0; }
.help-topic { border-top: 1px solid var(--line2); }
.help-topic:first-child { border-top: 0; }
.help-topic > summary { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; list-style: none; }
.help-topic > summary::-webkit-details-marker { display: none; }
.help-topic > summary::before { content: "▸"; color: var(--accent); width: 10px; transition: transform .15s; }
.help-topic[open] > summary::before { transform: rotate(90deg); }
.help-topic > summary:hover { background: var(--hover); }
.help-t { flex: 1; font-weight: 600; }
.help-topic > summary .btn, .help-topic > summary .small { flex-shrink: 0; }
.help-b { padding: 0 16px 10px 34px; }
.help-b p { margin: 0 0 8px; line-height: 1.5; }
.flash.practice { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.flash.practice .i { width: 22px; height: 22px; flex-shrink: 0; }
.practice-done { max-width: 720px; }
.practice-done .form-btns { justify-content: flex-start; flex-wrap: wrap; }

/* the glowing frame and the bubble (tour.js) */
.tour-shade { position: fixed; inset: 0; z-index: 900; background: rgba(3, 6, 12, .55); }
.tour-ring { position: fixed; z-index: 901; border-radius: 10px; pointer-events: none; transition: all .25s ease;
  box-shadow: 0 0 0 3px var(--n1), 0 0 22px 6px rgba(var(--n1-rgb), .65), 0 0 0 9999px rgba(3, 6, 12, .55); animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 3px var(--n1), 0 0 34px 10px rgba(var(--n1-rgb), .85), 0 0 0 9999px rgba(3, 6, 12, .55); } }
.tour-bub { position: fixed; z-index: 902; width: min(380px, calc(100vw - 32px)); background: var(--card); color: var(--text); border: 1px solid rgba(var(--n1-rgb), .6);
  border-radius: 14px; padding: 16px 18px 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 18px rgba(var(--n1-rgb), .3); }
.tour-bub.mid { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tour-bub h3 { margin: 0 0 6px; font-size: 17px; color: var(--accent); }
.tour-bub p { margin: 0 0 12px; line-height: 1.5; }
.tour-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-btns .grow { flex: 1; }
.tour-count { font-size: 12px; color: var(--muted); }
.tour-pill { position: fixed; z-index: 902; right: 16px; bottom: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: calc(100vw - 32px);
  background: var(--card); border: 1px solid rgba(var(--n1-rgb), .6); border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
@media (prefers-reduced-motion: reduce) { .tour-ring { animation: none; transition: none; } }
@media print { .tour-shade, .tour-ring, .tour-bub, .tour-pill { display: none !important; } }

/* Shop computers board (beta-0.52): green / red / grey, readable from across the room */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shop-tile { display: block; padding: 14px 16px; border-radius: 12px; color: #fff; text-decoration: none; min-height: 96px; overflow-wrap: anywhere; }
.shop-tile:hover { color: #fff; filter: brightness(1.08); }
.shop-green { background: #15803d; } .shop-red { background: #b91c1c; } .shop-grey { background: #4b5563; }
.shop-old { opacity: .45; }
.shop-name { font-size: 20px; font-weight: 700; }
.shop-look { font-weight: 600; }
.shop-reason { margin-top: 6px; font-weight: 600; }
.shop-job { margin-top: 6px; }
.shop-text, .muted-on { color: rgba(255, 255, 255, .85); font-size: 13px; }
.shop-bar { height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(0, 0, 0, .3); overflow: hidden; }
.shop-bar i { display: block; height: 100%; background: #fff; }
.shop-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.shop-lg { padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 13px; }
.shop-status { margin-bottom: 10px; padding: 8px 12px; border-radius: 8px; background: #b91c1c; color: #fff; font-weight: 600; }
.shop-detail { margin-bottom: 16px; max-width: 560px; }
.shop-dash .box-h a { margin-left: auto; color: #fff; font-size: 13px; text-transform: none; }

/* Two-step login */
.recovery-codes { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.recovery-codes code { display: block; padding: 7px 10px; text-align: center; font-size: 15px; }
.login-card .center { text-align: center; }
.login-card ol { margin: 8px 0; padding-left: 22px; }
