/* ==========================================================================
   PRINTEX — site stylesheet
   One file for every page (public site, print page, account, admin, incharge).

   HOW TO CHANGE THE THEME
   Edit only the "THEME" block below (the 10 colour lines). Everything else on
   every page is built from these variables. A list of ready-made themes is at
   the bottom of this file — copy any one of them over the THEME block.
   ========================================================================== */

:root {
  /* ---------- THEME: Crimson & Ivory ---------- */
  --ink:           #1C1A1A;   /* main text, dark bands */
  --primary:       #A3202F;   /* buttons, links, focus, accents */
  --primary-deep:  #821A26;   /* hover / pressed primary, accent text */
  --tint:          #F7ECE8;   /* tinted sections, chips, selected states */
  --paper:         #FDFAF9;   /* page background */
  --ink-soft:      #615C5C;   /* secondary text */
  --line:          #EDD4D2;   /* borders, dividers */
  --line-strong:   #DCABAD;   /* stronger borders, dashed outlines */
  --on-ink-soft:   #B8B8B8;   /* secondary text on dark (ink) surfaces */
  --on-ink-faint:  #888888;   /* tertiary text on dark surfaces */

  /* ---------- STATUS (kept separate from the theme so they never clash) ---------- */
  --ok:            #2E6A8A;   /* available / success */
  --ok-bg:         #E3EDF3;
  --warn:          #A97B2C;   /* busy / low / due soon */
  --warn-bg:       #F5EEDF;
  --off:           #5B6270;   /* offline / inactive */
  --off-bg:        #ECEDF0;
  --err:           #A9544A;   /* errors / overdue */
  --err-bg:        #F6E7E4;

  /* ---------- FIXED ---------- */
  --white:   #FFFFFF;
  --shadow-color: 28, 26, 26;   /* r,g,b used in shadows (match --ink) */

  --display: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --body:    'Figtree', 'Segoe UI', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(var(--shadow-color), .05), 0 8px 24px -12px rgba(var(--shadow-color), .2);
  --shadow-lg: 0 1px 2px rgba(var(--shadow-color), .06), 0 18px 40px -16px rgba(var(--shadow-color), .32);

  --nav-h: 68px;
  color-scheme: light;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.15rem); }
h3 { font-size: 1.1rem; }
p { max-width: 68ch; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
.mono  { font-family: var(--mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-soft); }
.label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); }
.divider { height: 1px; background: var(--line); }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
/* .todo marks placeholder UI that has no backend yet. Uncomment to see them all outlined while developing: */
/* .todo { outline: 1px dashed var(--err); outline-offset: 4px; } */
@media (max-width: 480px) { .container { padding-inline: 16px; } }

/* ==========================================================================
   Brand (logo slot)
   ========================================================================== */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.brand-text { line-height: 1; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  background: var(--white); color: var(--ink);
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--primary-deep); }
.btn-quiet { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-quiet:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-deep); }
.btn-danger { background: var(--white); border-color: var(--err-bg); color: var(--err); }
.btn-danger:hover:not(:disabled) { border-color: var(--err); }
.btn-danger-solid { background: var(--err); color: var(--white); }
.btn-text { background: none; border: none; color: var(--primary-deep); padding: 0; font-weight: 600; }
.btn-text:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-xs { padding: 5px 10px; font-size: .78rem; border-radius: var(--r-sm); }
.btn .icon { width: 18px; height: 18px; }

/* ==========================================================================
   Status pills
   ========================================================================== */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 100px; font-size: .78rem; font-weight: 600; background: var(--ok-bg); color: var(--ok); white-space: nowrap; line-height: 1.5; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.off  { background: var(--off-bg); color: var(--off); }
.pill.err  { background: var(--err-bg); color: var(--err); }
.pill.idle { background: var(--paper); color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); }
.pill.brand { background: var(--primary); color: var(--white); }
.pill.plain::before { display: none; }
.pill.chip { background: var(--tint); color: var(--primary-deep); }
.pill.chip::before { display: none; }

/* ==========================================================================
   Messages (JS toggles .error / .success / .info)
   ========================================================================== */
.msg { display: none; font-size: .88rem; padding: 10px 14px; border-radius: var(--r-sm); margin-top: 12px; line-height: 1.45; text-align: left; }
.msg.error   { display: block; background: var(--err-bg); color: var(--err); }
.msg.success { display: block; background: var(--ok-bg); color: var(--ok); }
.msg.info    { display: block; background: var(--tint); color: var(--primary-deep); }

