/* ==========================================================================
   MIND FACILITIES — Design System
   هوية Mind Sport: فحمي #24282A · أخضر مرمادي #8A9B93 · رملي #EDE39B
   عربي أولًا (RTL حقيقي عبر الخصائص المنطقية) · شبكة 4px
   ========================================================================== */

:root {
  /* Brand */
  --charcoal: #24282A; --charcoal-2: #2E3436; --charcoal-3: #1A1D1F;
  --sage: #8A9B93; --sage-deep: #5F7069; --sage-ink: #4B5B54; --sage-soft: #E4EAE6; --sage-pale: #F0F3F1;
  --sand: #EDE39B; --sand-strong: #DCCD6A; --sand-ink: #6B6020; --sand-soft: #F8F4D9;

  /* Neutrals */
  --bg: #F6F7F4; --surface: #FFFFFF; --surface-2: #F2F4F0; --surface-3: #E9ECE7;
  --ink: #1E2224; --ink-2: #474F4D; --muted: #6A7471; --muted-2: #8B9491;
  --line: #E3E7E2; --line-2: #D4DAD4;

  /* Status */
  --ok: #2B6646; --ok-bg: #E2EFE7; --warn: #8A5300; --warn-bg: #F7EDD8;
  --bad: #A5432F; --bad-bg: #F7E4DF; --info: #375F78; --info-bg: #E2ECF3; --neutral: #5B6563; --neutral-bg: #EDEFEC;

  /* Charts — validated (dataviz validate_palette, light surface #FFF): band, chroma ≥0.1, CVD ΔE ≥9.3, contrast ≥3:1 */
  --c1: #1F8460; --c2: #A8861A; --c3: #2A6CB0; --c4: #B4643F; --c-neutral: #B8C0BC;

  /* Type */
  --f-body: "Rubik", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Baloo Bhaijaan 2", "Rubik", system-ui, sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-base: 15px; --fs-lg: 17px; --fs-xl: 20px;
  --fs-2xl: 24px; --fs-3xl: 30px; --fs-4xl: 40px; --fs-5xl: 52px;

  /* Shape & depth */
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(26, 29, 31, .05);
  --sh-2: 0 1px 2px rgba(26, 29, 31, .04), 0 6px 20px rgba(26, 29, 31, .06);
  --sh-3: 0 18px 48px rgba(26, 29, 31, .16);
  --ring: 0 0 0 3px rgba(138, 155, 147, .38);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Layout */
  --side-w: 256px; --top-h: 60px; --max: 1200px; --gutter: 16px;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--f-body); font-size: var(--fs-base); line-height: 1.6; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; font-weight: 700; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
::selection { background: var(--sand); color: var(--charcoal); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .ltr { direction: ltr; unicode-bidi: isolate; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i .acc { stroke: var(--sand-strong); }
.i-sm { width: 16px; height: 16px; } .i-lg { width: 24px; height: 24px; } .i-xl { width: 32px; height: 32px; }
[dir="ltr"] .flip { transform: scaleX(-1); } /* الأيقونات مرسومة لاتجاه RTL (التالي = يسار) وتنعكس في LTR */

/* ---------- Brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; direction: ltr; color: var(--charcoal); }
.brand .wordmark { height: var(--h, 24px); width: auto; color: currentColor; }
.brand .product { font-family: var(--f-display); font-weight: 700; font-size: calc(var(--h, 24px) * .78); letter-spacing: .01em; line-height: 1; padding-top: 2px; color: var(--sage-deep); }
.brand.on-dark { color: var(--sand); }
.brand.on-dark .product { color: #fff; }

/* ---------- Typography helpers ---------- */
.display { font-family: var(--f-display); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-deep); }
.muted { color: var(--muted); } .muted-2 { color: var(--muted-2); }
.small { font-size: var(--fs-sm); } .xs { font-size: var(--fs-xs); } .lg { font-size: var(--fs-lg); }
.strong { font-weight: 600; } .bold { font-weight: 700; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); } .warn-t { color: var(--warn); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: var(--g, 12px); }
.row { display: flex; align-items: center; gap: var(--g, 12px); }
.row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; } .row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--g, 16px); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(var(--min, 260px), 1fr)); }
.span-2 { grid-column: span 2; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
@media (max-width: 960px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }

/* ---------- Buttons ---------- */
.btn {
  --bh: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--bh);
  padding-inline: 16px; border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 600; font-size: var(--fs-md);
  cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), border-color .15s, color .15s, box-shadow .15s, transform .05s;
  background: var(--surface); color: var(--ink); border-color: var(--line-2); user-select: none;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.btn-primary:hover { background: var(--charcoal-2); }
