/* ============================================================
   meckly-v1.css — Meckly Customer App Unified Stylesheet
   Version: 1.0.0
   Mobile-first. All shared patterns. Token-driven.
   Pages add only their own page-specific CSS.
   ============================================================ */

/* ── SELF-HOSTED FONTS ──────────────────────────────────────── */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2') }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/inter-latin-500-normal.woff2') format('woff2') }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2') }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/inter-latin-700-normal.woff2') format('woff2') }
@font-face { font-family:'Inter'; font-style:normal; font-weight:800; font-display:swap; src:url('/assets/fonts/inter-latin-800-normal.woff2') format('woff2') }
@font-face { font-family:'Inter'; font-style:normal; font-weight:900; font-display:swap; src:url('/assets/fonts/inter-latin-900-normal.woff2') format('woff2') }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2') }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2') }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2') }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2') }

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* Brand — overridden per-shop by Cloudflare Worker KV injection */
  --brand:       #008feb;
  --brand2:      #0077cc;
  --g-brand:     linear-gradient(135deg, #008feb, #0077cc);
  --brand-l:     color-mix(in srgb, var(--brand) 10%, white);
  --brand-b:     color-mix(in srgb, var(--brand) 25%, transparent);
  --brand-glow:  color-mix(in srgb, var(--brand) 14%, transparent);
  --btn-text:    #ffffff;   /* #1a1200 for light brands — set by Worker */
  --nav-dark:    linear-gradient(135deg, #071324, #0d2d5e);

  /* Backgrounds */
  --bg:          #f0f2f5;   /* all app pages */
  --bg-doc:      #E8EAED;   /* quote & invoice document pages only */
  --surface:     #ffffff;
  --off:         #f7f8fa;

  /* Text */
  --ink:         #12181f;
  --ink-2:       #4a5568;
  --muted-l:     #6b7280;
  --muted-xs:    #9ca3af;

  /* Borders */
  --light-bd:    #e2e8f0;
  --bd2:         rgba(18,24,31,.06);

  /* Semantic colours */
  --green:       #16a34a;  --green-l:  #f0fdf4;
  --amber:       #d97706;  --amber-l:  #fffbeb;
  --red:         #dc2626;  --red-l:    #fef2f2;
  --purple:      #7c3aed;  --purple-l: #f5f3ff;

  /* Border radii */
  --r:           12px;
  --r2:          9px;
  --r3:          7px;

  /* Font stacks */
  --font-sans:   'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Layout */
  --content-w:   1140px;   /* matches meckly.com .wrap max-width */
  --nav-h:       58px;
  --tab-h:       60px;
}

/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { -webkit-text-size-adjust: 100% }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  max-width: 100vw;
}
/*
  Auth gate — NOT set here. Each authenticated page sets this in its own <style>:
    body { visibility: hidden }
    body.auth-ok { visibility: visible }
  Public pages (login.html, join.html, verify-email.html) omit it entirely.
*/

img { display: block; max-width: 100%; height: auto }
button, select, input, textarea { font-family: var(--font-sans) }
a { color: var(--brand); text-decoration: none }
a:hover { text-decoration: underline }
.mono, [class*="-mono"], td.mono, td.amt {
  font-family: var(--font-mono);
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
/* Standard page wrapper — mobile-first, expands to content width */
.mk-page {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 16px 16px calc(var(--tab-h) + 24px);
}
/* Narrow single-column pages (bookings, book, profile, etc) */
.mk-page-narrow {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--tab-h) + 24px);
}
/* Document pages (quote, invoice) */
.mk-page-doc {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

@media (min-width: 600px) {
  .mk-page, .mk-page-narrow, .mk-page-doc {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ── NAVIGATION ──────────────────────────────────────────────── */
.mk-nav {
  height: var(--nav-h);
  background: var(--nav-dark);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
@media (min-width: 600px) { .mk-nav { padding: 0 20px } }

.mk-nav-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Logo mark */
.mk-nav-logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--g-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
  box-shadow: 0 4px 12px var(--brand-glow);
  cursor: pointer;
  overflow: hidden;
}
.mk-nav-logo-mark img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
}

/* Shop name */
.mk-nav-logo-name {
  font-size: 18px; font-weight: 800; color: #fff;
  white-space: nowrap; flex-shrink: 0; letter-spacing: -.3px;
  cursor: pointer;
}
@media (min-width: 600px) { .mk-nav-logo-name { font-size: 19px } }

/* Desktop nav links — hidden on mobile */
.mk-nav-links {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: 14px;
}
@media (min-width: 860px) { .mk-nav-links { display: flex } }

.mk-nav-link {
  height: 32px; padding: 0 12px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,.7);
  border: none; background: transparent;
  cursor: pointer;
  transition: all .12s;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.mk-nav-link:hover {
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  color: #fff;
  text-decoration: none;
}
.mk-nav-link.active {
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  color: #fff; font-weight: 800;
}

/* Right side — bell + avatar */
.mk-nav-right {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Bell / notification button */
.mk-nav-bell {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1.5px solid color-mix(in srgb, var(--brand) 40%, white);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer; flex-shrink: 0;
  color: #fff;
  transition: background .12s;
}
.mk-nav-bell:hover { background: rgba(255,255,255,.14) }

/* Notification badge on bell */
.mk-nav-badge {
  display: none;
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid #071324;
  font-size: 9px; font-weight: 800; color: #fff;
  font-family: var(--font-sans);
  align-items: center; justify-content: center;
  padding: 0 3px;
}
.mk-nav-badge.show { display: flex }

/* Avatar initials */
.mk-nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-b);
  border: 1.5px solid color-mix(in srgb, var(--brand) 40%, white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  cursor: pointer; flex-shrink: 0;
}

/* ── MOBILE TAB BAR ──────────────────────────────────────────── */
.mk-tab-bar {
  display: none; /* shown only on mobile */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--nav-dark);
  border-top: 1px solid color-mix(in srgb, var(--brand) 15%, transparent);
  padding: 6px 0 max(8px, env(safe-area-inset-bottom));
}
@media (max-width: 640px) { .mk-tab-bar { display: block } }

.mk-tab-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.mk-tab-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 4px 8px;
  border: none; background: transparent;
  cursor: pointer; font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

.mk-tab-btn-ico { font-size: 24px; line-height: 1 }

.mk-tab-btn-label {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,.6);
  letter-spacing: .01em;
}
.mk-tab-btn.active .mk-tab-btn-label {
  color: #fff; font-weight: 800;
}
.mk-tab-btn.active .mk-tab-btn-ico {
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--brand) 90%, transparent));
}