/* Toast (admin / incharge) */
#toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--white); padding: 12px 20px; border-radius: var(--r); font-size: .88rem; opacity: 0; pointer-events: none; transition: all .2s; z-index: 1000; max-width: 90vw; text-align: center; box-shadow: var(--shadow-lg); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field > label, .field .flabel { font-size: .88rem; font-weight: 600; }
.field .hint, .hint { font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="number"], .field input[type="password"], .field input[type="url"], .field input[type="search"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white); font-size: .95rem; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint); }
textarea.input, .field textarea { min-height: 110px; resize: vertical; }
.input-code { font-family: var(--mono); letter-spacing: .25em; text-align: center; font-size: 1.15rem; }
input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* Segmented control (radio group) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--tint); border-radius: var(--r); padding: 4px; gap: 4px; }
.seg.wrap { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 9px 10px; border-radius: 7px; font-size: .9rem; font-weight: 500; cursor: pointer; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, color .15s; }
.seg input:checked + label { background: var(--white); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(var(--shadow-color), .12); }
.seg input:focus-visible + label { outline: 2px solid var(--primary); }
.seg input:disabled + label { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.orient { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; }
.orient.p { width: 11px; height: 15px; }
.orient.l { width: 15px; height: 11px; }

/* Number stepper (wraps a real <input type="number">) */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); width: max-content; }
.stepper button { width: 42px; height: 42px; border: none; background: none; cursor: pointer; font-size: 1.15rem; color: var(--ink-soft); }
.stepper button:hover { color: var(--primary-deep); }
.stepper input[type="number"] { width: 56px; border: none; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; padding: 8px 0; background: transparent; -moz-appearance: textfield; }
.stepper input[type="number"]:focus { outline: none; box-shadow: none; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ==========================================================================
   Site navigation
   ========================================================================== */
.nav { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
.nav-inner { display: flex; align-items: center; gap: 32px; height: var(--nav-h); }
.nav-links { display: flex; gap: 28px; font-size: .95rem; font-weight: 500; margin-left: 12px; }
.nav-links a { color: var(--ink-soft); padding-block: 4px; border-bottom: 1.5px solid transparent; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--primary); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .icon { width: 20px; height: 20px; }
.nav-panel { display: none; border-top: 1px solid var(--line); background: var(--paper); padding: 8px 16px 20px; }
.nav-panel.open { display: grid; }
.nav-panel a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 500; }
.nav-panel a.active { color: var(--primary-deep); font-weight: 600; }
.nav-panel .btn { margin-top: 14px; border-bottom: none; }
@media (max-width: 880px) {
  .nav-links, .nav-right .hide-md { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) { .nav-right .btn-primary { display: none; } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: 96px; }
.section-tint { background: var(--tint); }
.section-head { display: grid; gap: 14px; margin-bottom: 48px; max-width: 640px; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }
@media (max-width: 640px) { .section { padding-block: 64px; } .section-head { margin-bottom: 32px; } }

.page-head { padding-block: 72px 48px; border-bottom: 1px solid var(--line); }
.page-head .container { display: grid; gap: 14px; }
.page-head p { color: var(--ink-soft); font-size: 1.08rem; }
.crumb { font-size: .85rem; color: var(--ink-soft); }
.crumb a:hover { color: var(--primary-deep); }
@media (max-width: 640px) { .page-head { padding-block: 48px 32px; } }

/* ==========================================================================
   Home — hero
   ========================================================================== */
.hero { padding-block: 88px 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero-copy .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .9rem; color: var(--ink-soft); padding-top: 8px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { width: 16px; height: 16px; color: var(--primary); }

/* Hero picture: sized in em from the container width so it scales as one */
.hero-visual { position: relative; width: 100%; max-width: 560px; margin-left: auto; aspect-ratio: 1 / .94; container-type: inline-size; min-width: 0; }
.stage { position: absolute; inset: 0; font-size: 2.55cqw; }
.stage::before { content: ""; position: absolute; left: 14%; right: 0; top: 8%; bottom: 4%; border-radius: 2.4em; background: var(--tint); }
.sheets { position: absolute; right: 5%; top: 3%; width: 58%; aspect-ratio: 1 / 1.414; }
.sheet { position: absolute; inset: 0; background: var(--white); border-radius: .3em; box-shadow: 0 1px 2px rgba(var(--shadow-color), .06), 0 .9em 2em -1em rgba(var(--shadow-color), .22); }
.sheet.back2 { transform: rotate(6deg) translate(4%, 2%); }
.sheet.back1 { transform: rotate(2.5deg) translate(2%, 1%); }
.sheet.front { padding: 11% 10% 9%; display: flex; flex-direction: column; gap: .55em; transform: rotate(-2deg); animation: sheetOut 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes sheetOut { from { transform: rotate(-2deg) translateY(-7%); } to { transform: rotate(-2deg) translateY(0); } }
.doc-title { font-family: var(--display); font-weight: 600; font-size: .92em; color: var(--ink); letter-spacing: -.01em; }
.doc-sub { font-family: var(--mono); font-size: .52em; color: var(--ink-soft); margin-bottom: .5em; }
.sheet .l { height: .36em; border-radius: .2em; background: var(--tint); flex-shrink: 0; }
.sheet .l.s { width: 64%; }
.doc-plot { width: 100%; height: auto; display: block; margin-block: .3em .1em; }
.doc-plot .ax { stroke: var(--line-strong); stroke-width: 1; }
.doc-plot .stem { stroke: var(--primary); stroke-width: 1.4; }
.doc-plot .dot { fill: var(--primary); }
.doc-plot .env { fill: none; stroke: var(--line-strong); stroke-dasharray: 2 2; }
.doc-cap { font-size: .5em; color: var(--ink-soft); text-align: center; font-style: italic; }
.sheet-tag { margin-top: auto; align-self: flex-end; font-family: var(--mono); font-size: .5em; color: var(--ink-soft); }
.phone { position: absolute; left: 3%; bottom: 0; width: 40%; aspect-ratio: 9 / 17.4; background: var(--ink); border-radius: 2.3em; padding: .5em; box-shadow: 0 1.4em 3em -1.4em rgba(var(--shadow-color), .45); animation: phoneUp 1s .15s cubic-bezier(.2,.7,.2,1) both; }
@keyframes phoneUp { from { transform: translateY(4%); } to { transform: none; } }
.phone::after { content: ""; position: absolute; top: 1.05em; left: 50%; width: 26%; height: .95em; margin-left: -13%; border-radius: 1em; background: var(--ink); }
.screen { height: 100%; background: var(--paper); border-radius: 1.85em; padding: 2.7em 1.05em 1.1em; display: flex; flex-direction: column; gap: .75em; overflow: hidden; }
.ph-loc { display: flex; justify-content: space-between; align-items: center; gap: .4em; font-size: .6em; color: var(--ink-soft); }
.ph-loc b { color: var(--ink); }
.ph-live { display: inline-flex; align-items: center; gap: .35em; color: var(--ok); font-weight: 600; }
.ph-live::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; }
.ph-paid { display: flex; align-items: center; gap: .6em; background: var(--white); border: 1px solid var(--line); border-radius: .8em; padding: .65em .7em; }
.ph-check { width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--primary); color: var(--white); display: grid; place-items: center; flex-shrink: 0; }
.ph-check svg { width: 1.05em; height: 1.05em; display: block; }
.ph-paid div { display: grid; line-height: 1.25; }
.ph-paid b { font-size: .7em; }
.ph-paid span { font-size: .58em; color: var(--ink-soft); }
.ph-codebox { text-align: center; display: grid; gap: .25em; padding-block: .5em; }
.ph-codebox small { font-size: .52em; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); font-weight: 600; }
.ph-code { font-family: var(--mono); font-size: 1.35em; letter-spacing: .16em; color: var(--ink); }
.ph-rows { display: grid; gap: .35em; font-size: .58em; border-top: 1px solid var(--line); padding-top: .8em; }
.ph-rows div { display: flex; justify-content: space-between; }
.ph-rows span:first-child { color: var(--ink-soft); }
.ph-hint { margin-top: auto; display: flex; gap: .5em; align-items: center; background: var(--tint); border-radius: .7em; padding: .6em .7em; font-size: .56em; line-height: 1.35; }
.ph-hint svg { width: 1.6em; height: 1.6em; flex-shrink: 0; color: var(--primary-deep); }
.ph-btn { background: var(--primary); color: var(--white); border-radius: .7em; text-align: center; padding: .75em; font-size: .72em; font-weight: 600; }
.ph-timer { text-align: center; font-family: var(--mono); font-size: .55em; color: var(--primary-deep); }
.toast-card { position: absolute; right: 1%; bottom: 9%; display: flex; align-items: center; gap: .7em; background: var(--white); border: 1px solid var(--line); border-radius: .9em; padding: .75em 1em; box-shadow: 0 .8em 2em -1em rgba(var(--shadow-color), .3); min-width: 38%; }
.toast-card .ic { width: 2em; height: 2em; border-radius: .6em; background: var(--tint); color: var(--primary-deep); display: grid; place-items: center; flex-shrink: 0; }
.toast-card .ic svg { width: 58%; height: 58%; }
.toast-card div { display: grid; gap: .35em; flex: 1; min-width: 0; }
.toast-card b { font-size: .68em; white-space: nowrap; }
.toast-card .bar { height: .3em; border-radius: .2em; background: var(--tint); overflow: hidden; }
.toast-card .bar i { display: block; height: 100%; width: 25%; background: var(--primary); border-radius: .2em; transition: width .5s ease; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } .hero-visual { margin-inline: auto; } }
@media (max-width: 480px) { .hero { padding-block: 48px 64px; } .hero-actions .btn { width: 100%; } }

