/* Loyalty+ — shared stylesheet (hosted app and demo build) */

:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --ink: #131820;
  --ink-2: #5b6472;
  --ink-3: #8b95a5;
  --line: #e2e7ef;
  --line-2: #d3dae5;
  --accent: #0b5cff;
  --accent-ink: #ffffff;
  --good: #0f8a4d;
  --good-bg: #e6f6ed;
  --warn: #9a6200;
  --warn-bg: #fdf3e0;
  --bad: #c0392b;
  --bad-bg: #fdeceb;
  --info-bg: #e9f0ff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 20px rgba(16,24,40,.05);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

:root:not([data-theme="light"]) {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1218;
    --panel: #161c25;
    --panel-2: #1b222c;
    --ink: #e9edf3;
    --ink-2: #a3adbc;
    --ink-3: #7c8595;
    --line: #262f3b;
    --line-2: #333e4d;
    --accent: #5b8dff;
    --accent-ink: #06101f;
    --good: #4ecf8b;
    --good-bg: #102a1d;
    --warn: #f0b344;
    --warn-bg: #2c2312;
    --bad: #ff8175;
    --bad-bg: #2e1614;
    --info-bg: #16203a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1218; --panel: #161c25; --panel-2: #1b222c; --ink: #e9edf3; --ink-2: #a3adbc;
  --ink-3: #7c8595; --line: #262f3b; --line-2: #333e4d; --accent: #5b8dff; --accent-ink: #06101f;
  --good: #4ecf8b; --good-bg: #102a1d; --warn: #f0b344; --warn-bg: #2c2312; --bad: #ff8175;
  --bad-bg: #2e1614; --info-bg: #16203a; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* .field sets display:flex, which would otherwise beat the browser's [hidden] rule */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- layout */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 40; background: var(--panel);
  border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 14px; padding: 10px 16px; flex-wrap: wrap;
}
.logo { font-size: 19px; font-weight: 800; letter-spacing: -.5px; white-space: nowrap; }
.logo span { color: var(--accent); }
.topbar .spacer { flex: 1; }
.who { text-align: right; line-height: 1.25; }
.who b { display: block; font-size: 13px; }
.who small { color: var(--ink-2); font-size: 11.5px; }

/* Checkboxes and radios must be excluded here: the padding and border below
   are meant for text fields, and on a checkbox they inflate it into a wide
   rounded box that sits on top of its own label. */
.scope-select, .btn, .field input:not([type="checkbox"]):not([type="radio"]),
.field select, .field textarea, .input:not([type="checkbox"]):not([type="radio"]) {
  border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 8px;
  padding: 7px 10px; color: var(--ink);
}
.scope-select { max-width: 230px; }

/* ------------------------------------------------------------- side nav
   Twenty sections will not fit across the top of a screen — the row scrolled
   sideways and the left-most ones fell off the edge. They run down the side in
   groups instead. Wide screens get it pinned open; anything narrower gets the
   same markup as a drawer over the page, opened by ☰ in the top bar. */
.shell { display: flex; flex: 1; align-items: flex-start; min-height: 0; }

.sidenav {
  width: 208px; flex: none; align-self: stretch;
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 12px 8px 28px;
  position: sticky; top: 53px; max-height: calc(100vh - 53px); overflow-y: auto;
}
.nav-group { margin-bottom: 11px; }
.nav-group:last-child { margin-bottom: 0; }
.nav-head {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-2); opacity: .7; padding: 5px 10px 3px;
}
.sidenav button {
  display: block; width: 100%; text-align: left; background: none;
  border: 0; border-left: 2px solid transparent; border-radius: 0 8px 8px 0;
  padding: 7px 10px; margin-bottom: 1px; font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
}
.sidenav button:hover { color: var(--ink); background: var(--panel-2); }
.sidenav button.on {
  color: var(--accent); background: var(--panel-2);
  border-left-color: var(--accent); font-weight: 650;
}
.navtoggle, .nav-back { display: none; }

/* min-width:0 or a wide table inside a flex child refuses to shrink and pushes
   the whole page sideways instead of scrolling within its own container. */
main { padding: 18px; max-width: 1440px; width: 100%; margin: 0 auto; flex: 1; min-width: 0; }

