/* Doctor Salon — the same navy, gold and cream as the printed روشتة الخدمات. */
:root {
  --bg: #0D1830;
  --bg-deep: #091226;
  --surface: #14223F;
  --surface-2: #1A2B4D;
  --surface-3: #213459;
  --field: #0F1B35;
  --line: #22355B;
  --line-2: #2E4572;
  --ink: #EEF1F7;
  --ink-2: #C9D1E2;
  --muted: #9AA8C2;
  --dim: #5A6680;
  --gold: #F2A93B;
  --gold-2: #C27D17;
  --gold-ink: #1A1408;
  --gold-soft: rgb(242 169 59 / .12);
  --gold-line: rgb(242 169 59 / .38);
  --cream: #F7F5F0;
  --cream-ink: #14223F;
  --booked: #8FB3F0;
  --booked-bg: rgb(143 179 240 / .10);
  --arrived: #F2A93B;
  --arrived-bg: rgb(242 169 59 / .13);
  --chair: #43D394;
  --chair-bg: rgb(67 211 148 / .12);
  --done: #7D8AA6;
  --done-bg: rgb(125 138 166 / .08);
  --red: #F0776B;
  --red-bg: rgb(240 119 107 / .12);
  --wa: #3ED37A;
  --accent: #F2A93B;
  --glow: rgb(242 169 59 / .06);
  --top-bg: rgb(9 18 38 / .94);
  --top-line: transparent;
  --stripe: #091226;
  --chair-line: rgb(67 211 148 / .3);
  --track: rgb(255 255 255 / .08);
  --shade: rgb(9 18 38 / .35);
  --grid-half: rgb(34 53 91 / .45);
  --closed: rgb(5 10 22 / .45);
  --hatch: rgb(255 255 255 / .03);
  --appt-booked: #172a4f;
  --appt-arrived: #2a2a35;
  --appt-chair: #12333a;
  --note-ink: #f6cd8a;
  --rx-bg: var(--cream);
  --rx-line: transparent;
  --modal-back: rgb(5 10 22 / .72);
  --shadow-c: rgb(0 0 0 / .4);
  --toast-bg: var(--cream);
  --toast-ink: var(--cream-ink);
  --toast-ok: #1f8a57;
  --radius: 14px;
  --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 10px 30px rgb(0 0 0 / .28);
  --font: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --display: "Aref Ruqaa", "Tajawal", serif;
  --num: "Bebas Neue", "Tajawal", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

/* Light mode: the cream paper of the menu as the page, navy ink, a deeper amber for gold text. */
:root[data-theme="light"] {
  --bg: #F4F1EA;
  --bg-deep: #E9E4D8;
  --surface: #FFFFFF;
  --surface-2: #F8F5EF;
  --surface-3: #EEE8DC;
  --field: #FBF9F5;
  --line: #E6E0D3;
  --line-2: #D5CDBD;
  --ink: #14223F;
  --ink-2: #2E3E60;
  --muted: #5E6A84;
  --dim: #8A93A8;
  --accent: #A8650C;
  --gold-soft: rgb(242 169 59 / .16);
  --gold-line: rgb(194 125 23 / .45);
  --booked: #2F5FB3;
  --booked-bg: rgb(47 95 179 / .09);
  --arrived: #A8650C;
  --arrived-bg: rgb(242 169 59 / .16);
  --chair: #138A57;
  --chair-bg: rgb(19 138 87 / .09);
  --done: #6B7590;
  --done-bg: rgb(107 117 144 / .08);
  --red: #C0392B;
  --red-bg: rgb(192 57 43 / .08);
  --wa: #25C266;
  --shadow: 0 1px 2px rgb(20 34 63 / .05), 0 6px 18px rgb(20 34 63 / .06);
  --glow: rgb(242 169 59 / .12);
  --top-bg: rgb(255 255 255 / .94);
  --top-line: var(--line);
  --stripe: #14223F;
  --chair-line: rgb(19 138 87 / .3);
  --track: rgb(20 34 63 / .08);
  --shade: rgb(20 34 63 / .035);
  --grid-half: rgb(20 34 63 / .05);
  --closed: rgb(20 34 63 / .05);
  --hatch: rgb(20 34 63 / .05);
  --appt-booked: #EEF3FC;
  --appt-arrived: #FFF3DF;
  --appt-chair: #E6F5EE;
  --note-ink: #8A5208;
  --rx-bg: #FFFFFF;
  --rx-line: var(--line);
  --modal-back: rgb(20 34 63 / .38);
  --shadow-c: rgb(20 34 63 / .16);
  --toast-bg: #14223F;
  --toast-ink: #F7F5F0;
  --toast-ok: #43D394;
  color-scheme: light;
}
:root[data-theme="light"] .appt.done { opacity: .6; }
:root[data-theme="light"] .tl-closed span { background: var(--surface); border: 1px solid var(--line); }
.theme-btn .i { width: 19px; height: 19px; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--glow), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 500 15px/1.6 var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.num { font-family: var(--num); letter-spacing: .02em; font-weight: 400; font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.i { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.i.sm { width: 16px; height: 16px; }
.i.lg { width: 26px; height: 26px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.gold { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--top-bg); border-bottom: 1px solid var(--top-line); backdrop-filter: blur(10px); }
.top-in { max-width: 1440px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 24px; }
.hazard { height: 5px; background: repeating-linear-gradient(-45deg, var(--gold) 0 9px, var(--stripe) 9px 18px); opacity: .9; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 2px solid var(--gold); background: var(--surface); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--display); font-size: 26px; color: var(--ink); font-weight: 700; }
.brand-tag { font: 600 9.5px/1 "Outfit", var(--font); letter-spacing: .32em; color: var(--gold-ink); background: var(--gold); padding: 3px 6px 2px; border-radius: 3px; margin-top: 4px; align-self: flex-start; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; text-decoration: none;
  color: var(--muted); font-weight: 700; transition: background .2s, color .2s; position: relative;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a.on { color: var(--accent); background: var(--gold-soft); }
.nav .badge { background: var(--gold); color: var(--gold-ink); font: 800 11px/1 var(--font); padding: 3px 6px; border-radius: 99px; }
.top-side { display: flex; align-items: center; gap: 12px; }
.clock { font-family: var(--num); font-size: 26px; color: var(--accent); letter-spacing: .04em; direction: ltr; }

/* ---------- layout ---------- */
main { max-width: 1440px; margin: 0 auto; padding: 22px 20px 60px; }
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.2; }
.page-head h1 b { color: var(--accent); font-weight: 800; }
.page-head .sub { color: var(--muted); font-weight: 500; font-size: 14px; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.grid-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); position: relative;
}
.card.top-gold { border-top: 3px solid var(--gold); }
.card h2, .card h3 { margin: 0 0 12px; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.card h2 .ico, .card h3 .ico {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); flex: none;
}
.card h2 .ico .i, .card h3 .ico .i { width: 17px; height: 17px; }
.card .hint { color: var(--muted); font-size: 13px; font-weight: 500; }
.sticky { position: sticky; top: 96px; }

/* ---------- buttons, chips, fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
  font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .18s, border-color .18s, transform .12s var(--ease), color .18s;
}
.btn:hover { background: var(--surface-3); border-color: var(--dim); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 800; }
.btn.gold:hover { background: #f6b955; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.line { background: transparent; }
.btn.red { color: var(--red); border-color: rgb(240 119 107 / .35); background: transparent; }
.btn.red:hover { background: var(--red-bg); }
.btn.green { color: var(--chair); border-color: rgb(67 211 148 / .4); background: var(--chair-bg); }
.btn.wa { color: #04220f; background: var(--wa); border-color: var(--wa); }
.btn.wa:hover { background: #5be08f; }
.btn.wa.sent { background: transparent; color: var(--wa); border-color: rgb(62 211 122 / .4); }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13.5px; border-radius: 8px; }
.btn.lg { min-height: 54px; font-size: 18px; padding: 0 22px; border-radius: 12px; }
.btn.block { width: 100%; }
.icon-btn { width: 38px; padding: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--field); color: var(--ink-2); font-weight: 700; user-select: none;
  transition: border-color .15s, background .15s, color .15s, transform .12s var(--ease);
}
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.chip.on .chip-sub { color: rgb(26 20 8 / .7); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.chip-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; font: 800 10.5px/1 "Outfit", var(--font); letter-spacing: .06em;
  padding: 3px 6px; border-radius: 4px; background: var(--gold); color: var(--gold-ink);
}
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill.booked { background: var(--booked-bg); color: var(--booked); }
.pill.arrived { background: var(--arrived-bg); color: var(--arrived); }
.pill.in_chair { background: var(--chair-bg); color: var(--chair); }
.pill.done { background: var(--done-bg); color: var(--done); }
.pill.no_show, .pill.cancelled { background: var(--red-bg); color: var(--red); }
.pill.gift { background: var(--gold); color: var(--gold-ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--field); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.7; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.input.big { min-height: 56px; font-size: 22px; font-weight: 800; letter-spacing: .06em; }
.input.phone { direction: ltr; text-align: right; }
.input-wrap { position: relative; }
.input-wrap .i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.input-wrap .input { padding-inline-start: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 700; padding: 8px 14px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface-3); color: var(--accent); }

/* ---------- day board ---------- */
.day-nav { display: flex; align-items: center; gap: 6px; }
.day-label { min-width: 170px; text-align: center; font-weight: 800; font-size: 17px; }
.day-label small { display: block; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.sum { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sum b { font-family: var(--num); font-size: 30px; line-height: 1; font-weight: 400; }
.sum span { color: var(--muted); font-weight: 700; font-size: 13.5px; }
.sum.chair b { color: var(--chair); }
.sum.arrived b { color: var(--arrived); }
.sum.booked b { color: var(--booked); }
.sum.done b { color: var(--done); }

.board { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; align-items: start; }
.chairs { display: flex; flex-direction: column; gap: 14px; }
.chair-card { padding: 16px; }
.chair-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chair-head .avatar { width: 40px; height: 40px; }
.chair-head b { font-size: 17px; }
.chair-head .role { font-size: 12px; color: var(--muted); font-weight: 600; display: block; }
.chair-now { border-radius: 12px; padding: 12px 14px; background: var(--chair-bg); border: 1px solid var(--chair-line); cursor: pointer; }
.chair-now.free { background: var(--field); border: 1px dashed var(--line-2); color: var(--muted); cursor: default; text-align: center; padding: 16px; }
.chair-now .who { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.chair-now .what { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.progress { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 10px 0 6px; }
.progress i { display: block; height: 100%; background: var(--chair); border-radius: inherit; transition: width .6s var(--ease); }
.progress.over i { background: var(--red); }
.chair-next { margin-top: 10px; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.chair-next b { color: var(--ink); }
.waiting-list { display: flex; flex-direction: column; gap: 8px; }
.wait-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--arrived-bg); border: 1px solid rgb(242 169 59 / .25); cursor: pointer; }
.wait-row .t { font-family: var(--num); font-size: 20px; color: var(--accent); min-width: 48px; }

.timeline { padding: 0; overflow: hidden; }
.tl-scroll { max-height: calc(100vh - 270px); min-height: 460px; overflow-y: auto; scrollbar-color: var(--line-2) transparent; }
.tl-head {
  display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(0, 1fr));
  position: sticky; top: 0; z-index: 5; background: var(--surface-2); border-bottom: 1px solid var(--line-2);
}
.tl-head > div { padding: 12px 14px; font-weight: 800; display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-head > div + div { border-inline-start: 1px solid var(--line); }
.tl-head .tl-corner { justify-content: center; color: var(--dim); padding-inline: 0; }
.tl-head .tl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-head .count { margin-inline-start: auto; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.avatar.sm { width: 30px; height: 30px; font-size: 14px; }
.tl-body { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(0, 1fr)); position: relative; }
.tl-hours { position: relative; background: var(--shade); }
.tl-hours span { position: absolute; inset-inline: 0; transform: translateY(5px); text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.tl-col { position: relative; border-inline-start: 1px solid var(--line); cursor: copy;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-half) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2);
}
.tl-col:hover { background-color: rgb(242 169 59 / .025); }
.tl-col.off { cursor: not-allowed; background-color: var(--closed); }
.tl-col.off:hover { background-color: var(--closed); }
.off-note { position: absolute; top: 36px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--dim); text-align: center; pointer-events: none; }
.off-note b { font-size: 18px; color: var(--muted); }
.off-note small { font-size: 13px; font-weight: 600; }
.tl-closed {
  position: absolute; inset-inline: 0; pointer-events: none; display: flex; justify-content: center; align-items: flex-start;
  background: repeating-linear-gradient(-45deg, var(--hatch) 0 7px, transparent 7px 14px), var(--closed);
}
.tl-closed span { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--dim); background: var(--bg-deep); padding: 2px 10px; border-radius: 99px; }
.tl-past { position: absolute; inset-inline: 0; top: 0; background: var(--shade); pointer-events: none; }
.now-wrap { position: absolute; inset-inline-start: 64px; inset-inline-end: 0; top: 0; pointer-events: none; z-index: 3; }
.now-line { position: absolute; inset-inline: 0; height: 0; border-top: 2px solid var(--red); }
.now-line::before { content: ""; position: absolute; inset-inline-start: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.sum-hint { align-self: center; color: var(--muted); font-size: 13.5px; font-weight: 600; display: flex; gap: 6px; align-items: center; padding-inline: 6px; }
.date-pick { position: relative; overflow: hidden; }
.date-pick input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.closed-day { max-width: 560px; margin: 30px auto; text-align: center; padding: 36px 28px; }
.closed-day h2 { justify-content: center; font-size: 24px; margin-bottom: 6px; }
.closed-day p { margin: 0 0 20px; }
.closed-ico { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--gold-soft); color: var(--accent); border: 1px solid var(--gold-line); }
.closed-ico .i { width: 34px; height: 34px; }
.appt {
  position: absolute; inset-inline: 6px; border-radius: 9px; padding: 6px 10px; overflow: hidden; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line-2); border-inline-start: 4px solid var(--booked);
  transition: transform .15s var(--ease), box-shadow .15s; z-index: 1;
}
.appt:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--shadow-c); z-index: 2; }
.appt { line-height: 1.35; }
.appt .a-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.appt .a-name { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt .a-svc { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.short { padding-block: 3px; }
.appt.short .a-svc { display: none; }
.appt.booked { border-inline-start-color: var(--booked); background: var(--appt-booked); }
.appt.arrived { border-inline-start-color: var(--arrived); background: var(--appt-arrived); }
.appt.in_chair { border-inline-start-color: var(--chair); background: var(--appt-chair); }
.appt.done { border-inline-start-color: var(--done); background: var(--surface); opacity: .7; }
.appt.no_show, .appt.cancelled { border-inline-start-color: var(--red); background: var(--surface); opacity: .5; }
.appt.cancelled .a-name { text-decoration: line-through; }
.appt .gift { color: var(--accent); }

/* ---------- booking / checkout ---------- */
.step { display: flex; gap: 14px; }
.step-no { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); font-family: var(--num); font-size: 18px; }
.step-body { flex: 1; min-width: 0; }
.cat-title { font-weight: 800; color: var(--accent); font-size: 14px; margin: 14px 0 8px; display: flex; align-items: center; gap: 8px; }
.cat-title:first-child { margin-top: 0; }
.cust-found { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); margin-top: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--accent); font-weight: 800; font-size: 19px; flex: none; border: 1px solid var(--gold-line); }
.avatar.lg { width: 72px; height: 72px; font-size: 30px; }
.note-box { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--arrived-bg); color: var(--note-ink); font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.slot-group { margin-bottom: 14px; }
.slot-group > b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { padding: 9px 4px; text-align: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field); cursor: pointer; font-weight: 800; transition: all .15s; }
.slot small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.slot:hover { border-color: var(--gold); }
.slot.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.slot.on small { color: rgb(26 20 8 / .7); }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 12px; }

