/* Nada Elmasry Beauty Care — tokens from the design system (noir first, cream for the admin). */
:root, [data-theme="noir"] {
  --ground: #0e0b08; --surface: #1a1510; --surface-sunk: #251e17;
  --line: #3a3026; --line-strong: #7a6650;
  --ink: #f3e9d6; --ink-muted: #b9a78a;
  --gold: #c9a35c; --gold-deep: #a8823f; --gold-text: #d8b673; --on-gold: #1a1209;
  --cocoa: #6b4a33; --caramel: #b07a4a;
  --success: #7cc4a4; --warning: #e0b25a; --danger: #e88a7a; --info: #8fb4d9; --focus: #e8c987;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-glow: 0 0 0 1px #c9a35c, 0 0 24px rgba(201, 163, 92, .35);
}
[data-theme="cream"] {
  --ground: #f6eee3; --surface: #fffaf3; --surface-sunk: #ece1d1;
  --line: #d9c9b2; --line-strong: #8a7256;
  --ink: #2e2117; --ink-muted: #6b5644;
  --gold-text: #7a5b28; --cocoa: #5a3e2b;
  --success: #2f6b52; --warning: #8a5a12; --danger: #a33a2a; --info: #2f5d8a; --focus: #7a5b28;
  --shadow-card: 0 6px 18px rgba(74, 52, 30, .12);
  --shadow-glow: 0 0 0 1px #c9a35c, 0 0 18px rgba(201, 163, 92, .25);
}
:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 24px; --radius-full: 9999px;
  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-ar-display: "Amiri", "Traditional Arabic", serif;
  --font-sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/28px var(--font-sans); }
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { width: min(1120px, 100% - 2 * var(--space-4)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Type */
.eyebrow { display: block; font: 600 13px/20px var(--font-display); letter-spacing: .18em; color: var(--gold-text); direction: ltr; unicode-bidi: isolate; text-align: right; }
.display-ar { font: 700 clamp(34px, 6vw, 52px)/1.45 var(--font-ar-display); margin: 0; }
.title-ar { font: 700 clamp(26px, 4vw, 34px)/1.5 var(--font-ar-display); margin: 0; }
.h3 { font-size: 18px; line-height: 28px; font-weight: 600; margin: 0; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 22px; }
.caption { font-size: 12px; line-height: 18px; font-weight: 500; }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md); border: 1px solid transparent; font: 600 16px/24px var(--font-sans); text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-deep); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--gold); }
.btn-sm { min-height: 36px; padding: var(--space-1) var(--space-4); font-size: 14px; border-radius: var(--radius-sm); }
.btn svg { width: 20px; height: 20px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 72px; }
.brand { display: flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; }
.brand-mark { width: 44px; height: 44px; border-radius: var(--radius-full); display: grid; place-items: center; box-shadow: var(--shadow-glow);
  font: 600 20px/1 var(--font-display); color: var(--gold-text); background: var(--surface); }
.brand-name { display: grid; line-height: 1.2; }
.brand-name b { font: 600 15px/20px var(--font-display); letter-spacing: .08em; direction: ltr; text-align: right; }
.brand-name span { font-size: 12px; color: var(--ink-muted); }
.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav a { color: var(--ink-muted); text-decoration: none; font-size: 15px; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.btn-gold { color: var(--on-gold); }
@media (max-width: 860px) { .site-nav a:not(.btn) { display: none; } }

/* Hero */
.hero { padding-block: var(--space-12) var(--space-16); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: var(--space-12); }
.hero p.lead { font-size: 18px; line-height: 32px; color: var(--ink-muted); margin: var(--space-4) 0 var(--space-8); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.frames { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); align-items: end; }
.frame { display: grid; justify-items: center; gap: var(--space-3); text-align: center; }
.frame-ring { width: 100%; aspect-ratio: 1; border-radius: var(--radius-full); padding: 6px; box-shadow: var(--shadow-glow);
  background: radial-gradient(circle at 50% 40%, var(--surface-sunk), var(--surface) 70%); display: grid; place-items: center; overflow: hidden; }
.frame-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-full); }
.frame-ring svg { width: 46%; height: 46%; color: var(--gold); }
.frame:nth-child(2) .frame-ring { transform: translateY(calc(-1 * var(--space-8))); }
.frame .eyebrow { font-size: 11px; letter-spacing: .14em; text-align: center; }
@media (max-width: 860px) {
  .hero { padding-block: var(--space-8) var(--space-12); }
  .hero .wrap { grid-template-columns: 1fr; gap: var(--space-12); }
  .frames { order: -1; max-width: 420px; margin-inline: auto; width: 100%; padding-top: var(--space-6); }
}