/* ── CARDS ───────────────────────────────────────────────────── */
.mk-card {
  background: var(--surface);
  border: 1.5px solid var(--light-bd);
  border-radius: var(--r);
  overflow: hidden;
}
.mk-card + .mk-card { margin-top: 10px }

.mk-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--light-bd);
  background: var(--off);
}
.mk-card-head-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-xs);
}

/* ── STATUS PILLS ────────────────────────────────────────────── */
.mk-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.mk-pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%; flex-shrink: 0;
}
.mk-pill.blue   { background: var(--brand-l); color: var(--brand);  border-color: var(--brand-b) }
.mk-pill.green  { background: var(--green-l); color: var(--green);  border-color: rgba(22,163,74,.2) }
.mk-pill.amber  { background: var(--amber-l); color: var(--amber);  border-color: rgba(217,119,6,.25) }
.mk-pill.red    { background: var(--red-l);   color: var(--red);    border-color: rgba(220,38,38,.2) }
.mk-pill.grey   { background: var(--off);     color: var(--muted-l); border-color: var(--light-bd) }
.mk-pill.purple { background: var(--purple-l); color: var(--purple); border-color: rgba(124,58,237,.2) }

.mk-pill.blue  .dot { background: var(--brand) }
.mk-pill.green .dot { background: var(--green) }
.mk-pill.amber .dot { background: var(--amber) }
.mk-pill.red   .dot { background: var(--red) }

/* Pulse animation for live statuses */
@keyframes mk-pulse {
  0%, 100% { opacity: 1; transform: scale(1) }
  50%       { opacity: .5; transform: scale(1.45) }
}
.mk-pill.amber .dot { animation: mk-pulse 1.6s ease-in-out infinite }

/* Radar ring for booked state */
@keyframes mk-radar {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 50%, transparent) }
  70%  { box-shadow: 0 0 0 6px transparent }
  100% { box-shadow: 0 0 0 0 transparent }
}
.mk-pill.blue .dot.radar { animation: mk-radar 1.8s ease-out infinite }

/* ── BUTTONS ─────────────────────────────────────────────────── */
/* Primary — gradient, full brand */
.mk-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 48px; padding: 0 22px;
  border-radius: var(--r);
  border: none;
  background: var(--g-brand);
  color: var(--btn-text);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px var(--brand-glow);
  transition: filter .12s, transform .1s;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.mk-btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.1) 0%, transparent 60%);
  pointer-events: none;
}
.mk-btn-primary:hover   { filter: brightness(1.07); text-decoration: none }
.mk-btn-primary:active  { transform: scale(.98) }
.mk-btn-primary:disabled { opacity: .4; cursor: not-allowed; filter: none; box-shadow: none }

/* Secondary — outlined */
.mk-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 18px;
  border-radius: var(--r2);
  border: 1.5px solid var(--light-bd);
  background: var(--surface);
  color: var(--muted-l);
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: all .12s;
  -webkit-tap-highlight-color: transparent;
}
.mk-btn-secondary:hover { border-color: var(--brand); color: var(--brand); text-decoration: none }
.mk-btn-secondary:active { transform: scale(.98) }
.mk-btn-secondary:disabled { opacity: .4; cursor: not-allowed }

/* Danger bare text — destructive actions */
.mk-btn-bare-danger {
  background: none; border: none;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 700;
  color: var(--muted-l);
  cursor: pointer; padding: 8px 0;
  transition: color .12s;
}
.mk-btn-bare-danger:hover { color: var(--red) }

/* Icon button (edit, remove) */
.mk-btn-icon {
  width: 40px; height: 40px;
  border-radius: var(--r2);
  border: 1.5px solid var(--light-bd);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; flex-shrink: 0;
  transition: border-color .12s;
  -webkit-tap-highlight-color: transparent;
}
.mk-btn-icon:hover { border-color: var(--brand) }
.mk-btn-icon.danger:hover { border-color: var(--red) }

/* Add / dashed button */
.mk-btn-add {
  width: 100%; height: 40px;
  border-radius: var(--r2);
  border: 1.5px dashed var(--light-bd);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 700;
  color: var(--muted-l);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .14s;
}
.mk-btn-add:hover { border-color: var(--brand); color: var(--brand) }

/* ── SEGMENT CONTROL ─────────────────────────────────────────── */
.mk-seg {
  display: flex;
  background: var(--surface);
  border: 1.5px solid var(--light-bd);
  border-radius: var(--r2);
  padding: 3px; gap: 2px;
}
.mk-seg-btn {
  flex: 1; height: 36px;
  border-radius: 6px; border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  color: var(--muted-l);
  cursor: pointer;
  transition: all .14s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap; padding: 0 6px;
  -webkit-tap-highlight-color: transparent;
}
.mk-seg-btn:hover { color: var(--ink) }
.mk-seg-btn.active {
  background: var(--g-brand);
  color: var(--btn-text);
  font-weight: 700;
  box-shadow: 0 2px 8px var(--brand-glow);
}
/* Hide emoji labels on very small screens */
@media (max-width: 420px) {
  .mk-seg-btn .seg-ico { display: none }
  .mk-seg-btn { font-size: 11px }
}

/* ── BADGES (count indicators) ───────────────────────────────── */
.mk-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  font-size: 10px; font-weight: 800;
  padding: 0 5px;
}
.mk-seg-btn .mk-badge { background: var(--brand-l); color: var(--brand) }
.mk-seg-btn.active .mk-badge { background: rgba(255,255,255,.25); color: var(--btn-text) }