/* Steps (real sequence) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1.5px solid var(--line-strong); min-width: 0; }
.step:first-child { border-top-color: var(--primary); }
.step-n { font-family: var(--mono); font-size: .8rem; color: var(--primary-deep); }
.step p { color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.feature { background: var(--white); padding: 32px 28px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.feature .ic { width: 40px; height: 40px; border-radius: var(--r); background: var(--tint); color: var(--primary-deep); display: grid; place-items: center; margin-bottom: 6px; }
.feature .ic .icon { width: 20px; height: 20px; }
.feature p { color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Pricing */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.rate-table { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.rate-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.rate-row:last-of-type { border-bottom: none; }
.rate-row b { font-family: var(--display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.rate-row small { color: var(--ink-soft); font-size: .85rem; margin-left: 4px; }
.rate-foot { background: var(--tint); padding: 14px 24px; font-size: .88rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
@media (max-width: 820px) { .price-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Dark CTA band */
.band { background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.band h2 { color: var(--white); margin-bottom: 10px; }
.band p { color: var(--on-ink-soft); }
.band .btn-primary { background: var(--white); color: var(--ink); }
.band .btn-primary:hover { background: var(--tint); }
@media (max-width: 560px) { .band { padding: 36px 24px; } .band .btn { width: 100%; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { border-top: 1px solid var(--line); padding-block: 64px 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr 1fr; gap: 40px; }
.footer-grid p { color: var(--ink-soft); font-size: .92rem; margin-top: 14px; max-width: 30ch; }
.footer h4 { font-family: var(--body); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 10px; font-size: .93rem; }
.footer li a:hover { color: var(--primary-deep); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   How it works
   ========================================================================== */
.timeline { display: grid; max-width: 780px; }
.tl-item { display: grid; grid-template-columns: 56px 1fr; gap: 24px; padding-bottom: 40px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 1.5px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-num { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--primary); color: var(--primary-deep); display: grid; place-items: center; font-family: var(--mono); font-size: .85rem; background: var(--paper); }
.tl-body { display: grid; gap: 10px; min-width: 0; }
.tl-body p, .tl-body li { color: var(--ink-soft); }
.tl-body ul { padding-left: 20px; display: grid; gap: 4px; }
.tl-note { font-size: .9rem; background: var(--tint); border-radius: var(--r); padding: 12px 16px; max-width: 62ch; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }
td.empty { color: var(--ink-soft); text-align: center; padding: 28px; }

/* ==========================================================================
   Find a kiosk
   ========================================================================== */
.find-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; }
.map-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; position: sticky; top: calc(var(--nav-h) + 24px); min-width: 0; }
.map-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.map-head h3 { font-size: 1rem; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--ink-soft); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.legend i.w { background: var(--warn); }
.legend i.o { background: var(--off); }
.map-img { display: block; width: 100%; aspect-ratio: 600 / 440; object-fit: cover; background: var(--tint); }
.map-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; font-size: .82rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
.find-side { display: grid; gap: 16px; min-width: 0; }
.kiosk-list { display: grid; gap: 14px; }
.kiosk { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 14px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.kiosk:hover { border-color: var(--line-strong); }
.kiosk.sel { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint); }
.kiosk-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; flex-wrap: wrap; }
.kiosk-top h3 { margin-bottom: 2px; }
.kiosk-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .88rem; color: var(--ink-soft); }
.kiosk-meta span, .kiosk-meta a { display: inline-flex; gap: 6px; align-items: center; }
.kiosk-meta .icon { width: 15px; height: 15px; }
.kiosk-meta .dir { font-weight: 600; color: var(--primary-deep); }
.kiosk-printers { display: flex; flex-wrap: wrap; gap: 8px; }
.kiosk-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: .85rem; color: var(--ink-soft); }
.empty-card { background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 12px; justify-items: start; }
@media (max-width: 900px) { .find-grid { grid-template-columns: 1fr; } .map-card { position: static; } }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-grid { display: grid; grid-template-columns: 220px 1fr; gap: 64px; align-items: start; }
.faq-nav { display: grid; gap: 4px; position: sticky; top: calc(var(--nav-h) + 32px); }
.faq-nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-soft); font-size: .93rem; }
.faq-nav a:hover, .faq-nav a.active { color: var(--ink); background: var(--tint); }
.faq-group { margin-bottom: 48px; min-width: 0; scroll-margin-top: calc(var(--nav-h) + 24px); }
.faq-group h2 { font-size: 1.3rem; margin-bottom: 8px; }
details.qa { border-bottom: 1px solid var(--line); }
details.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-weight: 600; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary .icon { color: var(--primary); transition: transform .2s; margin-top: 3px; }
details.qa[open] summary .icon { transform: rotate(45deg); }
details.qa p { color: var(--ink-soft); padding-bottom: 20px; margin-top: -6px; }
details.qa a, .prose a, .tl-body a { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 820px) { .faq-grid { grid-template-columns: 1fr; gap: 24px; } .faq-nav { position: static; display: flex; flex-wrap: wrap; } }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact-list { display: grid; border-top: 1px solid var(--line); }
.contact-item { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.contact-item .ic { width: 40px; height: 40px; border-radius: var(--r); background: var(--tint); color: var(--primary-deep); display: grid; place-items: center; }
.contact-item b { display: block; word-break: break-word; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; min-width: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 480px) { .panel { padding: 22px; } }

/* ==========================================================================
   Legal (Terms / Privacy)
   ========================================================================== */
.legal { display: grid; grid-template-columns: 220px 1fr; gap: 64px; align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 32px); display: grid; gap: 8px; font-size: .88rem; }
.toc a { color: var(--ink-soft); }
.toc a:hover { color: var(--primary-deep); }
.prose { display: grid; gap: 14px; max-width: 68ch; min-width: 0; }
.prose h2 { font-size: 1.25rem; margin-top: 28px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink); opacity: .86; }
.prose ul { padding-left: 20px; display: grid; gap: 8px; }
.callout { background: var(--tint); border-radius: var(--r); padding: 16px 20px; }
@media (max-width: 820px) { .legal { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   App top bar (print page)
   ========================================================================== */
.app-top { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 200; }
.app-top .container { display: flex; align-items: center; gap: 14px; height: 64px; }
.app-top .loc { display: grid; line-height: 1.25; min-width: 0; }
.app-top .loc b { font-family: var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-top .loc span { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--white); display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.icon-btn .icon { width: 20px; height: 20px; }
.statusline { background: var(--tint); font-size: .86rem; }
.statusline .container { display: flex; justify-content: space-between; gap: 6px 16px; padding-block: 10px; flex-wrap: wrap; }

/* Live status dot (JS sets .online / .busy / .offline) */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.status-dot.online  { background: var(--ok); }
.status-dot.busy    { background: var(--warn); }
.status-dot.offline { background: var(--off); }

/* Side drawer */
.overlay { position: fixed; inset: 0; background: rgba(var(--shadow-color), .45); z-index: 800; display: none; align-items: center; justify-content: center; padding: 16px; }
.overlay.open { display: flex; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 82vw); background: var(--white); z-index: 801; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-lg); transform: translateX(-102%); transition: transform .2s ease; }
.drawer.open { transform: none; }
.drawer .brand { margin: 0 8px 20px; }
.drawer a { padding: 12px 10px; border-radius: var(--r-sm); font-weight: 500; }
.drawer a:hover { background: var(--tint); }
.drawer .signout { margin-top: auto; color: var(--err); border-top: 1px solid var(--line); border-radius: 0; padding-top: 16px; }

/* ==========================================================================
   Print page
   ========================================================================== */
.print-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; padding-block: 32px 64px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 22px; min-width: 0; }
.card-head { display: flex; align-items: baseline; gap: 12px; }
.card-head .n { font-family: var(--mono); font-size: .8rem; color: var(--primary-deep); }
.card-head h2 { font-size: 1.15rem; }
.stack { display: grid; gap: 20px; min-width: 0; align-content: start; }
.code-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.code-bar .input { flex: 1; min-width: 140px; font-family: var(--mono); letter-spacing: .15em; text-transform: uppercase; padding-block: 9px; }

.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 36px 20px; text-align: center; display: grid; gap: 8px; justify-items: center; background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.drop:hover, .drop.dragging { border-color: var(--primary); background: var(--tint); }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop .icon { width: 30px; height: 30px; color: var(--primary); }
.drop small { color: var(--ink-soft); }
.tip { font-size: .84rem; color: var(--ink-soft); line-height: 1.5; background: var(--paper); border-radius: var(--r-sm); padding: 10px 12px; }
.file-list { display: grid; gap: 8px; }
.file-list:empty { display: none; }
.file-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.file-item .ft { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--tint); display: grid; place-items: center; font-family: var(--mono); font-size: .6rem; color: var(--primary-deep); text-transform: uppercase; }
.file-item .fn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 500; }
.file-remove { border: none; background: none; cursor: pointer; color: var(--ink-soft); width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); font-size: 1rem; }
.file-remove:hover { color: var(--err); background: var(--err-bg); }
.multi-note { font-size: .84rem; color: var(--ink-soft); background: var(--tint); border-radius: var(--r-sm); padding: 9px 12px; display: none; }
.upload-progress { display: none; gap: 6px; }
.upload-progress-track { height: 6px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.upload-progress-fill { height: 100%; width: 0%; background: var(--primary); border-radius: 4px; transition: width .35s ease; }
.upload-progress-label { font-size: .82rem; color: var(--ink-soft); }
.mode-note { font-size: .82rem; color: var(--err); display: none; }

.summary { position: sticky; top: 88px; }
.price-box { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.price-label { font-size: .85rem; color: var(--ink-soft); font-weight: 500; }
.price-breakdown { font-size: .85rem; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }
.price-amount { font-family: var(--display); font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.sum-rows { display: grid; gap: 8px; font-size: .9rem; }
.sum-rows div { display: flex; justify-content: space-between; gap: 12px; }
.sum-rows span:first-child { color: var(--ink-soft); }
.secure { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: .8rem; color: var(--ink-soft); }
.secure .icon { width: 14px; height: 14px; }
.window-hint { font-size: .84rem; color: var(--ink-soft); line-height: 1.5; text-align: center; }

/* Print Now panel (shown after payment) */
.release-panel { display: none; border: 1px solid var(--primary); box-shadow: 0 0 0 3px var(--tint); border-radius: var(--r-lg); padding: 20px; background: var(--white); text-align: center; }
.release-panel > * + * { margin-top: 10px; }
.upload-progress-label { margin-top: 6px; }
#issueBtn { margin-top: 0; }
.release-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.release-title .ok { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--white); display: grid; place-items: center; }
.release-title .ok .icon { width: 14px; height: 14px; }
.release-ref { font-family: var(--mono); letter-spacing: .14em; font-size: 1.5rem; }
.release-text { font-size: .9rem; color: var(--ink-soft); }
.release-timer { font-family: var(--mono); font-size: 1.15rem; color: var(--primary-deep); }
.release-note { font-size: .8rem; color: var(--ink-soft); line-height: 1.45; }
@media (max-width: 900px) { .print-grid { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 480px) { .card { padding: 20px; } .print-grid { padding-block: 20px 48px; } }

/* Modals */
.modal { background: var(--white); border-radius: var(--r-lg); width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; padding: 28px; display: grid; gap: 16px; box-shadow: var(--shadow-lg); }
.modal h2, .modal h3 { font-size: 1.25rem; }
.modal p.sub { color: var(--ink-soft); font-size: .92rem; margin-top: -8px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.modal-actions .btn { width: 100%; }
@media (max-width: 480px) { .modal { padding: 22px; } }

/* Feedback popup */
.feedback-pop { display: none; position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 500; width: calc(100% - 32px); max-width: 360px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-lg); text-align: center; }
.feedback-pop .title { font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.stars { font-size: 1.8rem; letter-spacing: 6px; cursor: pointer; color: var(--primary); margin-bottom: 10px; user-select: none; }
.feedback-pop textarea { width: 100%; min-height: 56px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .88rem; resize: vertical; display: none; margin-bottom: 10px; }
.feedback-pop .row { display: flex; gap: 8px; justify-content: center; }

/* ==========================================================================
   My orders
   ========================================================================== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: none; padding: 12px 14px; font-weight: 500; color: var(--ink-soft); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--primary); }
.orders { display: grid; gap: 14px; }
.order-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.order-card.needs-action { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint); }
.order-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 18px 22px; cursor: pointer; }
.order-summary:hover { background: var(--paper); }
.order-id { display: grid; gap: 2px; }
.order-id .mono { font-size: 1.1rem; letter-spacing: .14em; }
.order-info { display: grid; gap: 2px; min-width: 0; }
.order-file { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-date { font-size: .84rem; color: var(--ink-soft); }
.order-right { display: flex; align-items: center; gap: 12px; }
.order-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.chevron { color: var(--ink-soft); transition: transform .15s; display: inline-grid; }
.chevron .icon { width: 16px; height: 16px; }
.order-card.open .chevron { transform: rotate(90deg); }
.order-detail { display: none; border-top: 1px solid var(--line); padding: 16px 22px 20px; background: var(--paper); font-size: .9rem; }
.order-card.open .order-detail { display: block; }
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.detail-row span:first-child { color: var(--ink-soft); }
.detail-row span:last-child { text-align: right; }
.release-box { margin-top: 14px; padding: 18px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); display: grid; gap: 10px; text-align: center; }
.release-box .release-timer { font-size: 1.4rem; }
.release-box .note { font-size: .8rem; color: var(--ink-soft); line-height: 1.45; }
.empty { text-align: center; color: var(--ink-soft); padding: 48px 16px; display: grid; gap: 10px; justify-items: center; }
.empty .ic { width: 52px; height: 52px; border-radius: 50%; background: var(--tint); color: var(--primary-deep); display: grid; place-items: center; }
@media (max-width: 640px) {
  .order-summary { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .order-id { display: flex; gap: 10px; align-items: baseline; }
  .order-right { justify-content: space-between; }
  .order-detail { padding: 14px 16px 18px; }
}

/* ==========================================================================
   Centered states (unavailable, complaint, login)
   ========================================================================== */
.center-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 48px 16px; }
.state { max-width: 460px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.state .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--tint); color: var(--primary-deep); display: grid; place-items: center; }
.state .ic .icon { width: 28px; height: 28px; }
.state p { color: var(--ink-soft); }
.state .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.auth-split { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: var(--paper); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-side .brand { color: var(--paper); }
.auth-side h2 { color: var(--white); max-width: 18ch; }
.auth-side p { color: var(--on-ink-soft); }
.auth-side small { color: var(--on-ink-faint); font-size: .82rem; }
.auth-main { display: grid; place-items: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 380px; display: grid; gap: 22px; }
.auth-box h1 { font-size: 1.7rem; }
.auth-box .error, .auth-box .success { display: block; font-size: .88rem; padding: 10px 14px; border-radius: var(--r-sm); }
.auth-box .error { background: var(--err-bg); color: var(--err); }
.auth-box .success { background: var(--ok-bg); color: var(--ok); }
.auth-steps { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--ink-soft); }
.auth-steps span { display: inline-flex; align-items: center; gap: 6px; }
.auth-steps i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-style: normal; font-size: .7rem; }
.auth-steps .on { color: var(--ink); font-weight: 600; }
.auth-steps .on i { border-color: var(--primary); background: var(--primary); color: var(--white); }
.auth-steps .done i { border-color: var(--primary); color: var(--primary); }
@media (max-width: 820px) { .auth-split { grid-template-columns: 1fr; } .auth-side { padding: 28px 24px; } .auth-side .hide-sm { display: none; } }

/* ==========================================================================
   Dashboards (admin / incharge)
   ========================================================================== */
.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { background: var(--white); border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; height: 100dvh; }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink-soft); font-weight: 500; font-size: .93rem; background: none; border: none; cursor: pointer; text-align: left; width: 100%; }
.side-nav .icon { width: 18px; height: 18px; }
.side-nav a:hover, .side-nav button:hover { background: var(--paper); color: var(--ink); }
.side-nav .active, .side-nav .on { background: var(--tint); color: var(--ink); }
.side-nav .count { margin-left: auto; font-size: .72rem; background: var(--err-bg); color: var(--err); border-radius: 100px; padding: 1px 8px; font-weight: 600; }
.side .who { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); font-size: .85rem; display: grid; gap: 2px; }
.side .who a { color: var(--primary-deep); font-weight: 600; }
.dash-main { padding: 32px 40px 64px; min-width: 0; display: grid; gap: 24px; align-content: start; }
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.dash-head h1 { font-size: 1.7rem; }
.tab-content { display: none; gap: 20px; align-content: start; min-width: 0; }
.tab-content.active { display: grid; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpis.six { grid-template-columns: repeat(6, 1fr); }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 6px; min-width: 0; }
.kpi b { font-family: var(--display); font-weight: 600; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi small { font-size: .8rem; color: var(--ink-soft); }
.kpi.pos b { color: var(--ok); }
.kpi.neg b { color: var(--err); }
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; overflow: hidden; }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.box-head h3 { font-size: 1rem; }
.box-head .sub { font-weight: 400; color: var(--ink-soft); font-size: .85rem; font-family: var(--body); }
.box-body { padding: 20px; display: grid; gap: 16px; }
.box .table-wrap { border: none; border-radius: 0; }
.chart-pad { padding: 16px 20px 12px; }
.spark { width: 100%; height: 170px; display: block; }
.spark .grid-line { stroke: var(--tint); }
.spark .area { fill: var(--tint); }
.spark .line { fill: none; stroke: var(--primary); stroke-width: 2; }
.chart-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-soft); padding: 4px 20px 14px; }

