/* =========================================================
   Sairy — shared design system
   tokens, base, components used across booking + admin
   ========================================================= */

:root {
  /* surfaces */
  --bg-paper: oklch(0.985 0.012 50);
  --bg-rose:  oklch(0.96  0.022 18);
  --bg-elev:  oklch(0.99  0.008 60);

  /* ink */
  --ink:      oklch(0.20  0.020 30);
  --ink-soft: oklch(0.45  0.018 25);
  --ink-mute: oklch(0.62  0.014 30);

  /* brand — only --rose is the source of truth.
     stored as hex so the native color picker can round-trip exactly;
     mixing happens in oklch space below. */
  --rose:      #c44d68;
  --rose-deep: color-mix(in oklch, var(--rose) 78%, black);
  --rose-tint: color-mix(in oklch, var(--rose) 16%, var(--bg-paper));

  /* gold */
  --gold:      oklch(0.78 0.118 78);
  --gold-deep: oklch(0.62 0.115 75);

  /* rules */
  --rule:        oklch(0.88 0.020 30);
  --rule-strong: oklch(0.78 0.025 30);

  /* status */
  --ok:   oklch(0.62 0.110 145);
  --warn: oklch(0.74 0.130 70);
  --bad:  oklch(0.55 0.150 25);

  /* type — Aref Ruqaa is reserved for the brand mark "سيري" only.
     Everything else uses Tajawal. --font-accent kept for backward
     compat but resolves to Tajawal. */
  --font-display: "Aref Ruqaa", "Tajawal", serif;
  --font-body:    "Tajawal", system-ui, sans-serif;
  --font-accent:  var(--font-body);

  /* radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  /* motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; min-width: 0; }
html, body {
  margin: 0; padding: 0;
  overflow-x: hidden;
  max-width: 100%;
}

html {
  background: var(--bg-paper);
  color: var(--ink);
  font: 400 15px/1.65 var(--font-body);
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

body {
  background:
    radial-gradient(ellipse 70vmax 50vmax at 100% -10%, var(--bg-rose), transparent 60%),
    radial-gradient(ellipse 60vmax 40vmax at -10% 110%, oklch(0.94 0.025 22 / 0.7), transparent 60%),
    var(--bg-paper);
  background-attachment: fixed;
  min-height: 100vh;
}

::selection { background: var(--rose-tint); color: var(--ink); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }

:where(button, a, input, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ----- typography utilities ----- */
.display { font-family: var(--font-body); font-weight: 400; line-height: 1.15; }
.accent  { font-family: var(--font-accent); font-weight: 400; }
.brand   { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; }

/* small section opener: latin number + arabic label + thin gold rule */
.opener { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.opener-num   { font-family: var(--font-accent); font-size: 18px; color: var(--gold-deep); letter-spacing: 0.05em; }
.opener-label { font-family: var(--font-body); font-size: 13px; color: var(--ink-soft); letter-spacing: 0.02em; }
.opener-rule  { flex: 1; height: 1px; background: linear-gradient(to left, var(--gold), transparent); transform-origin: right; animation: hr-grow 600ms var(--ease) 200ms both; }

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border: 1px solid var(--rule);
  background: var(--bg-elev); color: var(--ink);
  border-radius: var(--r-md);
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--rose-tint); border-color: var(--rose); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn--primary { background: var(--rose); color: oklch(0.99 0.005 80); border-color: var(--rose); }
.btn--primary:hover { background: var(--rose-deep); border-color: var(--rose-deep); color: oklch(0.99 0.005 80); }
.btn--ghost { background: transparent; }

/* ----- inputs ----- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.02em; }
.input, .textarea {
  font: inherit; color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 11px 14px;
  outline: none;
  width: 100%;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.input:focus, .textarea:focus { border-color: var(--rose); background: var(--bg-paper); }
.textarea { resize: vertical; min-height: 80px; }
.input.is-error { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 12px; }

/* ----- chips ----- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
  border: 1px solid currentColor;
  background: color-mix(in oklch, currentColor 8%, transparent);
}
.chip--ok      { color: var(--ok); }
.chip--warn    { color: var(--warn); }
.chip--bad     { color: var(--bad); }
.chip--neutral { color: var(--ink-soft); }

/* ----- icons ----- */
.icon { width: 24px; height: 24px; flex: 0 0 24px; }
.icon-sm { width: 16px; height: 16px; flex: 0 0 16px; }
.icon-lg { width: 32px; height: 32px; flex: 0 0 32px; }

/* ----- animations ----- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hr-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}
.fade-up    { animation: fade-up 360ms var(--ease) both; }
.fade-up.d1 { animation-delay: 80ms; }
.fade-up.d2 { animation-delay: 160ms; }
.fade-up.d3 { animation-delay: 240ms; }
.fade-up.d4 { animation-delay: 320ms; }
.fade-up.d5 { animation-delay: 400ms; }

/* =========================================================
   Tweaks panel (shared)
   ========================================================= */
.tw-panel { position: fixed; bottom: 24px; left: 24px; z-index: 1000; font-family: var(--font-body); }
.tw-trigger {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  box-shadow: 0 6px 18px -8px oklch(0.30 0.030 30 / 0.25);
  transition: transform .25s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.tw-trigger:hover { color: var(--rose); border-color: var(--rose); }
.tw-panel.is-open .tw-trigger { color: var(--rose); border-color: var(--rose); transform: rotate(90deg); }

.tw-body {
  position: absolute;
  bottom: 56px; left: 0;
  width: 260px;
  background: var(--bg-elev);
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 50px -20px oklch(0.30 0.030 30 / 0.30);
  padding: 14px;
  animation: fade-up 220ms var(--ease) both;
  max-height: 60vh;
  overflow-y: auto;
}
.tw-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.tw-title { font-family: var(--font-body); font-size: 16px; }
.tw-close { padding: 4px 6px; border-radius: var(--r-sm); color: var(--ink-soft); display: grid; place-items: center; }
.tw-close:hover { color: var(--ink); }
.tw-content { display: grid; gap: 16px; }

.tw-section-title { font-family: var(--font-accent); font-size: 12px; letter-spacing: 0.05em; color: var(--ink-mute); padding-bottom: 6px; margin-bottom: 8px; border-bottom: 1px dashed var(--rule); }
.tw-section-body { display: grid; gap: 10px; }
.tw-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--ink); }