/* ── FORMS & INPUTS ──────────────────────────────────────────── */
.mk-field { display: flex; flex-direction: column; gap: 5px }

.mk-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted-xs);
}

.mk-input {
  width: 100%; height: 44px;
  padding: 0 12px;
  border-radius: var(--r2);
  border: 1.5px solid var(--light-bd);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  -webkit-appearance: none;
}
.mk-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.mk-input::placeholder { color: var(--muted-xs); font-size: 14px }
.mk-input.mono { font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase }
.mk-input:disabled { opacity: .55; cursor: not-allowed; background: var(--off) }

/* Select */
.mk-select {
  width: 100%; height: 44px;
  padding: 0 32px 0 12px;
  border-radius: var(--r2);
  border: 1.5px solid var(--light-bd);
  background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 500;
  color: var(--ink);
  outline: none; cursor: pointer;
  -webkit-appearance: none;
  transition: border-color .12s, box-shadow .12s;
}
.mk-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

/* Textarea */
.mk-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r2);
  border: 1.5px solid var(--light-bd);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 500;
  color: var(--ink);
  outline: none; resize: vertical;
  line-height: 1.5; min-height: 88px;
  transition: border-color .12s, box-shadow .12s;
}
.mk-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.mk-textarea::placeholder { color: var(--muted-xs); font-size: 14px }

/* Hint */
.mk-hint { font-size: 11px; color: var(--muted-l); line-height: 1.4 }

/* Two-column field grid */
.mk-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
@media (max-width: 360px) { .mk-field-row { grid-template-columns: 1fr } }

/* ── ALERTS / BANNERS ────────────────────────────────────────── */
.mk-alert {
  border-radius: var(--r2);
  padding: 11px 14px;
  font-size: 13px; font-weight: 600;
  line-height: 1.5;
  display: none;
  border: 1.5px solid transparent;
}
.mk-alert.show { display: block }
.mk-alert.ok     { background: var(--green-l); border-color: rgba(22,163,74,.25);   color: #166534 }
.mk-alert.warn   { background: var(--amber-l); border-color: rgba(217,119,6,.3);    color: #92400e }
.mk-alert.err    { background: var(--red-l);   border-color: rgba(220,38,38,.25);   color: #991b1b }
.mk-alert.info   { background: var(--brand-l); border-color: var(--brand-b);        color: var(--brand) }

/* ── BOTTOM SHEETS ───────────────────────────────────────────── */
.mk-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(7,19,36,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.mk-overlay.open { display: flex }

.mk-sheet {
  background: var(--surface);
  width: 100%; max-width: 560px;
  border-radius: 20px 20px 0 0;
  max-height: 92vh; overflow-y: auto;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(0,0,0,.15);
}

.mk-sheet-head {
  position: sticky; top: 0;
  background: var(--surface);
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--light-bd);
  z-index: 1;
}
.mk-sheet-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--light-bd);
  margin: 0 auto 14px;
}
.mk-sheet-title-row {
  display: flex; align-items: center; justify-content: space-between;
}
.mk-sheet-title { font-size: 17px; font-weight: 800; color: var(--ink) }
.mk-sheet-sub   { font-size: 13px; color: var(--muted-l); margin-top: 3px; line-height: 1.5 }

.mk-sheet-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--off); border: none;
  font-size: 14px; color: var(--muted-l);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.mk-sheet-body { padding: 16px 20px 0 }

/* Sheet action buttons */
.mk-sheet-btn-primary {
  width: 100%; height: 50px;
  border-radius: var(--r2);
  border: none;
  background: var(--g-brand); color: var(--btn-text);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 700;
  cursor: pointer; margin-bottom: 8px;
  transition: filter .12s;
}
.mk-sheet-btn-primary:hover { filter: brightness(1.07) }

.mk-sheet-btn-ghost {
  width: 100%; height: 44px;
  border-radius: var(--r2);
  border: 1.5px solid var(--light-bd);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 700;
  color: var(--muted-l); cursor: pointer;
  margin-bottom: 8px;
}
.mk-sheet-btn-ghost:hover { border-color: var(--brand); color: var(--brand) }

.mk-sheet-btn-bare {
  width: 100%; padding: 10px;
  border: none; background: none;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  color: var(--muted-l); cursor: pointer;
  transition: color .12s;
}
.mk-sheet-btn-bare:hover { color: var(--red) }

/* ── SKELETON LOADERS ────────────────────────────────────────── */
@keyframes mk-skel-shimmer {
  0%   { background-position: -400px 0 }
  100% { background-position: 400px 0 }
}
.skel {
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--off) 25%, #eaecef 50%, var(--off) 75%);
  background-size: 400px 100%;
  animation: mk-skel-shimmer 1.4s ease-in-out infinite;
  min-height: 100px;
  margin-bottom: 10px;
}

/* ── SPINNER ─────────────────────────────────────────────────── */
@keyframes mk-spin { to { transform: rotate(360deg) } }
.mk-spinner {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 3px solid var(--light-bd);
  border-top-color: var(--brand);
  animation: mk-spin .7s linear infinite;
}
.mk-spinner-sm {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: mk-spin .7s linear infinite;
  flex-shrink: 0;
}
.mk-spinner-dark {
  border-color: rgba(0,0,0,.12);
  border-top-color: var(--ink);
}

/* ── EMPTY STATES ────────────────────────────────────────────── */
.mk-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
}
.mk-empty-ico   { font-size: 44px; margin-bottom: 14px; opacity: .35 }
.mk-empty-title { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 6px }
.mk-empty-sub   { font-size: 13px; color: var(--muted-l); margin-bottom: 22px; line-height: 1.55; max-width: 300px }

