/* ==========================================================================
   The Moto Art — shared styles for the public site (index.html), the
   owner dashboard (admin.html) and setup (install.php).
   Black + gold, taken from the wolf logo. Mobile first; dark by default.
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg: #09090a;
  --bg-2: #0e0e10;
  --surface: #141416;
  --surface-2: #1b1b1e;
  --surface-3: #242428;
  --line: #262629;
  --line-2: #36363b;
  --text: #f4f0e8;
  --muted: #a09b91;
  --brand: #f5a524;
  --brand-2: #ffcb6b;
  --brand-ink: #1a1100;
  --info: #7cb8ff;
  --wa: #25d366;
  --wa-ink: #04220f;
  --amber: #f5a524;
  --green: #5ad58a;
  --red: #ff7a72;
  --violet: #f5a524;
  --glow: rgba(245, 165, 36, .16);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 48px -28px rgba(0, 0, 0, .85);
  --header-bg: rgba(9, 9, 10, .72);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f4ee;
  --bg-2: #efeae0;
  --surface: #ffffff;
  --surface-2: #f5f1e9;
  --surface-3: #ebe5d9;
  --line: #e5dfd3;
  --line-2: #d4ccbc;
  --text: #141413;
  --muted: #6a655b;
  --brand: #a35f00;
  --brand-2: #d98a0b;
  --brand-ink: #1a1100;
  --info: #1d66c2;
  --wa: #128c4b;
  --wa-ink: #ffffff;
  --amber: #b86b00;
  --green: #17803f;
  --red: #c62f28;
  --violet: #a35f00;
  --glow: rgba(245, 165, 36, .22);
  --shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 18px 40px -26px rgba(40, 30, 10, .28);
  --header-bg: rgba(247, 244, 238, .8);
  color-scheme: light;
}

:root {
  --gold: linear-gradient(135deg, #ffd88a 0%, #f5a524 48%, #d9860b 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Saira", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-family: var(--font-display); font-weight: 700; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
code { font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* logo images swap with the theme */
:root:not([data-theme="light"]) .only-light,
[data-theme="light"] .only-dark { display: none !important; }

/* spacing scale — every gap on the site comes from these, so the rhythm stays even
   from a 320px phone to a wide desktop */
:root {
  --gutter: clamp(14px, 4vw, 26px);
  --sp-section: clamp(54px, 8vw, 96px);
  --sp-head: clamp(26px, 4vw, 44px);
  --sp-card: clamp(18px, 2.6vw, 24px);
  --gap: clamp(12px, 1.8vw, 18px);
}

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wa-icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .74em 1.2em; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer;
  background: var(--surface-2); color: var(--text);
  transition: transform .15s ease, filter .15s ease, background .15s ease, border-color .15s ease, box-shadow .2s ease;
  text-decoration: none; white-space: nowrap; line-height: 1.2;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .icon-btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