.tw-switch {
  width: 36px; height: 20px;
  background: var(--rule);
  border-radius: 999px; padding: 2px;
  position: relative;
  transition: background .2s var(--ease);
  flex-shrink: 0;
}
.tw-switch.is-on { background: var(--rose); }
.tw-thumb {
  display: block; width: 16px; height: 16px;
  background: var(--bg-paper);
  border-radius: 999px;
  transition: transform .2s var(--ease);
  transform: translateX(0);
}
/* RTL: thumb starts at the right edge (off), slides to left edge (on) */
[dir="rtl"] .tw-switch.is-on .tw-thumb { transform: translateX(-16px); }
[dir="ltr"] .tw-switch.is-on .tw-thumb { transform: translateX(16px); }

.tw-color { display: inline-flex; align-items: center; gap: 8px; position: relative; cursor: pointer; }
.tw-color input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; }
.tw-swatch { display: inline-block; width: 24px; height: 24px; border-radius: var(--r-sm); border: 1px solid var(--rule); }

/* =========================================================
   Booking page
   ========================================================= */
.b-page { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .b-page { padding: 0 20px; } }

.b-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg-paper) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gold);
}
.b-nav-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 16px 32px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
@media (max-width: 720px) { .b-nav-inner { padding: 14px 20px; } }
.b-mark { font-family: var(--font-display); font-size: 30px; letter-spacing: 0.02em; }
.b-mark-dot { color: var(--gold-deep); margin-inline-start: 2px; }
.b-nav-link { font-size: 13px; color: var(--ink-soft); display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: var(--r-md); border: 1px solid transparent; transition: all .15s var(--ease); }
.b-nav-link:hover { color: var(--rose-deep); border-color: var(--rule); }

