/* =========================================================================
   Violets Salon Booking System — design system
   Compact, professional. Restrained purple on white; light-first with a
   dark-mode fallback.
   ========================================================================= */

:root {
  /* brand */
  --plum-900: #241733;
  --plum-800: #32204a;
  --plum-700: #4c2d71;
  --plum-600: #603a8a;
  --violet-500: #7c5cd6;
  --violet-400: #9b82e3;
  --violet-300: #c3b2ef;
  --violet-200: #ded4f7;
  --violet-100: #eee9fb;
  --violet-050: #f7f5fc;

  /* surfaces */
  --bg: #f7f7fa;
  --surface: #ffffff;
  --surface-2: #f8f7fb;
  --line: #e6e4ed;
  --line-strong: #d3cfdf;

  /* text */
  --ink: #241f30;
  --ink-soft: #5a5368;
  --ink-mute: #8b8599;
  --on-brand: #ffffff;

  /* status */
  --ok: #0f7355;       --ok-bg: #e6f4ef;
  --warn: #92600a;     --warn-bg: #fbf1de;
  --bad: #a8304b;      --bad-bg: #fbe9ed;
  --info: #2f5ea8;     --info-bg: #e9eff9;

  /* scale */
  --radius: 7px;
  --radius-sm: 5px;
  --radius-lg: 11px;
  --shadow-sm: 0 1px 2px rgba(36, 23, 51, .05);
  --shadow: 0 1px 3px rgba(36, 23, 51, .07), 0 4px 12px rgba(36, 23, 51, .05);
  --shadow-lg: 0 8px 28px rgba(36, 23, 51, .12);
  --ring: 0 0 0 3px rgba(124, 92, 214, .22);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Cormorant Garamond', Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15121c;
    --surface: #1d1927;
    --surface-2: #231e30;
    --line: #2f2940;
    --line-strong: #3e3652;
    --ink: #ece9f3;
    --ink-soft: #b3abc5;
    --ink-mute: #857d99;
    --violet-050: #231e30;
    --violet-100: #2b2440;
    --ok-bg: #13302a; --warn-bg: #332814; --bad-bg: #331a22; --info-bg: #19253c;
    --ok: #48c9a4; --warn: #d9a74d; --bad: #ea7f98; --info: #7fa6ef;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .25);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--plum-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--ink); font-weight: 600; }
h1 { font-size: 1.5rem; letter-spacing: -.015em; }
h2 { font-size: 1.1rem; letter-spacing: -.008em; }
h3 { font-size: .95rem; }
h4 { font-size: .86rem; }
p  { margin: 0 0 .9em; }

:focus-visible { outline: 2px solid var(--violet-500); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-mute); }
.soft  { color: var(--ink-soft); }
.small { font-size: .84rem; }
.tiny  { font-size: .75rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt1 { margin-top: 6px; } .mt2 { margin-top: 14px; } .mt3 { margin-top: 24px; }
.mb1 { margin-bottom: 6px; } .mb2 { margin-bottom: 14px; } .mb3 { margin-bottom: 24px; }
.stack > * + * { margin-top: 11px; }
.row { display: flex; gap: 10px; align-items: center; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em;
  background: var(--violet-050); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }

/* ---------- brand wordmark ---------- */
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--plum-700);
  line-height: 1;
}
.wordmark-sub {
  font-size: .58rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: 5px; font-weight: 500;
}
.script { font-family: var(--display); font-weight: 600; color: var(--plum-700); letter-spacing: -.01em; }

/* ---------- public header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .bar { display: flex; align-items: center; gap: 18px; padding: 11px 0; }
.site-header .wordmark { font-size: 1.4rem; }
.site-nav { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); font-weight: 500; font-size: .84rem; }
.site-nav a:hover, .site-nav a.active { color: var(--plum-700); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.2rem; color: var(--plum-700); cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: .84rem; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
  text-decoration: none; line-height: 1.3; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--plum-700); color: #fff; }
.btn-primary:hover { background: var(--plum-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--violet-300); }
.btn-soft { background: var(--violet-100); color: var(--plum-700); }
.btn-soft:hover { background: var(--violet-200); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: var(--line-strong); }
.btn-danger:hover { background: var(--bad); color: #fff; border-color: transparent; }
.btn-sm { padding: 5px 11px; font-size: .78rem; }
.btn-lg { padding: 11px 24px; font-size: .92rem; }
.btn-block { width: 100%; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 16px; }
.card-head {
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; font-size: .92rem; }
.card-body { padding: 16px; }
.card-foot { padding: 11px 16px; border-top: 1px solid var(--line); background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--violet-050), var(--surface));
  border-bottom: 1px solid var(--line);
  padding: 44px 0 40px;
  text-align: center;
}
.hero .wordmark { font-size: clamp(2.2rem, 5.5vw, 3.2rem); }
.hero-tag {
  font-family: var(--display); font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink-soft); margin-top: 4px; font-style: italic;
}
.hero-services {
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center;
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-mute); margin: 16px 0 22px; font-weight: 500;
}

/* ---------- tiles ---------- */
.tile {
  display: block; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease; color: inherit;
}
.tile:hover { box-shadow: var(--shadow); border-color: var(--violet-300); text-decoration: none; }
.tile-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--violet-100); color: var(--plum-700); font-size: 1rem; margin-bottom: 10px;
}
.tile h3 { margin: 0 0 3px; color: var(--plum-700); }
.tile p { margin: 0; font-size: .82rem; color: var(--ink-soft); }