.meter { display: grid; gap: 4px; min-width: 90px; }
.meter .bar { height: 6px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.meter.low .bar i { background: var(--warn); }
.meter.crit .bar i { background: var(--err); }
.meter span { font-size: .78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.tickets { display: grid; }
.ticket { display: grid; gap: 6px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ticket:last-child { border-bottom: none; }
.ticket-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ticket p { font-size: .86rem; color: var(--ink-soft); }

/* Kiosk / printer management cards */
.kiosk-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kiosk-summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; cursor: pointer; gap: 14px; flex-wrap: wrap; }
.kiosk-summary:hover { background: var(--paper); }
.kiosk-name { font-weight: 600; font-family: var(--display); font-size: 1.02rem; }
.kiosk-sub { font-size: .84rem; color: var(--ink-soft); margin-top: 2px; }
.kiosk-incharge { font-size: .8rem; color: var(--primary-deep); font-weight: 600; margin-top: 4px; }
.kiosk-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dots { display: flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dots i.green  { background: var(--ok); }
.dots i.yellow { background: var(--warn); }
.dots i.red    { background: var(--off); }
.kiosk-card.open .chevron { transform: rotate(90deg); }
.kiosk-detail { display: none; border-top: 1px solid var(--line); padding: 20px; background: var(--paper); gap: 14px; }
.kiosk-card.open .kiosk-detail { display: grid; }
.incharge-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; background: var(--tint); color: var(--primary-deep); padding: 3px 10px; border-radius: 100px; font-weight: 600; }
.tag .x { cursor: pointer; color: var(--err); font-weight: 700; }
.printer-card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: var(--white); display: grid; gap: 14px; }
.printer-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.printer-name { font-weight: 600; }
.id-tag { font-family: var(--mono); font-size: .74rem; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); padding: 1px 7px; border-radius: 4px; margin-left: 6px; }
.printer-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stock-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 2px; }
.stock-label { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stock-val { font-family: var(--display); font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stock-val.ok { color: var(--ink); } .stock-val.low { color: var(--warn); } .stock-val.crit { color: var(--err); } .stock-val.unset { font-size: .82rem; color: var(--ink-soft); font-family: var(--body); font-weight: 500; }
.stock-sub { font-size: .74rem; color: var(--ink-soft); }
.update-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.update-form label { font-size: .76rem; font-weight: 600; display: block; margin-bottom: 4px; }
.update-form input { width: 110px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .88rem; background: var(--white); }
.update-form input:focus { outline: none; border-color: var(--primary); }
.service-row { display: flex; align-items: center; gap: 10px; font-size: .86rem; flex-wrap: wrap; }
.due-soon { color: var(--warn); font-weight: 600; }
.overdue { color: var(--err); font-weight: 600; }
.log-action { font-family: var(--mono); font-size: .74rem; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.inline-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { min-width: 120px; }
.inline-form .field.grow { flex: 1 1 220px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters .input { width: auto; flex: 1 1 180px; padding-block: 9px; }
.tally { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; }
.tally .pos { color: var(--ok); font-size: 1.25rem; } .tally .neg { color: var(--err); font-size: 1.25rem; }
.lock-screen { text-align: center; padding: 56px 20px; display: grid; gap: 12px; justify-items: center; }
.lock-screen .ic { width: 56px; height: 56px; border-radius: 50%; background: var(--tint); color: var(--primary-deep); display: grid; place-items: center; }
.lock-screen form { display: grid; gap: 10px; width: 100%; max-width: 260px; }
.mode-toggle { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--tint); padding: 4px; border-radius: var(--r); }
.mode-toggle button { padding: 8px; border-radius: 7px; font-size: .82rem; font-weight: 500; border: none; background: none; cursor: pointer; color: var(--ink-soft); }
.mode-toggle button.active { background: var(--white); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(var(--shadow-color), .12); }
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(var(--shadow-color), .45); z-index: 900; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.open { display: flex; }
.proof-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.mobile-bar { display: none; }

@media (max-width: 1100px) { .kpis, .kpis.six { grid-template-columns: repeat(3, 1fr); } .two-col { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash > * { min-width: 0; }
  .side { position: sticky; top: 0; z-index: 60; height: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 10px; }
  .side .brand { display: none; }
  .side-nav { display: flex; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a, .side-nav button { white-space: nowrap; width: auto; }
  .side .who { display: none; }
  .mobile-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--white); }
  .dash-main { padding: 20px 16px 48px; }
  .kpis, .kpis.six { grid-template-columns: 1fr 1fr; }
  .stock-grid { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
}
@media (max-width: 420px) { .stock-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   Shared helpers
   ========================================================================== */
.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; }
.btn-lg { padding: 15px 22px; font-size: 1rem; }
.icon-btn.sm { width: 36px; height: 36px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--white); padding: 10px 18px; border-radius: 100px; font-size: .88rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 1000; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* "i" info tip (click/tap or hover) */
.itip { position: relative; display: inline-flex; vertical-align: middle; }
.itip > button { width: 20px; height: 20px; border-radius: 50%; border: none; background: var(--tint); color: var(--primary-deep); display: grid; place-items: center; cursor: pointer; padding: 0; }
.itip > button .icon { width: 14px; height: 14px; }
.itip .tip-box { display: none; position: absolute; right: -8px; bottom: calc(100% + 8px); width: min(300px, 80vw); background: var(--ink); color: var(--paper); font-size: .8rem; line-height: 1.5; padding: 12px 14px; border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 50; text-align: left; font-weight: 400; }
.itip .tip-box a { color: var(--white); text-decoration: underline; }
.itip.open .tip-box { display: block; }
@media (hover: hover) { .itip:hover .tip-box { display: block; } }

/* ==========================================================================
   Print page — order-code bar, receipt
   ========================================================================== */
.code-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--primary-deep); font-weight: 600; font-size: .85rem; cursor: pointer; padding: 0; }
.code-toggle .icon { width: 15px; height: 15px; }
.code-toggle:hover, .code-toggle.on { text-decoration: underline; text-underline-offset: 3px; }
.code-panel { border-top: 1px solid var(--line); background: var(--white); }
.statusline .code-form, .code-form { display: grid; justify-content: start; grid-template-columns: minmax(0, 320px) auto auto; gap: 8px; align-items: center; padding-block: 10px; }
.code-form .input { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; padding-block: 9px; }
.code-form .input::placeholder { letter-spacing: .02em; text-transform: none; font-family: var(--body); }
.code-form .msg { grid-column: 1 / -1; margin-top: 0; }
.side-col { display: grid; gap: 12px; align-content: start; position: sticky; top: 88px; min-width: 0; }
.side-col .summary { position: static; }
.stack.dimmed { opacity: .45; pointer-events: none; filter: saturate(.6); transition: opacity .2s; }

.receipt { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; animation: rc-in .35s ease; }
@keyframes rc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rc-head { background: var(--primary); color: var(--white); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rc-brand { color: var(--white); font-size: 1.15rem; }
.rc-brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--white); }
.rc-tag { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.rc-body { padding: 18px 20px 6px; display: grid; gap: 14px; }
.rc-codebox { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.rc-code { font-size: 1.85rem; letter-spacing: .2em; line-height: 1.15; margin-top: 2px; color: var(--ink); }
.rc-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .82rem; }
.rc-other { font-size: .85rem; background: var(--warn-bg); color: var(--ink); border-radius: var(--r-sm); padding: 10px 12px; line-height: 1.5; }
.rc-window { background: var(--tint); border-radius: var(--r); padding: 14px; display: grid; gap: 8px; }
.rc-window-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .9rem; }
.rc-window-top b { color: var(--primary-deep); }
.rc-left { font-size: 1.05rem; color: var(--primary-deep); white-space: nowrap; }
.rc-bar { height: 6px; background: var(--white); border-radius: 4px; overflow: hidden; }
.rc-bar i { display: block; height: 100%; width: 100%; background: var(--primary); border-radius: 4px; transition: width 1s linear; }
.rc-window p { font-size: .8rem; color: var(--ink-soft); line-height: 1.45; }
.rc-window.urgent .rc-left, .rc-window.urgent .rc-window-top b { color: var(--err); }
.rc-window.urgent .rc-bar i { background: var(--err); }
.rc-window .btn-primary { margin-top: 4px; }
.rc-cancel { font-size: .85rem; justify-self: center; color: var(--ink-soft); }
.rc-body > .msg { margin-top: 0; }
.rc-rows { display: grid; gap: 7px; font-size: .88rem; padding-top: 4px; }
.rc-rows > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.rc-rows dt { color: var(--ink-soft); }
.rc-rows dd { text-align: right; overflow-wrap: anywhere; }
.rc-small { font-size: .76rem; }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line-strong); padding-top: 12px; font-weight: 600; }
.rc-total b { font-family: var(--display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.rc-refund { display: flex; justify-content: space-between; font-size: .88rem; color: var(--ok); font-weight: 600; margin-top: -6px; }
.rc-perf { height: 18px; margin: 10px 0 0; position: relative; background: radial-gradient(circle at 0 50%, var(--paper) 9px, transparent 9.5px) left / 18px 18px no-repeat, radial-gradient(circle at 100% 50%, var(--paper) 9px, transparent 9.5px) right / 18px 18px no-repeat; }
.rc-perf::after { content: ""; position: absolute; left: 18px; right: 18px; top: 50%; border-top: 1.5px dashed var(--line); }
.rc-foot { padding: 6px 20px 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rc-foot .btn .icon { width: 16px; height: 16px; }
.rc-new { margin-left: auto; font-size: .88rem; }
@media (max-width: 900px) {
  .side-col { position: static; }
  .stack.dimmed { display: none; }
}
@media (max-width: 480px) {
  .statusline .code-form { grid-template-columns: minmax(0, 1fr) auto auto; justify-content: stretch; }
  .rc-code { font-size: 1.6rem; letter-spacing: .16em; }
  .rc-foot .btn-quiet { flex: 1 1 140px; }
  .rc-new { margin: 4px auto 0; width: 100%; }
}

/* ==========================================================================
   Find a kiosk — map pins + filters
   ========================================================================== */
.map-stage { position: relative; }
.map-stage .map-img { width: 100%; height: auto; aspect-ratio: auto; object-fit: fill; }
.pin { position: absolute; transform: translate(-50%, -100%); background: none; border: none; padding: 0; cursor: pointer; display: grid; justify-items: center; z-index: 2; }
.pin .dot { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ok); border: 2.5px solid var(--white); box-shadow: 0 3px 8px rgba(var(--shadow-color), .35); display: grid; place-items: center; transition: transform .15s; }
.pin .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--white); }
.pin.busy .dot { background: var(--warn); }
.pin.offline .dot { background: var(--off); }
.pin.online .dot { animation: pin-pulse 2.4s ease-out infinite; }
@keyframes pin-pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 106, 138, .45), 0 3px 8px rgba(var(--shadow-color), .35); } 70%, 100% { box-shadow: 0 0 0 12px rgba(46, 106, 138, 0), 0 3px 8px rgba(var(--shadow-color), .35); } }
.pin .name { margin-top: 4px; font-size: .7rem; font-weight: 600; background: var(--white); padding: 1px 7px; border-radius: 100px; box-shadow: 0 1px 4px rgba(var(--shadow-color), .2); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.pin:hover .name, .pin.sel .name, .pin:focus-visible .name { opacity: 1; }
.pin.sel { z-index: 3; }
.pin.sel .dot { transform: rotate(-45deg) scale(1.2); }
.pin[hidden] { display: none; }
.find-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.find-tools .input { flex: 1 1 200px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 500; cursor: pointer; user-select: none; white-space: nowrap; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 100px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: transform .15s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(14px); }
.kiosk-printers .pill.chip.busy { background: var(--warn-bg); color: var(--warn); }
.kiosk-printers .pill.chip.offline { background: var(--off-bg); color: var(--off); text-decoration: line-through; }
.find-count { font-size: .82rem; color: var(--ink-soft); }
.updated { font-size: .78rem; color: var(--ink-soft); }

/* My orders extras */
.order-amount .refunded { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: .86rem; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ==========================================================================
   Dashboards v2 (admin + incharge) — dark side panel, filter bar, tiles,
   charts. Colours all come from the THEME + STATUS variables.
   ========================================================================== */
:root {
  /* Chart series (Orders-by-type donut + legend) */
  --chart-bw:   var(--ink);
  --chart-bwd:  var(--off);
  --chart-clr:  var(--primary);
  --chart-clrd: var(--warn);
}
.adm-body { background: var(--paper); }

/* Side panel */
.side.side-dark { background: var(--ink); border-right: none; color: var(--on-ink-soft); gap: 18px; overflow-y: auto; }
.side-dark .brand { color: var(--white); padding: 0 6px; }
.side-dark .brand-mark { background: var(--white); }
.brand-sub { font-family: var(--body); font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--white); background: var(--primary); padding: 2px 7px; border-radius: 100px; margin-left: 2px; }
.side-group { font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-faint); padding: 14px 12px 6px; }
.side-group:first-child { padding-top: 4px; }
.side-dark .side-nav a, .side-dark .side-nav button { color: var(--on-ink-soft); position: relative; }
.side-dark .side-nav a:hover, .side-dark .side-nav button:hover { background: rgba(255, 255, 255, .06); color: var(--white); }
.side-dark .side-nav .active { background: var(--primary); color: var(--white); box-shadow: 0 6px 16px -8px var(--primary); }
.side-dark .side-nav .count { background: var(--white); color: var(--primary-deep); }
.side-dark .side-nav .count.warn { background: var(--warn); color: var(--white); }
.side-nav .side-lock { margin-left: auto; width: 14px; height: 14px; opacity: .6; }
.side-fleet { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.side-fleet div { background: rgba(255, 255, 255, .06); border-radius: var(--r-sm); padding: 10px 12px; display: grid; }
.side-fleet b { color: var(--white); font-family: var(--display); font-size: 1.25rem; line-height: 1.1; }
.side-fleet span { font-size: .72rem; }
.side-dark .who { margin-top: 0; border-top: 1px solid rgba(255, 255, 255, .1); color: var(--white); display: flex; justify-content: space-between; align-items: center; }
.side-dark .who a { color: var(--on-ink-soft); display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.side-dark .who a:hover { color: var(--white); }
.side-dark .who .icon { width: 15px; height: 15px; }

/* Filter bar */
.filterbar { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-top: -8px; }
.fb-field { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px; }
.fb-field .icon { width: 16px; height: 16px; color: var(--primary); }
.fb-field select { border: none; background: none; padding: 9px 4px; font-weight: 600; font-size: .88rem; cursor: pointer; max-width: 220px; }
.fb-field select:focus { outline: none; }
.fb-presets { display: flex; gap: 2px; background: var(--tint); padding: 3px; border-radius: var(--r); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.fb-presets::-webkit-scrollbar { display: none; }
.fb-presets button { border: none; background: none; padding: 7px 12px; border-radius: 7px; font-size: .82rem; font-weight: 500; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.fb-presets button:hover { color: var(--ink); }
.fb-presets button.on { background: var(--white); color: var(--primary-deep); font-weight: 600; box-shadow: 0 1px 3px rgba(var(--shadow-color), .14); }
.fb-custom { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.fb-custom input { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; font-size: .84rem; background: var(--white); }
.fb-now { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-soft); }
.fb-now .icon { width: 16px; height: 16px; }
.fb-now b { color: var(--ink); }
.fb-clear { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--tint); color: var(--primary-deep); font-weight: 700; margin-left: 4px; line-height: 1; }

/* KPI tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1560px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { --c: var(--primary); --cb: var(--tint); position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px 16px; display: grid; gap: 6px; overflow: hidden; min-width: 0; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.tile.t-primary { --c: var(--primary); --cb: var(--tint); }
.tile.t-ok   { --c: var(--ok);   --cb: var(--ok-bg); }
.tile.t-warn { --c: var(--warn); --cb: var(--warn-bg); }
.tile.t-off  { --c: var(--off);  --cb: var(--off-bg); }
.tile.t-err  { --c: var(--err);  --cb: var(--err-bg); }
.tile.t-ink  { --c: var(--ink);  --cb: var(--paper); background: var(--ink); color: var(--white); border-color: var(--ink); }
.tile.t-ink .label, .tile.t-ink small { color: var(--on-ink-soft); }
.tile.t-ink .tile-ic { background: rgba(255, 255, 255, .1); color: var(--white); }
.tile.t-ink.neg b { color: #F2B8B0; }
.tile-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tile-top .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--cb); color: var(--c); display: grid; place-items: center; flex-shrink: 0; }
.tile-ic .icon { width: 16px; height: 16px; }
.tile b { font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1.1; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile small { font-size: .78rem; color: var(--ink-soft); }
.tile.locked b { font-size: 1.05rem; color: var(--ink-soft); }
.tile.t-ink.locked b { color: var(--on-ink-soft); }
.tile.t-ink .btn-text { color: var(--white); }
.trend { font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 100px; white-space: nowrap; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.trend.good { background: var(--ok-bg); color: var(--ok); }
.trend.bad  { background: var(--err-bg); color: var(--err); }
.trend.flat { background: var(--paper); color: var(--ink-soft); }
.tile.t-ink .trend.good { background: rgba(46, 106, 138, .35); color: #CFE3EF; }
.tile.t-ink .trend.bad { background: rgba(169, 84, 74, .35); color: #F6D4CE; }
.tile.t-ink .trend.flat { background: rgba(255, 255, 255, .08); color: var(--on-ink-soft); }

/* Layout grids */
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack-col { display: grid; gap: 20px; min-width: 0; }

/* Bar chart */
.mini-toggle { display: flex; gap: 2px; background: var(--tint); padding: 3px; border-radius: 8px; }
.mini-toggle button { border: none; background: none; font-size: .78rem; padding: 5px 10px; border-radius: 6px; color: var(--ink-soft); cursor: pointer; font-weight: 500; }
.mini-toggle button.on { background: var(--white); color: var(--primary-deep); font-weight: 600; box-shadow: 0 1px 2px rgba(var(--shadow-color), .12); }
.chart-wrap { position: relative; }
.bars { width: 100%; height: 220px; display: block; }
.bars .bar { transition: opacity .12s; }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--ink); color: var(--white); font-size: .78rem; padding: 6px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; display: grid; gap: 1px; box-shadow: var(--shadow); }
.chart-tip b { font-size: .72rem; color: var(--on-ink-soft); font-weight: 500; }
.chart-foot { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; color: var(--ink-soft); padding: 0 20px 14px; font-variant-numeric: tabular-nums; }

/* Donut */
.donut-wrap { position: relative; width: 180px; margin: 18px auto 6px; }
.donut { width: 100%; display: block; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-family: var(--display); font-size: 1.7rem; line-height: 1; }
.donut-center span { font-size: .75rem; color: var(--ink-soft); }
.legend-list { list-style: none; display: grid; gap: 2px; padding: 8px 14px 16px; }
.legend-list li { display: grid; grid-template-columns: 12px 1fr auto; gap: 2px 10px; align-items: center; padding: 6px 6px; border-radius: var(--r-sm); font-size: .86rem; }
.legend-list li:hover { background: var(--paper); }
.legend-list li b { font-variant-numeric: tabular-nums; }
.legend-list li small { grid-column: 2 / 4; color: var(--ink-soft); font-size: .74rem; }
.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sw-bw { background: var(--chart-bw); } .sw-bwd { background: var(--chart-bwd); } .sw-clr { background: var(--chart-clr); } .sw-clrd { background: var(--chart-clrd); }

/* Health */
.health-sum { display: flex; gap: 6px; flex-wrap: wrap; }
.hs { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 100px; }
.hs.down { background: var(--err-bg); color: var(--err); } .hs.warn { background: var(--warn-bg); color: var(--warn); } .hs.ok { background: var(--ok-bg); color: var(--ok); }
.hdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--ok); flex-shrink: 0; }
.hdot.warn { background: var(--warn); } .hdot.down { background: var(--err); } .hdot.inactive { background: var(--off); }
.hdot.lg { width: 12px; height: 12px; margin: 0; box-shadow: 0 0 0 4px var(--ok-bg); }
.hdot.lg.warn { box-shadow: 0 0 0 4px var(--warn-bg); } .hdot.lg.down { box-shadow: 0 0 0 4px var(--err-bg); }
.tbl td { padding: 12px 16px; }
.tbl td b { white-space: nowrap; }
.tbl th { padding: 11px 16px; }
.tbl tr.row-down td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.tbl tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tbl tbody tr:hover td { background: var(--paper); }
.tbl tfoot td { background: var(--paper); font-weight: 600; font-size: .86rem; border-top: 1px solid var(--line); }
.pos { color: var(--ok); } .neg { color: var(--err); }
.ok-empty { display: flex !important; align-items: center; gap: 10px; color: var(--ok); }
.ok-empty .icon { width: 18px; height: 18px; }