.btn-primary { background: var(--gold); color: #1a1100; box-shadow: 0 10px 26px -12px rgba(245, 165, 36, .7); }
.btn-primary:hover { box-shadow: 0 14px 30px -12px rgba(245, 165, 36, .85); }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); background: var(--surface-2); filter: none; }
.btn-danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.btn-amber { background: var(--gold); color: #1a1100; }
.btn-green { background: var(--green); color: #03240f; }
.btn-sm { padding: .5em .85em; font-size: .82rem; border-radius: 10px; }
.btn-lg { padding: .95em 1.5em; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .ico { width: 1.1em; height: 1.1em; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; padding: 0;
  display: inline-grid; place-items: center; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text); cursor: pointer; font-size: 1.05rem;
  transition: border-color .15s ease;
}
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn .ico { width: 18px; height: 18px; }

/* ---------- forms ---------- */
.field { display: grid; gap: .4rem; }
.field label { font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
input, select, textarea {
  width: 100%; min-width: 0; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .72em .9em; min-height: 46px; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--brand) 70%, var(--line)); box-shadow: 0 0 0 4px var(--glow); outline: none; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }

/* ---------- cards / chips / badges ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-card); box-shadow: var(--shadow);
}
.chip {
  display: inline-flex; align-items: center; gap: .45em; padding: .38em .85em; border-radius: 999px;
  font: inherit; font-size: .8rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}
.badge {
  display: inline-flex; align-items: center; gap: .35em; padding: .25em .65em; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
}
.b-wait { background: color-mix(in srgb, var(--amber) 15%, transparent); color: var(--amber); }
.b-wash { background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
.b-done { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.b-due  { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.b-gift { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .75em;
  color: var(--brand); font-weight: 600; letter-spacing: .24em; text-transform: uppercase; font-size: .72rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .7; }
.center .eyebrow, .section-head .eyebrow { justify-content: center; }
.grad { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .grad { background: linear-gradient(135deg, #c27600, #8a4f00); -webkit-background-clip: text; background-clip: text; }

/* ==========================================================================
   PUBLIC SITE
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 12px; }
.logo { display: flex; align-items: center; gap: .7rem; color: var(--text); min-width: 0; }
.logo img { height: 42px; width: auto; }
.logo-text { display: grid; line-height: 1; }
.logo-text b {
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.12rem;
  text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
}
.logo-text small { font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: var(--brand); margin-top: 5px; white-space: nowrap; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; overflow: hidden;
  background: #0d0d0e; border: 1px solid rgba(245, 165, 36, .35);
}
.logo-mark img { width: 86%; height: auto; }
.nav-links { display: none; gap: 30px; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .92rem; position: relative; padding: 6px 0; transition: color .15s ease; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--brand); transform: scaleX(0); transition: transform .2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: inline-grid; }
.nav-actions .btn-wa span { display: none; }
@media (min-width: 520px) { .nav-actions .btn-wa span { display: inline; } }
@media (min-width: 980px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}
.mobile-menu { display: none; border-top: 1px solid var(--line); padding: 8px 16px 18px; background: var(--bg); }
.mobile-menu.open { display: grid; }
.mobile-menu a { padding: 14px 4px; color: var(--text); border-bottom: 1px solid var(--line); font-weight: 500; }
.mobile-menu a:last-child { border-bottom: 0; color: var(--muted); }

/* hero */
.hero { position: relative; padding: clamp(26px, 4.5vw, 72px) 0 clamp(40px, 6.5vw, 84px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 45% at 76% 38%, var(--glow), transparent 72%);
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 70% at 70% 40%, #000 10%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 70% 40%, #000 10%, transparent 75%);
}
.hero-grid { display: grid; gap: clamp(22px, 3.5vw, 40px); align-items: center; }
.hero-copy { position: relative; }
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5.2rem); font-weight: 800; font-style: italic; text-transform: uppercase;
  letter-spacing: -.01em; line-height: .98; margin: 18px 0 22px;
}
.hero p.lead { font-size: 1.12rem; color: var(--text); max-width: 540px; margin-bottom: .6em; }
.hero p.lead-sm { font-size: .98rem; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: clamp(22px, 3.4vw, 32px) 0 clamp(24px, 3.8vw, 34px); }
@media (max-width: 519px) { .hero-copy .hero-cta .btn { flex: 1 1 100%; } }
.hero-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 16px clamp(22px, 4vw, 34px); padding-top: clamp(20px, 3vw, 26px); border-top: 1px solid var(--line); max-width: 560px; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.hero-stats strong small { font-size: .55em; color: var(--muted); margin-left: 3px; font-weight: 600; }
.hero-stats > div > span { color: var(--muted); font-size: .8rem; }
.hero-tiers { font-size: 1rem !important; line-height: 1.35 !important; padding-top: 4px; }
.hero-tiers span { display: block; white-space: nowrap; }
@media (max-width: 519px) { .hero-stats { grid-template-columns: 1fr 1fr; } .hero-stats > div:last-child { grid-column: 1 / -1; } }

.hero-emblem { position: relative; width: min(78vw, 360px); margin: 6px auto 0; aspect-ratio: 1; display: grid; place-items: center; }
.hero-emblem img { position: relative; width: 86%; height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .45)); }
.emblem-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.emblem-ring::before {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(245, 165, 36, .9) 88%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: spin 9s linear infinite;
}
.emblem-ring::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1px dashed var(--line-2); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 40px; }
  .hero-emblem { width: 100%; max-width: 470px; margin: 0 0 0 auto; }
}
@media (max-width: 959px) { .hero-emblem { order: -1; } }

