:root {
  --brand: #2563eb;
  --brand-2: #0891b2;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --canvas: #f8fafc;
  --success: #16a34a;
  --warn: #f59e0b;
  --danger: #dc2626;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
[data-theme="dark"] {
  --ink: #f8fafc;
  --muted: #94a3b8;
  --line: #273244;
  --paper: #111827;
  --canvas: #0b1120;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.search-icon { width: 18px; height: 18px; display: inline-block; position: relative; flex: 0 0 auto; }
.search-icon::before { content: ""; position: absolute; left: 2px; top: 2px; width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 999px; opacity: .78; }
.search-icon::after { content: ""; position: absolute; left: 12px; top: 12px; width: 7px; height: 2px; border-radius: 999px; background: currentColor; opacity: .78; transform: rotate(45deg); transform-origin: left center; }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; background: var(--brand); color: white; font-weight: 800; }
.btn:hover { filter: brightness(.96); transform: translateY(-1px); }
.btn-secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-art { display: grid; align-content: center; padding: 8vw; color: white; background: radial-gradient(circle at 20% 20%, #38bdf8, transparent 30%), linear-gradient(140deg, #0f172a, #1d4ed8); }
.login-art h1 { max-width: 680px; margin: 0 0 16px; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1; }
.login-art p { max-width: 560px; line-height: 1.65; color: #dbeafe; }
.login-panel { display: grid; place-items: center; padding: 28px; }
.login-box { width: min(430px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 18px 50px #0f172a14; }
.link-button { width: 100%; margin-top: 10px; border: 0; color: var(--brand-2); background: transparent; font-weight: 850; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-weight: 800; font-size: .82rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--paper); color: var(--ink); outline: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.inline-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.switch-line { display: flex; align-items: center; gap: 9px; margin: 10px 0 14px; color: var(--muted); font-size: .9rem; }
.form-divider { grid-column: 1 / -1; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 800; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 272px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; min-height: 0; padding: 22px 16px; color: white; background: #0f172a; display: flex; flex-direction: column; gap: 20px; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; font-size: 1.05rem; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--brand); }
.nav { min-height: 0; flex: 1; display: grid; align-content: start; gap: 12px; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #475569 transparent; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-thumb { border-radius: 999px; background: #475569; }
.nav-group { display: grid; gap: 5px; }
.nav-group-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 0; padding: 6px 10px; background: transparent; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .07em; font-size: .68rem; font-weight: 900;
}
.nav-chevron { transition: transform .16s ease; }
.nav-group-toggle[aria-expanded="false"] .nav-chevron { transform: rotate(-90deg); }
.nav-submenu { display: grid; gap: 4px; }
.nav-group-toggle[aria-expanded="false"] + .nav-submenu { display: none; }
.nav button:not(.nav-group-toggle) { width: 100%; border: 0; border-radius: 10px; padding: 11px 12px 11px 16px; text-align: left; background: transparent; color: #cbd5e1; font-weight: 750; }
.nav button.active, .nav button:hover { color: white; background: #ffffff14; }
.nav-group:has(.active) .nav-group-toggle { color: #e2e8f0; }
.sidebar-footer { flex: 0 0 auto; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid #ffffff14; }
.main { min-width: 0; }
.main-header { position: sticky; top: 0; z-index: 4; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(12px); }
.content { padding: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.section-head h2 { margin: 0 0 4px; letter-spacing: -.02em; }
.action-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.metric-card, .card, .insight-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 10px 30px #0f172a0a; }
.metric-card { padding: 16px; }
.metric-card strong { display: block; margin-top: 7px; font-size: 1.55rem; letter-spacing: -.04em; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.card, .insight-card { padding: 18px; }
.calendar-board { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.calendar-day { min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: color-mix(in srgb, var(--paper) 88%, transparent); }
.appointment { display: grid; gap: 5px; margin: 10px 0; padding: 12px; border-left: 4px solid var(--brand); border-radius: 10px; background: var(--paper); box-shadow: 0 6px 18px #0f172a0d; }
.pill { display: inline-flex; width: fit-content; border-radius: 999px; padding: 4px 8px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-size: .75rem; font-weight: 850; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.bars { display: grid; gap: 11px; }
.bar-line { display: grid; gap: 5px; }
.bar-track { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.booking-page { min-height: 100vh; background: var(--canvas); }
.booking-topbar {
  position: sticky; top: 0; z-index: 18; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px max(16px, calc((100vw - 1060px) / 2)); border-bottom: 1px solid color-mix(in srgb, white 22%, transparent);
  color: white; background: color-mix(in srgb, var(--brand) 88%, #0f172a); backdrop-filter: blur(14px);
}
.booking-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-weight: 900; }
.booking-brand .brand-mark { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, white 18%, transparent); }
.booking-brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-nav { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.booking-nav::-webkit-scrollbar { display: none; }
.booking-nav a, .booking-nav button {
  flex: 0 0 auto; border: 0; border-radius: 999px; padding: 9px 12px; color: white;
  background: color-mix(in srgb, white 13%, transparent); font-weight: 800; font-size: .86rem;
}
.booking-hero { padding: 42px 20px; color: white; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 80%, #0f172a), var(--brand-2)); scroll-margin-top: 78px; }
.booking-hero-inner, .booking-main { width: min(1060px, calc(100% - 32px)); margin: 0 auto; }
.booking-main { display: grid; grid-template-columns: 1fr 390px; gap: 18px; padding: 24px 0 70px; align-items: start; }
.booking-main .insight-card { scroll-margin-top: 96px; }
.service-list, .slot-grid { display: grid; gap: 10px; }
.service-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.slot-grid { grid-template-columns: repeat(4, 1fr); }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--paper); text-align: center; font-weight: 800; }
.slot.active, .service-item.active { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.store-info-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgba(15,23,42,.62); }
.store-info-card { width: min(980px, 100%); max-height: min(760px, 92vh); overflow: auto; border-radius: 14px; background: var(--paper); box-shadow: 0 24px 70px #0005; }
.store-info-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); }
.store-info-head h2 { margin: 3px 0 0; }
.store-info-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; padding: 18px; }
.store-info-details { display: grid; align-content: start; gap: 4px; }
.store-info-details p { margin-bottom: 10px; line-height: 1.45; }
.store-map { width: 100%; min-height: 360px; border: 0; border-radius: 12px; background: var(--canvas); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; padding: 13px 16px; border-radius: 12px; color: white; background: #0f172a; box-shadow: 0 14px 40px #0003; }
.homepage-preview { min-height: 360px; display: grid; align-content: center; gap: 14px; padding: 28px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.homepage-preview h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1; }
.homepage-preview p { max-width: 520px; line-height: 1.55; }
@media (max-width: 980px) {
  .shell, .login-page, .booking-main { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; max-height: 70vh; }
  .metric-grid, .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .metric-grid, .grid-2, .grid-3, .main-header, .section-head { grid-template-columns: 1fr; display: grid; }
  .content { padding: 16px; }
  .booking-topbar { align-items: stretch; flex-direction: column; padding: 9px 12px; }
  .booking-nav { width: 100%; }
  .booking-nav a, .booking-nav button { flex: 1 0 auto; text-align: center; padding: 10px 11px; }
  .booking-hero { padding: 28px 16px; }
  .booking-hero-inner, .booking-main { width: min(100% - 20px, 1060px); }
  .booking-main { padding-top: 14px; gap: 12px; }
  .service-item { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(2,1fr); }
  .booking-form, #booking-form { position: static; }
  .store-info-modal { align-items: end; padding: 0; }
  .store-info-card { width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; }
  .store-info-grid { grid-template-columns: 1fr; padding: 14px; }
  .store-map { min-height: 260px; }
  .inline-field { grid-template-columns: 1fr; }
}

/* Premium dark experience */
:root {
  --brand: #7C3AED;
  --brand-2: #8B5CF6;
  --ink: #FFFFFF;
  --muted: #A1A1AA;
  --line: #2E2E33;
  --paper: #18181B;
  --canvas: #09090B;
  --success: #22C55E;
  --warn: #F59E0B;
  --danger: #EF4444;
  --radius: 22px;
  color-scheme: dark;
}

[data-theme="light"] {
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --canvas: #f8fafc;
  color-scheme: light;
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--brand) 18%, transparent), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(59,130,246,.12), transparent 28rem),
    var(--canvas);
}

body, .main, .booking-page { color: var(--ink); background: transparent; }
.sidebar {
  border-right: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(24,24,27,.94), rgba(9,9,11,.98));
  box-shadow: 18px 0 60px rgba(0,0,0,.26);
}
.brand-mark {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--brand) 34%, transparent);
}
.main-header {
  border-color: rgba(255,255,255,.08);
  background: rgba(9,9,11,.72);
  backdrop-filter: blur(18px);
}
.global-search {
  flex: 1 1 320px; max-width: 460px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(24,24,27,.78);
}
.global-search input { min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.icon-action {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); background: rgba(24,24,27,.82);
}
.hero-dashboard {
  display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 20px;
  padding: 24px; border: 1px solid rgba(255,255,255,.08); border-radius: 24px;
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(24,24,27,.72));
  box-shadow: 0 24px 80px rgba(0,0,0,.24);
}
.hero-dashboard h1 { margin: 10px 0 6px; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.05em; }
.quick-filters, .view-switch {
  display: inline-flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(24,24,27,.82);
}
.quick-filters button, .view-switch button {
  border: 0; border-radius: 12px; padding: 10px 13px; color: var(--muted); background: transparent; font-weight: 850;
}
.quick-filters button.active, .view-switch button.active {
  color: white; background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.dashboard-filters {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 14px 0 16px;
}
.dashboard-filters .control-select { min-width: 0; }
.metric-card, .card, .insight-card, .table-wrap {
  border-color: rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(24,24,27,.92), rgba(18,18,21,.88));
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
  transition: transform .24s ease, border-color .24s ease, background .24s ease, box-shadow .24s ease;
}
.metric-card:hover, .card:hover, .insight-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: linear-gradient(180deg, rgba(39,39,42,.96), rgba(24,24,27,.92));
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
}
.metric-card strong { color: white; }
.btn {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 35px color-mix(in srgb, var(--brand) 32%, transparent);
  transition: transform .22s ease, filter .22s ease, box-shadow .22s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.01); filter: brightness(1.08); }
.btn-secondary { color: var(--ink); background: rgba(24,24,27,.86); border: 1px solid var(--line); box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #B91C1C); }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; filter: grayscale(.25); }
.field input, .field select, .field textarea, .control-select {
  color: var(--ink); border-color: var(--line); background: rgba(9,9,11,.64);
}
th, td { border-color: var(--line); }
.pill { color: white; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.toast { background: rgba(24,24,27,.96); border: 1px solid var(--line); backdrop-filter: blur(16px); }

.agenda-shell { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
.calendar-board {
  position: relative; grid-template-columns: repeat(5, minmax(230px, 1fr));
  padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 24px;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 100% 52px,
    rgba(12,12,15,.82);
}
.calendar-day {
  border-color: rgba(255,255,255,.06); background: rgba(24,24,27,.54); backdrop-filter: blur(12px);
}
.appointment {
  min-height: 84px; border: 1px solid rgba(255,255,255,.08); border-left-width: 5px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 26%, #18181B), rgba(24,24,27,.94));
  transition: min-height .24s ease, transform .24s ease, box-shadow .24s ease;
}
.appointment:hover { min-height: 112px; transform: translateY(-2px) scale(1.01); box-shadow: 0 20px 48px rgba(0,0,0,.34); }
.staff-filter { display: flex; gap: 10px; overflow-x: auto; padding: 0 0 16px; scrollbar-width: thin; }
.staff-filter button {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 12px; color: var(--muted); background: rgba(24,24,27,.82); font-weight: 850;
}
.staff-filter button.active { color: white; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.avatar {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  color: white; background: var(--staff, linear-gradient(135deg, var(--brand), var(--brand-2)));
}
.agenda-side { display: grid; gap: 14px; }
.mini-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 12px; text-align: center; }
.mini-days span { color: var(--muted); font-size: .75rem; }
.mini-days b { position: relative; padding: 7px 0; border-radius: 10px; font-size: .82rem; }
.mini-days b.today { color: white; background: var(--brand); }
.mini-days em { position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--success); transform: translateX(-50%); }
.side-appointment { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.side-appointment span { color: var(--brand-2); font-weight: 900; }
.side-appointment small { color: var(--muted); }
.mini-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-summary div { padding: 12px; border-radius: 14px; background: rgba(124,58,237,.15); }
.mini-summary strong { display: block; font-size: 1.5rem; }

.ai-bubble {
  position: fixed; right: 24px; bottom: 24px; z-index: 45; width: 64px; height: 64px; border: 0; border-radius: 22px;
  color: white; background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-weight: 950;
  box-shadow: 0 18px 50px color-mix(in srgb, var(--brand) 42%, transparent);
  animation: aiPulse 2.4s infinite;
}
@keyframes aiPulse { 50% { transform: translateY(-2px); box-shadow: 0 22px 62px color-mix(in srgb, var(--brand) 55%, transparent); } }
.ai-chat {
  position: fixed; right: 24px; bottom: 24px; z-index: 46; width: min(390px, calc(100vw - 28px)); height: min(560px, calc(100vh - 34px));
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 24px;
  background: rgba(18,18,21,.96); box-shadow: 0 28px 90px rgba(0,0,0,.5); backdrop-filter: blur(22px);
}
.ai-chat header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.ai-chat header span { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; }
.ai-chat header button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.04); }
.ai-messages { display: grid; align-content: start; gap: 10px; overflow-y: auto; padding: 16px; }
.ai-message { max-width: 82%; padding: 11px 13px; border-radius: 16px; color: var(--ink); background: rgba(255,255,255,.06); line-height: 1.45; }
.ai-message.user { justify-self: end; color: white; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.ai-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px; border-top: 1px solid var(--line); }
.ai-chat-form input { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--ink); background: rgba(9,9,11,.72); outline: 0; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-grid label { padding: 9px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.04); color: var(--muted); font-weight: 800; }
.assign-row { display: grid; gap: 8px; margin-top: 10px; }
.assign-row select { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 9px; color: var(--ink); background: rgba(9,9,11,.72); }
.appointment-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.appointment-actions .btn { flex: 1 1 auto; min-width: 94px; padding: 9px 10px; }

.booking-page {
  background:
    radial-gradient(circle at top left, rgba(124,58,237,.28), transparent 30rem),
    #09090B;
}
.booking-topbar { background: rgba(9,9,11,.76); border-color: rgba(255,255,255,.08); }
.booking-hero {
  min-height: 430px; display: grid; align-items: center;
  background:
    linear-gradient(90deg, rgba(9,9,11,.96) 0%, rgba(9,9,11,.7) 48%, rgba(9,9,11,.18) 100%),
    url("https://images.unsplash.com/photo-1622286346003-c45f85949b3f?auto=format&fit=crop&w=1600&q=80") center / cover;
}
.booking-hero h1 { max-width: 650px; letter-spacing: -.055em; line-height: .95; }
.booking-hero h1 span, #company-title { color: white; }
.booking-search {
  width: min(620px, 100%); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  margin-top: 22px; padding: 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: rgba(24,24,27,.72); backdrop-filter: blur(14px);
}
.booking-search input { min-width: 0; border: 0; outline: 0; color: white; background: transparent; }
.booking-benefits { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.booking-benefits span { padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(24,24,27,.62); color: #d4d4d8; font-weight: 750; }
.booking-brand .brand-mark { overflow: hidden; }
.booking-brand .brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.booking-showcase { width: min(1060px, calc(100% - 32px)); margin: 12px auto 0; position: sticky; top: 74px; z-index: 12; }
.category-strip { min-width: 0; display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 8px 2px 10px; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; scrollbar-width: none; }
.category-strip::-webkit-scrollbar { display: none; }
.category-strip button { flex: 0 0 auto; min-height: 42px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 10px 15px; color: #d4d4d8; background: rgba(9,9,11,.2); backdrop-filter: blur(12px); font-weight: 850; white-space: nowrap; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.category-strip small { margin-left: 5px; color: rgba(255,255,255,.62); }
.category-strip button.active { color: white; border-color: rgba(255,255,255,.72); background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 14px 34px rgba(124,58,237,.36); }
.promo-card { display: grid; gap: 5px; margin-bottom: 16px; padding: 16px; border-radius: 22px; color: white; background: linear-gradient(135deg, var(--brand), #4C1D95); box-shadow: 0 20px 55px rgba(124,58,237,.28); }
.promo-card span { width: fit-content; padding: 4px 8px; border-radius: 999px; background: rgba(34,197,94,.18); color: #bbf7d0; font-weight: 900; font-size: .76rem; }
.booking-main { margin-top: 18px; position: relative; z-index: 2; }
.service-item {
  min-height: 92px; grid-template-columns: auto 1fr auto; border-color: rgba(255,255,255,.08); border-radius: 18px;
  background: linear-gradient(135deg, rgba(24,24,27,.95), rgba(39,39,42,.72));
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.service-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 16px; background: rgba(255,255,255,.08); }
.table-thumb { width: 34px; height: 34px; margin-right: 8px; object-fit: cover; border-radius: 10px; vertical-align: middle; }
.service-item:hover, .service-item.active { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,58,237,.22), 0 18px 48px rgba(0,0,0,.28); }
.slot { border-radius: 16px; color: var(--ink); background: rgba(24,24,27,.92); }
.slot.active { color: white; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 0 28px rgba(124,58,237,.5); }
.professional-cards { display: grid; gap: 10px; }
.professional-card {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; width: 100%;
  border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 12px; color: var(--ink); text-align: left;
  background: rgba(24,24,27,.88);
}
.professional-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,58,237,.2); }
.professional-photo { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; color: white; background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-weight: 950; }
.professional-card small, .professional-card em { display: block; margin-top: 3px; color: var(--muted); font-style: normal; }
.professional-card em { color: #FBBF24; font-size: .8rem; }
.loyalty-card-box {
  margin: 10px 0 16px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 20px;
  background: linear-gradient(180deg, rgba(24,24,27,.9), rgba(39,39,42,.7));
}
.loyalty-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.loyalty-card-head strong { display: block; margin-top: 3px; color: white; }
.loyalty-card-preview { min-height: 42px; }
.loyalty-visual-card {
  overflow: hidden; position: relative; display: grid; gap: 14px; padding: 16px; border-radius: 22px; color: white;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--card-brand) 70%, transparent), transparent 15rem),
    linear-gradient(135deg, var(--card-brand), var(--card-brand-2));
  box-shadow: 0 18px 48px color-mix(in srgb, var(--card-brand) 30%, transparent);
}
.loyalty-visual-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.18), transparent 42%);
}
.loyalty-visual-top, .loyalty-stamp-grid, .loyalty-visual-card p { position: relative; z-index: 1; }
.loyalty-visual-top { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.loyalty-visual-top span {
  width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 16px;
  background: rgba(255,255,255,.18); font-weight: 950;
}
.loyalty-visual-top img, .loyalty-stamp-grid img { width: 100%; height: 100%; object-fit: cover; }
.loyalty-visual-top small { display: block; margin-top: 2px; color: rgba(255,255,255,.76); }
.loyalty-stamp-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.loyalty-stamp-grid i {
  aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 1px dashed rgba(255,255,255,.34);
  border-radius: 14px; background: rgba(9,9,11,.18); color: rgba(255,255,255,.65); font-style: normal; font-weight: 900;
}
.loyalty-stamp-grid i.stamped {
  border-style: solid; border-color: rgba(255,255,255,.76); background: rgba(255,255,255,.92); color: var(--card-brand);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.38), 0 8px 24px rgba(0,0,0,.18);
}
.loyalty-stamp-grid i.stamped b { font-size: 1.2rem; }
.loyalty-visual-card p { margin: 0; font-weight: 850; color: rgba(255,255,255,.88); }
.booking-progress {
  display: grid; gap: 10px; margin: 14px 0; padding: 13px; border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px; background: rgba(9,9,11,.42);
}
.booking-progress strong { color: white; }
.booking-progress div { display: flex; flex-wrap: wrap; gap: 8px; }
.booking-progress span {
  padding: 7px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08);
  font-size: .8rem; font-weight: 850;
}
.booking-progress span.done { color: #bbf7d0; background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.26); }
.booking-progress span.pending { color: #fde68a; background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.28); }
.booking-progress p { margin: 0; color: var(--muted); font-size: .86rem; }
.selected-services-summary {
  margin: 10px 0 14px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; background: rgba(124,58,237,.1); line-height: 1.45;
}
.selected-services-summary strong { color: white; }
.store-info-card { background: #18181B; }

@media (max-width: 980px) {
  .agenda-shell { grid-template-columns: 1fr; }
  .agenda-side { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero-dashboard { align-items: start; flex-direction: column; }
}

@media (max-width: 620px) {
  .main-header .action-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .global-search { max-width: none; }
  .quick-filters, .view-switch { width: 100%; overflow-x: auto; }
  .dashboard-filters { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .agenda-side { grid-template-columns: 1fr; }
  .booking-hero { min-height: 520px; padding-top: 92px; }
  .booking-search { grid-template-columns: auto 1fr; }
  .booking-search .btn { grid-column: 1 / -1; width: 100%; }
  .booking-showcase { width: min(100% - 20px, 1060px); margin-top: 12px; top: 68px; }
  .booking-main { margin-top: 12px; }
  .service-item { grid-template-columns: 1fr; }
  .service-photo { width: 100%; height: 150px; }
  .loyalty-card-head { align-items: stretch; flex-direction: column; }
  .loyalty-card-head .btn { width: 100%; }
  .ai-chat { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
  .ai-bubble { right: 18px; bottom: 18px; }
}

@media (min-width: 981px) {
  #booking-form {
    position: sticky;
    top: 94px;
    max-height: calc(100vh - 112px);
    overflow: auto;
  }
}

.btn-mini {
  padding: 7px 9px;
  border-radius: 10px;
  font-size: .78rem;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    max-height: 78vh;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .main-header {
    position: sticky;
    top: 0;
    display: grid;
    align-items: stretch;
    padding: 12px;
  }
  .content {
    padding: 14px 10px 80px;
  }
  .metric-card,
  .card,
  .insight-card {
    border-radius: 18px;
    padding: 14px;
  }
  .table-wrap,
  #queue-table,
  #campaign-table,
  #today-table,
  #users-table {
    max-width: 100%;
    overflow-x: auto;
  }
  table {
    min-width: 680px;
  }
  .calendar-board {
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 86vw);
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  .calendar-day {
    scroll-snap-align: start;
    min-height: 360px;
  }
  .booking-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-direction: row;
    align-items: center;
  }
  .booking-brand {
    max-width: 42vw;
  }
  .booking-nav {
    justify-content: flex-end;
  }
  .booking-nav a,
  .booking-nav button {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: .78rem;
  }
  .booking-hero {
    min-height: 420px;
    padding: 84px 14px 28px;
  }
  .booking-hero h1 {
    letter-spacing: -.035em;
    line-height: 1.02;
  }
  .booking-benefits {
    display: grid;
    grid-template-columns: 1fr;
  }
  .booking-showcase {
    top: 62px;
    width: calc(100% - 14px);
  }
  .category-strip {
    padding: 8px 0 10px;
  }
  .booking-main {
    width: calc(100% - 14px);
    grid-template-columns: 1fr;
  }
  .service-item {
    grid-template-columns: 72px 1fr;
    align-items: start;
  }
  .service-item > strong {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .service-photo {
    width: 72px;
    height: 72px;
  }
  .slot-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
  .professional-card {
    grid-template-columns: auto minmax(0,1fr);
  }
  .inline-field {
    grid-template-columns: 1fr;
  }
  .loyalty-stamp-grid {
    grid-template-columns: repeat(4, minmax(0,1fr));
  }
  .store-info-card {
    max-height: 90vh;
  }
  .store-map {
    min-height: 240px;
  }
}

@media (max-width: 390px) {
  .slot-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .service-item {
    grid-template-columns: 1fr;
  }
  .service-photo {
    width: 100%;
    height: 138px;
  }
}