.btn-sand { background: var(--sand); color: var(--charcoal); border-color: var(--sand); }
.btn-sand:hover { background: var(--sand-strong); border-color: var(--sand-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #E7C3BA; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-danger-solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-sm { --bh: 32px; padding-inline: 12px; font-size: var(--fs-sm); }
.btn-lg { --bh: 48px; padding-inline: 22px; font-size: var(--fs-base); border-radius: var(--r); }
.btn-xl { --bh: 56px; padding-inline: 28px; font-size: var(--fs-lg); border-radius: var(--r); }
.btn-icon { width: var(--bh); padding: 0; }
.btn-block { width: 100%; }
.btn .spinner { display: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .i { display: none; }
.link { color: var(--sage-ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(95, 112, 105, .35); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--bad); margin-inline-start: 2px; }
.help { font-size: var(--fs-xs); color: var(--muted); }
.field-error { font-size: var(--fs-xs); color: var(--bad); font-weight: 500; }
.input, .select, .textarea, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; height: 42px; padding-inline: 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; font-size: var(--fs-base);
}
.field textarea, .textarea { height: auto; min-height: 96px; padding-block: 10px; resize: vertical; line-height: 1.6; }
.field select, .select { appearance: none; padding-inline-end: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A7471' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 16px; background-position: left 12px center; }
[dir="ltr"] .field select, [dir="ltr"] .select { background-position: right 12px center; }
.field select[multiple] { height: auto; min-height: 120px; padding-block: 6px; background-image: none; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: #B9C2BB; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--sage); box-shadow: var(--ring); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }
.field input[type=file] { font-size: var(--fs-sm); padding: 8px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .i { position: absolute; inset-inline-start: 12px; color: var(--muted); pointer-events: none; }
.input-group .input { padding-inline-start: 40px; }
[dir="rtl"] input[dir="ltr"], [dir="rtl"] textarea[dir="ltr"] { text-align: right; }
[dir="rtl"] input[dir="ltr"]::placeholder { text-align: right; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding-top: 8px; flex-wrap: wrap; }

.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-md); line-height: 1.5; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--charcoal); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 38px; height: 22px; border-radius: var(--r-full); background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--sage-deep); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-16px); }
[dir="ltr"] .switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: var(--r-sm); gap: 2px; flex-wrap: wrap; }
.seg > * { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg > .on, .seg > [aria-pressed="true"], .seg > [aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

/* Stepper (qty) */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.qty button { width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.qty button:hover { color: var(--ink); background: var(--surface-2); }
.qty output { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Chips, badges, tags ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding-inline: 14px; border-radius: var(--r-full); border: 1px solid var(--line-2); background: var(--surface); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--sage); color: var(--ink); }
.chip.on, .chip[aria-pressed="true"] { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.chip .i { width: 16px; height: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding-inline: 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral); }
.badge > i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-ok { background: var(--ok-bg); color: var(--ok); } .tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-bad { background: var(--bad-bg); color: var(--bad); } .tone-info { background: var(--info-bg); color: var(--info); }
.tone-neutral { background: var(--neutral-bg); color: var(--neutral); } .tone-sand { background: var(--sand-soft); color: var(--sand-ink); }
.demo-tag { display: inline-flex; align-items: center; height: 20px; padding-inline: 8px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; background: var(--sand-soft); color: var(--sand-ink); border: 1px dashed var(--sand-strong); white-space: nowrap; }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--ink-2); }
.code { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; direction: ltr; unicode-bidi: isolate; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: var(--fs-lg); font-weight: 600; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card.flat { box-shadow: none; }
.card.hover { transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s; }
.card.hover:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--line-2); }
.section-title { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin-bottom: 10px; }

/* Definition list */
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 10px 16px; font-size: var(--fs-md); }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; gap: 2px; } .dl dd { margin-bottom: 10px; } }