.b-hero { padding: 96px 0 72px; }
.b-hero-num { font-family: var(--font-accent); color: var(--gold-deep); font-size: 16px; letter-spacing: 0.06em; margin-bottom: 12px; }
.b-hero-num::before { content: "01 "; }
.b-hero h1 {
  font-family: var(--font-body);
  font-size: clamp(64px, 11vw, 144px);
  font-weight: 400; line-height: 0.92; margin: 0;
  letter-spacing: 0.01em;
  text-align: end;
}
.b-hero-rule {
  width: 96px; height: 1px; background: var(--gold);
  margin: 28px 0 24px auto;
  transform-origin: right; animation: hr-grow 800ms var(--ease) 320ms both;
}
.b-hero-meta { display: grid; gap: 6px; text-align: end; color: var(--ink-soft); font-size: 14px; }
.b-hero-meta-row { display: inline-flex; align-items: center; gap: 8px; justify-content: end; }
.b-hero-meta b { color: var(--ink); font-weight: 500; }
.b-hero-tag {
  display: inline-block; font-family: var(--font-accent);
  font-size: 14px; color: var(--gold-deep); letter-spacing: 0.05em;
  text-align: end;
}

.b-flow { padding: 24px 0 96px; }
.b-flow-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 36px;
  box-shadow: 0 30px 60px -40px oklch(0.30 0.030 30 / 0.30);
}
@media (max-width: 600px) { .b-flow-card { padding: 24px 20px; } }

/* step indicator */
.b-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 32px; }
.b-step-dot {
  width: 12px; height: 12px; border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg-paper);
  transition: all .25s var(--ease);
  flex-shrink: 0;
}
.b-step-dot.is-active { background: var(--rose); border-color: var(--rose); box-shadow: 0 0 0 5px var(--rose-tint); }
.b-step-dot.is-done   { background: var(--gold); border-color: var(--gold); }
.b-step-line { flex: 1; height: 1px; background: var(--rule); transition: background .3s var(--ease); }
.b-step-line.is-done { background: var(--gold); }
.b-step-counter { margin-inline-start: 12px; font-family: var(--font-accent); font-size: 14px; color: var(--ink-mute); white-space: nowrap; }

.b-step-title { font-family: var(--font-body); font-size: 30px; margin: 0 0 6px; line-height: 1.1; }
.b-step-sub { color: var(--ink-soft); margin: 0 0 24px; font-size: 14px; }

/* services */
.b-services { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .b-services { grid-template-columns: 1fr; } }
.b-service {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg-paper);
  text-align: start;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
  cursor: pointer;
}
.b-service:hover { border-color: var(--rose); transform: translateY(-1px); }
.b-service::after {
  content: ""; position: absolute; bottom: 0; inset-inline: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease);
  z-index: 1;
}
.b-service:hover::after { transform: scaleX(1); }
.b-service.is-selected { background: var(--rose-tint); border-color: var(--rose); }
.b-service.is-selected::after { transform: scaleX(1); background: var(--rose); }
.b-service-img {
  display: block; width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--rule);
  transition: transform .5s var(--ease);
}
.b-service:hover .b-service-img { transform: scale(1.04); }
.b-service-content {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.b-service-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.b-service-icon { color: var(--gold-deep); flex-shrink: 0; }
.b-service.is-selected .b-service-icon { color: var(--rose-deep); }
.b-service-name { font-family: var(--font-body); font-weight: 500; font-size: 16px; margin: 0; }
.b-service-desc { color: var(--ink-soft); font-size: 13px; margin: 0; line-height: 1.5; flex: 1; }
.b-service-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--rule); font-size: 13px; }
.b-service-duration { color: var(--ink-mute); display: inline-flex; align-items: center; gap: 6px; }
.b-service-price-num { font-family: var(--font-accent); font-size: 18px; color: var(--ink); }
.b-service-price-unit { font-size: 12px; color: var(--ink-soft); margin-inline-start: 4px; }

.b-selected-mark {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: var(--rose);
  color: oklch(0.99 0 0);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--bg-paper);
  box-shadow: 0 2px 6px oklch(0.30 0.030 30 / 0.30);
  z-index: 2;
}

/* staff */
.b-staff { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 600px) { .b-staff { grid-template-columns: 1fr; } }
.b-staff-card {
  position: relative;
  display: grid; gap: 10px; justify-items: center;
  padding: 24px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg-paper);
  text-align: center;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.b-staff-card:hover { border-color: var(--rose); transform: translateY(-1px); }