/* the prescription slip: a cream paper like the printed menu's QR panel */
.rx {
  background: var(--rx-bg); color: var(--cream-ink); border-radius: 14px; padding: 20px 20px 18px; position: relative;
  box-shadow: 0 18px 40px var(--shadow-c); border: 1px solid var(--rx-line);
}
.rx::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 6px; border-radius: 0 0 14px 14px; background: repeating-linear-gradient(-45deg, var(--gold) 0 8px, var(--cream-ink) 8px 16px); }
.rx-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--cream-ink); padding-bottom: 10px; margin-bottom: 12px; }
.rx-head .rx-title { font-family: var(--display); font-size: 30px; line-height: 1; }
.rx-head .rx-title b { color: var(--gold-2); }
.rx-head small { font: 600 10px/1 "Outfit", var(--font); letter-spacing: .25em; color: #5A6680; }
.rx-line { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; font-weight: 700; }
.rx-line .dots { flex: 1; border-bottom: 2px dotted #c9c3b5; transform: translateY(-4px); min-width: 20px; }
.rx-line .p { font-family: var(--num); font-size: 22px; color: var(--gold-2); }
.rx-line .x { border: 0; background: none; color: #a24b40; cursor: pointer; padding: 0 2px; display: inline-flex; }
.rx-meta { color: #5A6680; font-size: 13.5px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.rx-meta b { color: var(--cream-ink); }
.rx-total { display: flex; justify-content: space-between; align-items: center; border-top: 2px solid var(--cream-ink); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 17px; }
.rx-total .num { font-size: 44px; line-height: 1; color: var(--cream-ink); }
.rx-minus .p { color: #1f8a57; }
.rx .empty { border-color: #d6d0c2; color: #6b7590; }
.rx .btn.gold { margin-top: 14px; }
.rx .seg { background: #ece8de; border-color: #ddd6c6; width: 100%; }
.rx .seg button { flex: 1; color: #5A6680; }
.rx .seg button.on { background: var(--cream-ink); color: var(--accent); }
.rx .input { background: #fff; color: var(--cream-ink); border-color: #d6d0c2; }

/* ---------- the loyalty card ---------- */
/* the loyalty card stays a navy card in both themes */
.lcard {
  --ink: #EEF1F7; --muted: #9AA8C2; --dim: #5A6680; --line-2: #2E4572; --accent: #F2A93B;
  border-radius: 16px; padding: 16px 18px; color: var(--ink); position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1d3264 0%, #14223F 55%, #0D1830 100%); border: 1px solid var(--gold-line);
}
.lcard::before { content: ""; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px; border-radius: 50%; border: 18px solid rgb(242 169 59 / .07); }
.lcard-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lcard-head b { font-family: var(--display); font-size: 22px; line-height: 1; }
.lcard-head small { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 320px; }
.stamps.mini { display: flex; gap: 3px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line-2); display: grid; place-items: center; color: var(--dim); font-family: var(--num); font-size: 16px; }
.stamp.on { border: 2px solid var(--gold); background: var(--gold); color: var(--gold-ink); }
.stamp.on .i { width: 60%; height: 60%; }
.stamp.prize { border: 2px dashed var(--gold); color: var(--accent); }
.stamp.prize.ready { background: var(--gold); color: var(--gold-ink); border-style: solid; animation: pulse 1.6s var(--ease) infinite; }
.stamps.mini .stamp { width: 11px; height: 11px; border-width: 1.5px; }
.stamps.mini .stamp.prize { border-radius: 3px; }
.lcard-foot { margin-top: 12px; font-weight: 700; font-size: 14px; }
.lcard-foot b { color: var(--accent); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(242 169 59 / .5); } 50% { box-shadow: 0 0 0 7px rgb(242 169 59 / 0); } }
.gift-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, rgb(242 169 59 / .22), rgb(242 169 59 / .06)); border: 1px solid var(--gold);
}
.gift-banner .i { width: 30px; height: 30px; color: var(--accent); }
.gift-banner b { font-size: 17px; }
.switch { margin-inline-start: auto; width: 46px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: inset-inline-start .2s var(--ease); }
.switch.on { background: var(--gold); }
.switch.on::after { inset-inline-start: 23px; background: var(--gold-ink); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover, .list-row.click:hover { background: var(--surface-2); border-radius: 10px; cursor: pointer; }
.list-row .main { flex: 1; min-width: 0; }
.list-row .main b { display: block; font-weight: 800; }
.list-row .main small { color: var(--muted); font-size: 13px; font-weight: 600; }
.list-row .end { text-align: end; flex: none; }
.money { font-family: var(--num); font-size: 22px; color: var(--accent); letter-spacing: .02em; }
.money small { font-family: var(--font); font-size: 12px; color: var(--muted); margin-inline-start: 3px; font-weight: 700; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 11px 16px; color: var(--muted); font-weight: 800; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--gold); }
.tabs .badge { background: var(--surface-3); color: var(--ink); padding: 1px 8px; border-radius: 99px; font-size: 12px; }
.tabs button.on .badge { background: var(--gold); color: var(--gold-ink); }

/* ---------- customer file ---------- */
.profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile h1 { margin: 0; font-size: 26px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stat b { font-family: var(--num); font-size: 30px; font-weight: 400; line-height: 1.1; }
.stat b small { font-family: var(--font); font-size: 13px; color: var(--muted); }
.kpis .stat b { font-size: 36px; }
.kpis .stat.good b { color: var(--chair); }
.kpis .stat.bad b { color: var(--red); }
.kpis .stat.gold b { color: var(--accent); }
.visit { padding: 12px 4px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.visit:last-child { border-bottom: 0; }
.visit .d { width: 54px; text-align: center; flex: none; }
.visit .d b { display: block; font-family: var(--num); font-size: 26px; line-height: 1; color: var(--accent); }
.visit .d small { font-size: 11.5px; color: var(--muted); font-weight: 700; }

/* ---------- cash book bars ---------- */
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 6px 0; }
.bar-row .lbl { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 10px; border-radius: 99px; background: var(--field); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.bar-row .v { text-align: end; font-family: var(--num); font-size: 19px; }
.days-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 10px; }
.days-chart > div { flex: 1; min-width: 4px; background: var(--gold); border-radius: 4px 4px 0 0; opacity: .85; position: relative; }
.days-chart > div:hover { opacity: 1; background: #f6b955; }
.days-axis { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; font-weight: 700; margin-top: 6px; }

/* ---------- settings table ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl .input { min-height: 38px; padding: 6px 10px; }
.tbl tr.off td { opacity: .5; }
.tbl-wrap { overflow-x: auto; }

/* ---------- modal & toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-back { position: absolute; inset: 0; background: var(--modal-back); backdrop-filter: blur(3px); animation: fade .2s ease; }
.modal-card {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-top: 3px solid var(--gold); border-radius: 16px; padding: 22px;
  box-shadow: 0 30px 80px var(--shadow-c); animation: rise .28s var(--ease);
}
.modal-card h2 { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.modal-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.detail-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0; font-size: 14.5px; }
.detail-grid dt { color: var(--muted); font-weight: 700; }
.detail-grid dd { margin: 0; font-weight: 700; }
.steps { display: flex; gap: 4px; margin: 12px 0 4px; }
.steps span { flex: 1; text-align: center; font-size: 12px; font-weight: 800; padding: 6px 2px; border-radius: 6px; background: var(--field); color: var(--dim); }
.steps span.on { background: var(--gold-soft); color: var(--accent); }
.steps span.cur { background: var(--gold); color: var(--gold-ink); }
.pin-input { text-align: center; font-family: var(--num); font-size: 38px; letter-spacing: .5em; direction: ltr; }
.done-mark { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: var(--chair-bg); color: var(--chair); border: 2px solid var(--chair); }
.done-mark .i { width: 38px; height: 38px; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 80;
  display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 12px; font-weight: 800;
  background: var(--toast-bg); color: var(--toast-ink); box-shadow: 0 14px 40px var(--shadow-c); transition: opacity .25s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .i { color: var(--toast-ok); }
.toast.err { background: #ffe3df; color: #4a1410; }
.toast.err .i { color: #b4322a; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.fade-in { animation: rise .35s var(--ease); }
.lock-page { max-width: 380px; margin: 60px auto; text-align: center; }
.lock-page .ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--gold-soft); color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 1100px) {
  .board { grid-template-columns: 1fr; }
  .chairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .nav a span.lbl { display: none; }
  .nav a.on span.lbl { display: inline; }
  .top-side { margin-inline-start: auto; }
  main { padding: 16px 14px 50px; }
  .page-head h1 { font-size: 23px; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 70px; }
  .tl-scroll { max-height: none; }
  .hide-sm { display: none; }
  .day-nav { flex-wrap: wrap; width: 100%; }
  .day-label { min-width: 0; flex: 1; }
  .day-nav input[type=date] { width: 100% !important; }
  .page-head > .btn { flex: 1; }
  .chairs { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 90px minmax(0, 1fr) 64px; }
}
/* the phone field is typed left-to-right, so its icon side is set physically */
.input-wrap .input.phone { padding-inline-start: 13px; padding-right: 40px; }

/* ---------- cashier (made for a tablet: big targets, bill always in reach) ---------- */
.cashier { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.cs-menu { min-width: 0; }
.cs-bill { position: sticky; top: 96px; max-height: calc(100vh - 112px); overflow-y: auto; border-radius: 14px; scrollbar-width: thin; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 112px; padding: 14px 14px 12px;
  border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-align: start; cursor: pointer;
  font: inherit; box-shadow: var(--shadow); transition: transform .12s var(--ease), border-color .15s, background .15s; -webkit-tap-highlight-color: transparent;
  border-top: 3px solid var(--line-2);
}
.tile.cat-hair { border-top-color: var(--gold); }
.tile.cat-skin { border-top-color: var(--booked); }
.tile.cat-care { border-top-color: var(--chair); }
.tile:active { transform: scale(.95); }
.tile.on { border-color: var(--gold); background: var(--gold-soft); }
.tile .t-name { font-weight: 800; font-size: 15.5px; line-height: 1.35; }
.tile .t-price { font-family: var(--num); font-size: 30px; line-height: 1; color: var(--accent); }
.tile .t-price small { font-family: var(--font); font-size: 13px; color: var(--muted); margin-inline-start: 3px; }
.tile .t-qty { position: absolute; top: 8px; inset-inline-end: 8px; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 99px; background: var(--gold); color: var(--gold-ink);
  display: grid; place-items: center; font: 400 20px/1 var(--num); box-shadow: 0 4px 12px rgb(0 0 0 / .25); }
.cs-label { font-weight: 800; font-size: 13.5px; color: #5A6680; margin: 12px 0 6px; }
.cs-label small { font-weight: 600; }
.rx .seg.cs-barbers button { font-size: 16px; padding: 12px 10px; font-weight: 800; }
.rx .seg.cs-barbers.need { outline: 2px solid #C0392B; outline-offset: 2px; animation: nudge .4s; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.cs-cust { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cs-who { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #ECE8DE; display: flex; flex-direction: column; gap: 6px; }
.cs-who small { color: #5A6680; font-weight: 700; }
.cs-who .stamp { border-color: #c9c3b5; }
.cs-who .stamp.on { border-color: var(--gold-2); background: var(--gold-2); }
.cs-note { font-size: 13px; color: #8A5208; font-weight: 700; }
.cs-new { margin-top: 8px; font-size: 13px; font-weight: 700; color: #1f8a57; }
.rx .gift-banner.cs-gift { margin-top: 8px; padding: 10px 12px; color: var(--cream-ink); background: linear-gradient(90deg, rgb(242 169 59 / .35), rgb(242 169 59 / .12)); }
.rx .gift-banner.cs-gift .i { width: 24px; height: 24px; color: var(--gold-2); }
.rx .gift-banner.cs-gift b { font-size: 15px; }
.cs-lines { margin: 12px 0 4px; border-top: 2px solid var(--cream-ink); padding-top: 8px; max-height: 280px; overflow-y: auto; }
.cs-line { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #d6d0c2; font-weight: 700; }
.cs-line .cs-name { flex: 1; min-width: 0; }
.cs-line .p { font-family: var(--num); font-size: 22px; color: var(--gold-2); }
.cs-qty { display: inline-flex; align-items: center; gap: 2px; background: #ECE8DE; border-radius: 10px; padding: 2px; }
.cs-qty button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #fff; color: var(--cream-ink); font: 800 20px/1 var(--font); cursor: pointer; }
.cs-qty button:active { transform: scale(.92); }
.cs-qty b { min-width: 22px; text-align: center; font: 400 20px/1 var(--num); }
.cs-disc { display: flex; align-items: center; gap: 6px; margin: 10px 0; font-weight: 800; }
.cs-disc .input { width: 90px; min-height: 38px; }
.rx .cs-disc .chip { background: #ECE8DE; border-color: #ddd6c6; color: var(--cream-ink); padding: 6px 10px; }
.rx .seg.cs-method { margin-bottom: 4px; }
.cs-per { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cs-barber-count { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.cs-barber-count .num { font-size: 24px; color: var(--accent); }
.cs-time { width: 64px; flex: none; font-size: 19px; color: var(--muted); }
.cs-bar { display: none; }
@media (max-width: 980px) {
  .cashier { grid-template-columns: 1fr; }
  .cs-bill { position: static; max-height: none; overflow: visible; }
  /* upright tablet: services, then the bill, then today's invoices */
  .cs-menu { display: contents; }
  .cs-menu > .page-head { order: 1; } .tiles { order: 2; margin-bottom: 0; } .cs-bill { order: 3; } .cs-today { order: 4; }
  .cs-bar.show { display: flex; position: fixed; inset-inline: 12px; bottom: 12px; z-index: 40; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--toast-bg); color: var(--toast-ink); box-shadow: 0 12px 30px var(--shadow-c); font-weight: 700; }
  .cs-bar .num { font-size: 24px; }
  main { padding-bottom: 90px; }
}

/* ---------- online sign-in ---------- */
.auth-page { margin-top: 40px; }
.auth-doc { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 3px solid var(--gold); display: block; margin: 0 auto 12px; }
.auth-input { text-align: center; font-size: 19px; }