/* Rating + prices mini cards */
.rating-box { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.rating-num { white-space: nowrap; font-family: var(--display); font-size: 2.3rem; font-weight: 600; line-height: 1; }
.rating-num span { font-size: .9rem; color: var(--ink-soft); font-weight: 500; margin-left: 2px; }
.stars-static { --pct: calc(var(--r) / 5 * 100%); font-size: 1.15rem; letter-spacing: 3px; background: linear-gradient(90deg, var(--warn) var(--pct), var(--line) var(--pct)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-box-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 18px; }
.price-box-mini .label { grid-column: 1 / -1; }
.price-box-mini div { display: grid; background: var(--paper); border-radius: var(--r-sm); padding: 8px 10px; }
.price-box-mini b { font-family: var(--display); font-size: 1.15rem; }
.price-box-mini small { font-size: .7rem; color: var(--ink-soft); }

/* Leaderboard */
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--paper); font-weight: 600; font-size: .8rem; color: var(--ink-soft); }
.rank.r1 { background: var(--primary); color: var(--white); } .rank.r2 { background: var(--tint); color: var(--primary-deep); } .rank.r3 { background: var(--warn-bg); color: var(--warn); }
.hbar { position: relative; height: 26px; background: var(--paper); border-radius: 6px; overflow: hidden; min-width: 140px; }
.hbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--tint), var(--line-strong)); border-radius: 6px; }
.hbar span { position: relative; padding: 0 10px; line-height: 26px; font-weight: 600; font-size: .84rem; font-variant-numeric: tabular-nums; }
.star-sm { color: var(--warn); }