.b-staff-card.is-selected { background: var(--rose-tint); border-color: var(--rose); }
.b-staff-mono {
  width: 72px; height: 72px; border-radius: 999px;
  background: var(--bg-rose); color: var(--gold-deep);
  display: grid; place-items: center;
  font-family: var(--font-body); font-size: 32px;
  border: 1px solid var(--gold);
}
.b-staff-card.is-selected .b-staff-mono { background: var(--bg-elev); color: var(--rose-deep); border-color: var(--rose); }
.b-staff-name { font-family: var(--font-body); font-weight: 500; font-size: 16px; margin: 0; }
.b-staff-role { font-size: 13px; color: var(--ink-soft); margin: 0; }
.b-staff-tag { font-size: 11px; padding: 3px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-mute); margin-top: 2px; }

/* calendar */
.b-cal { display: grid; gap: 14px; }
.b-cal-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.b-cal-month { font-family: var(--font-body); font-size: 22px; }
.b-cal-month .accent { font-family: var(--font-accent); color: var(--gold-deep); margin-inline-start: 8px; }
.b-cal-nav { display: inline-flex; gap: 4px; }
.b-cal-nav-btn { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--ink-soft); border: 1px solid var(--rule); }
.b-cal-nav-btn:hover { color: var(--rose-deep); border-color: var(--rose); }
.b-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.b-cal-weekday { font-size: 11px; color: var(--ink-mute); text-align: center; padding: 6px 0; letter-spacing: 0.02em; }
.b-cal-day {
  height: 40px;
  display: grid; place-items: center;
  background: var(--bg-paper);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-accent); font-size: 16px; color: var(--ink);
  position: relative;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.b-cal-day:hover { border-color: var(--rose); background: var(--rose-tint); }
.b-cal-day.is-other { color: var(--ink-mute); opacity: 0.35; }
.b-cal-day.is-past { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.b-cal-day.is-closed { opacity: 0.25; cursor: not-allowed; pointer-events: none; text-decoration: line-through; text-decoration-color: var(--rule); }
.b-cal-day.is-today::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 999px; background: var(--gold); }
.b-cal-day.is-selected { background: var(--rose-tint); border-color: var(--rose); color: var(--rose-deep); font-weight: 500; }

/* time slots */
.b-times-label { font-size: 13px; color: var(--ink-soft); margin: 4px 0 8px; }
.b-times { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.b-times::-webkit-scrollbar { height: 6px; }
.b-times::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 999px; }
.b-time {
  flex: 0 0 auto;
  padding: 8px 18px; border: 1px solid var(--rule);
  border-radius: 999px; background: var(--bg-paper);
  font-family: var(--font-accent); font-size: 16px;
  color: var(--ink); cursor: pointer;
  transition: all .15s var(--ease);
  white-space: nowrap;
}
.b-time:hover { border-color: var(--rose); background: var(--rose-tint); }
.b-time.is-selected { background: var(--rose); color: oklch(0.99 0.005 80); border-color: var(--rose); }
.b-time.is-disabled { opacity: 0.3; pointer-events: none; }
.b-times-empty { color: var(--ink-mute); font-size: 13px; padding: 12px 0; }

/* info + summary */
.b-info { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
@media (max-width: 720px) { .b-info { grid-template-columns: 1fr; } }
.b-form { display: grid; gap: 16px; }
.b-summary {
  background: var(--bg-rose);
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  padding: 24px;
  display: grid; gap: 12px;
  position: sticky; top: 96px;
}
.b-summary-title { font-family: var(--font-body); font-size: 22px; margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--gold); }
.b-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--rule); font-size: 14px; }
.b-summary-row:last-of-type { border-bottom: 0; }
.b-summary-row span:first-child { color: var(--ink-soft); }
.b-summary-row span:last-child  { color: var(--ink); font-weight: 500; }
.b-summary-total {
  margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--gold);
  display: flex; justify-content: space-between; align-items: baseline;
}
.b-summary-total-label { font-family: var(--font-body); font-size: 18px; }
.b-summary-total-num { font-family: var(--font-accent); font-size: 24px; color: var(--rose-deep); }
.b-summary-total-unit { font-size: 13px; color: var(--ink-soft); margin-inline-start: 4px; }
.b-summary-empty { color: var(--ink-mute); font-size: 13px; padding: 4px 0; }
.b-summary .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* step nav */
.b-step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); }