@media (max-width: 1000px) {
  .navtoggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: none; font-size: 16px; line-height: 1;
    background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px;
    color: var(--ink); cursor: pointer;
  }
  /* The ☰ costs width the top bar did not have spare, and the name is already
     on the account menu — dropping it here keeps the bar on one line. */
  .who { display: none; }
  .sidenav {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: 246px;
    max-height: none; transform: translateX(-100%); transition: transform .18s ease;
    padding-top: calc(16px + var(--safe-top, 0px));
    padding-left: calc(8px + var(--safe-left, 0px));
    box-shadow: 0 0 40px rgba(0, 0, 0, .45);
  }
  .sidenav.open { transform: none; }
  .nav-back { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .45); }
  .nav-back[hidden] { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sidenav { transition: none; } }

/* ----------------------------------------------------------------- bits */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px;
}
.card > h2, .card > h3 { margin: 0 0 12px; font-size: 14px; letter-spacing: .2px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 14.5px; }
.card-head .spacer { flex: 1; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; box-shadow: var(--shadow);
}
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--ink-2); }
.stat .v { font-size: 27px; font-weight: 750; letter-spacing: -1px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.btn {
  cursor: pointer; font-weight: 550; font-size: 13px; padding: 8px 13px;
  transition: filter .12s ease, background .12s ease;
}
.btn:hover { filter: brightness(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label { font-size: 11.5px; color: var(--ink-2); font-weight: 550; }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select, .field textarea { width: 100%; }
.field input[type="checkbox"], .field input[type="radio"] { width: auto; flex: none; accent-color: var(--accent); }
.field.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.split { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.data th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--ink-2); padding: 9px 10px; background: var(--panel-2);
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--panel-2); }
table.data tr.selected { background: var(--info-bg); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  font-weight: 600; letter-spacing: .2px; white-space: nowrap;
}
.pill.new { background: var(--info-bg); color: var(--accent); }
.pill.invited { background: var(--info-bg); color: var(--accent); }
.pill.contacted { background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.pill.callback { background: var(--warn-bg); color: var(--warn); }
.pill.booked { background: var(--good-bg); color: var(--good); }
.pill.attended, .pill.sold, .pill.accepted, .pill.approved, .pill.completed, .pill.arrived { background: var(--good-bg); color: var(--good); }
.pill.not_interested, .pill.unreachable, .pill.declined, .pill.no_show, .pill.cancelled { background: var(--bad-bg); color: var(--bad); }
.pill.requested { background: var(--warn-bg); color: var(--warn); }
.pill.draft, .pill.presented, .pill.confirmed, .pill.pending, .pill.exported, .pill.sent, .pill.opened { background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line-2); }

.prefs { display: inline-flex; gap: 3px; }
.pref {
  width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 700; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--ink-3);
}
.pref.on { background: var(--good-bg); border-color: transparent; color: var(--good); }
.pref.dnc { background: var(--bad-bg); border-color: transparent; color: var(--bad); }

.banner {
  border-radius: 8px; padding: 10px 13px; font-size: 13px; margin-bottom: 12px;
  border: 1px solid var(--line-2); background: var(--panel-2);
}
.banner.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.banner.bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.banner.good { background: var(--good-bg); border-color: transparent; color: var(--good); }
.banner.info { background: var(--info-bg); border-color: transparent; color: var(--accent); }

.empty { padding: 34px 16px; text-align: center; color: var(--ink-2); font-size: 13px; }

/* ---------------------------------------------------------- slot picker */
.slotday { margin-bottom: 14px; }
.slotday h4 { margin: 0 0 7px; font-size: 12.5px; color: var(--ink-2); }
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.slot {
  border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 7px;
  padding: 7px 4px; text-align: center; cursor: pointer; font-size: 12.5px; font-weight: 600;
}
.slot small { display: block; font-weight: 400; font-size: 10px; color: var(--ink-3); }
.slot:hover:not(.full) { border-color: var(--accent); }
.slot.full { opacity: .45; cursor: not-allowed; }
.slot.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slot.on small { color: var(--accent-ink); opacity: .8; }

