/* All Records: shop app */
[hidden] { display: none !important; }
body { margin: 0; }

/* Layout: navy page, one white sign-in card with the logo overlapping its top edge, credit line below the card. Deliberately one theme. */
:root {
  color-scheme: light;
  --page: #1d3557;
  --card: #ffffff;
  --navy: #1d3557;
  --navy-hover: #26446d;
  --ink: #1c2a3a;
  --muted: #5b6573;
  --gold: #8f6f35;
  --field-line: #d9cdb8;
  --danger: #b4362c;
  --on-page: #c9d4e3;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: var(--page); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 40px;
  display: flex; flex-direction: column; align-items: center;
}
.stack { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.card {
  width: 100%; background: var(--card); border-radius: 10px; box-shadow: 0 24px 60px rgba(5, 15, 30, .35);
  padding: 0 36px 36px; display: flex; flex-direction: column; align-items: center; margin-top: 70px;
}
.logo {
  width: 140px; height: 140px; margin-top: -70px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--field-line); display: grid; place-items: center; overflow: hidden;
  color: var(--muted); font-size: 12px; text-align: center;
}
.logo img { width: 100%; height: 100%; object-fit: contain; }
.badge img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; background: #fff; }
.badge.has-img { background: #fff; border: 1px solid var(--line); }
.sa-logo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sa-logo-box { width: 96px; height: 96px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; flex: none; }
.sa-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.sa-logo .pc-btns label.open-btn { cursor: pointer; } .sa-logo input[type=file] { display: none; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--navy); margin: 18px 0 0; text-align: center; text-wrap: balance; }
.welcome { margin-top: 22px; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.rule { width: 56px; height: 2px; background: var(--gold); margin-top: 8px; }
form { width: 100%; display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink); }
input {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--card); height: 44px; padding: 0 12px;
  border: 1px solid var(--field-line); border-radius: 6px; width: 100%;
}
input:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
input.bad { border-color: var(--danger); }
.msg { min-height: 20px; margin: -6px 0 -6px; font-size: 13px; color: var(--danger); }
button {
  font: inherit; font-weight: 700; height: 44px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--navy); color: #ffffff;
}
button:hover:not(:disabled) { background: var(--navy-hover); }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.ghost { background: transparent; color: var(--navy); border: 1px solid var(--field-line); }
.ghost:hover:not(:disabled) { background: #f4efe6; }
.credit { text-align: center; color: var(--on-page); font-style: italic; margin: 0; }
.credit .by { font-size: 16px; }
.credit .alias { font-size: 13px; opacity: .85; }
.home { width: 100%; margin-top: 24px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.home p { margin: 0; color: var(--muted); }
.home strong { color: var(--ink); }
.demo { color: var(--on-page); font-size: 12px; text-align: center; opacity: .75; margin: 0; }

/* Signed-in app shell */
:root { --app-bg: #eef1ef; --bar: #ffffff; --brand: #1f6b4f; --line: #dfe5e2; --avatar-bg: #e3ece8; }
body.in-app { background: var(--app-bg); display: block; padding: 0; }
body.in-app .stack { display: none; }
#shell[hidden] { display: none; }
#shell:not([hidden]) { min-height: 100vh; display: flex; flex-direction: column; }
#shell > main { flex: 1 0 auto; width: 100%; }
.app-credit { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 20px 16px 28px; margin-top: 24px;
  border-top: 1px solid var(--line); color: var(--muted); font-style: italic; text-align: center; }
.app-credit .by { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.app-credit .alias { font-size: 12px; }
@media print { .app-credit { display: none; } }
.topbar { background: var(--bar); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.topbar-in, .page {
  max-width: 960px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.topbar-in { height: 60px; display: flex; align-items: center; gap: 12px; }
.badge { width: 36px; height: 36px; border-radius: 9px; background: var(--brand); color: #ffffff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.appname { font-weight: 700; font-size: 17px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--avatar-bg); color: var(--brand); border: 0; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; height: 34px; padding: 0; }
.avatar:hover:not(:disabled) { background: var(--line); }
.page { padding-block: 24px 40px; display: flex; flex-direction: column; gap: 18px; }
.title-block { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.title-block h2 { margin: 0 0 4px; font-family: var(--font-body); font-size: 28px; font-weight: 700; color: var(--ink); }
.title-block p { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.panel { background: var(--bar); border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-height: 160px; display: grid; place-items: center; color: var(--muted); }
.sheet { background: var(--bar); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.sheet h3 { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); text-wrap: balance; }
.cashier-row label { font-weight: 500; color: var(--muted); }
.inline { display: flex; gap: 10px; }
.inline input { flex: 1; min-width: 0; height: 48px; }
.inline button { flex: none; padding: 0 20px; height: 48px; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.inline button:hover:not(:disabled) { background: var(--app-bg); }
.eyebrow-s { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: -6px; }
.sheet input { border-color: var(--line); }
.sheet input:focus { outline-color: var(--brand); border-color: var(--brand); }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 14px; font-weight: 600; }
.total strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.saved { margin: -8px 0 -8px; min-height: 20px; font-size: 13px; color: var(--brand); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); }
.steps li::before { content: counter(s) ". "; }
.steps li.on { color: var(--brand); border-color: var(--brand); }
.steps li.done { color: var(--ink); border-color: #9cc3b3; }
.step { display: flex; flex-direction: column; gap: 18px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.grid label { gap: 6px; }
.grid input { height: 48px; font-variant-numeric: tabular-nums; }
.auto { height: 48px; display: flex; align-items: center; padding: 0 12px; border-radius: 6px; background: var(--app-bg); border: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; }
.note { margin: 0; font-size: 13px; color: var(--muted); }
.note.err { color: var(--danger); min-height: 0; }
.note.err:empty { display: none; }
.nav { display: flex; gap: 10px; }
.nav > * { flex: 1; }
.next { background: var(--brand); width: 100%; }
.next:hover:not(:disabled) { background: #185a42; }
.back-btn { background: transparent; color: var(--ink); border: 1px solid var(--line); flex: 0 0 auto; padding: 0 22px; }
.back-btn:hover:not(:disabled) { background: var(--app-bg); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { background: transparent; color: var(--ink); border: 1px solid var(--line); height: 38px; padding: 0 14px; font-weight: 600; }
.chip:hover:not(:disabled) { background: var(--app-bg); }
.rows { display: flex; flex-direction: column; gap: 10px; }
.rows:empty { display: none; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; }
.row input { height: 42px; }
.tag { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--avatar-bg); padding: 4px 8px; border-radius: 6px; }
.files { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: var(--app-bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 4px 4px 10px; font-size: 13px; }
.fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.fsize { color: var(--muted); font-variant-numeric: tabular-nums; }
.fx { background: transparent; color: var(--muted); width: 26px; height: 26px; padding: 0; font-size: 16px; }
.fx:hover:not(:disabled) { color: var(--danger); background: transparent; }
.attach { flex-direction: row; position: relative; font-size: 13px; font-weight: 600; color: var(--brand); border: 1px dashed #9cc3b3; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.attach:hover { background: var(--app-bg); }
.attach:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ferr { flex-basis: 100%; font-size: 13px; color: var(--danger); }
.x { background: transparent; color: var(--muted); width: 36px; height: 36px; padding: 0; font-size: 20px; }
.x:hover:not(:disabled) { background: var(--app-bg); color: var(--danger); }
@media (max-width: 460px) { .row { grid-template-columns: minmax(0, 1fr) 96px auto; } .tag { grid-column: 1 / -1; justify-self: start; } }
.summary { background: var(--app-bg); border-radius: 10px; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.summary b { font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }
.summary .wide { grid-column: 1 / -1; }
.summary .wide b { font-size: 18px; }
#save { background: var(--brand); flex: 1; }
#save:hover:not(:disabled) { background: #185a42; }
.confirm { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--app-bg); }
.confirm strong { font-size: 16px; }
#confirm-save { background: var(--brand); flex: 1; }
#close-shift { background: var(--brand); }
.report { margin: 0; white-space: pre-wrap; word-break: break-word; font: 14px/1.55 var(--font-body); font-variant-numeric: tabular-nums; background: var(--app-bg); border-radius: 10px; padding: 16px; }
.wa { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 6px; background: #1f8f4e; color: #ffffff; font-weight: 700; text-decoration: none; }
.wa:hover { background: #187a41; }
.wa:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#copy { height: 44px; }
.msg.ok { color: var(--brand, #1f6b4f); }
.sp { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.sp[hidden] { display: none; }
.sp-track { flex: 1; height: 8px; border-radius: 99px; background: var(--field-line, #e4dccb); overflow: hidden; }
.sp-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold, #a8833a), var(--navy, #1e3557)); transition: width .15s ease-out; }
.sp-num { min-width: 42px; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.col { display: flex; flex-direction: column; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--bar); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi strong { font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi small { color: var(--muted); font-size: 12px; }
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: var(--line); padding: 4px; border-radius: 10px; }
.tabs button { background: transparent; color: var(--muted); height: 38px; border-radius: 7px; }
.tabs button:hover:not(:disabled) { background: rgba(255,255,255,.5); }
.tabs button.on { background: var(--bar); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pend { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ph { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.ph b { font-size: 15px; }
.ph span { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.pm { font-size: 13px; color: var(--muted); margin-top: -6px; }
.pend .inline button { background: var(--brand); color: #ffffff; border: 0; }
.pend .inline button:hover:not(:disabled) { background: #185a42; }
.diff { margin: 0; font-size: 13px; font-weight: 600; min-height: 0; }
.diff:empty { display: none; }
.diff.short { color: var(--danger); } .diff.extra { color: #a06a12; } .diff.match { color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; margin: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.field-grid label, .lines label { gap: 6px; }
.field-grid input, .field-grid select { height: 46px; }
select { font: inherit; color: var(--ink); background: var(--bar); height: 46px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.lines { display: flex; flex-direction: column; gap: 10px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; align-items: center; }
.line input { height: 44px; }
.line .x:disabled { visibility: hidden; }
.pay-files { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.book-day { display: flex; flex-direction: column; gap: 6px; }
.book-day h4 { margin: 8px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.entry .what { font-weight: 600; min-width: 0; }
.entry .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.entry .amt.in { color: var(--brand); } .entry .amt.out { color: var(--danger); } .entry .amt.bank { color: var(--muted); }
.entry .sub { font-size: 13px; color: var(--muted); min-width: 0; }
.entry .bal { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.daysum { background: var(--app-bg); border-radius: 10px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-variant-numeric: tabular-nums; }
.daysum b { text-align: right; white-space: nowrap; }
.daysum .wide.head { border-top: 0; padding-top: 0; font-weight: 700; font-size: 15px; align-items: baseline; }
.daysum .head small { font-weight: 500; color: var(--muted); font-size: 12px; }
.daysum .neg { color: var(--danger); }
.daysum .wide.sep { font-size: inherit; margin-top: 4px; }
.daysum .wide.sep b { font-weight: 700; }
.daysum .item { font-size: 13px; color: var(--muted); font-weight: 500; padding-left: 12px; }
.daysum b.item { padding-left: 0; }
.daysum .wide { grid-column: 1 / -1; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; font-size: 16px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.bar-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-row i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--brand); opacity: .75; display: block; min-width: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-table th, .rep-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); }
.rep-table th:first-child, .rep-table td:first-child { text-align: left; }
.rep-table th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--app-bg); }
.rep-table tr:last-child td { border-bottom: 0; }
.rep-table .neg { color: var(--danger); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill.ok { background: var(--avatar-bg); color: var(--brand); }
.pill.wait { background: #fbeed5; color: #8a5a0b; }
h3 .count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: #fbeed5; color: #8a5a0b; font-size: 13px; vertical-align: 2px; margin-left: 4px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; margin-top: 4px; }
.thumb { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; background: var(--app-bg); color: var(--brand); border: 1px solid var(--line); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb:hover:not(:disabled) { background: var(--avatar-bg); }
.approve { background: var(--brand); flex: 1; }
.approve:hover:not(:disabled) { background: #185a42; }
.danger { background: var(--danger); flex: 1; }
.reject-box { display: flex; flex-direction: column; gap: 8px; }
.reject-box input { height: 44px; }
.pill.no { background: #f7dcd9; color: var(--danger); }
.entry .amt.struck { text-decoration: line-through; color: var(--muted); }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(10, 18, 15, .92); display: flex; flex-direction: column;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; color: #ffffff; }
.viewer-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.viewer-bar button { background: #ffffff; color: var(--ink); height: 38px; padding: 0 16px; flex: none; }
.viewer-body { flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 16px 24px; }
.viewer-body img, .viewer-body canvas { max-width: 100%; height: auto; background: #ffffff; border-radius: 4px; }
.viewer-msg { color: #ffffff; margin: 40px 0; text-align: center; }
body.no-scroll { overflow: hidden; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.pick .eyebrow-s { flex-basis: 100%; margin: 0 0 2px; }
.tick { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.tick:has(input:checked) { background: var(--avatar-bg); border-color: #9cc3b3; }
.tick.fixed { cursor: default; }
.tick input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--line); padding: 4px; border-radius: 10px; }
.seg button { background: transparent; color: var(--muted); height: 40px; border-radius: 7px; }
.seg button:hover:not(:disabled) { background: rgba(255,255,255,.5); }
.seg button.on { background: var(--bar); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.banner { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--avatar-bg); font-size: 14px; }
.linkish { background: none; color: var(--brand); height: auto; padding: 0; text-decoration: underline; font-weight: 600; margin-left: 4px; }
.linkish:hover:not(:disabled) { background: none; }
.bill .field-grid input, .bill .field-grid select { height: 42px; }
#bill-yes { background: var(--brand); flex: 1; }
.alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.alerts li { padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; border-left: 4px solid; }
.alerts li.no { background: #f7dcd9; border-color: var(--danger); color: #7d231c; }
.alerts li.wait { background: #fbeed5; border-color: #c98a1b; color: #6b4708; }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.tb { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--brand); }
.tb.warn { border-top-color: #c98a1b; } .tb.idle { border-top-color: var(--line); } .tb.bad { border-top-color: var(--danger); }
.tb-head { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.tb-head span { font-weight: 700; font-variant-numeric: tabular-nums; }
.tb-shift { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: 13px; align-items: center; }
.tb-shift span:first-child { color: var(--muted); min-width: 0; }
.tb-shift b { font-variant-numeric: tabular-nums; text-align: right; }
.tb-shift .pill { grid-column: 1 / -1; justify-self: start; }
.pill.live { background: #dbe8f5; color: #22507d; }
body.mgr .page, body.mgr .topbar-in { max-width: 1240px; }
.mgr-wrap { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; align-items: start; }
.mgr-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); }
.mgr-nav button { background: transparent; color: var(--muted); text-align: left; padding: 0 12px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; }
.mgr-nav button:hover:not(:disabled) { background: var(--line); color: var(--ink); }
.mgr-nav button.on { background: var(--bar); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.mgr-nav .count:empty { display: none; }
.mgr-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mgr-h { margin: 0; font-family: var(--font-body); font-size: 26px; color: var(--ink); }
.mgr-sub { margin: -10px 0 4px; color: var(--muted); }
.banner-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 10px; }
.banner-row i { width: 8px; height: 8px; border-radius: 50%; }
.banner-row b { display: block; } .banner-row span { font-size: 13px; color: var(--muted); }
.banner-row.info { background: #e1ebf5; } .banner-row.info i { background: #2c5784; }
.banner-row.warn { background: #f8ebd5; } .banner-row.warn i { background: #9a5b07; }
.open-btn { background: var(--bar); color: var(--ink); border: 1px solid var(--line); height: 34px; padding: 0 14px; font-size: 13px; }
.open-btn:hover:not(:disabled) { background: var(--app-bg); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.tile { background: var(--bar); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tile strong { font-size: clamp(18px, 1.7vw, 24px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile small { font-size: 13px; color: var(--muted); }
.mpanel { background: var(--bar); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mpanel-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; font-size: 16px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; }
.bank-head { display: flex; justify-content: space-between; align-items: flex-start; }
.bank-head small { display: block; color: var(--muted); }
.bank .big { font-size: 28px; font-variant-numeric: tabular-nums; margin-top: -6px; }
.bank-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bank-foot small { display: block; color: var(--muted); font-size: 12px; } .bank-foot b { font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 15px; font-family: var(--font-body); }
.chart .ax.now { fill: var(--ink); font-weight: 700; }
.table-wrap.flat { border: 0; border-radius: 0; }
.mgr-table th { background: transparent; text-transform: uppercase; letter-spacing: .04em; }
.mgr-table td small { display: block; color: var(--muted); font-size: 12px; }
.exp-table td { vertical-align: top; } .exp-table td.wrap { white-space: normal; min-width: 160px; text-align: left; }
.exp-table td:nth-child(2) { text-align: left; } .exp-table th:nth-child(2), .exp-table th:nth-child(3) { text-align: left; }
.exp-table select { height: 36px; min-width: 170px; }
.exp-table .thumb { display: block; margin-bottom: 4px; }
.exp-table .pill { margin-top: 4px; }
.cb-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.cb-filters .seg { width: 200px; }
.cb-filters label { gap: 4px; font-size: 13px; }
.cb-filters input, .cb-filters select { height: 40px; min-width: 150px; }
.cb-table td:nth-child(2), .cb-table th:nth-child(2) { text-align: left; }
.cb-table td.wrap { min-width: 260px; }
.cb-table td small { margin-top: 2px; }
.pl-table td:first-child { text-align: left; }
.pl-table tr.pl-head td { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; color: var(--muted); padding-top: 18px; }
.pl-table tr.pl-line td:first-child { padding-left: 24px; }
.pl-table tr.pl-total td { font-weight: 700; border-top: 1px solid var(--line); }
.pl-table tr.pl-grand td { font-weight: 700; font-size: 17px; border-top: 2px solid var(--ink); }
.mr-table td:first-child, .mr-table th:first-child { text-align: left; }
.mr-table tfoot td { font-weight: 700; border-top: 2px solid var(--ink); }
.mr-csv { height: 40px; margin-left: auto; }
.mr-note { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--app-bg); border-radius: 8px; font-size: 14px; color: var(--muted); }
.mr-note b { white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.pill.info { background: #e1ebf5; color: #2c5784; }
.ds-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ds-pick label, .mpanel > label { gap: 4px; font-size: 13px; }
.ds-pick input, .ds-pick select { height: 42px; }
.ds-strip { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; background: var(--app-bg); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.ds-strip span { display: inline-flex; gap: 6px; align-items: center; }
.ds-title { font-size: 18px; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 12px; }
.ds-grid label { gap: 4px; font-size: 13px; }
.ds-grid input { height: 42px; }
.ds-auto { gap: 4px; font-size: 13px; max-width: 160px; }
.ds-auto output { display: block; background: var(--app-bg); border-radius: 8px; padding: 10px 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ds-staff { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--app-bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 14px; }
.ds-chip button { background: none; color: var(--muted); height: 22px; width: 22px; padding: 0; }
.ds-add { display: flex; gap: 8px; max-width: 420px; } .ds-add input { flex: 1; height: 40px; } .ds-add .open-btn { height: 40px; }
.ds-drawer { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ds-rows { display: flex; flex-direction: column; gap: 10px; }
.ds-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; background: var(--app-bg); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.ds-sum b { font-variant-numeric: tabular-nums; } .ds-sum em { font-style: normal; color: var(--danger); font-size: 13px; }
.ds-confirm { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--brand); border-radius: 10px; padding: 14px; }
.ds-confirm span { color: var(--muted); font-size: 14px; }
.ds-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ds-cols > div { display: flex; flex-direction: column; gap: 4px; }
.ds-kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ds-kv b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-tabs { display: flex; gap: 6px; overflow-x: auto; }
.ds-tabs button { background: transparent; color: var(--muted); border: 1px solid var(--line); height: 34px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.ds-tabs button.on { background: var(--ink); color: var(--bar); border-color: var(--ink); }
.ds-tabs small { opacity: .7; margin-left: 4px; }
.ds-table td:nth-child(-n+4), .ds-table th:nth-child(-n+4) { text-align: left; }
.ds-table .linkish { margin: 0; }
@media (max-width: 700px) { .ds-pick, .ds-cols { grid-template-columns: 1fr; } }
.br-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.br-grid label { gap: 4px; font-size: 13px; } .br-grid input, .br-grid select { height: 40px; }
.br-grid .wide { grid-column: 1 / -1; }
.br-acct { padding: 12px 0; border-bottom: 1px solid var(--line); }
.br-acct-btns { display: flex; gap: 8px; }
.br-add-btn { height: 40px; margin-left: auto; width: auto; flex: 0 0 auto; padding: 0 18px; }
.br-del { display: block; margin: 4px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 700px) { .br-grid { grid-template-columns: 1fr; } }
.ct-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ct-list { display: flex; flex-direction: column; }
.ct-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ct-row > span { flex: 1; min-width: 0; }
.ct-row.edit input { flex: 1; height: 38px; min-width: 0; }
.ct-row .linkish { font-size: 13px; }
.ct-btn { background: transparent; color: var(--muted); border: 1px solid var(--line); height: 30px; width: 30px; padding: 0; font-size: 14px; }
.ct-btn:disabled { opacity: .35; }
@media (max-width: 800px) { .ct-cols { grid-template-columns: 1fr; } }
.al-table td:nth-child(-n+4), .al-table th:nth-child(-n+4), .al-users td, .al-users th { text-align: left; }
.al-table td.wrap { min-width: 220px; }
.al-table tr.al-bad td { background: #fdf3f2; }
.al-table .pill { margin-right: 6px; }
.pc-list { display: flex; flex-direction: column; gap: 8px; }
.pc-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: end; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pc-row label { gap: 4px; font-size: 13px; } .pc-row input, .pc-row select { height: 40px; }
.pc-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 700px) { .pc-row { grid-template-columns: minmax(0, 1fr) auto; } .pc-row label:not(:first-child) { grid-column: 1; } .pc-row .x { grid-row: 1; grid-column: 2; } }
.jn-table td:nth-child(2), .jn-table th:nth-child(2), .jn-tb td:first-child, .jn-tb th:first-child, .jn-tb td:nth-child(2), .jn-tb th:nth-child(2) { text-align: left; }
.jn-table tr.jn-head td { background: var(--app-bg); font-weight: 600; white-space: normal; text-align: left; }
.jn-table tr.jn-cr td:nth-child(2) { padding-left: 36px; }
.jn-ref { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.jn-tb .linkish { margin: 0; text-align: left; }
.br-route { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 12px; }
.br-route label { gap: 4px; font-size: 13px; } .br-route select { height: 40px; }
.ds-goes { margin: 0; font-size: 13px; color: var(--muted); } .ds-goes b { color: var(--ink); margin-right: 6px; }
.sa-table td:first-child, .sa-table th:first-child, .sa-table td:nth-child(2), .sa-table th:nth-child(2), .sa-table td:nth-child(3), .sa-table th:nth-child(3) { text-align: left; }
.sa-table td small { display: inline; margin-left: 6px; }
.sa-table tr.sa-off td { color: var(--muted); }
.sa-acts { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; } .sa-acts .linkish { margin: 0; font-size: 13px; }
.sa-edit, .sa-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sa-edit label, .sa-add label { gap: 4px; font-size: 13px; } .sa-edit input, .sa-add input, .sa-add select { height: 40px; }
.sa-add { padding-top: 12px; border-top: 1px solid var(--line); }
.sa-card { border-color: var(--brand); }
.sa-text { margin: 0; padding: 12px 14px; background: var(--app-bg); border-radius: 8px; font: 14px/1.5 var(--font-body); white-space: pre-wrap; }
.sa-links { gap: 6px; } .sa-links div { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; } .sa-links span { min-width: 220px; color: var(--muted); }
.sa-links code { font-size: 13px; word-break: break-all; }
.portal-demo { text-align: center; margin-top: 14px; font-size: 12px; } .portal-demo a { color: var(--brand); }
.pc-table th, .pc-table td { text-align: left; vertical-align: top; }
.pc-table th.num, .pc-table td.num { text-align: right; }
.pc-table td.pc-diffcell { white-space: normal; width: 100%; min-width: 300px; }
.pc-diff { display: grid; grid-template-columns: minmax(110px, auto) repeat(3, max-content); gap: 4px 16px; font-size: 13px; margin-bottom: 4px; }
.pc-diff span { text-align: right; } .pc-diff .h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pc-diff .h:first-child { text-align: left; } .pc-diff .neg { color: var(--danger); font-weight: 600; } .pc-diff .pos { color: #9a5b07; font-weight: 600; }
.pos-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pos-row input { height: 40px; } .pos-row .approve { width: auto; } .pos-st { grid-column: 2 / -1; font-size: 13px; }
@media (max-width: 640px) { .pos-row { grid-template-columns: 1fr auto; } .pos-row b { grid-column: 1 / -1; } .pos-st { grid-column: 1 / -1; } }
.rec-form { border-color: var(--brand); gap: 12px; }
.rec-form .pc-btns button { flex: 0 0 auto; width: auto; }
.rec-line { display: grid; grid-template-columns: 130px minmax(0, 1fr) 140px auto; gap: 8px; align-items: center; }
.rec-line input, .rec-line select { height: 40px; } .rec-rm { flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 500; font-size: 13px; }
.rec-line:has([data-rf-line]) { grid-template-columns: minmax(0, 1fr) 160px; }
.danger-link { color: var(--danger) !important; }
@media (max-width: 640px) { .rec-line { grid-template-columns: 1fr 1fr; } .rec-line input[data-k=note] { grid-column: 1 / -1; order: -1; } }
.sa-shifts { font-size: 13px; line-height: 1.5; color: var(--muted); }
.sa-wa { text-decoration: none; display: inline-flex; align-items: center; flex: 0 0 auto; width: auto; color: #fff; }
.sa-add .approve { flex: 0 0 auto; width: auto; }
@media (max-width: 640px) {
  .sa-table, .sa-table tbody { display: block; } .sa-table thead { display: none; }
  .sa-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .sa-table td { border: 0; padding: 0; } .sa-table td.sa-acts { width: 100%; text-align: left !important; display: flex; justify-content: flex-start; }
  .sa-table td.sa-acts .linkish { margin: 0 14px 0 0; }
}
.cb-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cb-files .thumb { height: 28px; font-size: 12px; }
.cb-table tr.ob td, .cb-table tfoot td { font-weight: 700; }
.cb-table tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; }
.cb-table tr.cb-close td { border-top: 1px solid var(--line); background: var(--app-bg); }
.approve.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.muted { color: var(--muted); }
.seg3 { grid-template-columns: repeat(3, 1fr); max-width: 420px; }
.mgr-empty { color: var(--muted); text-align: center; padding: 32px 16px; }
@media (max-width: 800px) {
  .mgr-wrap { grid-template-columns: minmax(0, 1fr); }
  .mgr-nav { flex-direction: row; overflow-x: auto; position: static; background: var(--line); padding: 4px; border-radius: 10px; }
  .mgr-nav button { flex: 1 0 auto; justify-content: center; gap: 6px; }
  .bank-foot { grid-template-columns: 1fr; }
}
.logout { background: transparent; color: var(--brand); border: 1px solid var(--line); height: 36px; padding: 0 14px; flex: none; }
.logout:hover:not(:disabled) { background: var(--app-bg); }
.menu { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); top: 56px; background: var(--bar); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; }
.menu button { background: transparent; color: var(--ink); height: 38px; padding: 0 14px; font-weight: 600; width: 100%; text-align: left; }
.menu button:hover { background: var(--app-bg); }
.topbar { position: sticky; }
.topbar-in { position: relative; }