.treatment-row {
  display: flex; gap: 14px; align-items: flex-start; padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.treatment-row:last-child { border-bottom: 0; }
.treatment-row h3 { margin: 0 0 2px; font-size: .92rem; }
.treatment-meta { font-size: .78rem; color: var(--ink-mute); }
.price-tag {
  font-family: var(--display); font-size: 1.25rem; font-weight: 600;
  color: var(--plum-700); white-space: nowrap; line-height: 1.1;
}

/* ---------- staff ---------- */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 600; font-size: .7rem;
  color: #fff; background: var(--plum-700);
  object-fit: cover; letter-spacing: .01em;
}
.avatar-lg { width: 58px; height: 58px; font-size: 1.05rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 1.5rem; }

.staff-card { text-align: center; padding: 18px 14px; }
.staff-card .avatar { margin: 0 auto 10px; }
.staff-card h3 { margin: 0 0 2px; }
.staff-card .role { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 500; }

/* ---------- forms ---------- */
label { display: block; font-weight: 500; font-size: .78rem; margin-bottom: 4px; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=search],
input[type=file], select, textarea {
  width: 100%; padding: 7px 10px; font: inherit; font-size: .84rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--violet-500); box-shadow: var(--ring);
}
textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.field { margin-bottom: 12px; }
.field-hint { font-size: .74rem; color: var(--ink-mute); margin-top: 4px; }
.field-row { display: grid; gap: 11px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: .83rem; color: var(--ink-soft); }
.check input { width: 15px; height: 15px; margin-top: 2px; flex: none; accent-color: var(--violet-500); }

/* ---------- alerts & badges ---------- */
.alert {
  padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 12px;
  font-size: .83rem; border: 1px solid transparent;
}
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.alert-error, .alert-danger { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 20%, transparent); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 20%, transparent); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 20%, transparent); }

.badge {
  display: inline-block; padding: 2px 7px; border-radius: 3px;
  font-size: .69rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--violet-100); color: var(--plum-700); }

/* ---------- booking stepper ---------- */
.stepper { display: flex; gap: 4px; margin: 0 0 20px; flex-wrap: wrap; }
.step {
  flex: 1 1 95px; padding: 7px 4px 0; border-top: 2px solid var(--line);
  font-size: .69rem; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--ink-mute); transition: .15s;
}
.step.done { border-top-color: var(--violet-400); color: var(--violet-500); }
.step.active { border-top-color: var(--plum-700); color: var(--plum-700); }