/* ---------- Stats / KPIs ---------- */
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat .label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.stat .label .i { width: 18px; height: 18px; color: var(--sage-deep); }
.stat .value { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: var(--fs-md); font-weight: 600; color: var(--muted); margin-inline-start: 4px; }
.stat .meta { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.delta-up { color: var(--ok); font-weight: 600; } .delta-down { color: var(--bad); font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { font-size: var(--fs-md); }
.table th { text-align: start; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #FAFBF9; }
.table tr.is-link { cursor: pointer; }
.table .end { text-align: end; } .table .center { text-align: center; }
.table .nowrap { white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-2); }
.card > .table-wrap:first-child .table th:first-child { border-start-start-radius: var(--r-lg); }
@media (max-width: 760px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.responsive td { padding: 0; border: 0; }
  .table.responsive td[data-hide-sm] { display: none; }
  .table.responsive td.end { text-align: end; }
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; background: none; font-weight: 600; font-size: var(--fs-md); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on, .tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--ink); border-bottom-color: var(--charcoal); }
.tabs .count { font-size: 11px; background: var(--surface-3); border-radius: var(--r-full); padding: 1px 7px; color: var(--ink-2); }

/* ---------- Alerts / banners ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid; font-size: var(--fs-md); }
.alert .i { margin-top: 2px; }
.alert strong { display: block; margin-bottom: 2px; }
.alert-info { background: var(--info-bg); border-color: #C9DAE6; color: #24465A; }
.alert-ok { background: var(--ok-bg); border-color: #C5DECF; color: #1F4D35; }
.alert-warn { background: var(--warn-bg); border-color: #EAD6AE; color: #6A4000; }
.alert-bad { background: var(--bad-bg); border-color: #EBC7BE; color: #7D2F20; }
.alert-sand { background: var(--sand-soft); border-color: #E9DE9C; color: #4F4612; }
.demo-banner { background: repeating-linear-gradient(-45deg, var(--sand), var(--sand) 12px, #F2EAAE 12px, #F2EAAE 24px); color: var(--charcoal); font-size: var(--fs-xs); font-weight: 600; text-align: center; padding: 6px 12px; }
.demo-banner a { text-decoration: underline; }

/* ---------- Empty / loading / error states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 20px; color: var(--muted); }
.empty .art { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--sage-pale); color: var(--sage-deep); margin-bottom: 4px; }
.empty h3 { font-size: var(--fs-lg); color: var(--ink); font-weight: 600; }
.empty p { max-width: 420px; font-size: var(--fs-md); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--r-sm); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; inset-block-end: 20px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 300; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
[dir="rtl"] .toasts { transform: translateX(50%); }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--charcoal); color: #fff; border-radius: var(--r); box-shadow: var(--sh-3); font-size: var(--fs-md); animation: toast-in .25s var(--ease); }
.toast .i { color: var(--sand); margin-top: 1px; }
.toast.error .i { color: #F2A28E; }
.toast button { margin-inline-start: auto; background: none; border: 0; color: #B9C2BE; cursor: pointer; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Modal (native dialog) & drawer ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-xl); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); box-shadow: var(--sh-3); background: var(--surface); color: var(--ink); }
dialog.modal::backdrop { background: rgba(26, 29, 31, .45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: modal-in .2s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.modal-head h3 { font-size: var(--fs-xl); }
.modal-body { padding: 16px 22px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 20px; flex-wrap: wrap; }
dialog.drawer { margin: 0; margin-inline-start: auto; height: 100vh; max-height: 100vh; width: min(480px, 100vw); border-radius: 0; border: 0; padding: 0; box-shadow: var(--sh-3); }
dialog.drawer::backdrop { background: rgba(26, 29, 31, .4); }
@media (max-width: 640px) {
  dialog.modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; }
}

/* ---------- Tooltip ---------- */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); inset-inline-start: 50%; transform: translateX(-50%);
  background: var(--charcoal); color: #fff; font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 6px; white-space: nowrap; z-index: 50; pointer-events: none;
}
[dir="rtl"] [data-tip]:hover::after { transform: translateX(50%); }

/* ---------- Menu (details) ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); padding: 6px; z-index: 120; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); font-size: var(--fs-md); color: var(--ink-2); background: none; border: 0; cursor: pointer; text-align: start; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); color: var(--ink); }
.menu-pop .sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- Avatar ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage-ink); font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }

/* ---------- Pagination & breadcrumbs ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: var(--fs-sm); color: var(--muted); border-top: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs .i { width: 14px; height: 14px; }

/* ---------- Progress ---------- */
.progress { height: 6px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--sage-deep); border-radius: inherit; }
.progress.sand > span { background: var(--sand-strong); }

/* ---------- Charts (server-rendered SVG) ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--f-body); fill: var(--muted); font-size: 11px; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-2); }
.chart .bar { fill: var(--c1); } .chart .bar.alt { fill: var(--c2); } .chart .bar.c3 { fill: var(--c3); } .chart .bar.muted { fill: var(--c-neutral); }
.chart .bar:hover { opacity: .85; }
.chart .line { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--c1); opacity: .1; }
.chart .dot { fill: var(--surface); stroke: var(--c1); stroke-width: 2; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c1); }
.hbar { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; display: flex; }
.hbar .track > span { height: 100%; background: var(--c1); }
.hbar .track > span.b { background: var(--c2); }
.hbar .track > span.c { background: var(--c3); }
.hbar .track > span + span { border-inline-start: 2px solid var(--surface); }
.legend i.c2 { background: var(--c2); } .legend i.c3 { background: var(--c3); } .legend i.c4 { background: var(--c4); } .legend i.cn { background: var(--c-neutral); }

/* ==========================================================================
   STOREFRONT
   ========================================================================== */
