/* Nirwana Carwash - styles built on the Nirwana design system tokens (tokens.json in the design system).
   Colours are set once here; pages use the variables, never raw hex values. */
:root {
  /* surfaces and text */
  --bg: #eef1f6;          /* surface-page */
  --card: #ffffff;        /* surface-card */
  --sunken: #e3e8f1;      /* surface-sunken */
  --ink: #1f3659;         /* ink (brand navy) */
  --muted: #4a5b78;       /* ink-muted */
  --line: #e3e8f1;        /* hairlines inside cards */
  --border: #cbd5e4;      /* decorative borders between cards */
  --field: #72849f;       /* border-control: inputs and outline buttons */
  /* actions */
  --primary: #2b6cc4;
  --primary-dk: #1f59a8;  /* primary-hover, text on primary-tint */
  --primary-bg: #e3edfb;  /* primary-tint */
  --primary-ink: #ffffff;
  --focus: #2b6cc4;
  /* brand artwork */
  --navy: #1f3659;
  --navy-muted: #afc0dd;  /* secondary text on navy */
  --sky: #56add7;
  --red: #ed1c24;         /* graphic accent only, never text */
  --accent: #ed1c24;
  /* status pairs */
  --ok: #0b7a5a;   --ok-bg: #dcf5ec;
  --busy: #9a5b00; --busy-bg: #fff1d6; --busy-line: #f2d79c;
  --wash: #1f59a8; --wash-bg: #e3edfb; --wash-bar: #2b6cc4;
  --late: #c8101a; --late-bg: #fde4e5;
  /* shape */
  --radius: 20px;   /* radius-lg: cards */
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(20, 35, 63, .12), 0 4px 12px rgba(20, 35, 63, .06);
  --shadow-pop: 0 8px 24px rgba(20, 35, 63, .18);
  --nav-h: 68px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: 'Montserrat', 'Poppins', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
}
body.role-guest { padding-bottom: 24px; }
a { color: var(--primary); }
a:hover { color: var(--primary-dk); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.05rem; font-weight: 700; }
.muted { color: var(--muted); }
.r { text-align: right; }
.num, .money { font-variant-numeric: tabular-nums; }
.hint { font-size: .85rem; color: var(--muted); margin: -4px 0 10px; }
.hint.ok { color: var(--ok); }
.hint.warn { color: var(--late); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.disp { font-family: var(--display); font-weight: 800; font-style: italic; letter-spacing: -.01em; }
.ico { width: 24px; height: 24px; flex-shrink: 0; }
.ico.s { width: 18px; height: 18px; }
.ico.xs { width: 14px; height: 14px; }

/* brand slash motif: two red parallelograms */
.slash { display: inline-flex; gap: 5px; vertical-align: middle; }
.slash i { display: block; width: 8px; height: 15px; background: var(--red); transform: skewX(-24deg); }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(238, 241, 246, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 12px; display: block; flex-shrink: 0; box-shadow: var(--shadow); }
.brand .bt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand .bt small { font-size: .75rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .bt span { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: 8px; }
.icb {
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  text-decoration: none; cursor: pointer; padding: 0; flex-shrink: 0; font: 700 .8rem var(--font);
}
.icb:hover { color: var(--primary-dk); }
.icb .ico { width: 20px; height: 20px; }
.icb.av { background: var(--navy); color: #fff; letter-spacing: .02em; }

.wrap { max-width: 760px; margin: 0 auto; padding: 8px 16px 16px; }
body.wide .wrap { max-width: 1100px; }
.pagetitle { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 1.85rem; letter-spacing: -.01em; margin: 6px 0 16px; display: flex; align-items: center; gap: 14px; }

/* ---------------------------------------------------------------- cards & forms */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h2 { margin-bottom: .6rem; }
.form label, label.block { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 12px; }
.form label.check { display: flex; font-weight: 500; margin-bottom: 0; }
.form label.pill { margin-bottom: 0; font-weight: 700; }
.form label input, .form label select, .form label textarea,
input.in, select.in { margin-top: 5px; }
input, select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 11px 13px; border: 1.5px solid var(--field); border-radius: var(--radius-sm);
  background: var(--card); min-height: 48px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--primary); }
.plate-input {
  font-size: 1.5rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; text-align: center;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 10px;
}
.plate-input::placeholder { color: #9aa8bd; }
.plate-input:focus { border-color: var(--ink); }
fieldset.field { border: 0; padding: 0; margin: 0 0 12px; }
fieldset.field legend { font-weight: 500; font-size: .9rem; padding: 0; margin-bottom: 6px; }
details.more { margin: 8px 0 4px; }
details.more > summary { cursor: pointer; font-weight: 700; padding: 10px 0; color: var(--primary); min-height: 44px; }

/* toggle switch: <input type="checkbox" class="toggle"> */
input.toggle {
  appearance: none; -webkit-appearance: none; width: 52px; height: 32px; min-height: 0; padding: 0; margin: 6px 0;
  border: 0; border-radius: 999px; background: var(--field); position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .12s;
}
input.toggle::after {
  content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 3px rgba(20, 35, 63, .3); transition: transform .12s;
}
input.toggle:checked { background: var(--primary); }
input.toggle:checked::after { transform: translateX(20px); }
.switchrow { display: flex; align-items: center; gap: 12px; padding: 6px 0; margin-bottom: 12px; }
.switchrow .tx { flex: 1; }
.switchrow .tx b { display: block; font-weight: 700; }
.switchrow .tx span { font-size: .85rem; color: var(--muted); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  border-radius: var(--radius-md); border: 1.5px solid var(--field); background: var(--card); color: var(--ink); font: inherit; font-weight: 700;
  font-size: .95rem; text-decoration: none; cursor: pointer; transition: background .12s, box-shadow .12s;
}
.btn:hover { color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover, .btn.primary:active { background: var(--primary-dk); border-color: var(--primary-dk); color: #fff; }
.btn.soft { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-dk); }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.dark:hover { color: #fff; }
.btn.danger { background: var(--card); border-color: var(--late); color: var(--late); }
.btn.small { min-height: 44px; padding: 5px 14px; font-size: .9rem; }
.btn.big { min-height: 54px; font-size: 1.02rem; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg, .ico-s { width: 20px; height: 20px; flex-shrink: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.actions form { display: contents; }
.actions.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.actions.grid2 form { display: block; }
.actions.grid2 .btn { width: 100%; }
.actions .btn.big { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }

/* floating action button */
.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 25;
  height: 56px; padding: 0 22px 0 18px; border-radius: 999px; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; text-decoration: none; box-shadow: var(--shadow-pop);
}
.fab:hover { background: var(--primary-dk); color: #fff; }
@media (min-width: 800px) { .fab { right: calc(50% - 364px); } }

/* ---------------------------------------------------------------- pills (radio chips) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pills.two .pill { flex: 1; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--field); border-radius: var(--radius-md); background: var(--card); font-weight: 700; text-align: center;
}
.pills.two .pill span { padding: 14px 10px; font-size: 1.02rem; }
.pill input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.checks { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--card); cursor: pointer; }
.check input { width: 22px; height: 22px; }
.check .nm { flex: 1; font-weight: 700; }
.check .pr { color: var(--muted); font-variant-numeric: tabular-nums; }
.check:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); }

/* filter chips (links or buttons) */
.chips-nav { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips-nav::-webkit-scrollbar { display: none; }
.chips-nav a, .chips-nav button {
  flex-shrink: 0; padding: 0 16px; border-radius: 999px; background: var(--card); text-decoration: none; font: 700 .9rem var(--font);
  color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); cursor: pointer; white-space: nowrap;
}
.chips-nav a.on, .chips-nav button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips-nav .n { font-weight: 500; opacity: .8; }

/* vehicle colour swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 56px; margin: 0 !important; font-weight: 500 !important; cursor: pointer; }
.sw input { position: absolute; opacity: 0; inset: 0; }
.sw span { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.sw em { font-style: normal; font-size: .75rem; color: var(--muted); text-align: center; line-height: 1.1; }
.sw input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.sw input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* payment proof picker */
.proofpick { margin-bottom: 12px; }
.proofpick .lbl { font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 0; padding: 0; }
.proofpick img.proof { max-height: 220px; }

/* flash */
.flash { padding: 12px 14px; border-radius: var(--radius-md); margin-bottom: 12px; font-weight: 700; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--late-bg); color: var(--late); }

/* login */
.login { max-width: 380px; margin: 6vh auto 0; }
.login .lockup { display: block; width: 240px; max-width: 80%; margin: 0 auto 8px; }
.login h1 { text-align: center; color: var(--ink); }
.login .muted { text-align: center; margin-bottom: 16px; }

/* ---------------------------------------------------------------- bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--card); border-top: 1px solid var(--border);
  padding: 4px 6px env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--nav-h); font-size: .75rem; color: var(--muted); text-decoration: none; font-weight: 500;
}
.bottomnav a .ni { width: 56px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; transition: background .12s; }
.bottomnav a .ico { width: 22px; height: 22px; }
.bottomnav a.on { color: var(--ink); font-weight: 700; }
.bottomnav a.on .ni { background: var(--primary-bg); color: var(--primary-dk); }

/* ---------------------------------------------------------------- hero (navy) cards */
.hero {
  background: var(--navy); color: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.hero .hl { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; color: var(--navy-muted); font-weight: 500; }
.hero .hl .tag { color: var(--sky); font-weight: 700; font-size: .78rem; display: inline-flex; align-items: center; gap: 4px; }
.hero .hv { display: flex; align-items: center; gap: 14px; }
.hero .hv b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 2.15rem; line-height: 1.25; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hero .hsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .16); margin-top: 10px; padding-top: 12px; }
.hero .hsplit span { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--navy-muted); font-weight: 500; }
.hero .hsplit b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.hero a { color: #fff; }
.hero .btn-ghost { align-self: flex-start; margin-top: 12px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.7); color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }

/* status badges (stage pairs from the design system) */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: .78rem; line-height: 1.35; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.badge .ico { width: 13px; height: 13px; }
.badge.st-waiting { background: var(--sunken); color: var(--muted); }
.badge.st-washing { background: var(--wash-bg); color: var(--wash); }
.badge.st-drying { background: var(--busy-bg); color: var(--busy); }
.badge.st-awaiting_payment { background: var(--late-bg); color: var(--late); }
.badge.st-paid { background: var(--ok-bg); color: var(--ok); }
.badge.st-cancelled { background: var(--sunken); color: var(--muted); text-decoration: line-through; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.navy { background: var(--navy); color: #fff; }

/* ---------------------------------------------------------------- station board */
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.counts .c { background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.counts .c span { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
.counts .c b { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.ledger .lday { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 4px; font-size: .82rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--line); }
.ledger .lday b { color: var(--ink); font-variant-numeric: tabular-nums; }

.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 32px; }
.sec-head h2 { margin: 0; font-size: 1.05rem; }
.sec-head small { color: var(--muted); font-weight: 500; }
.section { margin-top: 20px; }

.stations { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 8px; }
@media (min-width: 700px) { .stations { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stations .moto { grid-column: 1 / -1; }
.stcard {
  display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--radius); background: var(--card);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow); min-width: 0;
}
a.stcard:hover { color: var(--ink); box-shadow: var(--shadow-pop); }
.stcard.free { box-shadow: none; border: 2px dashed var(--border); background: transparent; align-items: center; justify-content: center; text-align: center; min-height: 128px; }
.st-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.st-ic { width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-ic .ico { width: 17px; height: 17px; }
.st-ic.wash { background: var(--wash-bg); color: var(--wash); }
.st-ic.dry { background: var(--busy-bg); color: var(--busy); }
.st-ic.free { width: 38px; height: 38px; background: var(--primary-bg); color: var(--primary-dk); }
.st-ic.idle { width: 38px; height: 38px; background: var(--sunken); color: var(--muted); }
.st-name { font-weight: 700; font-size: .92rem; }
.st-sub { font-size: .78rem; color: var(--muted); font-weight: 500; }
.st-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.st-next { font-size: .8rem; font-weight: 700; color: var(--primary); margin-top: 2px; }
.chipx { font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--sunken); color: var(--muted); }
.chipx.wash { background: var(--wash-bg); color: var(--wash); }
.chipx.dry { background: var(--busy-bg); color: var(--busy); }
.chipx.pay { background: var(--late-bg); color: var(--late); }
.chipx.free { background: var(--sunken); color: var(--muted); }

/* Indonesian plate (white since 2022): ink on white with a dark border */
.plt {
  display: inline-block; background: #fff; color: var(--ink); font-weight: 700; letter-spacing: .07em; font-size: 1.05rem; line-height: 1.3;
  padding: 1px 10px; border-radius: 7px; border: 2.5px solid var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.plt.sm { font-size: .78rem; padding: 0 6px; border-width: 2px; border-radius: 6px; }
.plt.lg { font-size: 1.4rem; padding: 2px 16px; border-width: 3px; border-radius: 9px; }
.pgroup { display: flex; flex-direction: column; gap: 5px; }
.pgroup .lbl { display: flex; justify-content: space-between; align-items: baseline; font-size: .78rem; color: var(--muted); font-weight: 500; }
.pgroup .lbl .pl { display: inline-flex; align-items: center; }
.pgroup .lbl { white-space: nowrap; }
.pgroup .lbl b { color: var(--ink); font-size: .82rem; font-variant-numeric: tabular-nums; }
.pbar { display: block; height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.pbar > i { display: block; height: 100%; width: 0; background: var(--wash-bar); border-radius: 99px; transition: width .4s; }
.stcard.dry .pbar > i { background: var(--busy); }
.pbar.late > i { background: var(--late) !important; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.timer.late { color: var(--late); }
.go { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--radius-md); background: var(--primary); color: #fff; font-weight: 700; font-size: .9rem; padding: 0 14px; text-decoration: none; }
.go.full { width: 100%; }
.go.soft { background: var(--primary-bg); color: var(--primary-dk); }
.stcard.moto { gap: 10px; align-items: stretch; text-align: left; }
.stcard.moto.free { flex-direction: row; justify-content: space-between; min-height: 0; padding: 12px 14px; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--wash-bg); text-decoration: none; color: var(--ink); }
.mrow .sub { font-size: .78rem; color: var(--muted); display: block; }
.mrow .timer { color: var(--wash); }
.mrow .timer.late { color: var(--late); }
.mgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* awaiting payment cards */
.paycards { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .paycards { grid-template-columns: 1fr 1fr; } }
.paycard { background: var(--card); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); border: 1.5px solid var(--late-bg); }
.paycard a.top { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.paycard form { margin: 0; }
.payrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.payrow .btn { width: 100%; }

/* list rows with an icon avatar (board today list, customers, menu) */
.list { padding: 4px 0; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); min-height: 56px; }
a.li:hover { background: #f6f8fb; color: var(--ink); }
.li + .li { border-top: 1px solid var(--line); }
.li .av { width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--sunken); color: var(--muted); font-weight: 700; font-size: .85rem; }
.li .av .ico { width: 20px; height: 20px; }
.li .av.waiting { background: var(--sunken); color: var(--muted); }
.li .av.washing { background: var(--wash-bg); color: var(--wash); }
.li .av.drying { background: var(--busy-bg); color: var(--busy); }
.li .av.awaiting_payment { background: var(--late-bg); color: var(--late); }
.li .av.paid { background: var(--ok-bg); color: var(--ok); }
.li .av.cancelled { background: var(--sunken); color: var(--muted); }
.li .mid { flex: 1; min-width: 0; }
.li .t1 { font-weight: 700; font-size: 1rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .t2 { font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.li .end b { font-variant-numeric: tabular-nums; }
.li .chev { color: var(--muted); width: 18px; height: 18px; }
.empty-note { padding: 14px 16px; color: var(--muted); }

.queue { padding: 4px 14px; }
.qrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.qrow:last-child { border-bottom: 0; }
.qrow .sub { font-size: .8rem; color: var(--muted); }

/* ---------------------------------------------------------------- job page */
.jobtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 8px; }
.jobtop .cap { font-weight: 700; }
.jobhead { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 18px; }
.jobhead .sub { color: var(--muted); font-size: .9rem; margin: 0; }
.jobhead .amt { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 2.6rem; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.jobhead .meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.bigmoney { font-size: 1.4rem; font-weight: 700; }
.roundacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 18px; }
.roundacts form { display: contents; }
.ract { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; padding: 0; font: 500 .82rem var(--font); color: var(--ink); text-decoration: none; cursor: pointer; }
.ract .c { width: 56px; height: 56px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }
.ract .c .ico { width: 22px; height: 22px; }
.ract.pri .c { background: var(--primary); color: #fff; box-shadow: 0 0 0 6px var(--primary-bg); }
.ract:hover { color: var(--ink); }
.ract[disabled] { opacity: .4; cursor: not-allowed; }
.custcard { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.custcard:hover { color: var(--ink); }
.custcard .ic { width: 44px; height: 44px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-dk); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.custcard .mid { flex: 1; min-width: 0; }
.custcard small { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; }
.custcard b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svclist { list-style: none; padding: 0; margin: 4px 0 0; }
.svclist li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: .95rem; }
.svclist li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.svclist li.tot { border-top: 1.5px dashed var(--border); margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 1.02rem; }
.stage-timer { font-weight: 700; }
.proof { max-width: 100%; border-radius: var(--radius-md); margin-top: 10px; border: 1px solid var(--border); }

/* vertical timeline */
.tline { list-style: none; margin: 4px 0 0; padding: 0; position: relative; }
.tline li { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.tline li:last-child { padding-bottom: 0; }
.tline li:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--border); }
.tline .d { width: 24px; height: 24px; border-radius: 999px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; z-index: 1; }
.tline .d .ico { width: 14px; height: 14px; }
.tline li.todo .d { background: var(--bg); border: 2px dashed var(--field); }
.tline li.todo .t { color: var(--muted); }
.tline .t { font-weight: 700; }
.tline .s { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tline-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; font-weight: 700; }

/* ---------------------------------------------------------------- tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-size: .78rem; color: var(--muted); font-weight: 500; background: transparent; }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.small { font-size: .84rem; }
.tbl tr.sum td { font-weight: 700; border-top: 2px solid var(--line); }
.tscroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.tscroll .tbl { min-width: 520px; }
.tscroll .tbl.narrow { min-width: 0; }

/* ---------------------------------------------------------------- KPI tiles & bars */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border-radius: 16px; padding: 13px 14px; box-shadow: var(--shadow); }
.kpi .l { font-size: .8rem; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .s { font-size: .8rem; color: var(--muted); }
.kpi.good .v { color: var(--ok); }
.kpi.bad .v { color: var(--late); }
.kpi.hero { grid-column: 1 / -1; background: var(--navy); color: #fff; box-shadow: none; padding: 20px; display: block; margin: 0; gap: 0; }
.kpi.hero .l, .kpi.hero .s { color: var(--navy-muted); }
.kpi.hero .v { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2.1rem; display: flex; align-items: center; gap: 14px; }
.kpi.hero a { color: #fff; }
.bar { height: 10px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.bars .brow { display: grid; grid-template-columns: 70px 1fr 110px; gap: 8px; align-items: center; font-size: .85rem; margin: 6px 0; }
.bars .brow .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.splitbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 3px; background: var(--sunken); }
.splitbar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9rem; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend b { font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.filters label { font-size: .82rem; font-weight: 500; flex: 1; min-width: 130px; }
.filters .btn { min-height: 48px; }

/* ---------------------------------------------------------------- menu / settings list */
.menulist { display: grid; gap: 8px; }
.menulist a { display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; background: var(--card); border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 700; box-shadow: var(--shadow); min-height: 54px; }
.grouplabel { font-size: .9rem; font-weight: 500; color: var(--muted); margin: 18px 4px 8px; }
.setlist { padding: 4px 0; }
.setlist .sr { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 12px; min-height: 58px; text-decoration: none; color: var(--ink); background: transparent; border: 0; width: 100%; font: inherit; cursor: pointer; text-align: left; }
.setlist .sr + .sr, .setlist form + .sr, .setlist .sr + form .sr { border-top: 1px solid var(--line); }
.setlist form { margin: 0; }
.setlist .sr:hover { background: #f6f8fb; color: var(--ink); }
.setlist .sr .ic { width: 40px; height: 40px; border-radius: 999px; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.setlist .sr .ic .ico { width: 20px; height: 20px; }
.setlist .sr .tt { flex: 1; font-weight: 500; }
.setlist .sr .vv { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.setlist .sr .chev { width: 18px; height: 18px; color: var(--muted); }
.setlist .sr.danger, .setlist .sr.danger .ic { color: var(--late); }
.bizcard { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.bizcard img { width: 60px; height: 60px; border-radius: 18px; display: block; flex-shrink: 0; }
.bizcard .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bizcard .mid > b { font-size: 1.12rem; }
.bizcard .tags { display: flex; flex-wrap: wrap; gap: 6px; }

.warnbox { background: var(--busy-bg); border: 1px solid var(--busy-line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: .92rem; color: var(--busy); }
.infobox { display: flex; gap: 12px; align-items: flex-start; background: var(--sunken); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; font-size: .92rem; }
.pricegrid th, .pricegrid td { padding: 6px 4px; }
.pricegrid input { min-height: 44px; padding: 6px 8px; min-width: 78px; text-align: right; }
.inline { display: inline; }

/* ---------------------------------------------------------------- cashflow ledger and cash card */
.ledger .lrow { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; }
.ledger .lrow:last-child { border-bottom: 0; }
.ledger .ld { color: var(--muted); font-size: .82rem; padding-top: 1px; font-weight: 500; }
.ledger .lm { min-width: 0; overflow-wrap: anywhere; font-weight: 500; font-size: .92rem; }
.ledger .lm form.inline { display: inline-block; margin-left: 6px; }
.ledger .la { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; font-size: .92rem; }
.ledger .la.in { color: var(--ok); }
.ledger .la.out { color: var(--late); }
.ledger .la small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
a.cashcard { display: block; text-decoration: none; color: inherit; }
.cashcard .cashrow { display: flex; justify-content: space-between; padding: 5px 0; }
.cashcard .cashrow.tot { border-top: 2px solid var(--line); margin-top: 4px; padding-top: 9px; font-size: 1.05rem; }
.ledger .lm a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
.kpi.dark { background: var(--navy); color: #fff; box-shadow: none; }
.kpi.dark .l { color: var(--navy-muted); }
.balhero { grid-column: 1 / -1; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 20px; }
.balhero .l { font-size: .85rem; color: var(--navy-muted); font-weight: 500; }
.balhero .v { font-family: var(--display); font-style: italic; font-size: 2rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.balsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.balsplit div { background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 10px 12px; }
.balsplit span { display: block; font-size: .78rem; color: var(--navy-muted); }
.balsplit b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- attendance calendar */
.cal { margin-bottom: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head b { font-size: 1.02rem; font-weight: 700; }
.cal-head a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-dk); text-decoration: none; font-size: 1.3rem; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .75rem; font-weight: 500; color: var(--muted); padding: 2px 0 4px; }
.cal-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  min-height: 56px; padding: 5px 2px 4px; border-radius: 12px; background: #f6f8fb; text-decoration: none; color: var(--ink);
  border: 2px solid transparent;
}
.cal-day.out { background: transparent; opacity: .35; pointer-events: none; }
.cal-day .d { font-size: .8rem; font-weight: 700; }
.cal-day.today .d { background: var(--navy); color: #fff; border-radius: 999px; min-width: 22px; text-align: center; padding: 0 4px; }
.cal-day.sel { border-color: var(--primary); background: #fff; }
.cal-day .n { font-size: 1rem; font-weight: 700; line-height: 1; }
.cal-day .o { font-size: .75rem; font-weight: 700; color: var(--busy); background: var(--busy-bg); border-radius: 999px; padding: 0 6px; }
.cal-day.lv1 { background: #e3edfb; }
.cal-day.lv2 { background: #c6daf6; }
.cal-day.lv3 { background: #a6c5ef; }
.cal-day.low .n { color: var(--late); }
.cal-day.zero .n { color: var(--muted); }
.cal-key { display: flex; flex-wrap: wrap; gap: 10px; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.cal-key i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 4px; }
.offweek { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.offweek:last-child { border-bottom: 0; }
.offweek .nm { font-weight: 700; }
.offweek .ct { font-weight: 700; font-variant-numeric: tabular-nums; padding: 2px 12px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-dk); }
.offweek .ct.zero { background: var(--sunken); color: var(--muted); }
.offweek .ct.many { background: var(--busy-bg); color: var(--busy); }

/* ---------------------------------------------------------------- column charts */
.cols { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.cols .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.cols .col i { display: block; width: 100%; background: rgba(86, 173, 215, .45); border-radius: 4px 4px 0 0; min-height: 3px; }
.cols .col.now i { background: var(--navy); }
.cols .amt { font-size: .75rem; font-weight: 500; color: var(--muted); height: 16px; white-space: nowrap; }
.cols .dn { font-size: .75rem; font-weight: 500; color: var(--muted); }
.cols .col.now .dn, .cols .col.now .amt { color: var(--ink); font-weight: 700; }
.cols .col .amt, .cols .col .dn { flex: none; }
.cols .col i { flex: 0 0 auto; }

.filterbox .frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .filterbox .frow { grid-template-columns: 1fr; } }
.stmt td, .stmt th { padding: 7px 6px; font-size: .84rem; vertical-align: top; }
.stmt td.in { color: var(--ok); } .stmt td.out { color: var(--late); }
.stmt tr.open td { background: var(--bg); }

/* top services */
.track { height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; margin-top: 6px; }
.track i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* ---------------------------------------------------------------- report page */
.report-head { display: none; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 4px 16px; }
.report-head img { height: 44px; width: auto; display: block; }
.report-head div { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.report-head b { font-size: 1rem; }
.report-head span { font-size: .78rem; color: var(--muted); }
.mgrid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid rgba(255, 255, 255, .16); margin-top: 10px; padding-top: 12px; }
@media (min-width: 640px) { .mgrid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mgrid4 span { display: block; font-size: .78rem; color: var(--navy-muted); font-weight: 500; }
.mgrid4 b { display: block; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.hero .balance { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); }
.hero .balance span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .92rem; }
.hero .balance b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.hero .balance.neg b { color: #ffb3b6; }
.cols.many { gap: 3px; }
.cols.many .amt { overflow: visible; position: relative; z-index: 1; }
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekstrip .day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.weekstrip .dl { font-size: .75rem; color: var(--muted); font-weight: 500; }
.weekstrip .dd { width: 38px; height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; background: var(--sunken); }
.weekstrip .dc { font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.weekstrip .today .dl { color: var(--ink); font-weight: 700; }
.weekstrip .today .dd { background: var(--navy); color: #fff; }
.weekstrip .today .dc { color: var(--primary-dk); }
.weekstrip .fut .dd { background: transparent; border: 1.5px dashed var(--border); color: var(--muted); }
.weekstrip .fut .dc { color: var(--muted); font-weight: 500; }
.rsec-h { margin-top: 4px; }

/* Export to image: a fixed-width, chrome-free copy of the report */
body.exporting #report { width: 640px; max-width: none; background: var(--bg); padding: 20px; }
body.exporting .report-head, .printing .report-head { display: flex; }
body.exporting #report .noprint { display: none !important; }
body.exporting .disp, body.exporting .hero .hv b { letter-spacing: 0; }

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  body { padding: 0 !important; font-size: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar, .bottomnav, .fab, .noprint, .flash { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .report-head { display: flex; }
  .card { box-shadow: none; border: 1px solid var(--border); break-inside: avoid; }
  .hero, .rsec, .rsec-h { break-inside: avoid; }
  .rsec-h { break-after: avoid; page-break-after: avoid; }
  .tscroll { overflow: visible; margin: 0; padding: 0; }
  .tscroll .tbl { min-width: 0; }
  a { color: inherit; text-decoration: none; }
}
.li .mid .row b.num { white-space: nowrap; flex-shrink: 0; }
.li .mid .row b:first-child { min-width: 0; }