.panel { display: none; }
.panel.active { display: block; animation: rise .22s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.choice {
  display: flex; gap: 11px; align-items: center; width: 100%; text-align: left;
  padding: 10px 13px; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); font: inherit; color: inherit;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.choice:hover { border-color: var(--violet-300); background: var(--violet-050); }
.choice.selected { border-color: var(--plum-700); background: var(--violet-050); box-shadow: var(--ring); }
.choice .label { font-weight: 600; font-size: .88rem; }
.choice .sub { font-size: .78rem; color: var(--ink-mute); }
.choice-list { display: grid; gap: 7px; }

/* ---------- date picker + slots ---------- */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.cal-head strong { font-size: .88rem; }
.cal-nav { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  width: 26px; height: 26px; cursor: pointer; color: var(--plum-700); font-size: .9rem; line-height: 1; }
.cal-nav:hover:not(:disabled) { background: var(--violet-050); }
.cal-nav:disabled { opacity: .3; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: .64rem; font-weight: 600; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: .05em; padding-bottom: 5px; }
.cal-day {
  aspect-ratio: 1; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer;
  font: inherit; font-size: .8rem; color: var(--ink); position: relative; transition: .13s;
}
.cal-day:hover:not(:disabled) { background: var(--violet-100); }
.cal-day:disabled { color: var(--ink-mute); opacity: .3; cursor: not-allowed; }
.cal-day.has-slots::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--violet-500);
}
.cal-day.selected { background: var(--plum-700); color: #fff; font-weight: 600; }
.cal-day.selected::after { background: #fff; }
.cal-day.empty { visibility: hidden; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.slot {
  padding: 7px 4px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); cursor: pointer; font: inherit; font-size: .81rem;
  font-weight: 500; color: var(--ink); transition: .13s;
}
.slot:hover { border-color: var(--violet-400); background: var(--violet-050); }
.slot.selected { background: var(--plum-700); color: #fff; border-color: transparent; font-weight: 600; }

.summary-box {
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .85rem; }
.summary-line + .summary-line { border-top: 1px solid var(--line); }
.summary-line .k { color: var(--ink-mute); }
.summary-line .v { font-weight: 500; text-align: right; }
.summary-total { font-size: .95rem; font-weight: 600; padding-top: 9px; margin-top: 4px;
  border-top: 1px solid var(--line-strong) !important; }
.summary-total .v { font-weight: 700; color: var(--plum-700); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .83rem; }
table.data th {
  text-align: left; padding: 8px 11px; font-size: .68rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute);
  border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
table.data td { padding: 8px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--violet-050); }
.empty-state { padding: 34px 18px; text-align: center; color: var(--ink-mute); font-size: .85rem; }
.empty-state .big { font-size: 1.6rem; margin-bottom: 7px; opacity: .55; }

/* ---------- admin shell ---------- */
.admin { display: grid; grid-template-columns: 198px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--plum-900);
  color: #ddd5ea; padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .wordmark { color: #fff; font-size: 1.25rem; padding: 0 8px; }
.sidebar .wordmark-sub { color: var(--violet-400); padding: 0 8px; margin-bottom: 18px; }
.sidebar nav { display: grid; gap: 1px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 9px; padding: 6px 9px;
  border-radius: var(--radius-sm); color: #b9aed0; font-size: .82rem; font-weight: 450;
  transition: background .13s, color .13s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--plum-600); color: #fff; font-weight: 600; }
.sidebar nav a .ico { width: 15px; text-align: center; font-size: .85rem; opacity: .85; }
.sidebar .group-label {
  font-size: .62rem; letter-spacing: .13em; text-transform: uppercase;
  color: #7c6f96; padding: 13px 9px 4px; font-weight: 600;
}
.admin-main { min-width: 0; background: var(--bg); }
.admin-top {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 9px 20px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 30; flex-wrap: wrap;
}
.admin-top h1 { font-size: 1rem; margin: 0; font-weight: 600; }
.admin-content { padding: 18px 20px; }
.user-chip {
  display: flex; align-items: center; gap: 7px; padding: 3px 11px 3px 3px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; font-size: .79rem; font-weight: 500;
}
.user-chip .avatar { width: 23px; height: 23px; font-size: .6rem; }

.stat {
  padding: 12px 14px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.stat .k { font-size: .67rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.stat .v { font-size: 1.5rem; font-weight: 600; color: var(--ink); line-height: 1.15; margin-top: 2px;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .d { font-size: .74rem; color: var(--ink-mute); margin-top: 1px; }

/* ---------- admin diary ---------- */
.diary { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.diary-grid { display: grid; min-width: 660px; }
.diary-col-head {
  padding: 7px 6px; text-align: center; font-size: .74rem; font-weight: 600;
  border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface-2);
  position: sticky; top: 0; z-index: 2;
}
.diary-col-head small { display: block; font-weight: 400; color: var(--ink-mute); font-size: .67rem; }
.diary-time {
  font-size: .66rem; color: var(--ink-mute); text-align: right; padding: 0 6px;
  border-bottom: 1px solid var(--line); height: 24px; line-height: 1;
  position: relative; top: -5px; font-variant-numeric: tabular-nums;
}
.diary-cell { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); height: 24px; position: relative; }
.diary-cell.closed { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 5px, transparent 5px, transparent 10px); }
.diary-event {
  position: absolute; left: 2px; right: 2px; border-radius: 4px; padding: 2px 5px;
  font-size: .68rem; line-height: 1.25; overflow: hidden; cursor: pointer;
  color: #fff; z-index: 1; border: 1px solid rgba(255,255,255,.18);
}
.diary-event strong { display: block; font-weight: 600; }
.diary-event.absence { background: repeating-linear-gradient(45deg, #8d8699, #8d8699 6px, #7d768b 6px, #7d768b 12px); }
.diary-event.cancelled { opacity: .4; text-decoration: line-through; }

/* ---------- misc ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  padding: 3px 9px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--line-strong); font-size: .76rem; color: var(--ink-soft);
  transition: .13s; cursor: pointer;
}
a.chip:hover { border-color: var(--violet-300); background: var(--violet-050); text-decoration: none; }
.chip.on { background: var(--plum-700); color: #fff; border-color: transparent; font-weight: 500; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.gallery-grid figcaption { padding: 7px 9px; font-size: .76rem; color: var(--ink-soft); }

.site-footer {
  background: var(--plum-900); color: #a79bbf; margin-top: 42px; padding: 30px 0 20px; font-size: .83rem;
}
.site-footer .wordmark { color: #fff; font-size: 1.25rem; }
.site-footer a { color: var(--violet-300); }

.bar-chart { display: flex; align-items: flex-end; gap: 5px; height: 118px; }
.bar-chart .bar { flex: 1; background: var(--violet-400);
  border-radius: 3px 3px 0 0; min-height: 2px; position: relative; transition: background .15s; }
.bar-chart .bar:hover { background: var(--plum-700); }
.bar-chart .bar span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center;
  font-size: .64rem; color: var(--ink-mute); }
.chart-frame { padding-bottom: 22px; }

.spinner {
  width: 20px; height: 20px; border: 2px solid var(--violet-200);
  border-top-color: var(--plum-700); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 18px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .admin-content { padding: 14px; }
  .site-nav { display: none; width: 100%; flex-direction: column; gap: 2px; align-items: stretch; padding-bottom: 10px; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-header .bar { flex-wrap: wrap; }
}

/* =========================================================================
   Home page — light theme with purple.
   White and soft lavender surfaces, purple carrying the accent and emphasis.
   Scoped to .home-* so the admin and booking flow stay compact.
   ========================================================================= */

.home-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(760px 420px at 14% -10%, rgba(155, 130, 227, .30), transparent 64%),
    radial-gradient(680px 420px at 88% 4%, rgba(195, 178, 239, .34), transparent 62%),
    linear-gradient(180deg, #fbfaff 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 104px;
  text-align: center;
}
/* Soft blurred shapes, drifting slowly — the only motion on the page. */
.home-hero::before,
.home-hero::after {
  content: '';
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(68px); opacity: .5;
}
.home-hero::before {
  width: 360px; height: 360px; top: -130px; left: -90px;
  background: radial-gradient(circle, rgba(124, 92, 214, .55), transparent 70%);
  animation: drift-a 20s ease-in-out infinite alternate;
}
.home-hero::after {
  width: 300px; height: 300px; bottom: -120px; right: -60px;
  background: radial-gradient(circle, rgba(195, 178, 239, .60), transparent 70%);
  animation: drift-b 24s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(60px, 40px, 0); } }
@keyframes drift-b { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50px, -30px, 0); } }
.home-hero > * { position: relative; z-index: 1; }

.home-eyebrow {
  display: inline-block; padding: 4px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--violet-200);
  font-size: .67rem; letter-spacing: .17em; text-transform: uppercase;
  font-weight: 600; color: var(--violet-500); margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.home-hero .wordmark {
  font-size: clamp(3rem, 9vw, 5.4rem); letter-spacing: .005em;
  color: var(--plum-700);
}
/* Gradient fill only where it is supported, so the name can never vanish. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .home-hero .wordmark {
    background: linear-gradient(135deg, var(--plum-800) 10%, var(--violet-500) 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}
.home-hero-tag {
  font-family: var(--display); font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.65rem); color: var(--ink-soft); margin-top: 2px;
}
.home-hero-lede {
  max-width: 530px; margin: 15px auto 0; color: var(--ink-soft); font-size: .93rem; line-height: 1.6;
}
.home-services {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px auto 28px; max-width: 700px;
}
.home-services span {
  padding: 4px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-soft);
}
.home-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-hero {
  background: linear-gradient(135deg, var(--plum-700), var(--violet-500));
  color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(76, 45, 113, .26);
}
.btn-hero:hover { color: #fff; box-shadow: 0 10px 26px rgba(76, 45, 113, .34); }

/* Floating white strip that overlaps the hero. */
.home-strip {
  max-width: 940px; margin: -58px auto 0; position: relative; z-index: 2;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(36, 23, 51, .10);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.home-strip > div { padding: 18px 20px; text-align: center; border-left: 1px solid var(--line); }
.home-strip > div:first-child { border-left: 0; }
.home-strip .n {
  font-family: var(--display); font-size: 1.85rem; font-weight: 600;
  color: var(--plum-700); line-height: 1.1;
}
.home-strip .l { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; margin-top: 3px; }

.home-section { padding: 56px 0; }
.home-section.alt { background: var(--violet-050); border-block: 1px solid var(--line); }
.home-head { text-align: center; max-width: 560px; margin: 0 auto 32px; }
.home-head .kicker {
  font-size: .67rem; letter-spacing: .19em; text-transform: uppercase;
  color: var(--violet-500); font-weight: 700; margin-bottom: 8px;
}
.home-head h2 { font-size: clamp(1.45rem, 3.2vw, 1.95rem); letter-spacing: -.02em; margin-bottom: 8px; }
.home-head p { color: var(--ink-soft); margin: 0; font-size: .91rem; }

/* Category cards */
.home-cards { display: grid; gap: 13px; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); }
.home-card {
  position: relative; display: block; padding: 21px 19px 19px; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-card::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--plum-700), var(--violet-400));
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.home-card:hover {
  transform: translateY(-3px); border-color: var(--violet-300);
  box-shadow: 0 12px 28px rgba(36, 23, 51, .10); text-decoration: none;
}
.home-card:hover::after { transform: scaleX(1); }
.home-card .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--violet-100), var(--violet-200));
  color: var(--plum-700); font-size: 1.15rem; margin-bottom: 13px;
}
.home-card h3 { font-size: 1rem; margin: 0 0 4px; color: var(--plum-700); }
.home-card p { margin: 0 0 10px; font-size: .84rem; color: var(--ink-soft); }
.home-card .more { font-size: .77rem; font-weight: 600; color: var(--violet-500); }