/* ── STATE SCREENS (loading / error / expired / no-data) ─────── */
.mk-state-screen {
  display: none;
  min-height: 55vh;
  flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center; gap: 0;
}
.mk-state-screen.show { display: flex }
.mk-state-ico   { font-size: 52px; margin-bottom: 16px; line-height: 1 }
.mk-state-title { font-size: 22px; font-weight: 900; color: var(--ink); margin-bottom: 8px; letter-spacing: -.3px }
.mk-state-sub   { font-size: 14px; color: var(--muted-l); line-height: 1.65; max-width: 340px; margin-bottom: 20px }

.mk-state-card {
  background: var(--surface);
  border-radius: var(--r);
  border: 1.5px solid var(--light-bd);
  padding: 18px 20px;
  max-width: 380px; width: 100%; text-align: left;
  box-shadow: 0 2px 16px rgba(26,30,46,.07);
  margin-bottom: 20px;
}
.mk-state-card-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--bd2);
}
.mk-state-card-row:last-child { border-bottom: none }
.mk-state-card-ico { font-size: 18px; flex-shrink: 0; margin-top: 1px }
.mk-state-card-txt { font-size: 13px; color: var(--ink-2); line-height: 1.55 }
.mk-state-card-txt strong { color: var(--ink); font-weight: 700 }

.mk-state-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center }
.mk-state-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r2);
  font-size: 14px; font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer; border: none; text-decoration: none;
  transition: opacity .15s;
}
.mk-state-btn-primary { background: var(--brand); color: #fff }
.mk-state-btn-primary:hover { opacity: .88; text-decoration: none }
.mk-state-btn-ghost { background: var(--off); color: var(--ink-2); border: 1.5px solid var(--light-bd) }
.mk-state-btn-ghost:hover { background: #eaecef; text-decoration: none }

/* ── VEHICLE PILL / HEADER ───────────────────────────────────── */
/* Used on book.html, ownership.html — slim header showing which car */
.mk-veh-pill {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--light-bd);
  gap: 12px;
}
.mk-veh-pill-info { min-width: 0 }
.mk-veh-pill-name {
  font-size: 18px; font-weight: 900; color: var(--ink);
  letter-spacing: -.03em;
}
.mk-veh-pill-rego {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted-xs); margin-top: 2px;
}
.mk-veh-pill-change {
  font-size: 12px; font-weight: 700; color: var(--brand);
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); flex-shrink: 0; padding: 0;
}

/* ── SECTION LABELS ──────────────────────────────────────────── */
.mk-section-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-xs);
  margin-bottom: 10px;
}

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.mk-progress-wrap { padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--light-bd) }
.mk-progress-top  { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted-xs); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px }
.mk-progress-track { height: 4px; background: var(--light-bd); border-radius: 999px; overflow: hidden }
.mk-progress-fill  { height: 100%; border-radius: 999px; background: var(--g-brand); transition: width .5s ease }

/* ── REGO CHIP ───────────────────────────────────────────────── */
.mk-rego {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  background: #fffbeb; color: #92400e;
  border: 1px solid #fde68a;
}
.mk-rego.unreg { background: var(--red-l); color: var(--red); border-color: rgba(220,38,38,.25) }

