/* Lamaa — RTL styles for the website and dashboards (no build step). */
:root {
  --paper: #F4F6F7;
  --surface: #FFFFFF;
  --ink: #0E1B2C;
  --ink-2: #33414F;
  --muted: #55626F;
  --line: #E1E6EA;
  --line-strong: #CBD3DA;
  --line-soft: #EEF1F4;
  --teal: #0A7C74;
  --teal-dark: #075E58;
  --teal-deep: #053F3B;
  --tint: #E3F3F1;
  --tint-2: #EFF8F7;
  --amber: #F2B33D;
  --amber-tint: #FFF4DC;
  --amber-line: #F0D79C;
  --amber-ink: #5C4A1E;
  --red: #B42318;
  --red-tint: #FDECEA;
  --navy: #0E1B2C;
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --display: 'Reem Kufi', 'IBM Plex Sans Arabic', sans-serif;
  --focus: 0 0 0 3px rgba(10, 124, 116, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.65; }
img, svg { display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.3; letter-spacing: 0; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; font-family: var(--font); font-weight: 700; }
p { margin: 0; }
small, .muted { color: var(--muted); }
.num { font-weight: 700; font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ================= Dashboard layout ================= */
.layout { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 250px; max-width: 100%; background: var(--surface); border-left: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; }
.sidebar.dark { background: var(--navy); color: #fff; border-left: 0; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 56px; }
.container { max-width: 1120px; margin-inline: auto; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) {
  .sidebar { max-width: 260px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}

.brand { display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px; font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.brand .icon { width: 26px; height: 26px; color: var(--teal); stroke-width: 2; }
.brand:hover { color: var(--ink); }
.sidebar.dark .brand { color: #fff; }
.sidebar.dark .brand .icon { color: #5FD0C4; }
.brand .tag { font-family: var(--font); font-size: 12px; font-weight: 600; background: var(--tint); color: var(--teal-dark); border-radius: 6px; padding: 2px 8px; }
.sidebar.dark .brand .tag { background: #5FD0C4; color: var(--navy); }
.station-chip { display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.station-chip strong { font-size: 14px; line-height: 1.4; }
.station-chip small { font-size: 12px; line-height: 1.4; }
.avatar { width: 38px; height: 38px; border-radius: 19px; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font: inherit; font-size: 14.5px; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: right; width: 100%; }
.nav a:hover, .nav button:hover { background: var(--paper); color: var(--ink); }
.nav a.active { background: var(--tint); color: var(--teal-dark); font-weight: 700; }
.nav form { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.sidebar.dark .nav a, .sidebar.dark .nav button { color: #C9D3DD; }
.sidebar.dark .nav a:hover, .sidebar.dark .nav button:hover { background: #1A2A3E; color: #fff; }
.sidebar.dark .nav a.active { background: #1F3046; color: #fff; }
.sidebar.dark .nav form { border-color: #22344A; }
.nav .count { margin-right: auto; font-size: 12px; font-weight: 700; background: var(--amber); color: var(--ink); border-radius: 10px; padding: 0 8px; line-height: 20px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-head .sub { color: var(--muted); margin-top: 2px; }

/* ================= Surfaces ================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.tight { padding: 14px 16px; }
.row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.row > .grow { flex: 999 1 520px; min-width: 0; }
.row > .side { flex: 1 1 300px; min-width: 0; }
.row > .half { flex: 1 1 380px; min-width: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat .label { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 26px; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12.5px; color: var(--muted); }
.stat.accent { background: var(--teal); border-color: var(--teal); color: #fff; }
.stat.accent .label, .stat.accent .hint { color: #E6F5F3; }

.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.kv > span:first-child { color: var(--muted); }
.kv > span:last-child { font-weight: 600; text-align: left; }
.box { background: var(--paper); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.divider { height: 1px; background: var(--line); }

/* ================= Alerts ================= */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.7; }
.alert .icon { margin-top: 2px; }
.alert.success { background: var(--tint-2); border: 1px solid #B5DDD8; color: var(--teal-dark); }
.alert.error { background: var(--red-tint); border: 1px solid #F5C2BD; color: var(--red); }
.alert.warn { background: var(--amber-tint); border: 1px solid var(--amber-line); color: var(--amber-ink); }
.alert ul { margin: 0; padding-right: 18px; }

/* ================= Buttons ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { color: #fff; background: #1F3046; }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #E5A42A; color: var(--ink); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-danger { background: var(--surface); border-color: var(--line-strong); color: var(--red); }
.btn-danger:hover { border-color: var(--red); color: var(--red); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--teal); font: inherit; font-weight: 600; cursor: pointer; padding: 0 6px; min-height: 40px; }
.inline-form { display: inline; }
[hidden] { display: none !important; }

/* ================= Forms ================= */
.form { display: flex; flex-direction: column; gap: 14px; }
.fields { display: flex; flex-wrap: wrap; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fields > .field { flex: 1 1 220px; }
.fields > .field.sm { flex: 1 1 140px; }
.fields > .field.full { flex: 1 1 100%; }
label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.help { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.error-text { font-size: 13px; color: var(--red); }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=email], input:not([type]), select, textarea {
  font: inherit; font-size: 15px; height: 46px; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 0 12px; color: var(--ink); background: #FBFCFD; width: 100%; transition: border-color .15s, box-shadow .15s;
}
textarea { padding: 10px 12px; height: auto; min-height: 90px; }
input::placeholder { color: #8A96A2; }
input:hover, select:hover, textarea:hover { border-color: #AEB9C3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: var(--focus); background: #fff; }
input[type=file] { font: inherit; font-size: 14px; }
input[type=tel] { direction: ltr; text-align: right; }
.input-suffix { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 0 12px; background: #FBFCFD; height: 46px; transition: border-color .15s, box-shadow .15s; }
.input-suffix:focus-within { border-color: var(--teal); box-shadow: var(--focus); background: #fff; }
.input-suffix input { border: 0; padding: 0; height: 42px; background: transparent; box-shadow: none !important; }
.input-suffix span { color: var(--muted); font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; min-height: 36px; font-size: 14px; color: var(--ink); }
.check input { width: 18px; height: 18px; accent-color: var(--teal); margin: 0; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-strong); border-radius: 8px; padding: 4px 10px; font-weight: 500; cursor: pointer; }
.days input { accent-color: var(--teal); margin: 0; }
.code-input { font-size: 22px !important; unicode-bidi: isolate; letter-spacing: 6px; text-align: center; direction: ltr; font-weight: 700; }
.form-section { font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--teal-dark); padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); margin-top: 4px; }

/* ================= Tables ================= */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: right; }
th { font-weight: 600; font-size: 13px; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFBFC; }
td .stack { display: flex; flex-direction: column; gap: 1px; }
td .stack small { font-size: 12px; }
.ltr { direction: ltr; unicode-bidi: embed; }
.nowrap { white-space: nowrap; }

.chip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; white-space: nowrap; line-height: 1.6; }
.chip.ok { background: var(--tint); color: var(--teal-dark); }
.chip.wait { background: var(--amber-tint); color: #6B4F12; }
.chip.bad { background: var(--red-tint); color: var(--red); }
.chip.muted { background: var(--line-soft); color: var(--ink-2); }

/* Filter bars: fields side by side, wrapping on small screens. flex-direction is set
   explicitly because a filter form is often also a .card (which stacks its children). */
.filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.filters > .field { flex: 1 1 160px; }
.filters > .btn, .filters > .btn-link { flex: 0 0 auto; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

/* ================= Pagination ================= */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 4px 0 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 40px; min-height: 38px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; padding: 0 12px; }
.pagination .current { background: var(--teal); border-color: var(--teal); color: #fff; }
.pagination .disabled { color: #9AA6B2; }

/* ================= Auth pages (login / register) ================= */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--surface); }
.auth-panel { flex: 1 1 380px; background: var(--teal-deep); color: #E6F5F3; padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-panel .brand { color: #fff; padding: 0; }
.auth-panel .brand .icon { color: #7FE0D4; }
.auth-panel h2 { font-size: clamp(26px, 3vw, 34px); color: #fff; line-height: 1.35; max-width: 420px; }
.auth-panel p { color: #CDE9E5; max-width: 420px; margin-top: 10px; }
.auth-points { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: #E6F5F3; }
.auth-points .icon { color: #7FE0D4; margin-top: 3px; }
.auth-panel .foot { font-size: 13px; color: #9CCFC8; }
.auth-main { flex: 1.3 1 420px; display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 56px) 20px; }
.auth-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.auth-form.wide { max-width: 640px; }
.auth-form h1 { font-size: 28px; }
.auth-form .lead { color: var(--muted); margin-top: 4px; }
.auth-form .switch { text-align: center; color: var(--muted); font-size: 14px; }
.auth-form .switch a { font-weight: 700; }
@media (max-width: 820px) {
  .auth { flex-direction: column; flex-wrap: nowrap; }
  .auth-panel { flex: 0 0 auto; padding: 18px 20px; gap: 0; }
  .auth-main { flex: 1 0 auto; align-items: flex-start; }
  .auth-panel .hide-sm { display: none; }
}
/* legacy single-card layout */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .brand { justify-content: center; padding: 0; }

/* ================= Scanner ================= */
#qr-reader { width: 100%; max-width: 360px; border-radius: 12px; overflow: hidden; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ================= Landing page ================= */
.lp { background: var(--surface); }
.lp-wrap { max-width: 1160px; margin-inline: auto; padding-inline: 20px; }
.lp-nav { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
.lp-nav .lp-wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.lp-nav .brand { padding: 0; }
.lp-links { display: flex; gap: 22px; margin-inline-start: 12px; }
.lp-links a { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.lp-links a:hover { color: var(--teal); }
.lp-nav .actions { margin-inline-start: auto; display: flex; gap: 8px; }
@media (max-width: 760px) { .lp-links { display: none; } .lp-nav .actions .btn-outline { display: none; } }

.lp-hero { overflow-x: clip; --notch: #EAF5F4; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); background: var(--notch); }
.lp-hero .lp-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 6vw, 72px); }
.lp-hero-text { flex: 1 1 440px; display: flex; flex-direction: column; gap: 20px; }
.lp-hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.22; color: var(--ink); max-width: 15ch; }
.lp-hero .lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 52ch; line-height: 1.8; }
.lp-hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.lp-hero .fine { font-size: 14px; color: var(--muted); }
.lp-hero .live { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--teal-dark); font-weight: 600; }
.lp-hero .live::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: var(--teal); box-shadow: 0 0 0 4px rgba(10,124,116,.16); }
.lp-hero-art { flex: 1 1 360px; display: flex; justify-content: center; }

/* The wash ticket — the one loud element on the page */
.ticket { width: min(100%, 360px); background: var(--surface); border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 30px 60px -28px rgba(5, 63, 59, .45), 0 2px 6px rgba(14, 27, 44, .06); transform: rotate(-3deg); position: relative; }
.ticket-head { background: var(--teal); color: #fff; padding: 16px 20px; border-radius: 19px 19px 0 0; display: flex; justify-content: space-between; align-items: center; }
.ticket-head strong { font-family: var(--display); font-size: 20px; font-weight: 600; }
.ticket-head span { font-size: 13px; color: #D5F0EC; }
.ticket-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.ticket-station { font-weight: 700; font-size: 16px; line-height: 1.4; }
.ticket-station small { display: block; font-weight: 500; font-size: 13px; }
.ticket-code { display: flex; align-items: center; gap: 16px; }
.ticket-code .qr { width: 96px; height: 96px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; flex-shrink: 0; }
.ticket-code .digits { display: flex; gap: .35em; direction: ltr; justify-content: flex-end; font-size: 30px; font-weight: 700; letter-spacing: 3px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ticket-code small { font-size: 13px; }
/* Perforation: two half-circle notches in the background colour behind the ticket, and a dashed tear line. */
.ticket-tear { height: 22px; position: relative; margin: 0 -1px; }
.ticket-tear::before, .ticket-tear i { content: ''; position: absolute; top: 0; width: 22px; height: 22px; border-radius: 11px; background: var(--notch, var(--paper)); }
.ticket-tear::before { right: -12px; }
.ticket-tear i { left: -12px; }
.ticket-tear::after { content: ''; position: absolute; top: 50%; right: 20px; left: 20px; border-top: 2px dashed var(--line-strong); }
.ticket-split { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ticket-split .kv:last-child { padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 16px; }
.ticket-split .kv:last-child span:last-child { color: var(--teal-dark); font-weight: 800; }

.lp-section { padding: clamp(56px, 8vw, 96px) 0; scroll-margin-top: 68px; }
.lp-section.alt { background: var(--paper); }
.lp-section h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.3; max-width: 30ch; }
.lp-section .intro { color: var(--ink-2); font-size: 17px; max-width: 58ch; margin-top: 12px; line-height: 1.8; }

/* How it works: a real sequence, so numbered */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; counter-reset: step; }
.steps li { position: relative; padding-top: 58px; }
.steps li::before { counter-increment: step; content: counter(step, arabic-indic); position: absolute; top: 0; right: 0; width: 42px; height: 42px; border-radius: 21px; background: var(--teal); color: #fff; font-family: var(--display); font-size: 20px; display: flex; align-items: center; justify-content: center; }
.steps li::after { content: ''; position: absolute; top: 21px; right: 54px; left: -16px; border-top: 2px dashed #B8DCD7; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--muted); line-height: 1.8; }
@media (max-width: 720px) { .steps li::after { display: none; } }

/* Money split */
.split { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split-text { flex: 1 1 380px; }
.split-visual { flex: 1 1 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.split-visual .title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.split-visual .title strong { font-size: 15px; }
.split-visual .title span { white-space: nowrap; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 54px; border-radius: 12px; overflow: hidden; }
.bar .s { background: var(--teal); color: #fff; flex: 88; display: flex; align-items: center; padding: 0 16px; font-weight: 700; }
.bar .p { background: var(--amber); color: var(--ink); flex: 12; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend .kv span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); line-height: 1.7; }
.ticks .icon { color: var(--teal); margin-top: 3px; }

/* Station tools */
.tools { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; border-top: 1px solid var(--line); }
@media (max-width: 960px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tools { grid-template-columns: minmax(0, 1fr); } }
.tools > div { padding: 24px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.tools .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--tint); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tools h3 { font-size: 16px; margin-bottom: 4px; }
.tools p { color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* Customers band */
.app-band { background: var(--teal-deep); color: #E6F5F3; border-radius: 24px; padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.app-band h2 { color: #fff; }
.app-band p { color: #CDE9E5; margin-top: 10px; max-width: 46ch; font-size: 16px; line-height: 1.8; }
.app-band .stores { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.app-band .store { display: inline-flex; flex-direction: column; border: 1.5px solid #3C7A74; border-radius: 12px; padding: 8px 16px; color: #fff; line-height: 1.35; }
.app-band .store small { color: #9CCFC8; font-size: 12px; }
.stamps-demo { display: flex; gap: 10px; align-items: center; }
.stamps-demo span { width: 52px; height: 52px; border-radius: 26px; display: flex; align-items: center; justify-content: center; }
.stamps-demo .done { background: #0E9A90; color: #fff; }
.stamps-demo .gift { background: var(--amber); color: var(--ink); }
.stamps-demo .icon { width: 24px; height: 24px; stroke-width: 2.4; }

/* FAQ */
.faq { margin-top: 32px; border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; color: var(--teal); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 20px; color: var(--ink-2); line-height: 1.85; max-width: 68ch; }

.lp-cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lp-cta h2 { max-width: none; }
.lp-foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
.lp-foot .lp-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.lp-foot nav { display: flex; gap: 18px; }
.lp-foot a { color: var(--ink-2); }

/* ================= Dashboard bar chart (single series) ================= */
.chart { margin: 0; }
.chart-plot { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; height: 160px; align-items: end; border-bottom: 1px solid var(--line-strong); padding-top: 26px; }
.chart-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.chart-bar { display: block; width: min(30px, 72%); background: #8FCFC8; border-radius: 4px 4px 0 0; position: relative; outline: none; }
.chart-bar.is-today { background: var(--teal); }
.chart-bar.is-zero { background: var(--line); }
.chart-bar:hover, .chart-bar:focus-visible { background: var(--teal-dark); box-shadow: none; }
.chart-bar:hover::after, .chart-bar:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; line-height: 1.5; padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 3; pointer-events: none; }
.chart-col:first-child .chart-bar:hover::after, .chart-col:first-child .chart-bar:focus-visible::after { left: auto; right: 0; transform: none; }
.chart-col:last-child .chart-bar:hover::after, .chart-col:last-child .chart-bar:focus-visible::after { left: 0; transform: none; }
.chart-direct { font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; margin-bottom: 4px; }
.chart-axis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 6px; }
.chart-axis span { text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.chart-head .total { font-size: 14px; color: var(--muted); }
.chart-head .total strong { color: var(--ink); font-size: 16px; }

/* ================= Setup checklist ================= */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.checklist .mark { width: 24px; height: 24px; border-radius: 12px; border: 2px dashed var(--line-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.checklist li.done { background: var(--tint-2); border-color: #CBE6E2; color: var(--teal-dark); }
.checklist li.done .mark { background: var(--teal); border: 0; color: #fff; }
.checklist li.done .mark .icon { width: 14px; height: 14px; stroke-width: 3; }
.checklist a { font-weight: 600; }
.progress { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--teal); border-radius: 3px; }

/* Ranked list (top stations) */
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.rank li:last-child { border-bottom: 0; }
.rank .pos { width: 28px; height: 28px; border-radius: 8px; background: var(--paper); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rank .who small { font-size: 12.5px; }
.rank .meter { flex: 0 1 140px; }
.rank .amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 92px; text-align: left; }

/* Small screens: the sidebar becomes a compact top bar with a scrollable menu. */
@media (max-width: 899px) {
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-left: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  .sidebar.dark { border-bottom: 0; }
  .station-chip { display: none; }
  .nav { flex-direction: row; width: 100%; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a, .nav button { width: auto; white-space: nowrap; min-height: 38px; padding: 0 10px; font-size: 14px; }
  .nav form { margin: 0; padding: 0; border: 0; }
  .main { padding-top: 20px; }
}

.field > .btn { align-self: flex-start; }

/* ================= Public text pages (privacy policy, account deletion) ================= */
.doc-page { padding: clamp(28px, 5vw, 56px) 20px 64px; }
.doc { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.9; color: var(--ink-2); }
.doc h1 { font-size: clamp(28px, 4vw, 36px); color: var(--ink); }
.doc h2 { font-size: 21px; color: var(--ink); margin-top: 18px; scroll-margin-top: 90px; }
.doc h3 { font-size: 17px; color: var(--ink); margin-top: 4px; }
.doc p, .doc ul { margin: 0; }
.doc ul { padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc-meta { color: var(--muted); font-size: 14px; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-toc a { background: var(--tint); color: var(--teal-dark); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; }
.doc-card { margin: 6px 0; font-size: 15px; line-height: 1.6; }
.doc-card h2 { margin-top: 0; }
.doc ul.doc-contact { list-style: none; padding-inline-start: 0; }
.doc-contact li { display: flex; align-items: center; gap: 8px; }
.doc-contact .icon { color: var(--teal); }
.lp-foot nav { flex-wrap: wrap; }
.steps-list { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.8; color: var(--ink-2); }

/* ================= Ratings ================= */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; line-height: 0; }
.stars svg { width: var(--star, 16px); height: var(--star, 16px); }
.stars .bg { fill: var(--line); }
.stars .fg { fill: #E0A526; }
.rating-big { display: flex; align-items: center; gap: 14px; }
.rating-big .score { font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.rating-big .stack { display: flex; flex-direction: column; gap: 4px; }
.rating-big small { color: var(--muted); font-size: 13px; }
.dist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dist a { display: grid; grid-template-columns: 38px 1fr 34px; align-items: center; gap: 10px; color: var(--ink-2); border-radius: 8px; padding: 4px 6px; font-size: 13.5px; }
.dist a:hover, .dist a.on { background: var(--tint-2); text-decoration: none; }
.dist .bar { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.dist .bar > span { display: block; height: 100%; background: #E0A526; border-radius: 99px; }
.dist .c { text-align: left; color: var(--muted); font-variant-numeric: tabular-nums; }
.reviews { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.reviews > li { border-top: 1px solid var(--line-soft); padding: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.reviews > li:first-child { border-top: 0; }
.reviews .head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.reviews .head .muted { font-size: 13px; }
.reviews p { margin: 0; line-height: 1.8; }
.quote { margin: 0; padding: 10px 14px; border-inline-start: 3px solid #E0A526; background: var(--amber-tint); border-radius: 8px; line-height: 1.8; color: var(--ink-2); }
.quote cite { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ================= Live alert for new codes ================= */
.live-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 50; display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 32px rgba(14, 27, 44, .28); width: min(560px, calc(100vw - 32px)); }
.live-toast[hidden] { display: none; }
.live-toast .live-body { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.6; }
.live-toast .live-body span { color: #C9D4DE; font-size: 13.5px; }
.live-toast .live-close { background: transparent; border: 0; color: #C9D4DE; padding: 6px; cursor: pointer; border-radius: 8px; min-height: 36px; }
.live-toast .live-close:hover { background: rgba(255, 255, 255, .1); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #5FD0C4; box-shadow: 0 0 0 6px rgba(95, 208, 196, .22); flex-shrink: 0; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 2px rgba(95, 208, 196, .1); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