/* Numbered steps */
.home-steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.home-step { text-align: center; padding: 0 10px; }
.home-step .num {
  width: 44px; height: 44px; margin: 0 auto 13px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display);
  font-size: 1.25rem; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, var(--plum-700), var(--violet-500));
  box-shadow: 0 6px 16px rgba(76, 45, 113, .26);
}
.home-step h3 { font-size: .94rem; margin: 0 0 5px; }
.home-step p { font-size: .83rem; color: var(--ink-soft); margin: 0; }

/* Featured treatments */
.home-treatments { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.home-treat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.home-treat:hover { border-color: var(--violet-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.home-treat .cat { font-size: .65rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--violet-500); font-weight: 700; }
.home-treat h3 { font-size: .94rem; margin: 0; }
.home-treat .meta { font-size: .77rem; color: var(--ink-mute); }
.home-treat .foot { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 10px; padding-top: 11px; border-top: 1px solid var(--line); }
.home-treat .price { font-family: var(--display); font-size: 1.38rem; font-weight: 600;
  color: var(--plum-700); line-height: 1; }
.home-treat .price small { display: block; font-family: var(--font); font-size: .67rem;
  font-weight: 500; color: var(--ink-mute); margin-top: 3px; }

/* Team */
.home-team { display: grid; gap: 13px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.home-member {
  text-align: center; padding: 20px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.home-member:hover { border-color: var(--violet-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.home-member .face {
  width: 60px; height: 60px; margin: 0 auto 11px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 1.02rem;
  object-fit: cover;
}
.home-member h3 { font-size: .89rem; margin: 0 0 2px; }
.home-member .role { font-size: .67rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; }

/* Closing band — light lavender, purple type */
.home-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(480px 260px at 18% 0%, rgba(195, 178, 239, .42), transparent 64%),
    linear-gradient(135deg, var(--violet-050), var(--violet-100));
  border: 1px solid var(--violet-200);
  border-radius: var(--radius-lg); padding: 44px 28px; text-align: center;
}
.home-band h2 {
  font-family: var(--display); font-size: clamp(1.55rem, 4vw, 2.2rem);
  margin-bottom: 8px; font-weight: 600; color: var(--plum-700);
}
.home-band p { color: var(--ink-soft); max-width: 440px; margin: 0 auto 20px; font-size: .91rem; }

@media (max-width: 700px) {
  .home-hero { padding: 52px 0 82px; }
  .home-strip { margin-top: -46px; }
  .home-strip > div { border-left: 0; border-top: 1px solid var(--line); }
  .home-strip > div:first-child { border-top: 0; }
  .home-section { padding: 40px 0; }
}