/* Sections */
.section { padding-block: var(--space-16); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: var(--space-2); margin-bottom: var(--space-8); max-width: 40em; }
.section-head p { margin: 0; color: var(--ink-muted); }
@media (max-width: 860px) { .section { padding-block: var(--space-12); } }

.cat { margin-top: var(--space-8); }
.cat:first-of-type { margin-top: 0; }
.cat-title { display: flex; align-items: baseline; gap: var(--space-3); margin: 0 0 var(--space-4); font-size: 22px; line-height: 32px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: var(--space-4); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); display: grid; gap: var(--space-3); align-content: start; }
.card p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 26px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); margin-top: auto; }
.price { color: var(--gold-text); }
.meta { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--ink-muted); font-size: 14px; }
.meta svg { width: 16px; height: 16px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-full);
  box-shadow: var(--shadow-glow); color: var(--gold-text); font: 600 18px/1 var(--font-display); margin-bottom: var(--space-4); }
.steps h3 { margin: 0 0 var(--space-2); font-size: 18px; line-height: 28px; }
.steps p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 26px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.quote { margin: var(--space-8) 0 0; padding: var(--space-8); border-radius: var(--radius-lg); background: var(--cocoa); color: #f3e9d6;
  font: 700 clamp(22px, 3.4vw, 30px)/1.6 var(--font-ar-display); }

.visit { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-8); align-items: start; }
.visit dl { margin: 0; display: grid; gap: var(--space-4); }
.visit dt { font-size: 14px; color: var(--ink-muted); }
.visit dd { margin: 0; }
.map { width: 100%; min-height: 340px; border: 1px solid var(--line); border-radius: var(--radius-lg); filter: grayscale(.4) contrast(1.05); }
@media (max-width: 860px) { .visit { grid-template-columns: 1fr; } }

.site-foot { border-top: 1px solid var(--line); padding-block: var(--space-8) calc(var(--space-8) + 72px); color: var(--ink-muted); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }
.site-foot nav { display: flex; gap: var(--space-4); }
@media (min-width: 861px) { .site-foot { padding-bottom: var(--space-8); } }

.book-bar { position: fixed; inset: auto 0 0 0; z-index: 20; display: none; gap: var(--space-2); padding: var(--space-3) var(--space-4);
  background: var(--surface); border-top: 1px solid var(--line); }
.book-bar .btn { flex: 1; }
@media (max-width: 860px) { .book-bar { display: flex; } }

/* Forms */
.field { display: grid; gap: var(--space-2); }
.label { font-size: 15px; font-weight: 600; }
.input { width: 100%; min-height: 48px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface-sunk); color: var(--ink); font: 400 16px/24px var(--font-sans); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
textarea.input { min-height: 96px; resize: vertical; }
.error { color: var(--danger); font-size: 14px; line-height: 22px; margin: 0; }
.alert { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-sunk); }
.alert-ok { border-color: var(--success); color: var(--success); }
.alert-bad { border-color: var(--danger); }

/* Booking */
.book { padding-block: var(--space-8) var(--space-16); }
.book-grid { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-8); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); display: grid; gap: var(--space-6); }
.step-title { display: flex; align-items: center; gap: var(--space-3); margin: 0; font-size: 20px; line-height: 30px; font-weight: 600; }
.step-title i { font-style: normal; width: 32px; height: 32px; border-radius: var(--radius-full); display: grid; place-items: center; box-shadow: var(--shadow-glow);
  color: var(--gold-text); font: 600 15px/1 var(--font-display); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: var(--space-3); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: grid; gap: var(--space-1); height: 100%; padding: var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-md); cursor: pointer; background: var(--surface-sunk); }