/* success */
.b-success { text-align: center; padding: 16px 0 8px; }
.b-success-mark { display: inline-grid; place-items: center; width: 96px; height: 96px; border-radius: 999px; background: var(--rose-tint); border: 1px solid var(--gold); color: var(--rose-deep); margin-bottom: 24px; }
.b-success-mark svg path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw 700ms var(--ease) 200ms forwards; }
.b-success h2 { font-family: var(--font-body); font-size: 36px; margin: 0 0 8px; }
.b-success-sub { color: var(--ink-soft); margin: 0 0 8px; }
.b-success-id { font-family: var(--font-accent); color: var(--gold-deep); font-size: 18px; margin: 0 0 28px; letter-spacing: 0.02em; }
.b-success-summary {
  text-align: start;
  background: var(--bg-rose);
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  padding: 24px;
  display: grid; gap: 10px;
  margin: 0 auto 28px;
  max-width: 520px;
}

/* footer */
.b-footer { border-top: 1px solid var(--gold); padding: 56px 0 40px; text-align: center; color: var(--ink-soft); font-size: 13px; margin-top: 48px; }
.b-footer-mark { font-family: var(--font-display); font-size: 32px; color: var(--ink); margin-bottom: 12px; letter-spacing: 0.02em; }
.b-footer-rule { display: block; width: 48px; height: 1px; background: var(--gold); margin: 0 auto 16px; }
.b-footer-line { margin: 4px 0; }
.b-footer-row { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.b-footer-copy { margin-top: 24px; color: var(--ink-mute); font-size: 12px; }

/* =========================================================
   Admin page
   ========================================================= */
.a-shell { min-height: 100vh; }
.a-sidebar {
  position: fixed; top: 0; bottom: 0;
  inset-inline-end: 0;
  width: 240px;
  background: var(--bg-elev);
  border-inline-start: 1px solid var(--gold);
  display: flex; flex-direction: column;
  padding: 24px 16px;
  z-index: 30;
}
.a-sidebar-mark { font-family: var(--font-display); font-size: 30px; padding: 0 12px 14px; border-bottom: 1px solid var(--gold); margin-bottom: 16px; }
.a-sidebar-mark .accent { font-family: var(--font-accent); color: var(--gold-deep); font-size: 12px; display: block; margin-top: 4px; letter-spacing: 0.08em; }
.a-sidebar-notif {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--rose-tint);
  border: 1px solid var(--rose);
  border-radius: var(--r-md);
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--rose-deep);
}
.a-sidebar-notif .a-badge {
  margin-inline-start: auto;
  background: var(--rose); color: oklch(0.99 0 0);
  font-family: var(--font-accent);
  padding: 0 8px; border-radius: 999px; font-size: 13px;
  min-width: 22px; text-align: center;
}
.a-nav { display: grid; gap: 2px; }
.a-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 14px; color: var(--ink-soft);
  text-align: start;
  transition: all .15s var(--ease);
  width: 100%;
}
.a-nav-item:hover { color: var(--ink); background: var(--bg-rose); }
.a-nav-item.is-active { color: var(--rose-deep); background: var(--rose-tint); }
.a-nav-item.is-active::before {
  content: ""; position: absolute; top: 8px; bottom: 8px;
  inset-inline-end: 0; width: 3px; background: var(--gold); border-radius: 3px;
}
.a-nav-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule); }
.a-nav-bottom .a-nav-item { color: var(--ink-soft); }
.a-nav-bottom .a-nav-item:hover { color: var(--rose-deep); }

/* main */
.a-main { margin-inline-end: 240px; min-height: 100vh; }
.a-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px;
  background: color-mix(in oklch, var(--bg-paper) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  gap: 24px;
}
.a-date { font-size: 13px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 2px; }
.a-date b { font-family: var(--font-body); color: var(--ink); font-weight: 400; font-size: 18px; line-height: 1; }
.a-stats { display: flex; align-items: stretch; }
.a-stat { padding: 0 18px; border-inline-start: 1px solid var(--rule); display: grid; align-content: center; }
.a-stat:first-child { border-inline-start: 0; }
.a-stat-label { font-family: var(--font-accent); font-size: 11px; color: var(--ink-mute); letter-spacing: 0.06em; }
.a-stat-num { font-family: var(--font-body); font-size: 22px; line-height: 1.1; }

