:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1d2330; --muted: #5f6b7a; --line: #e2e6eb;
  --accent: #2456c7; --accent-ink: #fff; --danger: #b42318; --ok: #1a7f37; --warn-bg: #fff6e0; --warn-ink: #7a4d00;
  --navy: #1F3864; --orange: #F4B183;
  --green: #22a55b; --amber: #e0a100; --red: #d92d20; --grey: #9aa4b2;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12151b; --card: #1b2029; --ink: #e7eaf0; --muted: #9aa4b2; --line: #2b323e;
          --accent: #5b8cff; --warn-bg: #3a2e10; --warn-ink: #f5d27a; --danger: #ff6b5e; --ok: #4cc77a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--accent); }
main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; min-width: 0; }
main.solo { max-width: 1200px; }
h1 { font-size: 1.5rem; margin: 8px 0 12px; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 16px;
       background: var(--top-bg, var(--navy)); color: var(--top-ink, #fff); }
.brand { font-weight: 700; text-decoration: none; color: var(--top-ink, #fff); font-size: 1.05rem; }
.picker { display: flex; align-items: center; gap: 8px; flex: 1; margin: 0; min-width: 0; }
.picker label { color: var(--top-muted, #c9d3e6); font-size: .85rem; }
.logout { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.top .who { color: var(--top-muted, #c9d3e6); }
.top button.link { color: var(--top-ink, #fff); }
/* Header gear menu: settings pages, account, Sign out (RMS Portal and the store dashboard; <details>, no script) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
           clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hdr-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.gear { position: relative; }
.gear > summary { list-style: none; cursor: pointer; }
.gear > summary::-webkit-details-marker { display: none; }
.top .gear-btn { background: #fff; color: var(--navy); border-color: transparent; }
.gear[open] > .gear-btn { box-shadow: 0 0 0 2px var(--orange); }
.gear-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 210px; display: flex;
             flex-direction: column; padding: 6px; background: var(--card); color: var(--ink);
             border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgb(0 0 0 / .18); }
.gear-menu a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.gear-menu a:hover { background: var(--bg); }
.gear-menu a.on { color: var(--accent); font-weight: 600; }
.gear-menu .gear-out { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.gear-menu .gear-out button.link { display: block; width: 100%; text-align: left; padding: 9px 12px; color: var(--ink);
                                   border-radius: 6px; text-decoration: none; font: inherit; }
.gear-menu .gear-out button.link:hover { background: var(--bg); }
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "side main";
         min-height: calc(100vh - 56px); }
.shell > main { grid-area: main; margin: 0; max-width: none; width: 100%; padding-left: 24px; padding-right: 24px; }
.shell > main > p.muted, .shell > main > p.warn { max-width: 120ch; }
.side { grid-area: side; display: flex; flex-direction: column; gap: 1px; background: var(--card);
        border-right: 1px solid var(--line); padding: 14px; }
.side a { text-decoration: none; color: var(--ink); padding: 6px 10px; border-radius: 8px; font-size: .92rem; }
.side a:hover { background: var(--bg); }
.side a.on { background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--accent); font-weight: 600; }
.side details { margin: 2px 0; }
.side summary { cursor: pointer; padding: 6px 10px; font-weight: 600; font-size: .92rem; border-radius: 8px; }
.side summary:hover { background: var(--bg); }
.side details a { display: block; padding-left: 22px; font-size: .88rem; }
.side .group { margin: 14px 10px 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* One control system: every button, dropdown, date box and link-button is the same height, radius and type. */
:root { --ctl-h: 36px; --ctl-r: 8px; }
.ctl, select.ctl, input.ctl, .datebar input.ctl, .picker select.ctl {
  box-sizing: border-box; height: var(--ctl-h); margin: 0; padding: 0 12px; width: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; line-height: 1; white-space: nowrap; text-decoration: none;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--ctl-r);
  cursor: pointer; transition: border-color .12s, background-color .12s; }
select.ctl { padding-right: 30px; }
input.ctl { cursor: text; }
.ctl:hover { border-color: var(--accent); }
.ctl:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ctl svg { flex: none; }
.ctl.icon { width: var(--ctl-h); padding: 0; }
.ctl.off { opacity: .4; cursor: default; }
.ctl.off:hover { border-color: var(--line); }
.ctl.primary { background: var(--primary-bg, var(--accent)); border-color: var(--primary-line, var(--accent));
               color: var(--primary-ink, var(--accent-ink)); font-weight: 500; }
.ctl.primary:hover { filter: brightness(1.04); border-color: var(--primary-line, var(--accent)); }
.ctl.button { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); font-weight: 500; }
.ctl.button:hover { background: color-mix(in srgb, var(--accent) 8%, var(--card)); border-color: var(--accent); }
.datebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.datebar .fld { display: inline-flex; align-items: center; gap: 8px; }
.datebar .lb { display: inline; margin: 0 0 0 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.datebar input.ctl { width: 156px; padding: 0 10px; }
.datebar .range { font-variant-numeric: tabular-nums; min-width: 214px; }
.datebar.js .go { display: none; }
.picker select.ctl { max-width: 340px; background: #fff; color: #1d2330; border-color: transparent; }
.picker .ctl.go-hd { background: var(--orange); border-color: var(--orange); color: #1d2330; font-weight: 600; }
.page-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.page-head .ph-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.page-head h1 { margin: 0; }
.page-head .kicker { margin: 0 0 -6px; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .04em;
                     text-transform: uppercase; }
.page-head .sub { margin: 0; color: var(--muted); font-size: .85rem; }
@media (max-width: 599px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side"; }
  .side { border-right: 0; border-top: 1px solid var(--line); }
  .picker { order: 3; flex-basis: 100%; }
  .picker label { display: none; }
  .picker select.ctl { flex: 1; max-width: none; }
  .gear-menu { position: fixed; left: 8px; right: 8px; top: 56px; min-width: 0; }
  .page-head .ph-row > .datebar { width: 100%; }
  .datebar select.ctl { flex: 1 1 100%; }
  .datebar .range { flex: 1; }
  .datebar .fld { flex: 1 1 100%; }
  .datebar .lb { margin-left: 0; width: 44px; }
  .datebar input.ctl { flex: 1; width: auto; }
  .bars .lbl { display: none; }
  .datebar .ctl.primary, .datebar .today-btn { flex: 1 1 100%; }
  .page-head .ph-row > .ctl.button { width: 100%; }
}

.badge { background: var(--red); color: #fff; border-radius: 10px; padding: 0 7px; font-size: .8rem; }
.tag { background: var(--line); border-radius: 4px; padding: 0 6px; font-size: .8rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 0 0 16px; }
.card.narrow { max-width: 480px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid .card { margin: 0; }
.grid + .card { margin-top: 16px; }
label { display: block; margin: 0 0 12px; font-weight: 500; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0 8px 0 0; }
input:not([type=checkbox]), select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row label { flex: 1 1 140px; }
button { font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--primary-bg, var(--accent)); border-color: var(--primary-line, var(--accent));
                 color: var(--primary-ink, var(--accent-ink)); }
button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.actions.stack { flex-direction: column; align-items: flex-start; }
.actions label:not(.check) { margin: 0; }
form.inline { display: inline; }
form.replace { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); max-width: 520px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.card .table-wrap { border: 0; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.status { white-space: nowrap; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.green { background: var(--green); } .dot.amber { background: var(--amber); }
.dot.red { background: var(--red); } .dot.grey { background: var(--grey); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
.ok { color: var(--ok); } .bad { color: var(--danger); font-weight: 600; }
.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); padding: 8px 12px; border-radius: 6px; }
.warn { background: var(--warn-bg); color: var(--warn-ink); padding: 8px 12px; border-radius: 6px; }
.flash { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  padding: 8px 12px; border-radius: 6px; }
.secret { font-size: 1.1rem; padding: 12px; background: var(--bg); border: 1px dashed var(--line); border-radius: 6px; user-select: all; }
.problems { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 10px 14px 10px 30px; }
.empty { padding: 24px; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: 10px; }
.pager { display: flex; gap: 16px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex;
        flex-direction: column; gap: 2px; }
.t-label { color: var(--muted); font-size: .85rem; }
.t-value { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-chg { font-size: .82rem; color: var(--muted); }
.up { color: var(--ok); } .down { color: var(--danger); }
.bars { margin: 0; }
.bars svg { width: 100%; height: 200px; display: block; }
.bars .bar { fill: var(--accent); }
.bars .bar:hover { fill: var(--orange); }
.bars .axis { stroke: var(--line); stroke-width: 1; }
.bars .lbl { fill: var(--muted); font-size: 11px; }
table.report td.neg { color: var(--danger); }
table.report tr.strong td { font-weight: 700; background: var(--bg); }
table.report tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
table.report th.num { text-align: right; }
table.report td:first-child { white-space: nowrap; }
.sheet h2 { margin-top: 4px; }
.sheet h3 { font-size: 1rem; margin: 18px 0 8px; }
.letterhead { color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.links { columns: 2 220px; padding-left: 18px; }
a.button:not(.ctl) { display: inline-block; font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--card); color: inherit; text-decoration: none; }
a.button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
button:disabled { opacity: .5; cursor: not-allowed; }
pre.logs { white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; font-size: .8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
/* page header with tabs (_tabs.html) */
.tabhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px;
           border-bottom: 1px solid var(--line); }
.tabhead h1 { margin: 8px 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 auto; align-self: flex-end; }
.tabs a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-bottom: 3px solid transparent;
          margin-bottom: -1px; white-space: nowrap; font-size: .95rem; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
a.button.primary { background: var(--primary-bg, var(--accent)); border-color: var(--primary-line, var(--accent));
                   color: var(--primary-ink, var(--accent-ink)); }
.tab-action { margin: 6px 0; white-space: nowrap; }
@media (max-width: 820px) { .tabhead { gap: 4px 12px; } .tabs a { padding: 8px 10px; } }
/* audit log (Settings -> Audit log): one line per row, one column per data point */
.audit-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin: 0 0 14px; }
.audit-filters label { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--muted); }
.audit-filters label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); font-size: .9rem; }
.audit-filters label.grow { flex: 1 1 180px; }
.audit-filters select.ctl { max-width: 220px; }
table.audit th, table.audit td { white-space: nowrap; vertical-align: top; }
table.audit th a { color: inherit; text-decoration: none; }
table.audit th a.on { color: var(--accent); }
table.audit .pin, table.audit .pin2 { position: sticky; background: var(--card); z-index: 1; }
table.audit .pin { left: 0; }
table.audit .pin2 { left: 7.2em; box-shadow: 1px 0 0 var(--line); }
table.audit td.pin { min-width: 7.2em; }
table.audit tr.problem td { background: color-mix(in srgb, var(--danger) 6%, var(--card)); }
details.more summary { cursor: pointer; color: var(--accent); font-size: .85rem; }
details.more[open] > div { white-space: normal; min-width: 260px; max-width: 480px; padding: 6px 0; font-size: .85rem; }
.cat { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .78rem; font-weight: 600;
       background: color-mix(in srgb, var(--muted) 16%, var(--card)); }
.cat-signin { background: color-mix(in srgb, #5b8cff 18%, var(--card)); }
.cat-stores { background: color-mix(in srgb, #2e9d5b 18%, var(--card)); }
.cat-deployment { background: color-mix(in srgb, #8b5cf6 18%, var(--card)); }
.cat-clients { background: color-mix(in srgb, #0ea5b7 18%, var(--card)); }
.cat-settings { background: color-mix(in srgb, #b7791f 18%, var(--card)); }
.cat-data { background: color-mix(in srgb, #2563eb 14%, var(--card)); }
.cat-reports { background: color-mix(in srgb, #64748b 18%, var(--card)); }
.cat-security { background: color-mix(in srgb, var(--danger) 18%, var(--card)); }
.warn-inline { color: var(--warn-ink, #8a5a00); font-weight: 600; }
td.nowrap, .nowrap { white-space: nowrap; }
.window-line form.inline { display: inline; }
/* phones (1.3.4): menu button at the top, sticky first column, key columns first, first rows first */
.mnav { display: none; }
.phone-only { display: none; }
table.report th:first-child, table.report td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
label.tgl { cursor: pointer; color: var(--accent); font-size: .9rem; margin: 6px 0; }
@media (max-width: 599px) {
  .side { display: none; }
  .mnav { display: block; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
  .mnav > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; list-style: none; }
  .mnav > summary::-webkit-details-marker { display: none; }
  .mnav[open] > summary { border-bottom: 1px solid var(--line); }
  .mnav nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
  .mnav nav a { text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 8px; }
  .mnav nav a.on { background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--accent); font-weight: 600; }
  .mnav nav details > a { display: block; padding-left: 22px; }
  .mnav nav summary { cursor: pointer; padding: 8px 10px; font-weight: 600; }
  .mnav nav .group { margin: 10px 10px 2px; font-size: .75rem; text-transform: uppercase; color: var(--muted); }
  .t-value { white-space: nowrap; }
  .t-value.long { font-size: clamp(.9rem, 4.3vw, 1.45rem); }
  table.report th, table.report td { padding: 7px 6px; }
  .card .table-wrap, article.sheet { margin-left: -4px; margin-right: -4px; }
}
@supports selector(:has(a)) {
  @media (max-width: 599px) {
    .phone-only { display: block; }
    label.phone-only { display: inline-block; }
    .rt .p2 { display: none; }
    .rt:has(.tgl-cols:checked) .p2 { display: table-cell; }
    .rt:has(.tgl-cols:checked) label[for^="c"] { display: none; }
    .rt .swipe.when-all { display: none; }
    .rt:has(.tgl-cols:checked) .swipe.when-all { display: block; }
    .rt tr.r-more { display: none; }
    .rt:has(.tgl-rows:checked) tr.r-more { display: table-row; }
    .rt:has(.tgl-rows:checked) label[for^="r"] { display: none; }
  }
}
form.seats { display: flex; gap: 6px; align-items: center; margin: 0; }
form.seats input { width: 4.5em; }
/* lists with search and tidy columns (Stores, Clients; 1.3.4) */
.list-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin: 0 0 14px; }
.list-filters label { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--muted); }
.list-filters label.grow { flex: 1 1 220px; }
.list-filters .count { align-self: center; margin-left: auto; }
table.list th, table.list td { white-space: nowrap; vertical-align: middle; }
table.list th a { color: inherit; text-decoration: none; }
table.list th a.on { color: var(--accent); }
table.list .pin { position: sticky; left: 0; background: var(--card); z-index: 1; box-shadow: 1px 0 0 var(--line); }
table.list details.more[open] > div { white-space: normal; }
form.stack-checks { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.actions.nowrap { flex-wrap: nowrap; align-items: center; }
@media (max-width: 599px) { .shell > main { padding-left: 12px; padding-right: 12px; } }
/* Rows never look crooked (dealer's rule): every plain field and button is one height, and a row lines its
   controls up at the bottom, so a button sits level with a field that has a label above it. */
input:not([type=checkbox]):not([type=radio]):not(.ctl), select:not(.ctl) {
  box-sizing: border-box; height: var(--ctl-h); padding-top: 0; padding-bottom: 0; }
button:not(.link):not(.ctl), a.button:not(.ctl) {
  box-sizing: border-box; height: var(--ctl-h); padding-top: 0; padding-bottom: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1; }
.actions, .actions form, .row { align-items: flex-end; }
.row > label, .actions label:not(.check) { margin-bottom: 0; }
.row { margin-bottom: 12px; }
.actions label.check, .row label.check, form.inline label.check { height: var(--ctl-h); }
.list-filters label, .audit-filters label { margin: 0; }
input:not([type=checkbox]):not([type=radio]):not(.ctl), select:not(.ctl) { margin-top: 0; }
label > input:not([type=checkbox]):not([type=radio]):not(.ctl), label > select:not(.ctl) { margin-top: 4px; }

/* Groups (store groups, client groups): tick lists side by side, each in a scroll box */
.card.narrow-wide { max-width: 760px; }
.pick-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 4px 0 12px; }
.pick-cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0; min-width: 0; }
.pick legend { font-weight: 600; padding: 0 4px; }
.pick-box { max-height: 320px; overflow: auto; display: flex; flex-direction: column; }
.pick-box label.check { display: flex; align-items: baseline; gap: 6px; margin: 3px 0; font-weight: 400; }
ul.plain { list-style: none; padding: 0; margin: 4px 0 0; }
ul.plain li { padding: 3px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-group { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line);
             font-size: .8rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.access-list td { vertical-align: top; }
@media (max-width: 820px) { .pick-cols, .pick-cols.two { grid-template-columns: minmax(0, 1fr); } }
.store-groups-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 0 14px; }
.access-src { margin-bottom: 4px; }
/* Date bar: the calendar behind the dates button (datebar.js opens it; the input itself stays invisible) */
.datebar .range-wrap { position: relative; display: inline-flex; }
.datebar .pick-date { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0;
                      pointer-events: none; }
@media (max-width: 820px) { .datebar .range-wrap { flex: 1; } .datebar .range-wrap .range { flex: 1; } }
/* Grouped lists (Stores, Clients, Deployment; stores-page-groups-plan.md): one column layout for the header and every
   section (table-layout fixed, same <colgroup>); each section a <details> (collapses without JavaScript). */
.gtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.gtools input.ctl { width: 220px; display: inline-flex; margin: 0; }
.gtools input.gnew { display: none; width: 200px; }
.gtools select:has(option[value="new"]:checked) ~ .gnew { display: inline-flex; }
.glist { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.glist > .ghead, .glist > .gwrap, .glist table.gl { min-width: 960px; }
table.gl { table-layout: fixed; width: 100%; }
table.gl td, table.gl th { overflow: hidden; text-overflow: ellipsis; }
table.gl td.pick { text-overflow: clip; padding-right: 4px; }
table.gl tbody tr:last-child td { border-bottom: 1px solid var(--line); }
table.ghead th { background: var(--bg); }
.gl .c-pick { width: 44px; } .gl .c-status { width: 150px; } .gl .c-store { width: 24%; } .gl .c-city { width: 13%; }
.gl .c-pc { width: 9%; } .gl .c-heard { width: 11%; } .gl .c-age { width: 8%; } .gl .c-num { width: 10%; }
.gl .c-ver { width: 7%; } .gl .c-email { width: 19%; } .gl .c-seats { width: 8%; } .gl .c-cstores { width: 20%; } .gl .c-manage { width: 120px; }
.gl .also { font-size: .78rem; margin-top: 2px; }
.gwrap { position: relative; display: flex; flex-direction: column; }
.gwrap:has(.gpop[open]) { z-index: 10; }
.gsec > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 10px; cursor: pointer;
                  background: color-mix(in srgb, var(--bg) 70%, var(--card)); border-bottom: 1px solid var(--line);
                  list-style: none; padding-right: 300px; }
.gsec > summary::-webkit-details-marker { display: none; }
.gsec > summary::before { content: ""; width: 7px; height: 7px; flex: none; margin: 0 4px 0 2px;
                          border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
                          transform: rotate(-45deg); transition: transform .12s; }
.gsec[open] > summary::before { transform: rotate(45deg); }
.gsec .gname { font-weight: 600; }
.gsec .gcount { font-size: .78rem; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
                color: var(--muted); }
.gsec .gnote, .gsec .gsees { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the group's buttons: on the section's header row, kept at the visible right edge when the list scrolls sideways */
.gacts { order: -1; position: sticky; right: 10px; align-self: flex-end; height: 38px; margin-bottom: -38px;
         display: flex; gap: 14px; align-items: center; font-size: .85rem; z-index: 3; }
.gacts a, .gpop > summary { color: var(--accent); text-decoration: none; cursor: pointer; line-height: 26px; }
.gpop { position: relative; }
.gpop > summary { list-style: none; }
.gpop > summary::-webkit-details-marker { display: none; }
.gpop > summary.danger-text { color: var(--danger); }
.gpop[open] > div { position: absolute; right: 0; top: 30px; width: 320px; padding: 12px; background: var(--card);
                    border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.gpop .row { display: flex; gap: 8px; } .gpop .row input.ctl { flex: 1; }
.gpop p, .gpop ul { margin: 0 0 8px; } .gpop label.check { margin: 0 0 8px; }
@media (max-width: 820px) {
  .gsec > summary { padding-right: 10px; }
  .gacts { position: static; align-self: stretch; height: auto; margin: 0; padding: 8px 10px 0;
          background: color-mix(in srgb, var(--bg) 70%, var(--card)); border-top: 1px solid var(--line); }
  .gwrap:has(.gacts) > .gsec > summary { padding-top: 4px; }
  .gpop[open] > div { left: 0; right: auto; width: min(320px, 86vw); }
  .gtools select.ctl, .gtools .gnew { flex: 1 1 100%; }
}
/* Clients: one Manage menu per row holding the dealer's forms (store access, seats, password, disable) */
table.gl td.manage { overflow: visible; text-align: right; }
.glist:has(.gpop[open]) { padding-bottom: 420px; }        /* room for an open menu on the last rows (no clipping) */
.gpop > summary.ctl { height: 32px; line-height: 1; color: var(--ink); font-size: .85rem; padding: 0 12px; }
.gpop > summary.ctl::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor;
                             border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.gpop[open] > .manage-pop { width: 340px; text-align: left; white-space: normal; max-height: 400px; overflow: auto; }
.manage-pop form { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.manage-pop form:first-child { border-top: 0; padding-top: 0; }
.manage-pop .pick-box { max-height: none; margin: 0 0 8px; }
.manage-pop .row { display: flex; gap: 8px; } .manage-pop .row input.ctl { width: 90px; flex: none; }
.gpop[open] { z-index: 20; }
/* Deployment, proposal B: tiles, version spread, rollout stages, one panel with two views (deployment-page-plan.md) */
.dot.blue { background: var(--accent); }
.warn-text { color: var(--warn-ink, #8a5a00); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.tile .lbl { font-size: .8rem; color: var(--muted); }
.tile .val { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .val small { font-size: .8rem; font-weight: 400; color: var(--muted); }
.spread-lbl { margin: 0 0 4px; }
svg.spread { display: block; width: 100%; height: 14px; border-radius: 7px; overflow: hidden; margin: 0 0 6px; }
svg.spread .seg-1, .spread-key .seg-1 { fill: color-mix(in srgb, var(--green) 55%, var(--card)); background: color-mix(in srgb, var(--green) 55%, var(--card)); }
svg.spread .seg-2, .spread-key .seg-2 { fill: color-mix(in srgb, var(--accent) 45%, var(--card)); background: color-mix(in srgb, var(--accent) 45%, var(--card)); }
svg.spread .seg-3, .spread-key .seg-3 { fill: color-mix(in srgb, var(--amber) 60%, var(--card)); background: color-mix(in srgb, var(--amber) 60%, var(--card)); }
svg.spread .seg-4, .spread-key .seg-4 { fill: var(--line); background: var(--line); }
.spread-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 16px; color: var(--muted); }
.spread-key span { display: inline-flex; align-items: center; gap: 6px; }
.spread-key .key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.card.rollout { margin-bottom: 14px; }
.ro-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
.ro-head h2 { margin: 0; }
.ro-head .ro-stop { margin-left: auto; font-size: .85rem; }
ol.stages { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.stage { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.stage.st-done { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.stage.st-problem { border-color: color-mix(in srgb, var(--red) 50%, var(--line)); }
.stage.st-in_progress { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.stage .st-top { display: flex; align-items: center; gap: 8px; }
.stage .st-n { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
               background: var(--bg); border: 1px solid var(--line); font-size: .78rem; font-weight: 600; flex: none; }
.stage progress.stbar { width: 100%; height: 6px; border: 0; border-radius: 3px; appearance: none; background: var(--bg); overflow: hidden; }
.stage progress.stbar::-webkit-progress-bar { background: var(--bg); border-radius: 3px; }
.stage progress.stbar::-webkit-progress-value { background: var(--green); border-radius: 3px; }
.stage progress.stbar::-moz-progress-bar { background: var(--green); border-radius: 3px; }
.stage .st-start { align-self: flex-start; margin-top: 4px; }
.stage .st-start > summary.ctl { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.stage .st-start[open] > div { left: 0; right: auto; }
.plan-stages { margin: 0 0 10px; padding-left: 22px; } .plan-stages li { margin: 3px 0; }
.plan-go { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 10px; }
.plan-go label { margin: 0; }
.vpanel { margin-bottom: 14px; }
.vpanel .vsw { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.vtabs { display: flex; align-items: center; gap: 4px; padding: 6px; background: var(--card); border: 1px solid var(--line);
         border-bottom: 0; border-radius: 10px 10px 0 0; }
.vtabs label { margin: 0; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: .9rem; color: var(--muted); font-weight: 500; }
.vtabs .vnote { margin-left: auto; padding-right: 6px; }
#v-att:checked ~ .vtabs label[for="v-att"], #v-all:checked ~ .vtabs label[for="v-all"] {
  background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--accent); }
#v-att:focus-visible ~ .vtabs label[for="v-att"], #v-all:focus-visible ~ .vtabs label[for="v-all"] { outline: 2px solid var(--accent); }
.vcnt { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; font-size: .75rem;
        text-align: center; background: var(--bg); color: var(--muted); }
.vcnt.hot { background: color-mix(in srgb, var(--red) 15%, var(--card)); color: var(--danger); }
.vbody { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 0 0 10px 10px; }
#v-att:checked ~ .v-att, #v-all:checked ~ .v-all { display: block; }
.vbody .glist { border: 0; border-radius: 0; margin: 0; }
.vbody .gtools { padding: 10px 10px 0; }
.vbody > .empty { padding: 14px; margin: 0; }
.attn-rows { list-style: none; margin: 0; padding: 0; }
.attn-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px 8px 34px; border-bottom: 1px solid var(--line); }
.attn-rows .attn-act { margin-left: auto; }
.gsec.attn > summary { padding-right: 10px; }
.gl .c-dstore { width: 27%; } .gl .c-dver { width: 8%; } .gl .c-dstate { width: 24%; } .gl .c-win { width: 14%; }
.gl .c-dauto { width: 10%; } .gl .c-dheard { width: 13%; }
.badge-soft { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; background: var(--bg);
              border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.badge-soft.ok-soft { background: color-mix(in srgb, var(--green) 14%, var(--card)); color: var(--ok); }
table.rels tr.gone td { color: var(--muted); }
table.rels tr.notes td { border-top: 0; padding-top: 0; color: var(--muted); white-space: normal; }
details.card.upload > summary { cursor: pointer; }
details.card.upload textarea { width: 100%; font: inherit; }
@media (max-width: 820px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attn-rows li { padding-left: 12px; } .attn-rows .attn-act { margin-left: 0; }
}
table.rels td { vertical-align: middle; } table.rels .nowrap { white-space: nowrap; }
table.rels td.acts { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
/* Reports on screen, navy + light blue (2.2.0, store-2.2.0-plan B7): navy band with store, title and period; light
   blue header rows (the section name in aligned tables); sub lines indented; bold totals; navy bottom lines; grey
   zeros. Excel files keep their own look. */
:root { --navy: #1F3864; --lightblue: #E6F1FB; --navy-ink: #0C447C; }
.sheet .rep-head { background: var(--band-bg, var(--navy)); color: var(--band-ink, #fff); border-radius: 10px; padding: 12px 16px; margin: 0 0 14px; }
.sheet .rep-head .letterhead { color: rgba(255,255,255,.78); margin: 0 0 4px; }
.sheet .rep-head h2 { color: #fff; margin: 2px 0 2px; }
.sheet .rep-head .rep-note { color: rgba(255,255,255,.85); margin: 0; }
table.report thead th, table.report thead th:first-child { background: var(--lightblue); color: var(--navy-ink); }
table.report.aligned { table-layout: fixed; }
table.report.aligned col.c-num { width: 9.5rem; }
table.report.aligned thead th:first-child { font-size: .95rem; font-weight: 700; }
table.report tr.k-sub td:first-child { padding-left: 30px; color: var(--muted); }
table.report tr.k-sub2 td:first-child { padding-left: 52px; color: var(--muted); font-size: .92em; }
table.report tr.k-total td { font-weight: 700; border-top: 1px solid var(--line); }
table.report tr.k-key td, table.report tr.k-key td:first-child { background: var(--navy); color: #fff; font-weight: 700;
  border-color: var(--navy); box-shadow: none; }
table.report tr.k-note td { color: var(--muted); font-style: italic; }
table.report td.zero { color: color-mix(in srgb, var(--muted) 70%, var(--card)); }
table.report tr.k-key td.zero { color: rgba(255,255,255,.7); }
/* Store page tabs + Settings tab (2.2.0: the dealer changes the store's settings, store-2.2.0-plan.md A5) */
.store-tabs { margin: 4px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.sasof { margin: 0 0 12px; }
.set-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; }
.set-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.set-nav a:hover { background: var(--bg); }
.set-nav a.on { background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--accent); font-weight: 600; }
.set-pane { margin: 0; }
.set-pane h2 { margin-top: 0; }
.sform { display: flex; flex-direction: column; gap: 12px; }
.sfield { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.sfield .slabel { font-weight: 500; font-size: .92rem; }
.sfield label.slabel { margin: 0; }              /* a <label> carries a default margin: keep it centred */
.sfield .sinput { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.sfield .sinput input.ctl, .sfield .sinput select.ctl { width: auto; min-width: 220px; max-width: 100%; display: inline-flex; margin: 0; }
.sfield .sinput input[type=number].ctl { min-width: 110px; width: 130px; }
.fav-card .sfield .sinput select.ctl, .fav-card .sfield .sinput input[type=time].ctl { width: 260px; min-width: 0; }
.sfield .sinput input[type=text].ctl, .sfield .sinput input[type=password].ctl { width: 100%; max-width: 28rem; }
.sfield .sinput textarea { width: 100%; max-width: 520px; font: inherit; margin: 0; }
.sfield .sinput label.check { margin: 0; font-weight: 400; }
.sfield .smulti { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 4px 16px; width: 100%; }
.sfield.tall { align-items: start; }                  /* a long list: its label at the top, not halfway down */
.sfield.tall .slabel { padding-top: 6px; }
.sfield .shelp { grid-column: 2; }
.sfield.ro .slabel { color: var(--muted); }
.sbusy { margin: -6px 0 0 234px; }
.sactions { display: flex; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
.slist { margin-top: 18px; }
/* sentences in the Settings tab's tables wrap (dealer tables keep cells on one line) */
table.list td.swrap { white-space: normal; min-width: 12rem; overflow-wrap: anywhere; }
.slist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.slist-head h3 { margin: 0; }
.sdel { display: inline-block; margin-left: 12px; }
.spill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--bg);
         border: 1px solid var(--line); color: var(--muted); }
.spill.s-succeeded { background: color-mix(in srgb, var(--green) 15%, var(--card)); color: var(--ok); border-color: transparent; }
.spill.s-rejected, .spill.s-failed, .spill.s-interrupted { background: color-mix(in srgb, var(--red) 12%, var(--card)); color: var(--danger); border-color: transparent; }
.spill.s-queued, .spill.s-leased { background: color-mix(in srgb, var(--amber) 18%, var(--card)); color: var(--warn-ink, #8a5a00); border-color: transparent; }
/* Clover reports: the Aldelo | Clover switch at the top of the menu (layout A), the item-details notice */
.srcswitch { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 0 0 10px; }
.srcswitch a { flex: 1; text-align: center; padding: 7px 0; font-size: .9rem; color: var(--ink); text-decoration: none; }
.srcswitch a.on { background: var(--navy); color: var(--on-navy, #fff); font-weight: 600; }
.rep-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* Overview: Aldelo and Clover sections (step 4, layout A) */
.src-head { font-size: 1.05rem; margin: 6px 0 10px; color: var(--ink); }
.src-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px;
                padding-top: 16px; border-top: 1px solid var(--line); }
.src-head-row .src-head { margin: 0; }
.src-head-row.solo { margin-top: 4px; padding-top: 0; border-top: 0; }
.tiles.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .tiles.tiles-3 { grid-template-columns: minmax(0, 1fr); } }
/* Deployment: push to the stores the dealer ticks */
.pick-sec { margin: 12px 0; }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.pick-list tr.dim td, .pick-list tr.dim label { color: var(--muted); }
.pick-list td:first-child { width: 45%; }
.pick-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px;
             border-top: 1px solid var(--line); }
.pick-foot .pick-count { margin-right: auto; }
.pick-foot input.ctl { width: 220px; margin: 0; }
/* Clients with usernames (client-usernames-plan.md) */
.lock-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .75rem;
              font-weight: 600; background: color-mix(in srgb, var(--red) 12%, var(--card)); color: var(--danger); }
.manage-pop .row { flex-wrap: nowrap; }
.manage-pop .row input[type=text].ctl { flex: 1 1 auto; width: auto; min-width: 0; }
.manage-pop .row > button.ctl { flex: none; }
.pw-shown { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 14px; align-items: center; margin: 12px 0; }
.pw-shown dt { color: var(--muted); }
.pw-shown dd { margin: 0; font-size: 1.15rem; }
.pw-shown dd.secret { margin: 0; }
/* Favorites (portal-favorites-plan.md, layout A) */
.fav-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.fav-head h1 { margin: 0; }
.fav-card { max-width: 980px; }
.fav-pick { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; align-items: start; width: 100%; }
.fav-col { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow: auto; padding-right: 6px; }
.fav-col strong { margin-bottom: 4px; }
.fav-sec { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 2px; }
.fav-sched { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-sched .ctl { min-width: 0 !important; width: auto; }
.fav-actions { flex-wrap: wrap; align-items: center; }
.fav-actions form.inline { display: inline-flex; margin: 0; }
.fav-del { margin-left: auto; }
.fav-del > summary.ctl.danger-text { color: var(--danger); height: var(--ctl-h, 36px); }
.fav-del > summary.ctl.danger-text::after { display: none; }
.fav-status { margin: 10px 0 0; }
.fav-name-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fav-row-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.fav-row-acts form.inline { display: inline-flex; margin: 0; }
.fav-row-acts .fav-dl, .fav-row-acts .fav-run, .fav-row-acts .fav-rdel > summary.ctl { height: 32px; padding: 0 12px; font-size: .85rem;
                                                               white-space: nowrap; line-height: 1; display: inline-flex; align-items: center; }
.fav-rdel > summary.ctl.danger-text, .fav-del > summary.ctl.danger-text { color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--card)); }
.fav-rdel > summary.ctl.danger-text::after { display: none; }
.fav-rdel[open] > div { right: 0; left: auto; }
table.list:has(.fav-rdel[open]) { margin-bottom: 120px; }
table.list td.fav-name { min-width: 16rem; }
@media (max-width: 820px) { .fav-pick { grid-template-columns: minmax(0, 1fr); } .fav-del { margin-left: 0; } }
/* Clover tab (clover-reports-plan.md step 1) */
.clover-card { max-width: 860px; }
.clover-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.clover-head h2 { margin: 0; }
.clover-facts { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 14px; margin: 14px 0; }
.clover-facts dt { color: var(--muted); font-size: .92rem; }
.clover-facts dd { margin: 0; overflow-wrap: anywhere; }
.clover-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clover-card label.slabel { margin: 0; }
.clover-card .clover-actions > .gpop > summary.ctl, .clover-card .clover-actions form.inline { height: 36px; margin: 0; }
.clover-card .sfield .sinput select.ctl { width: 100%; max-width: 28rem; }
.clover-card .sform .clover-actions { padding-left: 234px; }
.clover-card .sform .clover-actions .muted { flex-basis: 100%; }
.clover-card .gpop form { display: flex; flex-direction: column; gap: 6px; }
.clover-card .gpop[open] > div { left: 0; right: auto; }
.clover-card .gpop > summary.ctl.danger-text { color: var(--danger); }
.clover-card .gpop > summary.ctl.danger-text::after { display: none; }
@media (max-width: 820px) { .clover-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; } .clover-facts dd { margin-bottom: 8px; }
  .clover-card .sform .clover-actions { padding-left: 0; } }
@media (max-width: 820px) {
  .set-grid { grid-template-columns: minmax(0, 1fr); }
  .set-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .sfield { grid-template-columns: minmax(0, 1fr); }
  .sfield .shelp { grid-column: 1; }
  .sbusy { margin-left: 0; }
}

/* RMS Portal settings rows (Settings > Security, Status & alerts): one line per setting, the label and a short note
   on the left, the control on the right in a fixed column, so every control lines up; one column on phones. */
.srows h2 { margin-bottom: 4px; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 6px 20px; align-items: center;
  padding: 11px 0; border-top: 1px solid var(--line); }
.srows h2 + .srow, .srows h2 + p + .srow, .srows h2 + form > .srow:first-of-type { border-top: 0; }
.srow .sl { font-weight: 500; }
.srow .sn { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.srow .sc { display: flex; gap: 8px; align-items: center; min-width: 0; }
.srow .sc select.ctl, .srow .sc input.ctl { width: 100%; min-width: 0; }
.srow .sc.two > * { flex: 1 1 0; }
.srow .sc label.check { margin: 0; }
.srow-after { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: flex-end;
  padding: 4px 0 8px; }
.srow-after form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.srow-after label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.srow-after label select.ctl { width: auto; }
.note-ro { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.sec-save { margin: -4px 0 16px; justify-content: flex-end; }
@media (max-width: 640px) {
  .srow { grid-template-columns: minmax(0, 1fr); }
  .srow-after { justify-content: flex-start; }
}
/* Settings > Team: the technician permission tick boxes */
table.team th.perm { white-space: normal; text-align: center; width: 9.5rem; }
table.team td.perm { text-align: center; }
table.team td.perm[colspan] { text-align: center; }
.check-line { margin: 2px 0 12px; }                  /* a tick box on its own line above a form's button */


/* ===================================================================================================================
   Themes and iPhone / iPad (handoff/plans/mobile-ipad-plan.md, 2026-12-03)
   - Themes: html[data-theme=...] sets the colour variables; no attribute = Classic (today's navy, with the automatic
     dark mode). Buttons in every theme are a soft fill: a light tint with dark text of the same colour (dealer).
   - Layouts: phone up to 599 px, tablet 600-1024 (iPad upright keeps the side menu), desktop above.
   - Phone (RMS Portal only: body.rms): no top header; a bottom bar with the store picker and four tabs, one-handed.
   - Touch screens: 44 px controls (Apple's finger size).
   =================================================================================================================== */
html[data-theme] .sheet .rep-head h2, html[data-theme] .sheet .rep-head .rep-note,
html[data-theme] .sheet .rep-head .letterhead { color: var(--band-ink); }
html[data-theme] .sheet .rep-head .rep-note, html[data-theme] .sheet .rep-head .letterhead { opacity: .85; }
html[data-theme="white"] {
  --bg: #f7fbfa; --card: #ffffff; --ink: #14302b; --muted: #4b6661; --line: #dbe8e5; --accent: #0f8f7c; --accent-ink: #fff;
  --navy: #0f5f56; --on-navy: #fff; --top-bg: #ffffff; --top-ink: #0f5f56; --top-muted: #4b6661;
  --primary-bg: #d9f0ea; --primary-ink: #0d5c51; --primary-line: #bfe3da; --band-bg: #e3f3ef; --band-ink: #0f5f56;
  --lightblue: #eaf6f3; --navy-ink: #0d5c51; --loc-bg: #e3f3ef; --loc-ink: #0f5f56;
}
html[data-theme="grey"] {
  --bg: #f5f5f5; --card: #ffffff; --ink: #262626; --muted: #6b6b6b; --line: #e0e0e0; --accent: #3d3d3d; --accent-ink: #fff;
  --navy: #333333; --on-navy: #fff; --top-bg: #ebebeb; --top-ink: #333333; --top-muted: #6b6b6b;
  --primary-bg: #e3e3e3; --primary-ink: #262626; --primary-line: #d2d2d2; --band-bg: #ebebeb; --band-ink: #262626;
  --lightblue: #f0f0f0; --navy-ink: #333333; --loc-bg: #e6e6e6; --loc-ink: #333333;
}
html[data-theme="blush"] {
  --bg: #fffafb; --card: #ffffff; --ink: #3d2a31; --muted: #8c6a77; --line: #f4e3e9; --accent: #a35473; --accent-ink: #fff;
  --navy: #9a4566; --on-navy: #fff; --top-bg: #fdf0f4; --top-ink: #6b3a4c; --top-muted: #8c6a77;
  --primary-bg: #f6d5e0; --primary-ink: #7a3550; --primary-line: #efc2d2; --band-bg: #fbe8ee; --band-ink: #6b3a4c;
  --lightblue: #fdf0f4; --navy-ink: #7a3550; --loc-bg: #fbe8ee; --loc-ink: #6b3a4c;
}
html[data-theme="stone"] {
  --bg: #f7f4ef; --card: #fffdf9; --ink: #3a332b; --muted: #7a6e60; --line: #e3dccf; --accent: #8a6a4f; --accent-ink: #fff;
  --navy: #5b4a3a; --on-navy: #fff; --top-bg: #ebe5dc; --top-ink: #4a4036; --top-muted: #7a6e60;
  --primary-bg: #ebdfd1; --primary-ink: #5b4632; --primary-line: #dccdbb; --band-bg: #e9e1d5; --band-ink: #4a4036;
  --lightblue: #f1ebe2; --navy-ink: #5b4632; --loc-bg: #e9e1d5; --loc-ink: #4a4036;
}
html[data-theme="slate"] {
  --bg: #f4f6f8; --card: #ffffff; --ink: #26313d; --muted: #66727f; --line: #dbe1e7; --accent: #4d6680; --accent-ink: #fff;
  --navy: #3c5166; --on-navy: #fff; --top-bg: #e4e9ee; --top-ink: #33404d; --top-muted: #66727f;
  --primary-bg: #dbe3eb; --primary-ink: #2f4559; --primary-line: #c9d4df; --band-bg: #dfe5eb; --band-ink: #33404d;
  --lightblue: #eef2f6; --navy-ink: #2f4559; --loc-bg: #dfe5eb; --loc-ink: #33404d;
}
html[data-theme] .top { border-bottom: 1px solid var(--line); }
html[data-theme] .top .gear-btn { border-color: var(--line); }
html[data-theme] .top .ctl.go-hd { background: var(--primary-bg); color: var(--primary-ink); border-color: var(--primary-line); }

/* Account > Theme: the five swatches */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.theme-opt { position: relative; display: block; margin: 0; cursor: pointer; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt .sw { display: block; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.theme-opt input:checked + .sw { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.theme-opt input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-opt .sw-top { display: block; height: 22px; }
.theme-opt .sw-body { display: flex; gap: 6px; padding: 8px; align-items: center; }
.theme-opt .sw-tile { flex: 1; height: 22px; border-radius: 6px; }
.theme-opt .sw-btn { width: 42px; height: 22px; border-radius: 6px; }
.theme-opt .sw-name { display: block; padding: 6px 2px 0; font-weight: 500; font-size: .92rem; }
/* theme swatches (colours here, not inline: the portal's CSP allows no inline styles) */
.theme-opt .sw-top { border-bottom: 1px solid rgba(0,0,0,.06); }
.theme-opt .sw-tile { border: 1px solid rgba(0,0,0,.08); }
.sw.t-classic .sw-top { background: #1F3864; } .sw.t-classic .sw-body { background: #f6f7f9; } .sw.t-classic .sw-tile { background: #ffffff; border-color: #e2e6eb; } .sw.t-classic .sw-btn { background: #2456c7; }
.sw.t-white .sw-top { background: #ffffff; } .sw.t-white .sw-body { background: #f7fbfa; } .sw.t-white .sw-tile { background: #ffffff; border-color: #dbe8e5; } .sw.t-white .sw-btn { background: #d9f0ea; }
.sw.t-grey .sw-top { background: #ebebeb; } .sw.t-grey .sw-body { background: #f5f5f5; } .sw.t-grey .sw-tile { background: #ffffff; border-color: #e0e0e0; } .sw.t-grey .sw-btn { background: #e3e3e3; }
.sw.t-blush .sw-top { background: #fdf0f4; } .sw.t-blush .sw-body { background: #fffafb; } .sw.t-blush .sw-tile { background: #ffffff; border-color: #f4e3e9; } .sw.t-blush .sw-btn { background: #f6d5e0; }
.sw.t-stone .sw-top { background: #ebe5dc; } .sw.t-stone .sw-body { background: #f7f4ef; } .sw.t-stone .sw-tile { background: #fffdf9; border-color: #e3dccf; } .sw.t-stone .sw-btn { background: #ebdfd1; }
.sw.t-slate .sw-top { background: #e4e9ee; } .sw.t-slate .sw-body { background: #f4f6f8; } .sw.t-slate .sw-tile { background: #ffffff; border-color: #dbe1e7; } .sw.t-slate .sw-btn { background: #dbe3eb; }

/* Tablet (iPad upright, 600-1024 px): the side menu stays, a little narrower; controls stay side by side */
@media (min-width: 600px) and (max-width: 1024px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .side a, .side summary { font-size: .88rem; }
  .shell > main { padding-left: 16px; padding-right: 16px; }
  .tiles.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Touch screens (iPhone, iPad, any width): controls and menu links big enough for a finger */
@media (pointer: coarse) {
  :root { --ctl-h: 44px; }
  .side a, .side summary, .mnav nav a, .mnav nav summary, .gear-menu a, .gear-menu button { padding-top: 11px; padding-bottom: 11px; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
}

/* Phone (up to 599 px) */
.tabbar, .sheetpanel { display: none; }
@media (max-width: 599px) {
  /* one-row date bar: the period, then  < dates >  ; Today lives in the dropdown; From/To only for Custom */
  .datebar.js .today-btn { display: none; }
  .datebar select.ctl { flex: 1 1 0; min-width: 0; }
  .datebar .range-wrap { flex: 1.25 1 0; min-width: 0; }
  .datebar .range { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; padding: 0 8px; }
  .datebar .range svg { display: none; }
  .datebar .ctl.icon { flex: none; width: var(--ctl-h); padding: 0; }
  .datebar .fld { flex: 1 1 100%; }
  .datebar .ctl.primary { flex: 1 1 100%; }
  /* numbers first: a slimmer report band, a smaller page title, the download as a small button beside the title */
  .page-head { gap: 8px; margin-bottom: 10px; }
  .page-head h1 { font-size: 1.25rem; margin: 2px 0 4px; }
  .page-head .kicker { display: none; }
  .page-head .ph-row > .ctl.button { width: auto; flex: none; }
  .sheet .rep-head { padding: 8px 12px; border-radius: 8px; }
  .sheet .rep-head .letterhead { display: none; }
  .sheet .rep-head h2 { font-size: 1rem; margin: 0; }
  .tiles, .tiles.tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 10px 12px; }

  /* RMS Portal: the top header goes; the store picker and the four tabs sit at the bottom, under the thumb */
  body.rms .top { display: none; }
  body.rms .mnav { display: none; }
  body.rms .shell > main { padding-top: calc(12px + env(safe-area-inset-top)); padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  body.rms .tabbar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card);
    border-top: 1px solid var(--line); padding: 6px 8px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .locbar { margin: 0 0 4px; }
  .locbar .loc-name, .locbar select { display: flex; align-items: center; width: 100%; height: 44px; margin: 0;
    border-radius: 10px; padding: 0 12px; font: inherit; font-weight: 600; font-size: 15px;
    background: var(--loc-bg, var(--navy)); color: var(--loc-ink, #fff); border: 0; }
  .locbar select { -webkit-appearance: none; appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 20px) 19px, calc(100% - 14px) 19px; background-size: 6px 6px; background-repeat: no-repeat; }
  .locbar select option { color: #1d2330; background: #fff; }
  .tabs4 { display: grid; grid-template-columns: repeat(4, 1fr); }
  .tabs4 a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; min-height: 44px;
    text-decoration: none; color: var(--muted); font-size: 12px; }
  .tabs4 a svg { width: 22px; height: 22px; }
  .tabs4 a.on { color: var(--accent); font-weight: 600; }
  /* Reports / More open as full-screen panels (no JavaScript: :target) */
  body.rms .sheetpanel:target { display: block; position: fixed; inset: 0; z-index: 50; overflow: auto; background: var(--bg);
    padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); }
  .sheetpanel .sp-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
  .sheetpanel .sp-head h2 { margin: 0; font-size: 1.2rem; }
  .sheetpanel .sp-close { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 14px;
    border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
  .sheetpanel nav { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; padding: 6px; }
  .sheetpanel nav a, .sheetpanel nav summary, .sheetpanel nav button.link { display: block; padding: 12px; border-radius: 8px;
    color: var(--ink); text-decoration: none; font-size: 15px; text-align: left; width: 100%; }
  .sheetpanel nav summary { font-weight: 600; cursor: pointer; }
  .sheetpanel nav details > a { padding-left: 24px; }
  .sheetpanel nav a.on { background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--accent); font-weight: 600; }
  .sheetpanel nav .group { margin: 12px 12px 2px; font-size: .75rem; text-transform: uppercase; color: var(--muted); }
  .sheetpanel nav .srcswitch { margin: 4px 6px 8px; }
  .sheetpanel nav form { margin: 0; }
}

/* Phones: tap a row of a wide table to see its other columns (datebar.js; mobile-ipad-plan.md phase 2) */
.tap-hint { display: none; }
@media (max-width: 599px) {
  .rt.tap-rows .tap-hint { display: block; margin: 0 0 6px; }
  .rt.tap-rows:has(.tgl-cols:checked) .tap-hint { display: none; }
  .rt.tap-rows:not(:has(.tgl-cols:checked)) tbody tr:not(.rd),
  .rt.tap-rows:not(:has(.tgl-cols:checked)) tfoot tr { cursor: pointer; }
  .rt.tap-rows:not(:has(.tgl-cols:checked)) tbody tr:not(.rd) td:first-child::before {
    content: "\203A"; display: inline-block; width: 12px; color: var(--muted); transition: transform .15s; }
  .rt.tap-rows tbody tr.open td:first-child::before { transform: rotate(90deg); }
  .rt.tap-rows tr.open td { background: var(--lightblue); }
  .rt tr.rd td { background: var(--card); padding: 6px 12px 10px 24px; border-top: 0; }
  .rt tr.rd dl { position: sticky; left: 24px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 0; font-size: .92rem; }
  .rt tr.rd dt { color: var(--muted); }
  .rt tr.rd dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
  .rt tr.rd dd.neg { color: var(--danger); }
}

/* Phones: the dealer lists (Stores, Clients, Deployment; owners' Store health) as one card per row; the filters
   behind a Filter button; bulk actions only once something is ticked (mobile-ipad-plan.md phase 3). */
.flt-btn { display: none; }
@media (max-width: 599px) {
  .flt-btn { display: inline-flex; margin: 0 0 10px; }
  .flt-tgl:not(:checked) + .flt-btn + .list-filters { display: none; }
  .flt-tgl:checked + .flt-btn { box-shadow: inset 0 0 0 1px var(--accent); }
  main:not(:has(.glist td.pick input:checked)) .gtools { display: none; }
  .glist { overflow: visible; }
  .glist > .ghead, .glist > .gwrap, .glist table.gl { min-width: 0; }
  .glist > table.ghead, table.cards-ph thead { display: none; }
  table.gl, table.gl tbody, table.cards-ph, table.cards-ph tbody { display: block; width: 100%; }
  table.gl colgroup { display: none; }
  table.gl tr, table.cards-ph tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 14px;
    padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.gl tbody tr:last-child { border-bottom: 0; }
  table.gl td, table.cards-ph td { display: block; border: 0 !important; padding: 0; overflow: visible; white-space: normal;
    text-align: left; font-size: .9rem; }
  table.gl tr:has(td.pick input) { position: relative; padding-left: 46px; }
  table.gl td.pick { position: absolute; left: 12px; top: 10px; padding: 0; }
  table.gl td.nm, table.cards-ph td.nm { order: -2; flex: 1 1 60%; min-width: 0; font-weight: 600; font-size: 1rem; }
  table.gl td.status, table.cards-ph td.status { order: -1; margin-left: auto; font-size: .85rem; }
  table.gl td.city, table.cards-ph td.city { flex: 1 1 100%; color: var(--muted); }
  table.gl td[data-label]::before, table.cards-ph td[data-label]::before {
    content: attr(data-label) " "; color: var(--muted); font-size: .78rem; font-weight: 400; }
  table.gl td.manage { flex: 1 1 100%; text-align: left; margin-top: 4px; }
  table.gl td:empty, table.gl td.pick:not(:has(input)) { display: none; }
  table.gl .also { flex-basis: 100%; }
  .glist:has(.gpop[open]) { padding-bottom: 0; }
}

/* RMS Portal store page: the daily upload allowance line + the dealer's reset (2026-12-03) */
.allowance { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px 0 12px; }
.allowance p { margin: 0; }
.allowance.warn { padding: 8px 12px; }
.allowance .inline-form { margin: 0; }

/* Swipe between periods on touch screens (datebar.js, 2026-12-03): the page follows the finger a little, then slides
   out while the next period loads. */
main.swiping { transition: none; }
main.swipe-out-left, main.swipe-out-right { transition: transform .18s ease-out, opacity .18s ease-out; opacity: .5; }
main.swipe-out-left { transform: translateX(-40px); }
main.swipe-out-right { transform: translateX(40px); }
main:not(.swiping):not(.swipe-out-left):not(.swipe-out-right) { transition: transform .2s ease-out; }
.swipe-hint { margin: -4px 0 10px; }
@media (prefers-reduced-motion: reduce) {
  main.swipe-out-left, main.swipe-out-right { transform: none; }
}

/* Deployment: Install right away (push forms) and the "waiting to install" box (2026-12-03) */
.now-tick { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.now-box .now-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.now-box .now-form .ctl[type="password"] { max-width: 240px; }