/* Activity feed */
.feed { list-style: none; display: grid; }
.feed li { display: grid; grid-template-columns: 10px 1fr; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.feed li:last-child { border-bottom: none; }
.feed li.empty { display: block; text-align: center; color: var(--ink-soft); }
.feed p { font-size: .88rem; line-height: 1.45; }
.feed small { font-size: .76rem; color: var(--ink-soft); }
.feed-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--line-strong); }
.a-stock, .a-ink, .a-service { --a: var(--ok); } .a-ticket { --a: var(--warn); } .a-kiosk, .a-printer, .a-incharge { --a: var(--primary); }
.a-refund, .a-delete, .a-force { --a: var(--err); } .a-pricing, .a-expense, .a-accounts { --a: var(--ink); }
.feed-dot[class*="a-"] { background: var(--a, var(--line-strong)); }
.log-action[class*="a-"] { border-color: transparent; background: var(--paper); box-shadow: inset 3px 0 0 var(--a, var(--line-strong)); }

/* Kiosks tab */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.toolbar .input { flex: 1 1 240px; padding-block: 9px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--white); border-radius: 100px; padding: 6px 12px; font-size: .82rem; font-weight: 500; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-soft); }
.chips button span { font-size: .72rem; background: var(--paper); border-radius: 100px; padding: 0 7px; font-weight: 600; }
.chips button.on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chips button.on span { background: rgba(255, 255, 255, .16); }
.kiosk-stack { display: grid; gap: 12px; }
.kiosk-card { border-left: 4px solid var(--ok); }
.kiosk-card.health-warn { border-left-color: var(--warn); }
.kiosk-card.health-down { border-left-color: var(--err); }
.kiosk-card.health-inactive { border-left-color: var(--off); opacity: .85; }
.ks-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.ks-stat { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.ks-stat b { color: var(--ink); }
.kd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kd-actions .btn .icon { width: 14px; height: 14px; }
.kd-info { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-soft); }
.kd-info span { display: inline-flex; gap: 6px; align-items: center; }
.kd-info .icon { width: 14px; height: 14px; }
.mini-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-stats div { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; display: grid; font-size: .84rem; }
.mini-stats span { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 600; }
.printer-card { border-left: 3px solid var(--ok); }
.printer-card.health-warn { border-left-color: var(--warn); }
.printer-card.health-down { border-left-color: var(--err); }
.thin-bar { height: 4px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.thin-bar i { display: block; height: 100%; background: var(--ok); }
.thin-bar.low i { background: var(--warn); } .thin-bar.crit i { background: var(--err); }
.pc-forms { display: grid; gap: 10px; }

/* Accounts split bar */
.split-bar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--paper); gap: 2px; }
.split-bar i { display: block; min-width: 0; }
.s-net { background: var(--ok); } .s-ref { background: var(--err); } .s-exp { background: var(--warn); }
.split-legend { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: .85rem; }
.split-legend span { display: inline-flex; gap: 8px; align-items: center; }
.split-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Edit-kiosk modal + map pin picker */
.modal.wide { max-width: 620px; }
.pin-picker { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: crosshair; background: var(--tint); user-select: none; }
.pin-picker img { width: 100%; height: auto; display: block; min-height: 120px; }
.pin-mark { position: absolute; width: 22px; height: 22px; transform: translate(-50%, -100%); pointer-events: none; }
.pin-mark::before { content: ""; position: absolute; inset: 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--primary); border: 2.5px solid var(--white); box-shadow: 0 3px 8px rgba(var(--shadow-color), .35); }
.pin-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