/* live status strip */
.live-section { padding: 0 0 8px; margin-top: -18px; position: relative; z-index: 2; }
.live-panel {
  display: grid; gap: 16px; padding: 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.live-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-head strong { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .02em; }
.live-head .muted { margin-left: auto; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1.8s infinite; display: inline-block; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.live-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.live-num { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.live-num strong { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.live-num span { font-size: .74rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.live-num.n-wait strong { color: var(--amber); }
.live-num.n-wash strong { color: var(--info); }
.live-num.n-done strong { color: var(--green); }
.now-washing {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, transparent), transparent 80%);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
}
.token-big { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; font-style: italic; color: var(--brand); min-width: 64px; line-height: 1; }
.now-washing strong { display: block; }
.now-washing p { margin: 2px 0 0; }
.live-err { color: var(--red); margin: 0; }
@media (min-width: 960px) {
  .live-panel { grid-template-columns: auto 1fr 1.1fr; align-items: center; gap: 22px; padding: 18px 22px; }
  .live-head { flex-direction: column; align-items: flex-start; gap: 4px; padding-right: 8px; }
  .live-head .muted { margin-left: 0; }
  .live-err { grid-column: 1 / -1; }
}

/* marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: clamp(12px, 1.8vw, 16px) 0; background: var(--bg-2); }
.marquee-track { display: flex; gap: 42px; width: max-content; animation: marquee 32s linear infinite; }
.marquee span {
  font-family: var(--font-display); font-style: italic; font-weight: 700; text-transform: uppercase;
  font-size: 1.05rem; letter-spacing: .08em; color: var(--muted); display: inline-flex; align-items: center; gap: 42px; white-space: nowrap;
}
.marquee span::after { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--brand); }
.marquee span.hl { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* sections */
section { padding: var(--sp-section) 0; }
.section-head { max-width: 680px; margin: 0 auto var(--sp-head); text-align: center; }
.section-head h2, .sec-title {
  font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; font-style: italic; text-transform: uppercase; line-height: 1.02; margin: 14px 0 14px;
}
.section-head p { margin: 0; }
.alt { background: var(--bg-2); border-block: 1px solid var(--line); }

/* track my car */
.track-form {
  display: flex; gap: 8px; flex-wrap: wrap; max-width: 640px; margin: 0 auto 26px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.track-form input { flex: 1 1 220px; min-height: 52px; font-size: 1.02rem; border: 0; background: transparent; padding-inline: 1em; }
.track-form input:focus { box-shadow: none; }
.track-form:focus-within { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); box-shadow: 0 0 0 4px var(--glow); }
.track-form .btn { min-height: 52px; padding-inline: 1.6em; flex: 1 1 auto; }
@media (min-width: 520px) { .track-form .btn { flex: 0 0 auto; } }
.track-result { max-width: 800px; margin: 0 auto; display: grid; gap: 16px; }
.status-card { display: grid; gap: 18px; }
.status-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.status-token {
  width: 94px; height: 94px; border-radius: 22px; display: grid; place-items: center; text-align: center; flex: none;
  background: #0d0d0e; color: #f4f0e8; border: 1px solid rgba(245, 165, 36, .45);
  box-shadow: inset 0 0 30px rgba(245, 165, 36, .12);
}
.status-token small { display: block; font-size: .62rem; color: #f5a524; letter-spacing: .24em; text-transform: uppercase; }
.status-token strong { font-family: var(--font-display); font-style: italic; font-size: 2.4rem; line-height: 1; }
.status-card h3 { font-size: 1.3rem; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.progress div { height: 6px; border-radius: 99px; background: var(--surface-3); }
.progress div.on { background: var(--gold); }
.progress-labels { display: grid; grid-template-columns: repeat(3, 1fr); font-size: .74rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 8px; }
.progress-labels span:nth-child(2) { text-align: center; }
.progress-labels span:last-child { text-align: right; }

/* queue board */
.board { display: grid; gap: var(--gap); }
@media (min-width: 760px) { .board { grid-template-columns: repeat(3, 1fr); } }
.board-col h3 { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 1.05rem; letter-spacing: .02em; margin-bottom: 16px; }
.board-col h3 > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-wait { background: var(--amber); }
.dot-wash { background: var(--info); box-shadow: 0 0 0 4px color-mix(in srgb, var(--info) 20%, transparent); }
.dot-done { background: var(--green); }
.token-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; }
.token-pill {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 78px; padding: 9px 12px;
  border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line);
}
.token-pill strong { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.2; }
.token-pill span { font-size: .66rem; color: var(--muted); letter-spacing: .05em; }
.token-pill.wash { border-color: color-mix(in srgb, var(--info) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info) 14%, transparent); }
.token-pill.wash strong { color: var(--info); }
.token-pill.done strong { color: var(--green); }
.token-pill.more { border-style: dashed; }
.token-pill.more strong { color: var(--muted); }
.empty { color: var(--muted); font-size: .9rem; padding: 12px 0; }

/* services */
.services { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.service { display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; min-height: 170px; transition: transform .25s ease, border-color .25s ease; }
.service::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(80% 60% at 100% 0%, var(--glow), transparent 70%);
}
.service:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.service:hover::before { opacity: 1; }
.svc-no { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: .95rem; color: var(--brand); letter-spacing: .08em; margin-bottom: 18px; }
.service h3 { font-size: 1.35rem; text-transform: uppercase; font-style: italic; font-weight: 700; margin: 0; }
.svc-stamp { font-size: .8rem; color: var(--muted); margin: 4px 0 0; }
.svc-inc { margin-top: 16px; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--brand); }
.svc-details { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 7px; }
.svc-details li { position: relative; padding-left: 18px; font-size: .85rem; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.svc-details li::before {
  content: ""; position: absolute; left: 0; top: .52em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
}
.price-pair { display: flex; gap: 28px; margin-top: auto; padding-top: 18px; }
.price-pair span { display: block; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.price-pair b { font-family: var(--font-display); font-size: 1.85rem; font-weight: 700; line-height: 1; }
/* 4 Wheeler / 2 Wheeler switch above the service cards */
.veh-chips { justify-content: center; margin-bottom: 26px; }
.veh-chips .chip { cursor: pointer; font-size: .9rem; padding: .5em 1.1em; }
.svc-none { grid-column: 1 / -1; margin: 0; }
/* stands in for the prices when the owner hides them from the website */
.svc-ask { margin-top: auto; padding-top: 18px; }
.svc-ask span { display: block; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.svc-ask b { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; font-weight: 700; line-height: 1; color: var(--brand); }

/* book a slot */
.book-section { position: relative; overflow: hidden; isolation: isolate; background: var(--bg-2); border-block: 1px solid var(--line); }
.book-section::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 88% 0%, var(--glow), transparent 70%);
}
.book-grid { display: grid; gap: clamp(24px, 4vw, 52px); align-items: start; }
@media (min-width: 960px) { .book-grid { grid-template-columns: .95fr 1.05fr; align-items: center; } }
.book-copy h2 {
  font-size: clamp(1.75rem, 4.2vw, 2.5rem); font-style: italic; text-transform: uppercase;
  font-weight: 800; margin: 14px 0 16px;
}
.book-copy p { max-width: 46ch; margin-bottom: 0; }
.book-steps { list-style: none; margin: clamp(22px, 3vw, 30px) 0 0; padding: 0; display: grid; gap: 14px; }
.book-steps li { display: flex; gap: 14px; align-items: flex-start; }
.book-steps li > span {
  flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent);
}
.book-steps b { display: block; font-weight: 600; font-size: .98rem; }
.book-steps small { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.book-card { display: grid; gap: var(--gap); align-content: start; }
.book-row { display: grid; gap: var(--gap); }
@media (min-width: 520px) { .book-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.veh-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.veh-seg label { display: flex; align-items: center; justify-content: center; gap: .4em; padding: .72em .5em; font-size: .95rem; }
/* beats the dashboard's generic .seg rule, which comes later in this file */
.book-card .veh-seg label:has(input:checked) {
  background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent);
}
.time-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.time-chips .chip { cursor: pointer; }
.time-chips .chip.active { background: var(--gold); color: #1a1100; border-color: transparent; }
.book-note { margin: 0; text-align: center; }
.book-err { margin: 0; text-align: center; color: var(--red); font-weight: 600; }
/* after a booking is sent, the card shows only the confirmation */
.book-card.is-done > :not(.book-done) { display: none; }
.book-card:not(.is-done) > .book-done { display: none; }
.book-done { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 14px 0 2px; }
.book-done:focus { outline: none; }
.book-done-ico {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 700;
  color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
}
.book-done h3 { margin: 0; font-size: 1.4rem; font-style: italic; text-transform: uppercase; }
.book-done p { margin: 0; max-width: 42ch; }

/* loyalty */
.loyalty { position: relative; overflow: hidden; }
.loyalty-grid { display: grid; gap: clamp(28px, 4.5vw, 44px); align-items: center; }
@media (min-width: 960px) { .loyalty-grid { grid-template-columns: 1fr 1.05fr; gap: 64px; } }
.loyalty-grid .sec-title { margin-top: 14px; }
.tiers { display: grid; gap: 12px; margin: 26px 0; }
.tier {
  display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative;
}
.tier + .tier::before { content: ""; position: absolute; left: 44px; top: -13px; width: 1px; height: 12px; background: var(--line-2); }
.tier-ico {
  width: 56px; height: 56px; flex: none; border-radius: 16px; display: grid; place-items: center;
  background: #0d0d0e; color: #f5a524; border: 1px solid rgba(245, 165, 36, .4);
}
.tier-ico .ico { width: 30px; height: 30px; stroke-width: 1.5; }
.tier-at { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brand); font-weight: 600; }
.tier-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; font-style: italic; text-transform: uppercase; line-height: 1.15; }
.tier-note { font-size: .8rem; color: var(--muted); }
.mini-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.mini-steps li { display: flex; gap: 12px; align-items: baseline; color: var(--muted); font-size: .92rem; }
.mini-steps li::before {
  counter-increment: s; content: "0" counter(s); font-family: var(--font-display); font-style: italic; font-weight: 700; color: var(--brand); font-size: .9rem;
}
.mini-steps b { color: var(--text); font-weight: 600; }
.demo-note { margin-top: 12px; }

/* stamp card — always a black member card, in both themes */
.stampcard {
  container-type: inline-size;
  position: relative; overflow: hidden; border-radius: 24px; padding: 22px; color: #f4f0e8; isolation: isolate;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(245, 165, 36, .2), transparent 55%),
    radial-gradient(70% 60% at 0% 100%, rgba(245, 165, 36, .08), transparent 60%),
    linear-gradient(160deg, #1d1c19 0%, #0c0c0d 62%);
  border: 1px solid rgba(245, 165, 36, .38);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.stampcard::before {
  content: ""; position: absolute; z-index: -1; right: -30px; top: -40px; width: 230px; height: 200px; opacity: .05;
  background: url("../img/mark-dark.png") center / contain no-repeat;
}
.stampcard-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sc-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sc-brand img { width: 44px; height: auto; flex: none; }
.sc-name { font-family: var(--font-display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.08rem; letter-spacing: .02em; line-height: 1.1; }
.sc-sub, .sc-label { font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: #f5a524; font-weight: 600; }
.sc-label { color: rgba(244, 240, 232, .5); margin-bottom: 3px; }
.sc-count { text-align: right; font-family: var(--font-display); line-height: 1; white-space: nowrap; }
.sc-count strong { font-size: 2.4rem; font-weight: 800; font-style: italic; color: #f5a524; }
.sc-count span { font-size: 1rem; color: rgba(244, 240, 232, .55); margin-left: 2px; }
.stamps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 20px 0; }
@container (min-width: 470px) { .stampcard .stamps { grid-template-columns: repeat(10, 1fr); gap: 9px; } }
.stamp {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; min-width: 0;
  border: 1.5px dashed rgba(244, 240, 232, .2); color: rgba(244, 240, 232, .32); font-size: .7rem; font-weight: 600;
}
.stamp i { font-style: normal; }
.stamp .ico { width: 56%; height: 56%; stroke-width: 1.7; }
.stamp.filled {
  border: 0; color: #1a1100; transform: rotate(-8deg);
  background: radial-gradient(circle at 32% 28%, #ffe2a3, #f5a524 52%, #c97a06);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2), 0 6px 14px -6px rgba(245, 165, 36, .7);
}
.stamp.filled .ico { stroke-width: 2.4; }
.stamp.gift { border: 1.5px solid rgba(245, 165, 36, .8); color: #f5a524; background: rgba(245, 165, 36, .08); }
.stamp.gift .ico { width: 62%; height: 62%; stroke-width: 1.5; }
.stamp.gift.filled { border: 0; color: #1a1100; background: radial-gradient(circle at 32% 28%, #ffe2a3, #f5a524 52%, #c97a06); box-shadow: 0 0 0 3px rgba(245, 165, 36, .3), 0 8px 18px -6px rgba(245, 165, 36, .8); transform: none; }
.stampcard-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 20px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid rgba(244, 240, 232, .1); font-size: .9rem; }
.sc-member { font-weight: 600; letter-spacing: .02em; }
.sc-next { text-align: right; }
.sc-next > div:last-child { display: inline-flex; align-items: center; gap: 8px; }
.sc-next .ico { color: #f5a524; width: 20px; height: 20px; }
.reward-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; margin-top: 14px; font-size: .92rem;
  background: linear-gradient(135deg, rgba(245, 165, 36, .22), rgba(245, 165, 36, .08));
  border: 1px solid rgba(245, 165, 36, .5); color: inherit;
}
.reward-banner > .ico { width: 26px; height: 26px; color: #f5a524; flex: none; }
.reward-banner .btn { margin-left: auto; }
.reward-banner.center { justify-content: center; }
.stamps-plain { grid-template-columns: repeat(10, 1fr); gap: 5px; margin: 0; }
.stamps-plain .stamp { border-color: var(--line-2); color: var(--muted); font-size: .6rem; border-width: 1px; }
.stamps-plain .stamp.filled { transform: none; box-shadow: none; }
.stamps-plain .stamp.gift:not(.filled) { border-color: color-mix(in srgb, var(--brand) 70%, transparent); color: var(--brand); background: transparent; }
.stamps-plain .stamp.gift.filled { color: #1a1100; box-shadow: none; }

/* dashboard stamp meter with reward markers */
.meter { position: relative; height: 6px; border-radius: 99px; background: var(--surface-3); margin: 10px 9px 4px 0; max-width: 280px; }
.meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--gold); }
.meter-tick {
  position: absolute; top: 50%; width: 20px; height: 20px; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted);
}
.meter-tick .ico { width: 12px; height: 12px; }
.meter-tick.on { background: #f5a524; border-color: #f5a524; color: #1a1100; }

/* contact */
.contact-grid { display: grid; gap: var(--gap); align-items: stretch; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.05fr .95fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list strong { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-list li > div > div { font-size: 1.02rem; color: var(--text); }
.contact-list .ci {
  width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--brand);
}
.contact-list .ci .ico { width: 20px; height: 20px; }
.card h3 { font-size: 1.25rem; }
.map-card { padding: 0; overflow: hidden; }
.map-card iframe { display: block; width: 100%; height: 100%; min-height: 300px; border: 0; }
[data-theme="dark"] .map-card iframe, :root:not([data-theme="light"]) .map-card iframe { filter: grayscale(.35) contrast(1.05); }

/* footer */
.site-footer { padding: clamp(40px, 6vw, 62px) 0 clamp(72px, 9vw, 100px); border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; background: var(--bg-2); }
.footer-grid { display: grid; gap: clamp(20px, 3vw, 30px); }
.footer-brand img { width: 180px; height: auto; margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1fr auto; align-items: center; } }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .6);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

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

/* ==========================================================================
   ADMIN DASHBOARD
   ========================================================================== */
.admin-body { padding-bottom: 84px; }
.topbar {
  position: sticky; top: 0; z-index: 40; background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 66px; }
.topbar .date { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.topbar .logo-text b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; }
.topbar .logo-text { min-width: 0; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tab-btn {
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
  background: transparent; color: var(--muted); border: 0; padding: .55em 1em; border-radius: 10px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--surface-3); color: var(--text); }
.tabs-desktop { display: none; }
@media (min-width: 960px) {
  .tabs-desktop { display: flex; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs-desktop::-webkit-scrollbar { display: none; }
  .tabs-desktop .tab-btn { white-space: nowrap; }
  .topbar .wrap > div:first-child { flex: 0 0 auto; }   /* the shop name keeps its room */
  .admin-body { padding-bottom: 30px; }
}
@media (min-width: 960px) and (max-width: 1120px) { .tabs-desktop .tab-btn { padding: .55em .7em; font-size: .82rem; } }

.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 45; display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav .tab-btn { display: grid; justify-items: center; gap: 2px; padding: 9px 4px; border-radius: 0; font-size: .7rem;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-nav .tab-btn .i { font-size: 1.2rem; }
.bottom-nav .tab-btn.active { background: transparent; color: var(--brand); }
@media (min-width: 960px) { .bottom-nav { display: none; } }
/* number of new booking queries on the Queries tab */
.tab-count {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .45em; margin-left: .4em;
  border-radius: 999px; background: var(--gold); color: #1a1100; font-size: .7rem; font-weight: 800; line-height: 1; vertical-align: 1px;
}
.tab-count:empty { display: none; }
.bottom-nav .tab-btn { position: relative; }
.bottom-nav .tab-count { position: absolute; top: 4px; left: 50%; margin-left: 7px; font-size: .62rem; }

.panel { padding: clamp(18px, 3vw, 30px) 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.panel-head h2 { margin: 0; font-size: 1.7rem; font-style: italic; text-transform: uppercase; font-weight: 800; }

.stats { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 16px 18px; }
.stat span { color: var(--muted); font-size: .78rem; font-weight: 500; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(1.3rem, 5.2vw, 1.85rem); font-weight: 700; margin-top: 2px; line-height: 1.2; white-space: nowrap; }
.stat.s-wait strong { color: var(--amber); }
.stat.s-wash strong { color: var(--info); }
.stat.s-done strong { color: var(--green); }
.stat.s-red strong { color: var(--red); }

.kanban { display: grid; gap: 16px; }
@media (min-width: 1000px) { .kanban { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 12px; font-weight: 700; font-family: var(--font-display); letter-spacing: .02em; }
.col-list { display: grid; gap: 10px; }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.filter-chips .chip { cursor: pointer; white-space: nowrap; }
.filter-chips .chip.active { background: var(--gold); color: #1a1100; border-color: transparent; }
@media (max-width: 999px) {
  .kanban[data-filter="waiting"] .col:not([data-col="waiting"]),
  .kanban[data-filter="washing"] .col:not([data-col="washing"]),
  .kanban[data-filter="done"] .col:not([data-col="done"]) { display: none; }
}
@media (min-width: 1000px) { .filter-chips.queue-filter { display: none; } }

.job { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.job.st-washing { border-color: color-mix(in srgb, var(--info) 55%, var(--line)); }
.job-head { display: flex; align-items: flex-start; gap: 12px; }
.job-token {
  width: 54px; height: 54px; flex: none; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.2rem; background: var(--surface-2); border: 1px solid var(--line);
}
.st-washing .job-token { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.st-done .job-token { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.job-plate { font-weight: 700; letter-spacing: .05em; }
.job-meta { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.job-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.job-actions .btn { flex: 1 1 auto; }
.job-actions .btn[aria-label] { flex: 0 0 auto; }
.job-note { font-size: .82rem; background: var(--surface-2); padding: 8px 10px; border-radius: 10px; }

/* drawer form */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); display: none; }
.drawer-backdrop.open { display: block; }
.drawer {
  position: fixed; z-index: 61; inset: auto 0 0 0; max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-top: 1px solid var(--line); border-top-left-radius: 24px; border-top-right-radius: 24px;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease;
}
.drawer.open { transform: none; }
@media (min-width: 760px) {
  .drawer { inset: 0 0 0 auto; width: 480px; max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--line); transform: translateX(105%); padding: 26px; }
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drawer-head h3 { margin: 0; font-size: 1.3rem; }
.suggest { font-size: .8rem; margin-top: 4px; }
.suggest b { color: var(--brand); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 70; display: none; place-items: center; padding: 16px; background: rgba(0, 0, 0, .7); }
.modal.open { display: grid; }
.modal-card { width: min(460px, 100%); max-height: 90vh; overflow-y: auto; }
.modal-card .big-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; margin: 0 auto 10px; background: color-mix(in srgb, var(--green) 16%, transparent); }
.preview { white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: .85rem; margin: 12px 0; max-height: 220px; overflow-y: auto; }
.modal-actions { display: grid; gap: 8px; }
/* payment at the end: amount + Cash / UPI / Card */
.pay-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.pay-form { display: grid; gap: 12px; }
/* .seg.pay-modes: beats the generic .seg rules further down */
.seg.pay-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.pay-modes label { padding: .7em .4em; }
.seg.pay-modes label:has(input:checked) {
  background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent);
}
.pay-done { margin: 0 0 10px; text-align: center; color: var(--green); font-weight: 600; }

/* customers */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input, .toolbar select { flex: 1 1 200px; width: auto; }
.cust-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cust { display: grid; gap: 12px; align-content: start; }
.cust-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cust-top > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.cust-top h4 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.cust-count { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--brand); white-space: nowrap; }

/* credit book: the client's balance */
.bal { text-align: right; white-space: nowrap; flex: none; font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; line-height: 1.1; }
.bal span { display: block; font-family: var(--font-body); font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.bal-due { color: var(--amber); }
.bal-clear { color: var(--green); }
.bal-adv { color: var(--info); }
.cust .reward-banner { color: var(--text); border-color: color-mix(in srgb, var(--brand) 50%, transparent); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.cust .reward-banner > .ico { color: var(--brand); }
.bk-new { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }

/* account book */
.acc-layout { display: grid; gap: var(--gap); }
@media (min-width: 1000px) { .acc-layout { grid-template-columns: 360px minmax(0, 1fr); align-items: start; } }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.seg label { position: relative; text-align: center; padding: .55em; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--muted); }
/* hidden radios: 1px, not the inherited width:100%, or they stretch the page sideways */
.seg input { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface-2); color: var(--text); }
.seg label.inc:has(input:checked) { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.seg label.exp:has(input:checked) { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.amt { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.inc { color: var(--green); }
td.exp { color: var(--red); }
th.amt { text-align: right; }

/* settings */
.settings-grid { display: grid; gap: var(--gap); }
@media (min-width: 1000px) { .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.price-card { max-width: 760px; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.price-row > :first-child { grid-column: 1 / -1; }
.price-head { font-size: .74rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin-bottom: 6px; }
@media (min-width: 640px) {
  .price-row { grid-template-columns: minmax(0, 1fr) 130px 130px 40px; gap: 10px; }
  .price-row > :first-child { grid-column: auto; }
}
.svc-row { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.svc-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.svc-row .svc-detail-box { grid-column: 1 / -1; resize: vertical; line-height: 1.5; }
.reward-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 40px; gap: 8px; margin-bottom: 10px; align-items: center; }
.reward-row .rw-icon { grid-column: 1 / 2; }
.reward-row .rw-cost { grid-column: 2 / 3; }
.reward-row .icon-btn { grid-row: 1; grid-column: 3; }
@media (min-width: 641px) { .reward-row { grid-template-columns: 74px minmax(0, 1fr) 110px 90px 40px; } .reward-row .rw-icon, .reward-row .rw-cost, .reward-row .icon-btn { grid-column: auto; grid-row: auto; } }
.hint { font-size: .78rem; color: var(--muted); }
.hint code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .76rem; }

/* pin gate */
.gate {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(60% 50% at 50% 30%, var(--glow), transparent 70%);
}
.gate .card { width: min(400px, 100%); text-align: center; padding: 30px 26px; }
.gate-logo { width: 150px; height: auto; margin: 0 auto 14px; }
.pin-input { text-align: center; font-size: 1.6rem; letter-spacing: .5em; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 90;
  background: var(--text); color: var(--bg); padding: .75em 1.25em; border-radius: 12px; font-weight: 600; font-size: .9rem;
  opacity: 0; transition: .25s ease; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 30px; } }

/* print — day book */
@media print {
  .topbar, .bottom-nav, .no-print, .acc-form, .drawer, .modal, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .table-wrap { box-shadow: none; border-color: #ccc; background: #fff; }
  .panel { display: block !important; }
  .panel[data-panel]:not([data-panel="accounts"]) { display: none !important; }
  .acc-layout { grid-template-columns: 1fr; }
}

/* phones: table rows fold into blocks — date and amount on top, details underneath */
@media (max-width: 560px) {
  .table-wrap thead { display: none; }
  .table-wrap tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 10px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap td { display: block; border: 0; padding: 0; }
  .table-wrap td.hide-sm { display: none; }   /* block above must not un-hide it */
  .table-wrap td:first-child { font-size: .78rem; color: var(--muted); }
  .table-wrap td.amt { grid-column: 2; grid-row: 1; }
  .table-wrap td:last-child { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .table-wrap td:nth-child(2) { grid-column: 1 / span 2; }
  .table-wrap td[colspan] { grid-column: 1 / -1; text-align: center; padding: 22px 0; }
}

/* very small phones (≤ 400px): step the big numbers and the nav labels down */
@media (max-width: 400px) {
  .bal { font-size: 1.35rem; }
  .bottom-nav .tab-btn { font-size: .6rem; padding: 8px 2px; }
  .bottom-nav .tab-btn .i { font-size: 1.05rem; }
  .panel-head h2 { font-size: 1.45rem; }
}

/* nothing may force the page sideways */
.job-plate, .job-note, .cust-top h4, .muted, .hint { overflow-wrap: anywhere; }
.toolbar input, .toolbar select { min-width: 0; }

/* account table on phones: mode folds into the details cell */
.show-sm { display: none; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .show-sm { display: block; }
  th, td { padding: 10px 8px; }
}