.choice input:checked + span { border-color: var(--gold); box-shadow: var(--shadow-glow); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.days { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-2) var(--space-1); scroll-snap-type: x proximity; }
.day span { min-width: 76px; text-align: center; padding: var(--space-3) var(--space-2); }
.day b { font-size: 22px; line-height: 28px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--space-2); }
.slot span { text-align: center; padding: var(--space-3) var(--space-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.summary { position: sticky; top: 96px; }
.summary dl { margin: 0; display: grid; gap: var(--space-3); }
.summary div { display: flex; justify-content: space-between; gap: var(--space-3); }
.summary dt { color: var(--ink-muted); }
.summary dd { margin: 0; font-weight: 600; text-align: left; }
@media (max-width: 860px) { .book-grid { grid-template-columns: 1fr; } .summary { position: static; } .two { grid-template-columns: 1fr; } }

.done { padding-block: var(--space-12) var(--space-16); }
.done .panel { max-width: 640px; margin-inline: auto; text-align: center; justify-items: center; }
/* Live confirmation page */
.booked [hidden] { display: none !important; }
.booked { position: relative; transition: border-color .4s, box-shadow .4s; }
.booked[data-status="confirmed"], .booked[data-status="done"] { border-color: rgba(201, 163, 92, .55); }
.booked.is-news { animation: booked-glow 1.6s ease-out; }
@keyframes booked-glow { 0% { box-shadow: 0 0 0 0 rgba(201, 163, 92, .55); } 40% { box-shadow: 0 0 0 10px rgba(201, 163, 92, .18), 0 0 60px rgba(201, 163, 92, .3); } 100% { box-shadow: 0 0 0 0 rgba(201, 163, 92, 0); } }
.booked-mark { display: none; width: 64px; height: 64px; color: var(--gold); }
.booked[data-status="confirmed"] .booked-mark, .booked[data-status="done"] .booked-mark { display: block; }
.booked-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.booked-mark circle { stroke-dasharray: 151; stroke-dashoffset: 0; opacity: .5; }
.booked-mark path { stroke-width: 3; stroke-dasharray: 40; stroke-dashoffset: 0; }
.booked.is-news .booked-mark circle { animation: booked-draw .6s ease-out both; }
.booked.is-news .booked-mark path { animation: booked-draw .45s .45s ease-out both; }
.booked.is-news .booked-mark { animation: booked-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes booked-draw { from { stroke-dashoffset: 151; } }
@keyframes booked-pop { from { transform: scale(.6); opacity: 0; } }
.booked.is-news #booked-chip { animation: booked-pop .45s .2s cubic-bezier(.2, 1.4, .4, 1) both; }
.booked-dl { margin: 0; display: grid; gap: var(--space-2); }
.booked-dl dt { color: var(--ink-muted); font-size: 14px; }
.booked-dl dd { margin: 0; font-weight: 500; }
.booked-dl div:first-child dd { font-size: 18px; font-weight: 600; }
.booked-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-muted); }
.booked-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(124, 196, 164, .6); animation: booked-live 2s ease-out infinite; }
@keyframes booked-live { 70%, 100% { box-shadow: 0 0 0 8px rgba(124, 196, 164, 0); } }
@media (prefers-reduced-motion: reduce) { .booked *, .booked { animation: none !important; } }
.code { font: 600 34px/1.2 var(--font-sans); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .08em; color: var(--gold-text); direction: ltr; }

/* Admin (cream) */
.admin-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 64px; flex-wrap: wrap; }
.admin-head nav { display: flex; gap: var(--space-2); }
.admin-head nav a { padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); color: var(--ink-muted); text-decoration: none; font-weight: 600; }
.admin-head nav a[aria-current] { background: var(--surface-sunk); color: var(--ink); }
.admin-main { padding-block: var(--space-8) var(--space-16); display: grid; gap: var(--space-8); }
.admin-main h1 { margin: 0; font-size: 28px; line-height: 40px; font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3); justify-content: space-between; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
table.t { width: 100%; border-collapse: collapse; min-width: 880px; }
table.t th, table.t td { padding: var(--space-3) var(--space-2); text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); }
table.t th { background: var(--surface-sunk); font-size: 14px; font-weight: 600; color: var(--ink-muted); }
table.t tr:last-child td { border-bottom: 0; }
table.t .input { min-height: 36px; padding: var(--space-1) var(--space-2); font-size: 14px; }
.chip { display: inline-block; padding: 2px var(--space-3); border-radius: var(--radius-full); border: 1px solid currentColor; font-size: 13px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.chip-pending { color: var(--warning); } .chip-confirmed { color: var(--info); } .chip-done { color: var(--success); }
.chip-cancelled, .chip-no_show { color: var(--danger); }
.empty { padding: var(--space-8); text-align: center; color: var(--ink-muted); }
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--space-4); }
.login .panel { width: min(420px, 100%); }