.sf { background: var(--bg); font-size: 16px; }
.sf-header { position: sticky; top: 0; z-index: 100; background: rgba(246, 247, 244, .86); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.sf-header.scrolled { border-bottom-color: var(--line); }
.sf-header .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.sf-nav { display: flex; gap: 4px; }
.sf-nav a { white-space: nowrap; padding: 8px 12px; border-radius: var(--r-sm); font-weight: 500; font-size: var(--fs-md); color: var(--ink-2); }
.sf-nav a:hover, .sf-nav a.on { color: var(--ink); background: var(--surface-2); }
.sf-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.sf-burger { display: none; }
@media (max-width: 1080px) {
  .sf-nav { display: none; }
  .sf-burger { display: inline-flex; }
  .sf-actions .hide-sm { display: none; }
}
.sf-mobile-nav { position: fixed; inset: 68px 0 0; background: var(--bg); z-index: 99; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.sf-mobile-nav a { padding: 14px 12px; font-size: var(--fs-lg); font-weight: 600; border-bottom: 1px solid var(--line); }

.hero { position: relative; overflow: hidden; background: var(--charcoal); color: #fff; border-radius: 0 0 28px 28px; }
.hero .container { position: relative; z-index: 2; padding-block: 64px 120px; }
.hero h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(34px, 6vw, 60px); line-height: 1.1; max-width: 720px; }
.hero h1 em { font-style: normal; color: var(--sand); }
.hero p.lead { margin-top: 16px; font-size: clamp(16px, 2vw, 19px); color: #C9D1CD; max-width: 560px; }
.hero-art { position: absolute; inset: 0; z-index: 1; opacity: .9; pointer-events: none; }
.hero-art svg { width: 100%; height: 100%; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: var(--fs-2xl); font-weight: 700; color: var(--sand); }
.hero-stats span { font-size: var(--fs-sm); color: #AEB8B3; }
.search-card { position: relative; z-index: 3; margin-top: -72px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); padding: 10px; display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 6px; }
.search-card .sc-field { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--r); transition: background .15s; min-width: 0; }
.search-card .sc-field:hover, .search-card .sc-field:focus-within { background: var(--surface-2); }
.search-card label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.search-card select, .search-card input { border: 0; background: transparent; padding: 0; font-size: var(--fs-base); font-weight: 600; height: 28px; width: 100%; appearance: none; }
.search-card select:focus, .search-card input:focus { outline: none; }
.search-card .btn { height: auto; min-height: 56px; }
@media (max-width: 860px) {
  .search-card { grid-template-columns: 1fr 1fr; margin-top: -88px; }
  .search-card .sc-field:first-child { grid-column: 1 / -1; }
  .search-card .btn { grid-column: 1 / -1; }
}

.sf-section { padding-block: 72px; }
.sf-section.tight { padding-block: 48px; }
.sf-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.sf-section-head h2 { font-family: var(--f-display); font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.sf-section-head p { color: var(--muted); max-width: 560px; margin-top: 6px; }

.cat-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 150px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: all .2s var(--ease); }
.cat:hover { border-color: var(--sage); transform: translateY(-2px); box-shadow: var(--sh-2); }
.cat .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--sage-pale); color: var(--sage-deep); }
.cat strong { font-size: var(--fs-md); }
.cat span { font-size: var(--fs-xs); color: var(--muted); }

/* Asset card */
.asset-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.asset-card:hover { box-shadow: var(--sh-2); transform: translateY(-3px); }
.asset-card .media { position: relative; aspect-ratio: 16 / 10; background: var(--charcoal); overflow: hidden; }
.asset-card .media > svg { width: 100%; height: 100%; }
.asset-card .media .tags { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; }
.asset-card .media .tags .badge { background: rgba(255, 255, 255, .92); color: var(--ink); }
.asset-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.asset-card h3 { font-size: var(--fs-lg); font-weight: 600; }
.asset-card .meta { display: flex; gap: 12px; color: var(--muted); font-size: var(--fs-sm); flex-wrap: wrap; }
.asset-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.asset-card .meta .i { width: 15px; height: 15px; }
.asset-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.price-from { font-size: var(--fs-sm); color: var(--muted); }
.price-from strong { font-size: var(--fs-lg); color: var(--ink); font-weight: 700; }
.slot-peek { display: flex; gap: 6px; flex-wrap: wrap; }
.slot-peek a { font-size: var(--fs-xs); font-weight: 600; padding: 4px 9px; border-radius: var(--r-full); background: var(--sage-pale); color: var(--sage-ink); }
.slot-peek a:hover { background: var(--sage-soft); }