.a-view { padding: 32px; max-width: 1200px; }
.a-view-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gold); }
.a-view-head .accent { font-family: var(--font-accent); font-size: 14px; color: var(--gold-deep); letter-spacing: 0.06em; }
.a-view-title { font-family: var(--font-body); font-size: 32px; margin: 0; line-height: 1.1; }
.a-view-sub { color: var(--ink-soft); font-size: 13px; margin: 4px 0 0; }

.a-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.a-search { position: relative; flex: 1; min-width: 220px; max-width: 320px; }
.a-search .input { padding-inline-start: 36px; }
.a-search-icon { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-mute); pointer-events: none; }
.a-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.a-pill {
  padding: 6px 14px; border: 1px solid var(--rule);
  background: var(--bg-paper); color: var(--ink-soft);
  border-radius: 999px; font-size: 13px; cursor: pointer;
  transition: all .15s var(--ease);
}
.a-pill:hover { color: var(--ink); border-color: var(--rose); }
.a-pill.is-active { background: var(--rose-tint); border-color: var(--rose); color: var(--rose-deep); }

/* table */
.a-table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; background: var(--bg-elev); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; font-size: 14px; }
.a-table th, .a-table td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.a-table th { background: var(--bg-rose); color: var(--ink-soft); font-weight: 500; font-size: 12px; letter-spacing: 0.04em; }
.a-table tr:last-child td { border-bottom: 0; }
.a-table tbody tr { transition: background .15s var(--ease); }
.a-table tbody tr:hover td { background: color-mix(in oklch, var(--bg-rose) 50%, var(--bg-paper)); }
.a-table .num { font-family: var(--font-accent); }

.a-actions { display: inline-flex; gap: 4px; }
.a-icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  background: var(--bg-paper);
  transition: all .15s var(--ease);
}
.a-icon-btn:hover { color: var(--rose-deep); border-color: var(--rose); background: var(--rose-tint); }
.a-icon-btn[disabled] { opacity: 0.3; pointer-events: none; }
.a-icon-btn.is-active { color: var(--ok); border-color: var(--ok); }

.a-empty { text-align: center; padding: 64px 24px; color: var(--ink-soft); }
.a-empty-rule { width: 64px; height: 1px; margin: 0 auto 24px; background: var(--gold); }
.a-empty-title { font-family: var(--font-body); font-size: 24px; color: var(--ink); margin: 0 0 8px; }

/* monthly calendar */
.a-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.a-cal-month { font-family: var(--font-body); font-size: 28px; }
.a-cal-month .accent { font-family: var(--font-accent); color: var(--gold-deep); margin-inline-start: 10px; }
.a-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; background: var(--bg-elev); padding: 12px; border: 1px solid var(--rule); border-radius: var(--r-md); }
.a-cal-weekday { font-size: 11px; color: var(--ink-mute); text-align: center; padding: 6px 0; letter-spacing: 0.04em; }
.a-cal-day {
  min-height: 84px;
  background: var(--bg-paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 10px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  transition: all .15s var(--ease);
}
.a-cal-day:hover { border-color: var(--rose); }
.a-cal-day.is-other { opacity: 0.35; pointer-events: none; }
.a-cal-day.is-today { border-color: var(--gold); }
.a-cal-day.is-selected { background: var(--rose-tint); border-color: var(--rose); }
.a-cal-day-num { font-family: var(--font-accent); font-size: 16px; color: var(--ink); }
.a-cal-day-badge {
  align-self: end; margin-top: auto;
  background: var(--rose); color: oklch(0.99 0 0);
  font-family: var(--font-accent);
  padding: 0 8px; border-radius: 999px; font-size: 12px;
  min-width: 22px; text-align: center;
}

.a-cal-detail { margin-top: 24px; background: var(--bg-elev); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 24px; }
.a-cal-detail-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--gold); }
.a-cal-detail-title { font-family: var(--font-body); font-size: 22px; margin: 0; }
.a-cal-detail-list { display: grid; gap: 8px; }
.a-cal-detail-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--rule); font-size: 14px; }
.a-cal-detail-row:last-child { border-bottom: 0; }
.a-cal-detail-time { font-family: var(--font-accent); color: var(--gold-deep); font-size: 16px; }

/* clients */
.a-clients-summary { color: var(--ink-soft); font-size: 13px; margin-bottom: 8px; }