@media (max-width: 1100px) { .grid-2-1 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .side.side-dark { padding: 10px 12px; }
  .side-dark .brand, .side-group, .side-fleet, .side-dark .who { display: none; }
  .side-dark .side-nav .active { box-shadow: none; }
  .mobile-bar .brand-sub { display: none; }
  .filterbar { top: 58px; border-radius: var(--r); padding: 10px; margin-top: 0; }
  .fb-field { flex: 1 1 100%; } .fb-field select { max-width: none; flex: 1; }
  .fb-presets { flex: 1 1 100%; }
  .fb-now { margin-left: 0; }
  .tiles, .tiles.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; } .tile b { font-size: 1.3rem; }
  .kiosk-right .ks-stat { display: none; }
  .price-box-mini { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 420px) { .tile-top .trend { display: none; } }


/* Incharge views: one set of printer cards, filtered */
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.side-dark .side-nav .on { background: var(--primary); color: var(--white); }
.view-printers .sec-tickets, .view-stock .sec-tickets, .view-service .sec-tickets { display: none; }
.view-tickets .sec-machines, .view-tickets .only-machines { display: none; }
.dash-main:not(.view-tickets) .only-tickets { display: none; }
.view-stock .sec-service { display: none; }
.view-service .sec-stock { display: none; }
.view-tickets .tiles .tile:not(.t-primary) { opacity: .6; }
@media (max-width: 820px) { .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   THEME LIBRARY — copy one block over the THEME block at the top.
   (ink, primary, primary-deep, tint, paper, ink-soft, line, line-strong, on-ink-soft, on-ink-faint)
   --------------------------------------------------------------------------
   Crimson & Ivory  #1C1A1A #A3202F #821A26 #F7ECE8 #FDFAF9 #615C5C #EDD4D2 #DCABAD #B8B8B8 #888888
   Copper & Ink     #1C2230 #9A5B34 #7B492A #F5EFEB #FCFBF9 #4E5158 #EADDD5 #D8C0B0 #B8BABE #888C92
   Saffron & Navy   #1A2233 #9C5E12 #7D4B0E #F5EFE7 #FCFBF8 #4C515A #EADECD #D9C1A3 #B8BABF #888C94
   Coral & Midnight #172237 #B24A38 #8E3B2D #F7EDEB #FDFAF9 #4B515C #EFD9D6 #E1B9B2 #B7BAC0 #868C96
   Ember & Charcoal #1F2124 #A84A1A #863B15 #F6EDE8 #FCFAF9 #4F5052 #EDD9CF #DDB9A6 #B9BABA #8A8B8C
   Honey & Espresso #2A1F17 #8F6318 #724F13 #F4EFE8 #FCFBF9 #554F4B #E8DECF #D4C2A5 #BCB9B7 #908A86
   Maroon & Gold    #1F1618 #6A1B2E #551625 #F5EEDC #FCFAF5 #4F4A4B #E8DCBE #C9AAA4 #B9B7B7 #8A8686
   Raspberry&Slate  #1E2230 #A12D4F #81243F #F6EAED #FCF9FA #4F5158 #ECD3DA #DBAEBA #B9BABE #8A8C92
   Orchid           #211A22 #8A3F86 #6E326B #F3ECF3 #FCFAFC #504C51 #E6D7E6 #D1B5D0 #BAB8BA #8B888C
   Rosewood         #231F22 #9B4D5C #7C3E4A #F5EDEF #FCFAFB #514F51 #EADADD #D8BAC0 #BAB9BA #8C8A8C
   Mocha & Blush    #2A201D #7A5548 #62443A #F6E9E6 #FCF9F8 #55504E #E7D7D3 #CEBAB3 #BCB9B9 #908A89
   Aubergine&Champ. #1E1720 #4E2A4F #3E223F #F3ECE1 #FCFAF7 #4F4B50 #DFD5CF #BEAEB2 #B9B7B9 #8A868A
   Heather          #231F29 #6D5A7E #574865 #F0EEF2 #FBFAFB #514F55 #E0DCE4 #C6BFCD #BAB9BC #8C8A8F
   Taupe & Ink      #1C2230 #6B5E57 #564B46 #F0EFEE #FBFBFA #4E5158 #E0DEDC #C5C1BE #B8BABE #888C92
   Onyx             #111111 #222222 #1B1B1B #ECECEC #FAFAFA #474747 #D4D4D4 #ABABAB #B5B5B5 #838383
   Navy             #141C28 #1F4E79 #173C5E #E3EAF2 #F6F8FB #536072 #D3DCE7 #A9B8CA #B3BFCD #7F8C9D
   Harbour          #18222F #2E5A7E #234763 #E2E9F0 #F6F8FA #56636F #D2DBE4 #A8B7C6 #B4C0CC #808D9A
   Cobalt           #151B2E #2B4FA0 #213E80 #E4E9F5 #F7F8FC #545D75 #D4DBEC #AAB7D6 #B3BCD4 #7E88A2
   Indigo           #1B1E33 #3E4A8C #313B72 #E6E8F3 #F8F8FC #5A5E76 #D8DBEA #B2B7D2 #B9BCD2 #8589A2
   Slate            #1E2236 #4A5680 #3B4568 #E7E9F1 #F8F8FA #5D6176 #DADDE8 #B7BCCF #BDC1D3 #8A8FA5
   Violet           #1F1A2C #54407E #433265 #ECE8F3 #F9F8FB #625B72 #DFDAEA #BFB5D3 #C2BAD3 #8F87A2
   Plum             #261B27 #6B3F6E #553157 #F1E8F0 #FBF8FA #6A5A69 #E6D9E4 #CBB5C8 #CDBACB #9A8698
   Wine             #2A1B1E #7D3A46 #642D37 #F3E7E8 #FBF8F8 #6D5A5D #E8D8DA #CFB2B6 #D2BDC0 #9E878B
   Cocoa            #261D18 #6E4A36 #573A2A #F1EAE5 #FAF8F6 #6B5E55 #E6DCD4 #CBBAAD #CFC2B8 #9B8B7F
   Graphite         #1A1D22 #3C4350 #2D333D #E9EBEE #F8F9FA #5C626B #DCDFE3 #B7BCC4 #BEC2C8 #8B9098
   Tip: on a blue theme, set --ok to var(--primary-deep) if you prefer "available" in the brand colour.
   ========================================================================== */