/* Art (category illustrations) */
.art-bg { fill: var(--charcoal); } .art-line { fill: none; stroke: var(--sage); stroke-width: 2; opacity: .55; }
.art-accent { fill: none; stroke: var(--sand); stroke-width: 2.4; } .art-fill { fill: var(--sage); opacity: .14; }
.art-dot { fill: var(--sand); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 18px; inset-inline-end: 20px; font-family: var(--f-display); font-size: 44px; font-weight: 800; color: var(--surface-3); line-height: 1; }
.step .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--sand-soft); color: var(--sand-ink); margin-bottom: 14px; }
.step h3 { font-size: var(--fs-lg); margin-bottom: 6px; }
.step p { color: var(--muted); font-size: var(--fs-md); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.offer { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.offer.dark { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.offer.dark .muted { color: #AEB8B3; }
.offer .price { font-size: var(--fs-2xl); font-weight: 700; }

.split-band { border-radius: var(--r-xl); background: var(--sage-pale); padding: 36px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 760px) { .split-band { grid-template-columns: minmax(0, 1fr); padding: 24px; } }

.sf-footer { background: var(--charcoal); color: #C9D1CD; margin-top: 48px; padding-block: 48px 28px; }
.sf-footer a:hover { color: #fff; }
.sf-footer h4 { color: #fff; font-size: var(--fs-md); margin-bottom: 12px; }
.sf-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.sf-footer li { margin-bottom: 8px; font-size: var(--fs-md); }
.sf-footer .bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-dark, #3A4143); display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); flex-wrap: wrap; }
@media (max-width: 760px) { .sf-footer .cols { grid-template-columns: 1fr 1fr; } }

/* Page hero (inner) */
.page-hero { padding-block: 28px 8px; }
.page-hero h1 { font-family: var(--f-display); font-size: clamp(28px, 4vw, 40px); font-weight: 800; }

/* Discover layout */
.discover { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; padding: 20px; }
.filters h4 { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 8px; }
.filter-toggle { display: none; }
@media (max-width: 920px) {
  .discover { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; display: none; }
  .filters.open { display: flex; }
  .filter-toggle { display: inline-flex; }
}

/* Asset / product detail */
.detail-hero { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 21 / 8; background: var(--charcoal); position: relative; }
.detail-hero > svg { width: 100%; height: 100%; }
@media (max-width: 640px) { .detail-hero { aspect-ratio: 16 / 10; border-radius: var(--r-lg); } }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.sticky-col { position: sticky; top: 88px; }
@media (max-width: 1000px) { .detail-layout { grid-template-columns: minmax(0, 1fr); } .sticky-col { position: static; } }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.feature-list li { display: flex; gap: 10px; align-items: center; font-size: var(--fs-md); }
.feature-list .i { color: var(--sage-deep); }
@media (max-width: 520px) { .feature-list { grid-template-columns: 1fr; } }
.product-option { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.product-option:hover { border-color: var(--sage); }
.product-option .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--sage-pale); color: var(--sage-deep); display: grid; place-items: center; flex: none; }

/* Booking flow */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.flow > *, .detail-layout > *, .discover > *, .account-layout > *, .grid > *, .stack > * { min-width: 0; }
html, body { overflow-x: clip; }
@media (max-width: 1000px) { .flow { grid-template-columns: minmax(0, 1fr); } }
.flow-steps { display: flex; gap: 6px; margin-bottom: 20px; }
.flow-steps li { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted-2); }
.flow-steps li::before { content: ""; height: 4px; border-radius: var(--r-full); background: var(--surface-3); }
.flow-steps li.done::before { background: var(--sage-deep); } .flow-steps li.on::before { background: var(--charcoal); }
.flow-steps li.on, .flow-steps li.done { color: var(--ink); }
.flow-panel { padding: 24px; }
@media (max-width: 640px) { .flow-panel { padding: 18px 16px; } }
.flow-panel h2 { font-size: var(--fs-xl); font-weight: 700; margin-bottom: 4px; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.date-strip button, .date-strip a { scroll-snap-align: start; flex: none; width: 66px; padding: 10px 0; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; transition: all .15s; }
.date-strip .dw { font-size: 11px; color: var(--muted); font-weight: 600; }
.date-strip .dd { font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; }
.date-strip .dm { font-size: 11px; color: var(--muted); }
.date-strip button:hover, .date-strip a:hover { border-color: var(--sage); }
.date-strip .on { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.date-strip .on .dw, .date-strip .on .dm { color: #C9D1CD; }
.date-strip .closed { opacity: .4; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.slot { padding: 12px 10px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; text-align: center; transition: all .15s; display: flex; flex-direction: column; gap: 2px; }
.slot strong { font-size: var(--fs-md); font-weight: 600; } .slot span { font-size: var(--fs-xs); color: var(--muted); }
.slot:hover { border-color: var(--sage); background: var(--sage-pale); }
.slot.on { border-color: var(--charcoal); background: var(--charcoal); color: #fff; }
.slot.on span { color: var(--sand); }
.slot:has(input:checked) { border-color: var(--charcoal); background: var(--charcoal); color: #fff; }
.slot:has(input:checked) span { color: var(--sand); }
.slot:has(input:focus-visible), .seg > label:has(input:focus-visible) { box-shadow: var(--ring); }
.seg > label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.addon-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.addon-row:last-child { border-bottom: 0; }
.summary { padding: 0; overflow: hidden; }
.summary .sum-head { padding: 18px 20px; background: var(--charcoal); color: #fff; }
.summary .sum-head .muted { color: #AEB8B3; }
.summary .sum-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-md); }
.summary .line { display: flex; justify-content: space-between; gap: 12px; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px; border-top: 1px solid var(--line); font-weight: 700; font-size: var(--fs-xl); }
.mobile-bar { display: none; }
@media (max-width: 1000px) {
  .flow .summary-col { display: none; }
  .mobile-bar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 90; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; box-shadow: 0 -8px 24px rgba(26, 29, 31, .08); }
  .has-mobile-bar { padding-bottom: 96px; }
}
.confirm-hero { text-align: center; padding: 40px 20px 8px; }
.confirm-hero .ok-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.ticket { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.ticket .t-top { background: var(--charcoal); color: #fff; padding: 22px 24px; }
.ticket .t-cut { height: 0; border-top: 2px dashed var(--line-2); margin: 0 18px; position: relative; }
.ticket .t-body { padding: 22px 24px; }

/* Account */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; padding-block: 24px 48px; }
.account-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-weight: 500; color: var(--ink-2); font-size: var(--fs-md); }
.account-nav a:hover { background: var(--surface-2); }
.account-nav a.on { background: var(--charcoal); color: #fff; }
@media (max-width: 860px) {
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .account-nav { flex-direction: row; overflow-x: auto; padding: 6px; }
  .account-nav a { white-space: nowrap; }
}
.booking-tile { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 16px; }
.date-badge { width: 64px; height: 68px; border-radius: var(--r); background: var(--sage-pale); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.date-badge b { font-size: 24px; } .date-badge small { font-size: 11px; color: var(--muted); font-weight: 600; }
@media (max-width: 520px) { .booking-tile { grid-template-columns: 56px 1fr; } .booking-tile > :last-child { grid-column: 1 / -1; } .date-badge { width: 56px; } }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--charcoal); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { font-family: var(--f-display); font-size: 40px; font-weight: 800; line-height: 1.15; max-width: 420px; position: relative; z-index: 2; }
.auth-side p { color: #AEB8B3; max-width: 400px; margin-top: 12px; position: relative; z-index: 2; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: var(--fs-2xl); font-weight: 700; margin-bottom: 6px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.demo-accounts button { text-align: start; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: var(--fs-xs); }
.demo-accounts button:hover { border-color: var(--sage); background: var(--sage-pale); }
.demo-accounts button b { display: block; font-size: var(--fs-sm); color: var(--ink); }

/* ==========================================================================
   CONSOLE (Management)
   ========================================================================== */
.console { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--charcoal); color: #C9D1CD; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: #3A4143 transparent; }
.side > * { flex-shrink: 0; }
.side-brand { height: var(--top-h); display: flex; align-items: center; padding-inline: 20px; border-bottom: 1px solid #33393B; }
.side-org { margin: 14px 12px 4px; padding: 10px 12px; border-radius: var(--r); background: #2C3133; display: flex; gap: 10px; align-items: center; }
.side-org .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--sand); color: var(--charcoal); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.side-org b { color: #fff; font-size: var(--fs-sm); display: block; line-height: 1.3; }
.side-org span { font-size: 11px; color: #96A19C; }
.side nav { padding: 8px 12px 24px; display: flex; flex-direction: column; gap: 1px; }
.side .grp { font-size: 11px; font-weight: 600; color: #7E8A85; letter-spacing: .04em; padding: 16px 10px 6px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); font-size: var(--fs-md); font-weight: 500; color: #C9D1CD; position: relative; }
.side nav a .i { width: 19px; height: 19px; color: #96A19C; }
.side nav a:hover { background: #2E3436; color: #fff; }
.side nav a:hover .i { color: #fff; }
.side nav a.on { background: #343A3C; color: #fff; }
.side nav a.on .i { color: var(--sand); }
.side nav a.on::before { content: ""; position: absolute; inset-inline-start: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sand); }
[dir="rtl"] .side nav a.on::before { border-radius: 3px 0 0 3px; }
.side nav a .count { margin-inline-start: auto; font-size: 11px; font-weight: 700; background: var(--sand); color: var(--charcoal); border-radius: var(--r-full); padding: 0 7px; line-height: 18px; }
.side-foot { margin-top: auto; padding: 14px 20px; border-top: 1px solid #33393B; font-size: 11px; color: #7E8A85; }

.topbar { position: sticky; top: 0; z-index: 80; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding-inline: 24px; background: rgba(246, 247, 244, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .search { flex: 1; max-width: 460px; }
.topbar .search .input { height: 38px; background: var(--surface); }
.topbar .tb-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.bell { position: relative; }
.bell .dot { position: absolute; top: 7px; inset-inline-end: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--bg); }
.side-toggle { display: none; }
.main { min-width: 0; }
.page { padding: 24px 28px 48px; max-width: 1440px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-2xl); font-weight: 700; }
.page-head .sub { color: var(--muted); font-size: var(--fs-md); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input, .toolbar .select { height: 36px; font-size: var(--fs-md); width: auto; min-width: 150px; }
.toolbar .input-group { flex: 1; min-width: 200px; }
.toolbar .input-group .input { width: 100%; }
@media (max-width: 1080px) {
  .console { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); z-index: 200; transform: translateX(100%); transition: transform .25s var(--ease); }
  [dir="ltr"] .side { transform: translateX(-100%); }
  .side.open { transform: none !important; box-shadow: var(--sh-3); }
  .side-toggle { display: inline-flex; }
  .side-scrim { position: fixed; inset: 0; background: rgba(26, 29, 31, .4); z-index: 190; }
  .page { padding: 18px 16px 40px; }
  .topbar { padding-inline: 12px; }
}

/* Calendar timeline */
.timeline { --hour-w: 96px; overflow-x: auto; }
.tl-grid { display: grid; grid-template-columns: 200px calc(var(--hours, 8) * var(--hour-w)); width: max-content; min-width: 100%; }
.tl-head { display: grid; grid-template-columns: repeat(var(--hours, 8), var(--hour-w)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tl-head div { font-size: 11px; color: var(--muted); padding: 8px; border-inline-start: 1px solid var(--line); font-weight: 600; }
.tl-row-label { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 600; background: var(--surface); position: sticky; inset-inline-start: 0; z-index: 2; min-height: 56px; }
.tl-row-label small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.tl-track { position: relative; border-bottom: 1px solid var(--line); min-height: 56px; background-image: linear-gradient(to left, var(--line) 1px, transparent 1px); background-size: var(--hour-w) 100%; }
[dir="ltr"] .tl-track { background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); }
[dir="rtl"] .tl-track { background-position: right top; }
.tl-closed { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(0, 0, 0, .025) 6px, rgba(0, 0, 0, .025) 12px); }
.tl-item { position: absolute; top: 7px; bottom: 7px; border-radius: 8px; padding: 4px 8px; font-size: 11px; line-height: 1.35; overflow: hidden; display: flex; flex-direction: column; justify-content: center; border-inline-start: 3px solid; background: var(--sage-soft); border-color: var(--sage-deep); color: var(--ink); transition: box-shadow .15s; }
.tl-item:hover { box-shadow: var(--sh-2); z-index: 3; }
.tl-item b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-item span { color: var(--muted); white-space: nowrap; }
.tl-item.st-held, .tl-item.st-pending_payment, .tl-item.st-pending_approval { background: var(--warn-bg); border-color: var(--warn); }
.tl-item.st-checked_in { background: var(--info-bg); border-color: var(--info); }
.tl-item.st-completed { background: var(--surface-3); border-color: var(--muted-2); }
.tl-item.block { background: repeating-linear-gradient(-45deg, var(--bad-bg), var(--bad-bg) 6px, #FBEEEA 6px, #FBEEEA 12px); border-color: var(--bad); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 4; }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--surface-2); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.kcol-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 6px; font-size: var(--fs-sm); font-weight: 600; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.kcard:hover { border-color: var(--line-2); box-shadow: var(--sh-1); }

/* Checklist */
.checklist { display: flex; flex-direction: column; }
.checklist form { display: contents; }
.checklist .ci { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist .ci button { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; color: transparent; }
.checklist .ci.done button { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .ci.done .lbl { color: var(--muted); text-decoration: line-through; }

/* Permission matrix */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: start; }
.matrix input { width: 18px; height: 18px; accent-color: var(--charcoal); }

/* Print (invoices) */
.invoice-sheet { background: #fff; max-width: 820px; margin: 0 auto; padding: 40px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.qr { width: 132px; height: 132px; }
@media print {
  .side, .topbar, .no-print, .demo-banner, .sf-header, .sf-footer { display: none !important; }
  .console { display: block; } .page { padding: 0; } body { background: #fff; }
  .invoice-sheet { border: 0; padding: 0; }
}

/* Utilities */
.divider { height: 1px; background: var(--line); }
.pill-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sage-pale); color: var(--sage-deep); flex: none; }
.pill-ic.sand { background: var(--sand-soft); color: var(--sand-ink); }
.pill-ic.bad { background: var(--bad-bg); color: var(--bad); } .pill-ic.ok { background: var(--ok-bg); color: var(--ok); } .pill-ic.warn { background: var(--warn-bg); color: var(--warn); }
.list-row { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: #FAFBF9; }
.nowrap { white-space: nowrap; }
.text-end { text-align: end; }
.w-full { width: 100%; }
.hide { display: none; }
@media (max-width: 640px) { .hide-sm { display: none !important; } }
@media (min-width: 641px) { .show-sm { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------------- Photos: storefront ---------------- */
.asset-card .media > img, .detail-hero > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-card .media > img { transition: transform .5s var(--ease); }
.asset-card:hover .media > img { transform: scale(1.03); }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero.has-photo .hero-art { display: none; }
.hero.has-photo::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(26, 29, 31, .94) 0%, rgba(26, 29, 31, .8) 42%, rgba(26, 29, 31, .38) 100%); }
[dir="rtl"] .hero.has-photo::before { background: linear-gradient(270deg, rgba(26, 29, 31, .94) 0%, rgba(26, 29, 31, .8) 42%, rgba(26, 29, 31, .38) 100%); }
@media (max-width: 760px) { .hero.has-photo::before, [dir="rtl"] .hero.has-photo::before { background: linear-gradient(180deg, rgba(26, 29, 31, .78), rgba(26, 29, 31, .9)); } }
.band-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); display: block; }

.gallery { display: grid; gap: 8px; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 21 / 8; position: relative;
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery .g-item { position: relative; overflow: hidden; background: var(--charcoal); min-width: 0; min-height: 0; display: block; }
.gallery .g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s var(--ease), filter .2s; }
.gallery .g-item:hover img { transform: scale(1.03); filter: brightness(1.05); }
.gallery .g-item:focus-visible { outline: 3px solid var(--sand); outline-offset: -3px; }
.gallery .g-main { grid-row: 1 / 3; }
.gallery .g-item:nth-child(n+6) { display: none; }
.gallery.n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gallery.n2 { grid-template-columns: 2fr 1fr; } .gallery.n2 .g-item:nth-child(2) { grid-row: 1 / 3; }
.gallery.n3 { grid-template-columns: 2fr 1fr; }
.gallery.n4 .g-item:nth-child(4) { grid-row: 1 / 3; grid-column: 3; }
.gallery .g-count { position: absolute; bottom: 14px; inset-inline-end: 14px; z-index: 2; background: rgba(255, 255, 255, .94); color: var(--ink);
  border: 0; box-shadow: var(--sh-2); }
.gallery-note { margin-top: 8px; }
@media (max-width: 640px) {
  .gallery, .gallery.n1, .gallery.n2, .gallery.n3, .gallery.n4 { display: flex; aspect-ratio: auto; overflow-x: auto; scroll-snap-type: x mandatory;
    border-radius: var(--r-lg); gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery .g-item, .gallery .g-item:nth-child(n+6) { display: block; flex: 0 0 88%; aspect-ratio: 16 / 10; scroll-snap-align: center; border-radius: var(--r); }
  .gallery.n1 .g-item { flex-basis: 100%; }
  .gallery .g-count { display: none; }
}

.lightbox { border: 0; padding: 0; margin: auto; width: min(1200px, 100vw); max-width: 100vw; max-height: 100dvh; background: transparent; color: #fff; overflow: visible; }
.lightbox::backdrop { background: rgba(14, 16, 17, .92); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 16px 20px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; border-radius: var(--r); background: #111; }
.lightbox figcaption { font-size: var(--fs-sm); color: #D7DDDA; text-align: center; display: flex; gap: 10px; align-items: center; }
.lightbox figcaption .n { color: var(--sand); font-variant-numeric: tabular-nums; }
.lightbox .lb-btn { position: fixed; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background .15s; }
.lightbox .lb-btn:hover, .lightbox .lb-btn:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
.lightbox .lb-btn svg { width: 22px; height: 22px; }
.lightbox .lb-close { top: 14px; inset-inline-end: 14px; }
.lightbox .lb-prev { top: 50%; inset-inline-start: 14px; transform: translateY(-50%); }
.lightbox .lb-next { top: 50%; inset-inline-end: 14px; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 16px; transform: none; } }

/* ---------------- Photos: console ---------------- */
.input-sm { height: 34px !important; font-size: var(--fs-sm); }
.photo-admin { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .photo-admin { grid-template-columns: minmax(0, 1fr); } }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.photo-tile { margin: 0; overflow: hidden; display: flex; flex-direction: column; }
.photo-tile .ph { position: relative; aspect-ratio: 3 / 2; background: var(--charcoal); display: block; }
.photo-tile .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile .cover-tag { position: absolute; top: 10px; inset-inline-start: 10px; }
.cover-admin { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: center; }
@media (max-width: 760px) { .cover-admin { grid-template-columns: minmax(0, 1fr); } }
.cover-prev { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--r); display: block; background: var(--sage-pale); }
.cover-prev.empty { display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); }