/* ── UNSAVED CHANGES BAR ─────────────────────────────────────── */
.mk-unsaved-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--g-brand);
  padding: 11px 18px max(12px, env(safe-area-inset-bottom));
  display: none;
  align-items: center; justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
}
.mk-unsaved-bar.show { display: flex }
.mk-unsaved-bar-text { font-size: 13px; font-weight: 700; color: #fff; flex: 1 }
.mk-unsaved-bar-btn {
  height: 36px; padding: 0 18px;
  border-radius: var(--r3); border: none;
  background: rgba(255,255,255,.95);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 800;
  color: var(--brand); cursor: pointer; flex-shrink: 0;
}
.mk-unsaved-bar-btn:hover { background: #fff }

/* ── TOAST NOTIFICATION ──────────────────────────────────────── */
.mk-toast-stack {
  position: fixed; bottom: calc(var(--tab-h) + 16px); right: 16px;
  z-index: 300; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.mk-toast {
  background: var(--surface);
  border: 1.5px solid var(--light-bd);
  border-radius: var(--r2);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  font-size: 13px; font-weight: 600; color: var(--ink);
  min-width: 220px; max-width: 280px;
  transform: translateX(120%);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
  pointer-events: all;
}
.mk-toast.show    { transform: translateX(0) }
.mk-toast.ok  { border-color: rgba(22,163,74,.3);  background: var(--green-l) }
.mk-toast.err { border-color: rgba(220,38,38,.25); background: var(--red-l) }

/* ── PRINT UTILITIES ─────────────────────────────────────────── */
@media print {
  .mk-nav, .mk-tab-bar, .mk-unsaved-bar, .mk-toast-stack { display: none !important }
  body { background: #fff }
}

/* ── UTILITY CLASSES ─────────────────────────────────────────── */
.hidden  { display: none !important }
.show    { display: block }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0 }

/* Colour dots used in reports, compliance, upcoming */
@keyframes mk-dot-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }
.mk-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.mk-dot.blue   { background: var(--brand) }
.mk-dot.green  { background: var(--green) }
.mk-dot.amber  { background: var(--amber); animation: mk-dot-pulse 1.6s ease-in-out infinite }
.mk-dot.red    { background: var(--red) }
.mk-dot.grey   { background: var(--muted-xs) }

/* ============================================================
   DOCUMENT PAGES — Quote & Invoice shared styles
   Used by customer-quote.html and customer-invoice.html
   ============================================================ */

/* ── Document page body ────────────────────────────────────── */
body.doc-page {
  background: var(--bg-doc);
}

/* ── Greeting section ──────────────────────────────────────── */
.greeting {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 0;
}
.greeting-hi {
  font-size: 24px; font-weight: 900; color: var(--ink);
  letter-spacing: -.3px; margin-bottom: 6px;
}
.greeting-sub {
  font-size: 14px; color: var(--ink-2);
  line-height: 1.6; margin-bottom: 16px;
}
.greeting-notice {
  display: flex; gap: 10px;
  padding: 12px 14px;
  background: #fffbeb; border: 1.5px solid #fde68a;
  border-radius: var(--r2);
  font-size: 13px; color: #92400e; line-height: 1.5;
}
.greeting-notice svg {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; stroke: #d97706;
}
.greeting-notice-txt strong { font-weight: 700 }

/* ── Paper wrap ────────────────────────────────────────────── */
.paper-wrap {
  max-width: 720px;
  margin: 20px auto 0;
  padding: 0 16px 60px;
}

/* ── White paper (document surface) ───────────────────────── */
.paper {
  background: #fff;
  border-radius: var(--r);
  box-shadow: 0 2px 20px rgba(26,30,46,.10);
  overflow: hidden;
  margin-bottom: 4px;
  position: relative;
}

/* ── Letterhead ────────────────────────────────────────────── */
.lh {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 22px 16px;
  border-bottom: 2px solid #1a1e2e;
  gap: 12px;
}
.lh-name    { font-size: 20px; font-weight: 900; color: #1a1e2e; letter-spacing: .2px }
.lh-tag     { font-size: 10px; color: #8b90a8; margin-top: 2px; font-style: italic }
.lh-contact { font-size: 11px; color: #5a5f7a; text-align: right; line-height: 1.75 }
.lh-contact strong { color: #1a1e2e; font-weight: 700; display: block }

/* ── Address blocks (shared quote & invoice) ───────────────── */
.addr-lbl  { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #8b90a8; margin-bottom: 4px }
.addr-name { font-size: 13px; font-weight: 700; color: #1a1e2e; margin-bottom: 2px }
.addr-line { font-size: 11px; color: #5a5f7a; line-height: 1.65 }
.addr-rego { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; margin-top: 3px }
.addr-vin  { font-size: 10px; color: #9498b4; font-family: var(--font-mono); margin-top: 2px }

/* ── State screens (doc pages version) ────────────────────── */
.state-screen {
  display: none;
  min-height: 60vh;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center; gap: 0;
}
.state-screen.show { display: flex }
.state-icon  { font-size: 56px; margin-bottom: 18px; line-height: 1; filter: drop-shadow(0 4px 16px rgba(0,0,0,.12)) }
.state-title { font-size: 22px; font-weight: 900; color: #1a1e2e; margin-bottom: 8px; letter-spacing: -.3px }
.state-sub   { font-size: 14px; color: #6b7280; line-height: 1.65; max-width: 340px; margin-bottom: 24px }
.state-card  { background: #fff; border-radius: 16px; border: 1.5px solid #e4e6f0; padding: 20px; max-width: 380px; width: 100%; text-align: left; box-shadow: 0 2px 16px rgba(26,30,46,.07) }
.state-card-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6 }
.state-card-row:last-child { border-bottom: none }
.state-card-ico { font-size: 20px; flex-shrink: 0; margin-top: 1px }
.state-card-txt { font-size: 13px; color: #374151; line-height: 1.55 }
.state-card-txt strong { color: #1a1e2e; font-weight: 700 }
.state-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 10px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; border: none; text-decoration: none; transition: opacity .15s }
.state-btn-primary { background: #1a6fdb; color: #fff }
.state-btn-primary:hover { opacity: .88; text-decoration: none }
.state-btn-ghost { background: #f3f4f6; color: #374151; border: 1.5px solid #e4e6f0 }
.state-btn-ghost:hover { background: #e9eaec; text-decoration: none }
.state-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 16px }
.state-screen.err  .state-title { color: #991b1b }
.state-screen.err  .state-card  { border-color: #fca5a5; background: #fffafa }
.state-screen.warn .state-card  { border-color: #fde68a; background: #fffbeb }

/* ── Totals block (shared) ─────────────────────────────────── */
.tot-row   { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; font-size: 11px }
.tot-lbl   { color: #6b7091 }
.tot-val   { font-family: var(--font-mono); font-weight: 600; color: #1a1e2e }
.tot-row.grand {
  display: flex; justify-content: space-between; gap: 14px;
  padding-top: 6px; border-top: 2px solid #1a1e2e; margin-top: 4px;
}
.tot-row.grand .tot-lbl { font-size: 14px; font-weight: 800; color: #1a1e2e }
.tot-row.grand .tot-val { font-family: var(--font-mono); font-size: 20px; font-weight: 900; color: #166534 }

/* ── INVOICE-SPECIFIC styles ───────────────────────────────── */
.inv-meta-wrap {
  display: grid; grid-template-columns: 1fr auto;
  gap: 16px; padding: 16px 22px;
  border-bottom: 1px solid #e4e6f0;
}
@media (max-width: 480px) { .inv-meta-wrap { grid-template-columns: 1fr } }

.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
@media (max-width: 400px) { .inv-parties { grid-template-columns: 1fr } }

.inv-title-block { text-align: right; flex-shrink: 0 }
.inv-doc-title { font-size: 16px; font-weight: 900; color: #1a1e2e; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px }

.inv-meta-tbl     { border-collapse: collapse; margin-left: auto }
.inv-meta-tbl td  { font-size: 11px; padding: 1.5px 0; vertical-align: top }
.imt-lbl { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: #9498b4; padding-right: 10px; white-space: nowrap }
.imt-val { font-weight: 700; color: #1a1e2e; font-family: var(--font-mono); font-size: 11px }
.imt-badge { display: inline-block; font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 99px; letter-spacing: .04em }
.imt-badge.unpaid { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa }
.imt-badge.paid   { background: #f0fdf4; color: #166534; border: 1px solid #86efac }

.inv-table { width: 100%; border-collapse: collapse }
.inv-table thead tr { background: #f4f5f8; border-top: 1px solid #e0e2ea; border-bottom: 2px solid #1a1e2e }
.inv-table th { padding: 6px 10px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: #8b90a8; text-align: left }
.inv-table th.r { text-align: right }
.inv-table tbody tr { border-bottom: 1px solid #f0f1f7 }
.inv-table tbody tr:last-child { border-bottom: none }
.inv-table td { padding: 10px 10px; vertical-align: top }
.td-num  { font-size: 10px; color: #9498b4; font-family: var(--font-mono) }
.td-desc { font-size: 13px; color: #1a1e2e; font-weight: 600; line-height: 1.35 }
.td-r    { text-align: right; font-family: var(--font-mono); font-size: 11px; color: #5a5f7a; white-space: nowrap }
.td-amt  { text-align: right; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: #1a1e2e; white-space: nowrap }
@media (max-width: 480px) { .col-gst { display: none } }

.inv-footer { display: grid; grid-template-columns: 1fr 180px; gap: 16px; padding: 14px 22px 16px; border-top: 1px solid #e0e2ea }
@media (max-width: 520px) { .inv-footer { grid-template-columns: 1fr } }
.ws-notes-lbl  { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: #8b90a8; margin-bottom: 5px }
.ws-notes-body { font-size: 11px; color: #5a5f7a; line-height: 1.6 }
.totals-block  { margin-left: auto; min-width: 160px }
.tot-grand-row { display: flex; justify-content: space-between; gap: 14px; padding-top: 6px; border-top: 2px solid #1a1e2e; margin-top: 4px }
.tot-grand-lbl { font-size: 14px; font-weight: 800; color: #1a1e2e }
.tot-grand-val { font-family: var(--font-mono); font-size: 22px; font-weight: 900; color: #166534 }
.tot-gst-incl  { font-size: 10px; color: #6b7091; text-align: right; margin-top: 4px; font-style: italic }

.inv-doc-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 22px 14px; border-top: 2px solid #1a1e2e; font-size: 10px; color: #6b7091; line-height: 1.7 }
.inv-doc-footer strong { color: #1a1e2e; font-weight: 700 }
.inv-doc-footer-right  { text-align: right }
.gst-footnote { font-size: 9px; color: #9498b4; padding: 0 22px 14px; font-style: italic }

/* PAID stamp */
.paid-stamp { display: none; position: absolute; top: 24px; right: 20px; border: 4px solid #166534; border-radius: 6px; padding: 4px 14px; font-size: 20px; font-weight: 900; color: #166534; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-12deg); opacity: .82; pointer-events: none }
.paid-stamp.show { display: block }

/* Payment actions card */
.actions-card       { background: #fff; border-radius: var(--r); box-shadow: 0 2px 20px rgba(26,30,46,.10); overflow: hidden; margin-bottom: 16px }
.actions-head       { padding: 16px 20px; border-bottom: 1px solid #f3f4f6 }
.actions-head-title { font-size: 16px; font-weight: 800; color: #1a1e2e }
.actions-head-sub   { font-size: 13px; color: #6b7280; margin-top: 3px }
.actions-total-row  { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: #f9fafb; border-bottom: 1px solid #f3f4f6 }
.actions-total-lbl  { font-size: 13px; color: #6b7280; font-weight: 600 }
.actions-total-val  { font-family: var(--font-mono); font-size: 20px; font-weight: 900; color: #166534 }

.pay-opts    { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e4e6f0 }
.pay-opt     { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 18px 12px; background: #fff; cursor: pointer; border: none; font-family: inherit; transition: background .12s; text-align: center }
.pay-opt:hover  { background: #f9fafb }
.pay-opt.active { background: #f0fdf4 }
.pay-opt-ico   { font-size: 26px; line-height: 1 }
.pay-opt-title { font-size: 14px; font-weight: 800; color: #1a1e2e }
.pay-opt-sub   { font-size: 11px; color: #6b7280 }

.stripe-section     { padding: 18px 20px; border-top: 1px solid #f3f4f6 }
.stripe-section-lbl { font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px }
.btn-pay-now { width: 100%; padding: 14px; border-radius: 10px; border: none; background: #1a6fdb; color: #fff; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity .15s }
.btn-pay-now:hover     { opacity: .88 }
.btn-pay-now:disabled  { background: #e4e6f0; color: #9ca3af; cursor: not-allowed; opacity: 1 }
.stripe-error          { font-size: 12px; color: #dc2626; margin-top: 8px; padding: 8px 10px; background: #fef2f2; border-radius: 8px; border: 1px solid #fca5a5; display: none }
.stripe-error.show     { display: block }
.stripe-loading        { display: flex; align-items: center; gap: 8px; padding: 16px 0; color: #6b7280; font-size: 13px }
.stripe-spinner        { width: 16px; height: 16px; border: 2px solid #e4e6f0; border-top-color: #1a6fdb; border-radius: 50%; animation: mk-spin .7s linear infinite }

.instore-section    { padding: 18px 20px; border-top: 1px solid #f3f4f6 }
.instore-msg        { font-size: 14px; color: #374151; line-height: 1.6; margin-bottom: 14px }
.instore-shop-card  { background: #f9fafb; border: 1.5px solid #e4e6f0; border-radius: 10px; padding: 14px 16px }
.instore-shop-name  { font-size: 15px; font-weight: 800; color: #1a1e2e; margin-bottom: 6px }
.instore-shop-detail{ font-size: 13px; color: #4b5563; line-height: 1.7 }
.btn-call-shop      { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; border-radius: 10px; border: 1.5px solid #e4e6f0; background: #fff; color: #1a1e2e; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; margin-top: 12px; text-decoration: none; transition: background .12s }
.btn-call-shop:hover { background: #f9fafb; text-decoration: none }

.paid-banner       { display: none; align-items: center; gap: 12px; padding: 16px 20px; background: #f0fdf4; border-bottom: 1px solid #6ee7b7 }
.paid-banner.show  { display: flex }
.paid-banner-icon  { font-size: 28px; flex-shrink: 0 }
.paid-banner-title { font-size: 15px; font-weight: 800; color: #065f46 }
.paid-banner-sub   { font-size: 13px; color: #047857; margin-top: 2px }

/* ── QUOTE-SPECIFIC styles ─────────────────────────────────── */

/* Quote title row */
.qt-row      { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 22px 10px; border-bottom: 1px solid #e4e6f0; flex-wrap: wrap }
.qt-word     { font-size: 22px; font-weight: 900; color: #1a1e2e; letter-spacing: -.02em; flex-shrink: 0 }
.qt-meta     { display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline }
.qt-row-item { display: flex; align-items: baseline; gap: 5px }
.qt-lbl      { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: #8b90a8; white-space: nowrap }
.qt-val      { font-size: 11px; font-weight: 700; color: #1a1e2e; font-family: var(--font-mono) }
.qt-badge    { display: inline-block; font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 99px; letter-spacing: .04em; background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa }

/* Address sections */
.addrs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 22px; border-bottom: 1px solid #e4e6f0 }
@media (max-width: 400px) { .addrs { grid-template-columns: 1fr } }
.addr  {}

/* Line items header */
.inv-hdr   { display: grid; grid-template-columns: 28px 1fr 80px 100px; align-items: center; padding: 6px 10px; background: #f4f5f8; border-top: 1px solid #e0e2ea; border-bottom: 2px solid #1a1e2e }
.inv-hcell { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: #8b90a8 }
.inv-hcell.right { text-align: right }
.inv-hcell.gst   { text-align: right }
@media (max-width: 480px) { .inv-hcell.gst { display: none } }

/* Line item rows */
.inv-row          { display: grid; grid-template-columns: 28px 1fr 80px 100px; align-items: start; padding: 10px 10px; border-bottom: 1px solid #f0f1f7 }
.inv-row:last-child { border-bottom: none }
.inv-num-cell     { font-size: 10px; color: #9498b4; font-family: var(--font-mono); padding-top: 2px }
.inv-desc-cell    { padding-right: 8px }
.inv-desc-txt     { font-size: 13px; font-weight: 600; color: #1a1e2e; line-height: 1.35 }
.inv-desc-sub     { font-size: 11px; color: #8b90a8; margin-top: 2px; line-height: 1.4 }
.inv-gst-cell     { text-align: right; font-size: 11px; color: #5a5f7a; font-family: var(--font-mono); white-space: nowrap }
.inv-price-cell   { text-align: right }
.inv-price-main   { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: #1a1e2e; white-space: nowrap }
@media (max-width: 480px) { .inv-gst-cell { display: none } .inv-hdr { grid-template-columns: 28px 1fr 100px } .inv-row { grid-template-columns: 28px 1fr 100px } }

/* Photos */
.inv-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px }
.inv-photo  { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; cursor: zoom-in; border: 1px solid #e4e6f0 }

/* Totals */
.totals-body { padding: 12px 22px 14px; border-top: 1px solid #e0e2ea; max-width: 280px; margin-left: auto }

/* GST info bar */
.gst-bar { font-size: 10px; color: #8b90a8; padding: 6px 22px 10px; font-style: italic; line-height: 1.6 }

/* Payment chips */
.pay-section { padding: 10px 22px; border-top: 1px solid #f0f1f7 }
.pay-lbl     { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: #8b90a8; margin-bottom: 8px }
.pay-chips   { display: flex; flex-wrap: wrap; gap: 6px }
.pay-chip    { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #f4f5f8; color: #1a1e2e; border: 1px solid #e4e6f0 }

/* BNPL section */
.bnpl-section    { padding: 14px 22px; border-top: 1px solid #f0f1f7 }
.bnpl-header-lbl { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: #8b90a8; margin-bottom: 3px }
.bnpl-header-note { font-size: 11px; color: #6b7280; line-height: 1.5; margin-bottom: 10px }
.bnpl-cards      { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px }
.bnpl-card       { background: #f9fafb; border: 1.5px solid #e4e6f0; border-radius: var(--r2); padding: 12px 14px; min-width: 160px; flex: 1 }
.bnpl-card-headline { font-size: 13px; font-weight: 800; color: #1a1e2e; margin-bottom: 2px }
.bnpl-card-row   { display: flex; align-items: center; gap: 6px; margin-bottom: 6px }
.bnpl-card-ap    { font-size: 11px; color: #1a1e2e }
.bnpl-card-zip   { font-size: 11px; color: #1a1e2e }
.bnpl-card-amount { font-size: 18px; font-weight: 900; color: #1a1e2e; font-family: var(--font-mono); margin-bottom: 2px }
.bnpl-card-sub   { font-size: 10px; color: #6b7280 }
.bnpl-pill       { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800 }
.bnpl-pill-ap    { background: #000; color: #fff }
.bnpl-pill-zip   { background: #aa8fff; color: #fff }
.bnpl-legal      { font-size: 10px; color: #9498b4; line-height: 1.5 }
.bnpl-legal a    { color: #1a6fdb }

/* Legal section */
.legal-section     { padding: 14px 22px 16px; border-top: 1px solid #f0f1f7 }
.legal-section-lbl { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: #8b90a8; margin-bottom: 6px }
.legal-txt         { font-size: 11px; color: #6b7280; line-height: 1.7 }
.legal-txt strong  { color: #374151; font-weight: 700 }

/* Options bar */
.options-bar { max-width: 720px; margin: 0 auto; padding: 0 16px }

/* Action buttons */
.btn-accept {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--r2); border: none;
  background: linear-gradient(135deg, #16a34a, #059669);
  color: #fff; font-size: 15px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  box-shadow: 0 4px 14px rgba(22,163,74,.3);
  transition: filter .12s, transform .1s;
}
.btn-accept:hover    { filter: brightness(1.08); text-decoration: none }
.btn-accept:active   { transform: scale(.98) }
.btn-accept:disabled { opacity: .45; cursor: not-allowed; filter: none; box-shadow: none }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r2);
  border: 1.5px solid var(--light-bd); background: var(--surface);
  color: var(--muted-l); font-size: 14px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all .12s;
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); text-decoration: none }

.btn-sec {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--r2);
  border: 1.5px solid var(--light-bd); background: var(--surface);
  color: var(--muted-l); font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all .12s;
}
.btn-sec:hover         { border-color: var(--brand); color: var(--brand) }
.btn-sec.btn-decline:hover { border-color: var(--red); color: var(--red) }

/* Revision drawer */
.revision-drawer { display: none; padding: 14px; background: #f8f9fb; border: 1.5px solid var(--light-bd); border-radius: var(--r2); margin-top: 8px }
.revision-drawer.open { display: block }
.revision-drawer-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px }
.revision-textarea {
  width: 100%; min-height: 80px; padding: 10px 12px;
  border-radius: var(--r2); border: 1.5px solid var(--light-bd);
  background: #fff; font-family: inherit; font-size: 13px;
  color: var(--ink); resize: vertical; outline: none;
  transition: border-color .12s;
}
.revision-textarea:focus { border-color: var(--brand) }
.btn-send-revision {
  margin-top: 8px; padding: 10px 18px; border-radius: var(--r2);
  border: none; background: var(--brand); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: filter .12s;
}
.btn-send-revision:hover    { filter: brightness(1.08) }
.btn-send-revision:disabled { opacity: .5; cursor: not-allowed }

/* Declined message */
.declined-msg { display: none; padding: 12px 14px; background: #fff7ed; border: 1.5px solid #fed7aa; border-radius: var(--r2); margin-top: 10px }
.declined-msg.show      { display: block }
.declined-msg-title { font-size: 13px; font-weight: 800; color: #92400e; margin-bottom: 3px }
.declined-msg-sub   { font-size: 12px; color: #b45309; line-height: 1.5 }

/* Signature section */
.sig-wrap {
  max-width: 720px; margin: 20px auto 0; padding: 0 16px 40px;
}
.sig-header {
  text-align: center; padding: 28px 0 20px;
}
.sig-header-eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: var(--brand); margin-bottom: 6px }
.sig-header-title   { font-size: 26px; font-weight: 900; color: var(--ink); letter-spacing: -.03em; margin-bottom: 8px }
.sig-header-sub     { font-size: 14px; color: var(--muted-l); line-height: 1.6; max-width: 380px; margin: 0 auto }

.sig-body {
  background: #fff; border-radius: var(--r); border: 1.5px solid var(--light-bd);
  box-shadow: 0 2px 16px rgba(26,30,46,.08); padding: 20px;
}

/* Step indicators */
.sig-steps   { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--light-bd); padding-bottom: 14px }
.sig-step    { flex: 1; text-align: center; opacity: .4 }
.sig-step.active { opacity: 1 }
.sig-step.done   { opacity: .65 }
.sig-step-n      { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; color: var(--brand); margin-bottom: 2px }
.sig-step-lbl    { font-size: 12px; font-weight: 700; color: var(--ink) }
.sig-step.active .sig-step-lbl { color: var(--brand) }

/* Name input */
.sig-input-lbl { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-xs); margin-bottom: 6px }
.sig-input {
  width: 100%; height: 48px; padding: 0 14px;
  border-radius: var(--r2); border: 1.5px solid var(--light-bd);
  background: #fff; font-family: inherit; font-size: 16px; font-weight: 600;
  color: var(--ink); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.sig-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow) }

/* Canvas */
.canvas-container { }
.canvas-wrap {
  position: relative; border: 2px solid var(--light-bd);
  border-radius: var(--r2); overflow: hidden; background: #fff;
  cursor: crosshair; transition: border-color .15s;
}
.canvas-wrap:hover       { border-color: var(--brand) }
.canvas-wrap.has-sig     { border-color: #16a34a }
#sigCanvas               { display: block; width: 100%; touch-action: none }
.canvas-placeholder      { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; pointer-events: none; transition: opacity .2s }
.canvas-placeholder.hidden { opacity: 0 }
.canvas-ph-icon { font-size: 32px; opacity: .35 }
.canvas-ph-txt  { font-size: 13px; color: var(--muted-l); font-weight: 600 }
.canvas-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px }
.canvas-clear {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--r3);
  border: 1.5px solid var(--light-bd); background: transparent;
  font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--muted-l); cursor: pointer; transition: all .12s;
}
.canvas-clear svg    { width: 12px; height: 12px }
.canvas-clear:hover  { border-color: var(--red); color: var(--red) }
.canvas-hint         { font-size: 11px; color: var(--muted-xs) }

/* Confirm block */
.confirm-block { background: #f8f9fb; border: 1px solid var(--light-bd); border-radius: var(--r2); padding: 12px 14px; margin-bottom: 14px }
.confirm-row   { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--bd2); font-size: 12px }
.confirm-row:last-child { border-bottom: none }
.confirm-lbl   { color: var(--muted-l); font-weight: 600 }
.confirm-val   { font-weight: 700; color: var(--ink); text-align: right; font-family: var(--font-mono); font-size: 11px }

/* Approved banner */
.approved-banner {
  max-width: 720px; margin: 20px auto 0; padding: 28px 20px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #6ee7b7; border-radius: var(--r);
  text-align: center;
}
.approved-icon  { font-size: 52px; display: block; margin-bottom: 12px }
.approved-title { font-size: 26px; font-weight: 900; color: #065f46; margin-bottom: 6px; letter-spacing: -.03em }
.approved-sub   { font-size: 15px; color: #047857; margin-bottom: 8px; line-height: 1.5 }
.approved-meta  { font-size: 12px; color: #6b7280; font-family: var(--font-mono); margin-bottom: 4px }

/* Star rating */
.star-btn {
  font-size: 28px; background: none; border: none;
  cursor: pointer; opacity: .4; transition: opacity .15s, transform .15s;
  padding: 4px;
}
.star-btn.lit { opacity: 1 }
.star-btn:hover { transform: scale(1.2) }

/* Print overrides */
@media print {
  body { background: #fff !important; visibility: visible !important }
  .greeting, .actions-card, .options-bar, .sig-wrap, .approved-banner { display: none !important }
  .paper { border-radius: 0; box-shadow: none }
  .paper-wrap { padding: 0; margin: 0 }
}

/* ── Quote status badge — approved variant ──────────────────── */
.qt-badge.approved { background: #f0fdf4; color: #166534; border: 1px solid #86efac }