/* ------------------------------------------------------------- timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li:before {
  content: ''; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--line-2);
}
.timeline li.inbound:before { background: var(--accent); }
.timeline .when { font-size: 11px; color: var(--ink-3); }

/* --------------------------------------------------------------- modals */
.modal-back {
  position: fixed; inset: 0; background: rgba(10,14,20,.5); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 24px 14px; overflow: auto;
}
.modal {
  background: var(--panel); border-radius: 12px; width: 100%; max-width: 720px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3); border: 1px solid var(--line);
}
.modal.wide { max-width: 980px; }
.modal header {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.modal header h3 { margin: 0; font-size: 15px; flex: 1; }
.modal .body { padding: 16px; }
.modal footer { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.x { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-2); }

/* --------------------------------------------------------------- toasts */
.toasts { position: fixed; bottom: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 13px; max-width: 340px;
}
.toast.bad { border-left-color: var(--bad); }
.toast.good { border-left-color: var(--good); }

/* ---------------------------------------------------------- login page */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login {
  width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 26px;
}
.login .logo { font-size: 27px; margin-bottom: 3px; }
.login p.sub { margin: 0 0 20px; color: var(--ink-2); font-size: 13px; }
.login .field { margin-bottom: 12px; }
.login .btn { width: 100%; justify-content: center; margin-top: 6px; }
.demo-users { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.demo-users h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); }
.demo-user {
  display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer;
}
.demo-user:hover { border-color: var(--accent); }
.demo-user b { font-size: 13px; }
.demo-user small { display: block; color: var(--ink-2); font-size: 11px; }
.demo-user .rolechip {
  margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  background: var(--info-bg); color: var(--accent); border-radius: 999px; padding: 2px 8px; font-weight: 700;
}