/* staff cards */
.a-staff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .a-staff-grid { grid-template-columns: 1fr; } }
.a-staff-card { background: var(--bg-elev); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 24px; display: grid; gap: 18px; }
.a-staff-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--gold); }
.a-staff-mono { width: 56px; height: 56px; border-radius: 999px; background: var(--bg-rose); color: var(--gold-deep); display: grid; place-items: center; font-family: var(--font-body); font-size: 24px; flex-shrink: 0; border: 1px solid var(--gold); }
.a-staff-name { font-family: var(--font-body); font-size: 22px; margin: 0; }
.a-staff-role { color: var(--ink-soft); font-size: 13px; margin: 0; }
.a-staff-strip { display: grid; grid-template-columns: repeat(3, 1fr); }
.a-staff-stat { padding: 0 12px; border-inline-start: 1px solid var(--rule); }
.a-staff-stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.a-staff-stat-label { font-family: var(--font-accent); font-size: 11px; color: var(--ink-mute); }
.a-staff-stat-num { font-family: var(--font-body); font-size: 22px; line-height: 1.1; }
.a-staff-recent { font-size: 13px; }
.a-staff-recent-title { font-family: var(--font-accent); color: var(--ink-mute); font-size: 12px; letter-spacing: 0.05em; padding-bottom: 8px; border-bottom: 1px dashed var(--rule); margin-bottom: 8px; }
.a-staff-recent-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--rule); color: var(--ink-soft); }
.a-staff-recent-row:last-child { border-bottom: 0; }
.a-staff-recent-row .num { color: var(--gold-deep); }

/* stats */
.a-stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
@media (max-width: 980px) { .a-stat-cards { grid-template-columns: 1fr 1fr; } }
.a-stat-card { background: var(--bg-elev); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 22px; display: grid; gap: 6px; position: relative; overflow: hidden; }
.a-stat-card::before { content: ""; position: absolute; top: 14px; inset-inline-start: 14px; width: 24px; height: 1px; background: var(--gold); }
.a-stat-card-label { font-family: var(--font-accent); font-size: 13px; color: var(--ink-mute); margin-top: 18px; letter-spacing: 0.04em; }
.a-stat-card-num { font-family: var(--font-body); font-size: 36px; line-height: 1.1; }
.a-stat-card-sub { color: var(--ink-soft); font-size: 12px; }

.a-charts { display: grid; gap: 24px; }
@media (min-width: 980px) { .a-charts { grid-template-columns: 1fr 1fr; } }
.a-chart { background: var(--bg-elev); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 24px; }
.a-chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--gold); }
.a-chart-title { font-family: var(--font-body); font-size: 20px; margin: 0; }
.a-chart-sub { font-family: var(--font-accent); font-size: 12px; color: var(--ink-mute); }
.a-bars { display: grid; gap: 10px; }
.a-bar-row { display: grid; grid-template-columns: 130px 1fr 50px; align-items: center; gap: 12px; font-size: 13px; }
.a-bar-label { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-bar-track { height: 8px; background: var(--bg-rose); border-radius: 999px; overflow: hidden; }
.a-bar-fill { height: 100%; background: linear-gradient(to left, var(--gold), var(--rose)); border-radius: 999px; transition: width 600ms var(--ease); }
.a-bar-num { font-family: var(--font-accent); text-align: end; color: var(--ink); }

/* compact mode */
body.compact { font-size: 13px; }
body.compact .a-view { padding: 20px; }
body.compact .a-view-title { font-size: 24px; }
body.compact .a-table th, body.compact .a-table td { padding: 9px 12px; font-size: 13px; }
body.compact .a-stat-card-num { font-size: 28px; }
body.compact .a-staff-card { padding: 16px; }
body.compact .a-cal-day { min-height: 62px; }
body.compact .a-stat-num { font-size: 18px; }

/* responsive */
@media (max-width: 880px) {
  .a-sidebar { position: static; width: 100%; height: auto; border-inline-start: 0; border-bottom: 1px solid var(--gold); padding: 16px; }
  .a-main { margin-inline-end: 0; }
  .a-nav { display: flex; gap: 4px; flex-wrap: wrap; }
  .a-nav-item { width: auto; }
  .a-nav-item.is-active::before { display: none; }
  .a-nav-bottom { margin-top: 0; padding-top: 0; border: 0; }
  .a-stats { display: none; }
  .a-topbar { padding: 12px 16px; }
  .a-view { padding: 20px; }
}