/* --------------------------------------------------------- offer editor */
.offer-figures { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.figrow { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.figrow.total { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 9px; font-weight: 700; }
.figrow .v { font-variant-numeric: tabular-nums; }
.headline-fig {
  background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px;
}
.headline-fig .k { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; opacity: .85; }
.headline-fig .v { font-size: 30px; font-weight: 800; letter-spacing: -1.2px; }

.bar { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }

.tag {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  background: var(--warn-bg); color: var(--warn); border-radius: 5px; padding: 2px 6px;
}

.demo-ribbon {
  background: var(--warn-bg); color: var(--warn); font-size: 12px; padding: 6px 16px;
  border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.demo-ribbon .spacer { flex: 1; }

/* ------------------------------------------------ bell and notifications */
.bell {
  position: relative; background: none; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 9px; cursor: pointer; font-size: 15px; line-height: 1;
}
.bell:hover { border-color: var(--accent); }
.bell-count {
  position: absolute; top: -6px; right: -6px; background: var(--bad); color: #fff;
  border-radius: 999px; font-size: 10px; font-weight: 700; padding: 1px 5px; min-width: 16px; text-align: center;
}
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox li {
  display: flex; gap: 10px; padding: 11px 10px; border-bottom: 1px solid var(--line); cursor: pointer;
  border-left: 3px solid transparent; border-radius: 6px;
}
.inbox li:hover { background: var(--panel-2); }
.inbox li.unread { border-left-color: var(--accent); background: var(--info-bg); }
.inbox li:last-child { border-bottom: 0; }
.inbox .ico { font-size: 17px; line-height: 1.3; }
.inbox .when { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

/* ------------------------------------------------ handoff from the phone */
.card.handoff { border: 2px solid var(--accent); background: var(--info-bg); }
.card.handoff .card-head h2 { color: var(--accent); }

/* -------------------------------------------------------- scan-only hero */
.scan-hero { text-align: center; padding: 40px 22px; max-width: 560px; margin: 0 auto 16px; }
.scan-hero-icon { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.scan-hero h2 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.3px; }
.scan-hero p { margin: 0 auto; max-width: 420px; font-size: 13.5px; }
.btn.big { font-size: 15px; padding: 13px 26px; margin-top: 18px; }

/* ---------------------------------------------------------- call script */
.script-card { border: 1px solid var(--warn) !important; }
blockquote.script {
  margin: 0; padding: 11px 14px; background: var(--warn-bg); color: var(--warn);
  border-radius: 8px; font-size: 13.5px; line-height: 1.5; font-style: italic;
}
.yesno { display: flex; gap: 8px; }
.yesno .btn { min-width: 74px; justify-content: center; }

/* ----------------------------------------------------- offer builder bits */
.offer-slot {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.offer-slot:last-child { border-bottom: 0; }
.slot-no {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; margin-top: 18px;
  background: var(--info-bg); color: var(--accent); font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
ol.offer-list { margin: 12px 0 0; padding-left: 20px; }
ol.offer-list li { padding: 5px 0; font-size: 13px; }
ol.offer-list li b { font-weight: 650; }
ol.offer-list li span { display: block; color: var(--ink-2); font-size: 12px; margin-top: 2px; }

/* --------------------------------------------------- offer sheet preview */
.sheet-preview {
  background: #f2f4f7; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px;
  height: min(66vh, 780px);
}
.sheet-preview iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; }

/* ------------------------------------------------------- camera scanner */
.scanner {
  position: relative; background: #000; border-radius: 10px; overflow: hidden;
  aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.plate-guide {
  position: absolute; left: 10%; right: 10%; top: 37%; height: 26%;
  border: 2px dashed rgba(255, 255, 255, .85); border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35);
}

/* ------------------------------------------------------ invitation page */
.invite-wrap { min-height: 100vh; display: flex; justify-content: center; padding: 24px 14px 40px; }
.invite {
  width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 24px;
}
/* The invitation is the one page a customer sees, so the dealership's mark
   leads it, centred, with the site name under it. */
.invite-head {
  border-bottom: 3px solid var(--accent); padding-bottom: 14px; margin-bottom: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.invite-head .logo { font-size: 24px; }
.invite-head .brand-logo { max-height: 78px; max-width: min(300px, 100%); margin: 2px auto 0; }
.invite h1 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.3px; }
.invite h2 { font-size: 14px; margin: 20px 0 4px; }
.invite .btn { width: 100%; margin-top: 10px; }
.invite .row .btn { width: auto; flex: 1; }
.invite .slotgrid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.invite .slot { padding: 9px 4px; }
.ref-card {
  background: var(--info-bg); border-radius: 10px; padding: 12px 14px; margin: 16px 0; text-align: center;
}
.ref-card .k { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--ink-2); }
.ref-card .v { font-size: 21px; font-weight: 700; letter-spacing: 1.5px; color: var(--accent); }
.invite-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 20px; }

/* preview frame used to show the invitation inside the app */
.phone-frame {
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg);
  max-height: 62vh; overflow: auto; padding: 8px;
}
.phone-frame .invite { box-shadow: none; max-width: 100%; }
.phone-frame .invite-wrap { min-height: 0; padding: 0; }

/* -------------------------------------------------------- audit entries */
.audit-detail { color: var(--ink-2); font-size: 12px; }
.act {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink-2);
}
.act.view { background: var(--info-bg); border-color: transparent; color: var(--accent); }
.act.create { background: var(--good-bg); border-color: transparent; color: var(--good); }
.act.export, .act.print { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.act.consent_change, .act.purge, .act.delete { background: var(--bad-bg); border-color: transparent; color: var(--bad); }

@media (max-width: 640px) {
  main { padding: 12px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .who { display: none; }
  .tabs { top: 49px; }
}
@media print { .topbar, .tabs, .sidenav, .navtoggle, .nav-back, .demo-ribbon, .toasts { display: none; } }

/* --------------------------------------------------- capacity by day */
.cap-days { max-width: 420px; }
.cap-days td { vertical-align: middle; }
.cap-days tr.weekend td:first-child { color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------- subtabs */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.subtabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 11px;
  color: var(--ink-2); cursor: pointer; font-size: 12.5px; font-weight: 550; white-space: nowrap;
}
.subtabs button:hover { color: var(--ink); }
.subtabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }

/* ------------------------------------------------------- today's jobs */
.today-card { border-left: 3px solid var(--accent); }
.today-jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.today-job {
  display: flex; align-items: baseline; gap: 9px; text-align: left; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px;
}
.today-job:hover { border-color: var(--accent); }
.today-job .n { font-size: 26px; font-weight: 750; letter-spacing: -1px; color: var(--accent); }
.today-job .l { font-size: 12.5px; color: var(--ink-2); line-height: 1.3; }

/* ------------------------------------------------- showroom / arrivals */
/* Sits under the top bar alone now the tab strip is gone from beneath it. */
.showroom-head { position: sticky; top: 53px; z-index: 30; }
.slot-block .slot-time { font-size: 20px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.arrivals { display: grid; gap: 10px; }
.arrival {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center;
  border: 1px solid var(--line-2); border-left: 4px solid var(--line-2);
  border-radius: 10px; padding: 14px 16px; background: var(--panel-2);
}
.arrival.in { border-left-color: var(--good); background: var(--good-bg); }
.arrival.missed { border-left-color: var(--bad); opacity: .72; }
.arrival-name { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.arrival-name .tag { margin-left: 6px; vertical-align: 2px; }
.arrival-note {
  margin-top: 6px; padding-left: 9px; border-left: 2px solid var(--line-2); font-style: italic;
}
.arrival-state { text-align: right; }
.arrival-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.btn.big-touch { padding: 11px 16px; font-size: 14px; min-height: 44px; }
@media (min-width: 900px) {
  .arrival { grid-template-columns: minmax(0, 1fr) auto auto; }
  .arrival-actions { grid-column: auto; }
}

/* ------------------------------------------------------- sold deal form */
.offer-used { display: grid; gap: 6px; }
.used-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; font-size: 13px;
}
.used-row:hover { border-color: var(--accent); }
.used-row input { margin-top: 2px; }

/* --------------------------------------------------------- one-time code */
.code-box {
  margin: 16px 0; padding: 18px; text-align: center; border-radius: 10px;
  background: var(--info-bg); border: 1px dashed var(--accent);
}
.code-box .mono { font-size: 30px; font-weight: 700; letter-spacing: 6px; color: var(--accent); }

/* --------------------------------------------------------- status strip */
.status-strip { background: var(--panel-2); border: 1px solid var(--line-2) !important; }

/* -------------------------------------------------------------- journey */
.journey-line { display: flex; gap: 4px; flex-wrap: wrap; }
.journey-step {
  font-size: 11px; font-weight: 650; padding: 4px 10px; border-radius: 999px;
  background: var(--panel-2); color: var(--ink-3); border: 1px solid var(--line-2);
}
.journey-step.on { background: var(--info-bg); color: var(--accent); border-color: transparent; }

/* ---------------------------------------------------- sign-in extras */
.login .alt {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center;
}
.login .alt button { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 12.5px; }

@media (max-width: 640px) {
  .showroom-head { position: static; }
  .arrival { padding: 12px; }
  .code-box .mono { font-size: 24px; letter-spacing: 4px; }
}

/* --------------------------------------------------------------- funnel */
.funnel { display: grid; gap: 8px; }
.fn-row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 96px; gap: 12px; align-items: center;
}
.fn-label { font-size: 13px; font-weight: 600; }
.fn-track { height: 26px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.fn-track > i {
  display: block; height: 100%; background: var(--accent);
  border-radius: 6px 0 0 6px; transition: width .35s ease;
}
.fn-value { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.fn-value .muted { display: block; font-size: 11px; }
.fn-note { grid-column: 1 / -1; margin: -4px 0 4px 162px; }
@media (max-width: 700px) {
  .fn-row { grid-template-columns: 110px minmax(0, 1fr) 74px; gap: 8px; }
  .fn-label { font-size: 12px; }
  .fn-note { margin-left: 118px; }
}

/* ------------------------------------------------- invitation extras */
.confirmed {
  text-align: center; padding: 22px 16px 18px; border-radius: 12px;
  background: var(--good-bg); border: 1px solid transparent; margin-bottom: 16px;
}
.confirmed-tick {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--good); color: #fff; font-size: 26px; line-height: 46px; font-weight: 700;
}
.confirmed h2 { color: var(--good); font-size: 18px; }
.confirmed-when { font-size: 16px; margin-top: 8px; line-height: 1.35; }
.confirmed-when b { font-size: 26px; letter-spacing: -.5px; }

.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.cal-row { display: flex; gap: 8px; }
.cal-row .btn { flex: 1; text-align: center; text-decoration: none; justify-content: center; }
.invite h2 { margin-top: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink);
  border-radius: 999px; padding: 8px 13px; font-size: 12.5px; cursor: pointer; font-weight: 550;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.bring {
  margin-top: 22px; padding: 14px; border-radius: 10px; background: var(--panel-2);
  border: 1px solid var(--line); font-size: 13px;
}
.bring ul { margin: 8px 0 0; padding-left: 20px; }
.bring li { padding: 2px 0; }

/* ================================================= installed app =========
 * When Loyalty+ is added to a home screen there is no browser chrome, so the
 * page itself has to keep clear of the notch, the status bar and the home
 * indicator. env() is zero in a normal browser tab, so these are harmless there.
 */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
.topbar {
  padding-top: calc(10px + var(--safe-top));
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
}
.tabs { padding-left: calc(10px + var(--safe-left)); padding-right: calc(10px + var(--safe-right)); }
main {
  padding-left: calc(18px + var(--safe-left));
  padding-right: calc(18px + var(--safe-right));
  padding-bottom: calc(18px + var(--safe-bottom));
}
.login-wrap, .invite-wrap {
  padding-top: calc(24px + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
}
.toasts { bottom: calc(16px + var(--safe-bottom)); right: calc(16px + var(--safe-right)); }
.modal-back { padding-top: calc(24px + var(--safe-top)); padding-bottom: calc(24px + var(--safe-bottom)); }

/* The sticky tab bar sits under the top bar, which is taller once the status
   bar is behind it. Computed rather than guessed so it cannot drift. */
@supports (top: env(safe-area-inset-top)) {
  .sidenav {
    top: calc(53px + var(--safe-top));
    max-height: calc(100vh - 53px - var(--safe-top));
  }
  .showroom-head { top: calc(53px + var(--safe-top)); }
  @media (max-width: 1000px) { .sidenav { top: 0; max-height: none; } }
}

/* An installed app should not look like a page you can pull around. */
@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; }
  main { padding-bottom: calc(30px + var(--safe-bottom)); }
}

/* ------------------------------------------------------- install prompt */
.install-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--info-bg); color: var(--accent); border-bottom: 1px solid var(--line);
  padding: 10px calc(16px + var(--safe-right)) 10px calc(16px + var(--safe-left));
  font-size: 13px;
}
.install-bar .spacer { flex: 1; }
.install-bar b { color: var(--ink); }
.install-steps { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.install-steps li { padding: 3px 0; }

/* ------------------------------------------------ iPad showroom, hands-on */
@media (min-width: 760px) and (pointer: coarse) {
  .arrival { padding: 18px 20px; }
  .arrival-name { font-size: 19px; }
  .btn.big-touch { min-height: 52px; padding: 14px 20px; font-size: 15px; }
  .slot-block .slot-time { font-size: 24px; }
}

/* ==================================================== event control ===== */
.control-head { border-top: 3px solid var(--accent); }
.ctrl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.ctrl-tile {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; cursor: pointer;
}
.ctrl-tile:hover { border-color: var(--accent); }
.ctrl-tile .n {
  font-size: 32px; font-weight: 780; letter-spacing: -1.5px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ctrl-tile .l { font-size: 12px; color: var(--ink-2); line-height: 1.25; }
.ctrl-tile.good .n { color: var(--good); }
.ctrl-tile.warn .n { color: var(--warn); }
.ctrl-tile.bad .n { color: var(--bad); }
.ctrl-next {
  margin-top: 14px; padding: 11px 14px; border-radius: 9px;
  background: var(--info-bg); color: var(--accent); font-size: 13.5px;
}

.ctrl-person {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.ctrl-person:last-child { border-bottom: 0; }
.ctrl-when { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.ctrl-who b { font-size: 15px; }
.ctrl-do { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) {
  .ctrl-person { grid-template-columns: 52px minmax(0, 1fr); }
  .ctrl-do { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ------------------------------------------------------ activity stream */
.stream { list-style: none; margin: 0; padding: 0; }
.stream li {
  display: flex; gap: 11px; align-items: flex-start; padding: 9px 8px;
  border-bottom: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.stream li:last-child { border-bottom: 0; }
.stream li:hover { background: var(--panel-2); }
.stream .ico { font-size: 16px; line-height: 1.35; }
.stream .t { display: block; font-size: 13px; }
.stream .when { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* -------------------------------------------------------- global search */
.gsearch { position: relative; flex: 1 1 260px; max-width: 460px; min-width: 160px; }
.gsearch input { width: 100%; }
.gs-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22); overflow: hidden; max-height: 66vh; overflow-y: auto;
}
.gs-row {
  display: grid; grid-template-columns: minmax(0,1.3fr) 130px minmax(0,1fr) minmax(0,1fr);
  gap: 10px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; font-size: 12.5px;
}
.gs-row:last-child { border-bottom: 0; }
.gs-row:hover, .gs-row.on { background: var(--info-bg); }
.gs-name { font-weight: 650; font-size: 13px; }
.gs-meta { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-empty { padding: 16px; text-align: center; color: var(--ink-2); font-size: 13px; }
@media (max-width: 900px) {
  .gs-row { grid-template-columns: minmax(0,1fr) auto; }
  .gs-row .gs-meta:last-child { display: none; }
}
@media (max-width: 640px) {
  .gsearch { order: 9; flex-basis: 100%; max-width: none; }
}

/* -------------------------------------------------------- offer library */
.tpl-list { display: grid; gap: 6px; }
.tpl-row {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  width: 100%; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; cursor: pointer; font-size: 13px;
}
.tpl-row:hover { border-color: var(--accent); }
.tpl-edit {
  display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1.4fr) 120px auto auto;
  gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) { .tpl-edit { grid-template-columns: 1fr 1fr; } }
.slot-pick { align-self: flex-end; margin-bottom: 4px; }

/* ------------------------------------------------------- handover notes */
.handover-note { border-left: 3px solid var(--accent) !important; }
.hn-items { list-style: none; margin: 10px 0 0; padding: 0; }
.hn-items li {
  display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap;
  padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px;
}
.input.sm { padding: 5px 8px; font-size: 12px; }

/* ===================================================== configuration ===== */
.set-field { margin-bottom: 14px; }
.set-field .tag { margin-left: 6px; vertical-align: 1px; }
.logo-field { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.logo-preview {
  height: 44px; max-width: 150px; object-fit: contain; border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--line); padding: 4px;
}
.logo-preview.empty {
  display: grid; place-items: center; width: 110px; font-size: 11px; color: var(--ink-3);
}
.list-chip { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.list-chip .x {
  background: none; border: 0; color: inherit; cursor: pointer; font-size: 15px;
  line-height: 1; opacity: .7; padding: 0 0 0 2px;
}
.list-chip .x:hover { opacity: 1; }
.list-chip .tag { background: rgba(255,255,255,.2); color: inherit; }

/* ---------------------------------------------------------------- rota */
table.data.rota { min-width: 820px; }
table.data.rota th.num { font-size: 10px; padding: 6px 2px; text-align: center; }
.rota-cell { padding: 0 !important; width: 26px; border-left: 1px solid var(--line); }
.rota-cell.on { background: var(--good); }
.rota-cell.assumed { background: var(--good-bg); }
.rota-cell.lunch { background: var(--warn); }
.rota-cell.break { background: var(--warn-bg); }
.rota-cell.blocked { background: var(--ink-3); }
.rota-cell.off { background: var(--bad-bg); }
.rota-cell.out { background: var(--panel-2); }
tr.rota-total td { background: var(--panel-2); border-top: 2px solid var(--line-2); }
tr.rota-total td.num { text-align: center; font-variant-numeric: tabular-nums; }
tr.rota-total td.zero b { color: var(--bad); }
.rota-key { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.rota-key span { display: inline-flex; align-items: center; gap: 6px; }
.rota-key i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); }
.rota-key i.on { background: var(--good); }
.rota-key i.assumed { background: var(--good-bg); }
.rota-key i.lunch { background: var(--warn); }
.rota-key i.break { background: var(--warn-bg); }
.rota-key i.blocked { background: var(--ink-3); }
.rota-key i.off { background: var(--bad-bg); }
.rota-key i.out { background: var(--panel-2); }

/* --------------------------------------------------------- call queue */
.q-score {
  display: inline-block; min-width: 34px; padding: 3px 8px; border-radius: 7px;
  background: var(--info-bg); color: var(--accent); font-variant-numeric: tabular-nums;
}
.why {
  display: inline-block; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 7px; margin: 0 3px 3px 0; font-size: 11.5px; white-space: nowrap;
}
.why b { color: var(--accent); }

/* -------------------------------------------------- invitation branding */
.brand-logo { max-height: 40px; max-width: 180px; object-fit: contain; display: block; }

/* ================================================= data safety ========== */
.dup-group {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; margin-bottom: 14px;
  background: var(--panel-2);
}
.dup-why {
  font-size: 12px; font-weight: 650; color: var(--warn); background: var(--warn-bg);
  display: inline-block; padding: 3px 9px; border-radius: 999px; margin-bottom: 10px;
}

.import-summary {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line);
}
.import-summary > div { display: flex; flex-direction: column; }
.import-summary .n { font-size: 26px; font-weight: 750; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.import-summary .l { font-size: 11.5px; color: var(--ink-2); }
.import-summary .arrow { font-size: 20px; color: var(--ink-3); }
.import-summary .good .n { color: var(--good); }
.import-summary .warn .n { color: var(--warn); }
.import-summary .bad .n { color: var(--bad); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex; gap: 12px; align-items: flex-start; padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: 0; }
.checklist .tick {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: 0 0 auto;
}
.checklist li.ok .tick { background: var(--good-bg); color: var(--good); }
.checklist li.no .tick { background: var(--warn-bg); color: var(--warn); }
.checklist .body { flex: 1; display: flex; flex-direction: column; gap: 2px; }

/* ---------------------------------------------------- Group D: running it */

/* A middle state between working and broken: email not set up is not a fault,
   but it is something a manager should know before promising a customer a
   confirmation. */
.checklist li.warn .tick { background: var(--warn-bg); color: var(--warn); }

/* Sits above everything, including modals — losing the connection is more
   important than whatever was on top when it happened. */
.net-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
}
.net-bar span { flex: 1; }
.net-bar.off { background: #3b1d1d; color: #ffd9d9; }
.net-bar.lost { background: #4a3410; color: #ffe6b8; }
.net-bar .btn { background: rgba(255, 255, 255, .16); color: inherit; border-color: transparent; }

/* Anything mid-flight is visibly mid-flight, so the second press does not
   happen in the first place. */
.btn[data-busy="1"] { opacity: .65; cursor: progress; }

.device-note { color: var(--ink-3); font-size: 11.5px; }

/* ---------------------------------------------------------------- 1.6.0
   Opportunities, the showroom floor, and the dealership-systems screens. */

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-2);
  border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* A reason that pushes somebody down the list reads differently from one that
   pushes them up — it is still shown, because it still explains the order. */
.why-down { opacity: .8; text-decoration: none; border-style: dashed; }

/* How long somebody has been standing there, next to the time they were due. */
.ctrl-person.attention { border-left: 3px solid var(--bad); background: var(--bad-bg); }
.ctrl-when .wait { font-size: 11px; margin-top: 4px; line-height: 1.25; }
.row-bad td { background: var(--bad-bg); }
.bad-text { color: var(--bad); }

.floor-pill {
  display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600;
  background: var(--good-bg); color: var(--good);
}
.floor-pill.busy { background: var(--warn-bg); color: var(--warn); }
.floor-pill.full { background: var(--bad-bg); color: var(--bad); }

/* Column mapping for a DMS export: many small selects, two or three abreast. */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

.kiosk-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 34px; font-weight: 700;
  letter-spacing: 6px; margin-top: 8px;
}

/* An on/off setting is a real switch rather than a box to type 1 or 0 into —
   the two halves of the product are the one thing a manager reads at a glance. */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 46px; height: 26px; border-radius: 999px; background: var(--line);
  position: relative; cursor: pointer; transition: background .15s;
}
.switch input[type="checkbox"]::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 25, 43, .3); transition: left .15s;
}
.switch input[type="checkbox"]:checked { background: var(--accent); }
.switch input[type="checkbox"]:checked::after { left: 23px; }
.switch span { font-weight: 600; }
