/* BookMySalon — design tokens and base styles (matches the UI Screens design canvas). */
:root {
    --ink: #17171B;
    --ink-2: #3F3F48;
    --muted: #5B5B66;
    --line: #E6E4DF;
    --line-strong: #D9D6CF;
    --ground: #F6F5F2;
    --surface: #FFFFFF;
    --rail: #121217;
    --rail-icon: #C9C9D1;
    --accent: #0E7C6B;
    --accent-ink: #0A5C50;
    --accent-soft: #DCEFE9;
    --accent-light: #8FD8C6;
    --danger: #B42318;
    --danger-soft: #FEF0EE;
    --info-soft: #EAF3FB;
    --photo-panel: #1B2B27;
    --radius: 10px;
    --radius-lg: 16px;
    --font: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: Fraunces, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--surface); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
h1, h2, h3 { margin: 0; letter-spacing: -0.3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.muted { color: var(--muted); }
.center { text-align: center; display: block; }

/* ---------- Logo ---------- */
.logo { display: block; width: auto; max-width: 100%; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--ground); color: var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-social { position: relative; }
.btn-social-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); display: inline-flex; }
.btn-social-letter { width: 24px; height: 24px; border: 1.8px solid var(--ink); border-radius: 50%; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; }
.link-button:hover { color: var(--accent-ink); text-decoration: underline; }
.link-button:disabled { color: var(--muted); cursor: default; text-decoration: none; }

.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.hint { font-size: 12px; color: var(--muted); }
.input { height: 50px; width: 100%; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input.invalid { border-color: var(--danger); }
.input-code { text-align: center; font-size: 28px; font-weight: 800; letter-spacing: 14px; height: 64px; }
.input-wrap { position: relative; }
.input-with-action { padding-right: 76px; }
.input-action { position: absolute; right: 7px; top: 7px; height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: #F1EFEA; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; }
.phone-row { display: flex; gap: 8px; }
.input-cc { width: 120px; flex-shrink: 0; font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.check a { font-weight: 700; }

.alert { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 600; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--info-soft); color: #1D4F7A; }
.validation-message { color: var(--danger); font-size: 13px; }

.divider { display: flex; align-items: center; gap: 14px; color: #6B6B75; font-size: 12px; font-weight: 600; }
.divider::before, .divider::after { content: ""; height: 1px; flex-grow: 1; background: var(--line); }
.rule { border: 0; height: 1px; background: var(--line); margin: 4px 0; width: 100%; }

/* ---------- Auth split screen ---------- */
.auth-page { min-height: 100vh; display: flex; background: var(--surface); }
.auth-left { position: relative; width: 50%; min-width: 480px; display: flex; flex-direction: column; align-items: center; padding: 0 24px; }
.auth-corner { position: absolute; top: 24px; left: 28px; text-decoration: none; color: var(--ink); }
.auth-back { width: 44px; height: 44px; top: 18px; left: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.auth-back:hover { background: var(--ground); color: var(--ink); }
.auth-form { width: 100%; max-width: 400px; margin: auto 0; padding: 96px 0 32px; display: flex; flex-direction: column; gap: 22px; }
.auth-form-wide { max-width: 440px; padding-top: 80px; gap: 16px; }
.auth-heading { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.auth-heading h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.4px; }
.auth-heading p { margin: 0; color: #55555F; font-size: 15px; }
.auth-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; align-self: center; }
.auth-resend { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; font-size: 14px; color: #55555F; }
.auth-link { text-align: center; font-size: 14px; font-weight: 600; text-decoration: none; }
.auth-switch { text-align: center; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.auth-switch a { font-weight: 600; text-decoration: none; }
.auth-footer { padding: 0 0 28px; font-size: 13px; color: var(--muted); text-align: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.auth-photo { flex-grow: 1; position: relative; overflow: hidden; margin-left: -30px; border-bottom-left-radius: 110px 100%;
    /* Layers, top first: a dark fade so the wordmark reads, your own photo when auth-professionals.jpg exists,
       then the built-in salon illustration, then the panel colour. */
    background:
        linear-gradient(180deg, rgba(12, 23, 20, 0) 55%, rgba(12, 23, 20, 0.9) 100%),
        url('/images/auth-professionals.jpg') center / cover no-repeat,
        url('/images/auth-salon.svg') center bottom / cover no-repeat,
        var(--photo-panel); }
.auth-photo-brand { position: absolute; left: 0; right: 0; bottom: 64px; text-align: center; color: #fff; }
.auth-photo-word { display: flex; justify-content: center; padding: 0 24px; }
.auth-photo-word .logo { width: min(290px, 70%); height: auto !important; margin-bottom: 6px; }
.auth-photo-sub { font-size: 20px; font-weight: 600; }

@media (max-width: 960px) {
    .auth-photo { display: none; }
    .auth-left { width: 100%; min-width: 0; }
}

/* ---------- Demo login (Development only) ---------- */
.demo-login { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 14px 18px; background: #FBFAF7; display: flex; flex-direction: column; }
.demo-login-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.demo-login-head strong { font-size: 14px; }
.demo-login-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #FEF3E2; color: #8A5A00; }
.demo-login-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid #ECE9E2; font-size: 13px; }
.demo-login-row strong { display: block; font-size: 13px; }
.demo-login-row span { color: var(--muted); word-break: break-all; }
.demo-login-use { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.demo-login-use:hover { background: var(--ground); }
.demo-login-code { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid #ECE9E2; font-size: 13px; color: var(--muted); }
.demo-login-code code { font-size: 17px; font-weight: 700; letter-spacing: 3px; color: var(--ink); }
.demo-login-code .link-button { margin-left: auto; font-size: 13px; }
.demo-login.demo-login-code { flex-direction: row; border-top: 1px dashed var(--line-strong); padding: 12px 16px; }

/* ---------- App shell ---------- */
.app { height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-logo { text-decoration: none; display: flex; align-items: center; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.pill { height: 40px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; text-decoration: none; margin-right: 8px; }
.pill-accent { background: var(--accent); color: #fff; }
.pill-accent:hover { background: var(--accent-ink); color: #fff; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--ground); }
.account { position: relative; margin-left: 6px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent-ink); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.account-menu { position: absolute; right: 0; top: 48px; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 8px; z-index: 20; }
.account-menu-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.account-name { font-weight: 800; }
.account-sub { font-size: 13px; color: var(--muted); }
.menu-item { display: block; width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--ground); color: var(--ink); }

.app-body { flex-grow: 1; display: flex; min-height: 0; }
.rail { width: 72px; flex-shrink: 0; background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; }
.rail-item { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--rail-icon); }
.rail-item:hover { background: #24242B; color: #fff; }
.rail-item.active { background: var(--accent); color: #fff; }
.rail-spacer { flex-grow: 1; }
.app-main { flex-grow: 1; overflow: auto; background: var(--ground); }

/* ---------- Pages ---------- */
.page { width: 100%; margin: 0; padding: 32px 32px 48px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.page-head h1 { font-size: 30px; font-weight: 800; }
.page-head p { margin: 6px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; }
.card-title { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.empty-body { min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--accent); }
.empty-body strong { color: var(--ink); font-size: 17px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist-mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.checklist li.done .checklist-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.checklist-text { flex-grow: 1; display: flex; flex-direction: column; }
.checklist-state { font-size: 13px; font-weight: 700; color: var(--muted); }
.checklist li.done .checklist-state { color: var(--accent-ink); }

/* ---------- Blazor error UI ---------- */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding: 12px 20px; background: #FFF4E5; color: var(--ink); box-shadow: 0 -2px 8px rgba(0,0,0,.15); font-weight: 600; }
#blazor-error-ui .dismiss { position: absolute; right: 16px; top: 8px; background: none; border: 0; font-size: 20px; cursor: pointer; }

/* =====================================================================
   Phase 1: section pages, tables, modals, wizard, service menu, roster
   ===================================================================== */
.small { font-size: 13px; }
.right { text-align: right; }
.spacer { flex-grow: 1; }
.row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field-label { font-size: 14px; font-weight: 700; }
.textarea { height: auto; padding: 10px 14px; resize: vertical; }
.input-inline { width: auto; min-width: 200px; }
.input-time { width: 130px; }
.input-sm { height: 40px; width: 150px; font-size: 14px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.link-button.danger, .danger-text { color: var(--danger); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: #EDEBE6; font-size: 12px; font-weight: 800; color: var(--ink-2); vertical-align: middle; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: #EDEBE6; color: var(--ink-2); font-size: 12px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.tag-accent { background: var(--accent); color: #fff; }
.tag-warn { background: #FFEFC9; color: #6B4200; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.back-link:hover { color: var(--ink); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-head .card-title { margin-bottom: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { position: relative; width: 320px; color: var(--muted); }
.search svg { position: absolute; left: 14px; top: 16px; }
.search .input { padding-left: 42px; }

/* Section layout: sub-menu + content */
.section-layout { display: flex; min-height: 100%; }
.section-nav { width: 220px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line); padding: 24px 12px; display: flex; flex-direction: column; gap: 2px; }
.section-nav-title { font-size: 18px; font-weight: 800; padding: 0 12px 10px; }
.section-nav-heading { font-size: 16px; font-weight: 800; padding: 16px 12px 6px; }
.section-nav-item { display: block; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.section-nav-item:hover { background: var(--ground); color: var(--ink); }
.section-nav-item.active { background: #EEF5F3; color: var(--accent-ink); }
.section-nav-item.disabled { color: #8A8A93; cursor: default; }
.section-nav-item small { font-size: 11px; font-weight: 700; margin-left: 4px; }
.section-content { flex-grow: 1; min-width: 0; padding: 32px 32px 48px; display: flex; flex-direction: column; gap: 18px; }
.section-content.narrow { max-width: none; }
.section-content.wide { max-width: none; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table.card { padding: 0; overflow: hidden; }
.table th { text-align: left; font-weight: 800; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.table td { padding: 12px 16px; border-bottom: 1px solid #F1EFEA; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.person { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; text-align: left; }
.person-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.avatar-md { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: var(--ink); flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--ink); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.setting-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; min-height: 150px; }
.setting-card svg { color: var(--accent); margin-bottom: 6px; }
.setting-card:hover { border-color: var(--line-strong); box-shadow: 0 4px 16px rgba(0,0,0,.05); color: var(--ink); }
.setting-card.disabled { opacity: .7; }
.setting-card .tag { align-self: flex-start; margin: 6px 0 0; }
.list-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; color: var(--ink); text-decoration: none; }
.list-card:hover { border-color: var(--line-strong); color: var(--ink); }
.list-card-main { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }

/* Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #D9D6CF; border-radius: 999px; cursor: pointer; transition: background .15s; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Swatches */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--ink); box-shadow: inset 0 0 0 3px #fff; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(18, 18, 23, .45); z-index: 50; }
.modal { position: fixed; z-index: 51; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.modal-wide { width: min(860px, calc(100vw - 32px)); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 10px 24px; }
.modal-head h2 { font-size: 20px; font-weight: 800; }
.modal-body { padding: 8px 24px 20px; overflow: auto; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); }

/* Wizard (business setup) */
.blank { min-height: 100vh; background: var(--surface); }
.wizard-head { height: 88px; display: grid; grid-template-columns: 200px minmax(0, 1fr) 200px; align-items: center; gap: 32px; padding: 0 32px; }
.wizard-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wizard-bar { height: 6px; border-radius: 3px; background: var(--line); }
.wizard-bar.on { background: var(--accent); }
.wizard-actions { display: flex; justify-content: flex-end; }
.wizard-main { max-width: 640px; margin: 32px auto 64px; padding: 0 24px; display: flex; flex-direction: column; gap: 24px; }
.wizard-copy { display: flex; flex-direction: column; gap: 8px; }
.wizard-copy h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.15; }
.wizard-copy p { margin: 0; font-size: 16px; }
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; height: 96px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; display: flex; align-items: flex-end; text-align: left; }
.tile.on { border: 2px solid var(--accent); background: #F2FAF7; }
.tile-name { font-size: 15px; font-weight: 700; }
.tile .tag { position: absolute; top: 10px; right: 10px; margin: 0; }
.option-row { height: 64px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.option-row.on { border: 2px solid var(--accent); background: #F2FAF7; }
.radio-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #B9B5AC; }
.option-row.on .radio-dot { border: 7px solid var(--accent); }

/* Opening hours / schedules */
.hours { display: flex; flex-direction: column; }
.hours-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #F1EFEA; flex-wrap: wrap; }
.hours-row:first-child { border-top: 0; }
.hours-day { width: 150px; }

/* Service menu */
.menu-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.menu-categories { display: flex; flex-direction: column; gap: 4px; }
.menu-cat { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.menu-cat:hover { background: var(--ground); }
.menu-cat.on { background: #EEF5F3; color: var(--accent-ink); }
.menu-cat .count { margin-left: 8px; }
.menu-services { display: flex; flex-direction: column; gap: 24px; }
.menu-group { display: flex; flex-direction: column; gap: 10px; }
.menu-group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.menu-group-head h2 { font-size: 20px; font-weight: 800; }
.icon-btn.small { width: 36px; height: 36px; }
.service-row { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 0; border-radius: 12px; padding: 16px 20px; color: var(--ink); text-decoration: none; box-shadow: inset 6px 0 0 var(--cat, #9FD2F5); }
.service-row:hover { border-color: var(--line-strong); color: var(--ink); }
.service-row-main { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.service-row-price { font-weight: 700; white-space: nowrap; }
.variant-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 12px; align-items: end; }
.staff-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.staff-row .check { flex-grow: 1; align-items: center; }

/* Roster */
.roster { padding: 0; overflow-x: auto; }
.roster-table th { white-space: nowrap; font-size: 13px; }
.roster-table th.today { color: var(--accent-ink); }
.roster-table td { padding: 8px; }
.roster-table td:first-child { padding-left: 16px; min-width: 220px; }
.date-nav { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); padding: 2px; }
.date-nav-label { font-size: 14px; font-weight: 700; padding: 0 10px; }
.shift-cell { width: 100%; min-width: 110px; min-height: 52px; border-radius: 10px; border: 1px solid transparent; background: #F6F5F2; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; }
.shift-cell:hover { border-color: var(--line-strong); }
.shift-cell.working { background: #E3F2EE; }
.shift-cell.override { border: 1px dashed var(--accent); }
.shift-cell.off { background: #FFF6E0; }
.shift-cell.closed { background: repeating-linear-gradient(135deg, #EDEBE6 0 6px, #F7F6F3 6px 12px); color: var(--muted); }
.shift-cell .tag { margin: 0; }

@media (max-width: 1100px) {
    .card-grid, .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .menu-layout { grid-template-columns: 1fr; }
    .section-nav { display: none; }
}

/* =====================================================================
   Phase 2: calendar, booking drawer, appointment details, clients
   ===================================================================== */
.pad { padding: 16px 20px; }
.pre { white-space: pre-line; margin: 0; }
.center-row { justify-content: center; }
.pill-btn { border-radius: 999px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.segmented button { height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; }
.segmented button.on { background: var(--ink); color: #fff; }
.add-menu { position: relative; }
.add-menu .account-menu { width: 200px; top: 44px; }

/* Status chips (colours from the design) */
.status-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #FFFFFF; color: #3F3F48; align-self: flex-start; }
.status-chip.status-confirmed { background: #DCEFE9; color: #0A5C50; }
.status-chip.status-arrived { background: #FFEFC9; color: #6B4200; }
.status-chip.status-started { background: #E4E0FF; color: #3B2F9E; }
.status-chip.status-completed { background: #EDEBE6; color: #3F3F48; }
.status-chip.status-cancelled { background: var(--danger-soft); color: var(--danger); }
.status-chip.status-noshow { background: #FDE7E4; color: #8A1C12; }

/* Calendar */
.cal { display: flex; flex-direction: column; height: 100%; background: var(--surface); }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #FAF9F7; border-bottom: 1px solid var(--line); }
.cal-toolbar .input-sm { width: auto; min-width: 160px; }
.cal-grid { flex-grow: 1; display: flex; flex-direction: column; min-height: 0; }
.cal-head { display: flex; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.cal-gutter { width: 64px; flex-shrink: 0; position: relative; }
.cal-colhead { flex: 1 1 0; min-width: 160px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 8px; border-left: 1px solid var(--line); }
.cal-colhead-text { display: flex; flex-direction: column; min-width: 0; }
.cal-colhead-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-daynum { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.cal-daynum.today { background: var(--accent); color: #fff; }
.cal-scroll { flex-grow: 1; overflow: auto; }
.cal-body { position: relative; display: flex; }
.cal-hour { position: absolute; right: 10px; transform: translateY(-2px); font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-col { flex: 1 1 0; min-width: 160px; position: relative; border-left: 1px solid var(--line); cursor: pointer;
    background-image:
        repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)),
        repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) / 2), #F3F1ED calc(var(--hour) / 2) calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px) var(--hour)); }
.cal-col.closed { background-color: #F7F6F3; }
.cal-off { position: absolute; left: 0; right: 0; pointer-events: none; background: repeating-linear-gradient(135deg, #F1EFEA 0 6px, #F8F7F4 6px 12px); opacity: .85; }
.cal-block { position: absolute; left: 4px; right: 6px; border: 0; border-radius: 8px; padding: 5px 8px; text-align: left; font: inherit; color: var(--ink); background: color-mix(in srgb, var(--block, #9FD2F5) 55%, white); overflow: hidden; display: flex; flex-direction: column; gap: 1px; cursor: pointer; box-shadow: inset 3px 0 0 var(--block, #9FD2F5); z-index: 1; }
.cal-block:hover { filter: brightness(0.97); }
.cal-block:focus-visible { outline: 2px solid var(--ink); }
.cal-block-time { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-block-sub { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-block.status-noshow, .cal-block.status-completed { opacity: .7; }
.cal-block.blocked { background: repeating-linear-gradient(135deg, #EDEBE6 0 6px, #F7F6F3 6px 12px); box-shadow: none; color: var(--ink-2); }
.cal-grid.dragging .cal-block, .cal-grid.dragging .cal-off { pointer-events: none; }
.cal-grid.dragging .cal-col:hover { background-color: #F2FAF7; }
.cal-now { position: absolute; left: 64px; right: 0; height: 2px; background: #C8102E; pointer-events: none; z-index: 2; }
.cal-now-label { position: absolute; left: 6px; height: 20px; padding: 0 6px; border-radius: 999px; background: #C8102E; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; z-index: 3; }

/* Month */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.month-head { background: #FAF9F7; padding: 10px; font-size: 13px; font-weight: 800; text-align: center; }
.month-cell { background: var(--surface); min-height: 110px; padding: 10px; border: 0; font: inherit; text-align: left; display: flex; flex-direction: column; gap: 6px; cursor: pointer; color: var(--ink); }
.month-cell:hover { background: #FAF9F7; }
.month-cell.empty { cursor: default; background: #FAF9F7; }
.month-cell.closed { background: repeating-linear-gradient(135deg, #F1EFEA 0 6px, #F8F7F4 6px 12px); }
.month-cell.today .month-num { background: var(--accent); color: #fff; }
.month-num { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.month-count { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }

/* Drawers */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(18, 18, 23, .45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(860px, 100vw); background: var(--surface); z-index: 41; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.18); }
.drawer-narrow { width: min(520px, 100vw); }
.drawer-body { flex-grow: 1; display: flex; min-height: 0; }
.drawer-left { width: 380px; flex-shrink: 0; border-right: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.drawer-left.full { width: 100%; border-right: 0; }
.drawer-right { flex-grow: 1; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.drawer-right h3 { font-size: 24px; font-weight: 800; margin: 0; }
.drawer-title-row { display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-title-row h2 { font-size: 22px; font-weight: 800; }
.drawer-foot { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line); }
.drawer-foot .alert { flex-grow: 1; }
.drawer-total { font-size: 22px; font-weight: 800; }
.client-card { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.client-card-main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.client-avatar { background: var(--accent-soft); color: var(--accent-ink); }
.client-result { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.client-result:hover { background: var(--ground); }
.empty-hint { padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.line-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--cat, #9FD2F5) 22%, white); }
.line-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.line-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.line-grid .input-sm, .input-sm.wide { width: 100%; }
.line-note { font-size: 12px; font-weight: 700; }
.line-note.ok { color: var(--accent-ink); }
.line-note.warn { color: #8A4B00; }
.total-row { padding: 8px 2px 0; border-top: 1px solid var(--line); }
.note-box { padding: 12px; border-radius: 12px; background: #FFF8E6; white-space: pre-line; }
.picker-group { display: flex; flex-direction: column; gap: 8px; }
.picker-group-head { font-size: 16px; font-weight: 800; }
.picker-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 0; background: var(--surface); box-shadow: inset 5px 0 0 var(--cat, #9FD2F5); font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.picker-item:hover { border-color: var(--line-strong); }
.picker-item[disabled] { opacity: .5; cursor: not-allowed; }
.picker-item-main { flex-grow: 1; display: flex; flex-direction: column; }
.picker-price { font-weight: 700; white-space: nowrap; }
.history summary { cursor: pointer; font-weight: 700; }
.history ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.history li { display: flex; flex-direction: column; }

/* Clients */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.file-btn { cursor: pointer; align-self: flex-start; }
.problems { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); max-height: 160px; overflow: auto; }
.profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.profile-card h1 { font-size: 22px; font-weight: 800; }
.avatar-lg { width: 88px; height: 88px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; }
.facts { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0 0; text-align: left; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.profile-main { display: flex; flex-direction: column; gap: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.stat strong { font-size: 22px; font-weight: 800; }
.appt-list { list-style: none; margin: 0; padding: 0; }
.appt-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #F1EFEA; }
.appt-list li:first-child { border-top: 0; }
.appt-date { width: 44px; display: flex; flex-direction: column; align-items: center; }
.appt-date strong { font-size: 20px; }
.appt-main { flex-grow: 1; display: flex; flex-direction: column; }
.appt-total { font-weight: 700; min-width: 90px; text-align: right; }

@media (max-width: 1100px) {
    .drawer-body { flex-direction: column; overflow-y: auto; }
    .drawer-left { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
    .profile { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ======================= Phase 3: checkout & sales ======================= */

/* Shared helpers */
.grid-2.align-start { align-items: start; }
.grow { flex-grow: 1; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.negative { color: var(--danger); }
.search.wide { width: 100%; }
.table.compact th, .table.compact td { padding: 9px 12px; }
.table tr.zero td { color: #9A9AA3; }
.table tr.total td { font-weight: 800; border-top: 1px solid var(--line); }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #FAF9F6; }
.table-scroll { overflow-x: auto; padding: 0; }
.range-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range-bar .input-sm { width: 150px; }
.export-buttons { display: inline-flex; gap: 6px; }
.pill-preview { display: inline-flex; align-items: center; height: 50px; padding: 0 14px; border-radius: var(--radius); background: var(--ground); font-weight: 800; letter-spacing: .3px; }
.client-card.flat { border: 0; padding: 0 0 14px; }

/* Sale status chips (reuse .status-chip shape) */
.status-chip.sale-unpaid { background: #FFEFC9; color: #6B4200; }
.status-chip.sale-partpaid { background: #FFE3C2; color: #7A3A00; }
.status-chip.sale-completed { background: #DCEFE9; color: #0A5C50; }
.status-chip.sale-partrefunded { background: #E4E0FF; color: #3B2F9E; }
.status-chip.sale-refunded { background: #EDEBE6; color: #3F3F48; }
.status-chip.sale-voided { background: var(--danger-soft); color: var(--danger); }
.page-head h1 .status-chip { vertical-align: middle; margin-left: 6px; font-size: 12px; height: 24px; }

/* Money inputs: "AED [ 150 ]" */
.money-input { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.money-input span { padding: 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--ground); height: 100%; display: inline-flex; align-items: center; }
.money-input input { border: 0; height: 100%; width: 120px; padding: 0 10px; font: inherit; font-size: 14px; }
.money-input input:focus { outline: none; }
.money-input:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.money-input.grow input { width: 100%; }
.discount-input { display: inline-flex; gap: 4px; }
.discount-input select { width: 72px; }
.discount-input input { width: 100px; }
.qty-input { width: 80px; text-align: right; }

/* Checkout page */
.checkout { min-height: 100vh; background: var(--ground); display: flex; flex-direction: column; }
.checkout-head { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.checkout-title { flex-grow: 1; display: flex; flex-direction: column; }
.checkout-title h1 { font-size: 22px; font-weight: 800; }
.checkout-title .input-sm { width: auto; }
.checkout-empty { max-width: 520px; margin: 48px auto; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.checkout-body { flex-grow: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.checkout-main { display: flex; flex-direction: column; gap: 16px; }
.checkout-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }
.checkout-client { padding: 14px 16px; }
.checkout-client .client-card { border: 0; padding: 0; }

.cart { display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 5px 0 0 var(--cat, #D6D3CC); }
.cart-item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item-main .input-sm.wide { width: 100%; }
.cart-item-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.cart-item-controls .input-sm { width: auto; min-width: 150px; }
.cart-item-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.cart-item-total strong { font-size: 16px; }
.cart-discount { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; height: 36px; }
.qty button { width: 34px; height: 34px; border: 0; background: none; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; color: var(--ink); border-radius: 999px; }
.qty button:hover:not([disabled]) { background: var(--ground); }
.qty button[disabled] { color: #B8B6B0; cursor: not-allowed; }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }

.tip-row { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.tip-row:first-of-type { border-top: 0; padding-top: 0; }
.tip-who { display: flex; align-items: center; gap: 10px; }
.tip-who > div { display: flex; flex-direction: column; }
.tip-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tip-option { height: 58px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tip-option small { font-size: 12px; font-weight: 600; color: var(--muted); }
.tip-option.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tip-option.on small { color: #D6D3CC; }

.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.sum-row.sum-total { font-size: 17px; font-weight: 800; padding-top: 10px; border-top: 1px solid var(--line); }
.sum-row.sum-total.due { color: #8A4B00; border-top: 0; padding-top: 0; }
.sum-row.paid { color: var(--accent-ink); }
.totals { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0 auto; max-width: 360px; }

.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.method { height: 72px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.method:hover { border-color: var(--ink); }
.method.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.method-grid.compact .method { height: 44px; flex-direction: row; }

/* Printable receipt */
.receipt-page { max-width: 420px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.receipt-actions { display: flex; justify-content: space-between; }
.receipt { font-size: 13px; color: #000; background: #fff; border: 1px dashed var(--line-strong); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.receipt header { text-align: center; }
.receipt header h1 { font-size: 18px; margin-bottom: 4px; }
.receipt header p { margin: 0; color: #444; }
.receipt-meta div, .receipt-line, .receipt-totals div { display: flex; justify-content: space-between; gap: 12px; }
.receipt-meta { border-top: 1px dashed #999; border-bottom: 1px dashed #999; padding: 8px 0; display: flex; flex-direction: column; gap: 2px; }
.receipt-lines { display: flex; flex-direction: column; gap: 8px; }
.receipt-line small { display: block; color: #555; }
.receipt-totals { border-top: 1px dashed #999; padding-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.receipt-totals .grand { font-weight: 800; font-size: 15px; }
.receipt footer { text-align: center; color: #444; border-top: 1px dashed #999; padding-top: 10px; }

@media print {
    .no-print, #blazor-error-ui { display: none !important; }
    .receipt-page { max-width: none; padding: 0; }
    .receipt { border: 0; padding: 0; }
}

@media (max-width: 980px) {
    .checkout-body { grid-template-columns: 1fr; }
    .checkout-side { position: static; }
    .cart-item { grid-template-columns: 1fr auto; }
    .cart-item-total { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
    .tip-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ======================= Phase 4: public booking site & messaging ======================= */

.auth-photo-customer { background: linear-gradient(160deg, #2A2F45 0%, #0E7C6B 100%); }
.inline-form { display: inline; margin: 0; }

/* Public layout */
.public { min-height: 100vh; display: flex; flex-direction: column; background: var(--ground); }
.public-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.public-nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.public-link { font-weight: 700; text-decoration: none; color: var(--ink); }
.public-name { color: var(--muted); }
.public-main { flex-grow: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 28px 20px 48px; }
.public-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; font-size: 13px; color: var(--muted); }
.public-hero { max-width: 640px; margin: 48px auto; display: flex; flex-direction: column; gap: 16px; }
.public-hero h1 { font-family: var(--font-display); font-size: 40px; }
.public-empty { max-width: 520px; margin: 48px auto; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.public-page { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.public-page.narrow { max-width: 620px; }
.public-page h1 { font-size: 28px; font-weight: 800; }
.pay-amount { font-size: 36px; font-weight: 800; margin: 0; }

/* Booking flow */
.booking { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.booking-main { display: flex; flex-direction: column; gap: 16px; }
.booking-title { font-size: 30px; font-weight: 800; }
.booking-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.booking-steps button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); padding: 6px 2px; margin-right: 14px; border-bottom: 2px solid transparent; cursor: pointer; }
.booking-steps button.on { color: var(--ink); border-bottom-color: var(--ink); }
.booking-steps button[disabled] { color: #B8B6B0; cursor: default; }
.booking-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.salon-head { display: flex; gap: 12px; align-items: center; }
.salon-avatar { background: var(--accent-soft); color: var(--accent-ink); }
.booking-when { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.picker-item.picked { border-color: var(--accent); background: #F3FAF8; }
.pick-mark { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.picker-item.picked .pick-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.member-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font: inherit; cursor: pointer; text-align: center; }
.member-card:hover { border-color: var(--line-strong); }
.member-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.member-card .avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.any-avatar { background: var(--ground); color: var(--ink); }

.date-strip { display: flex; flex-direction: column; gap: 10px; }
.date-strip-head { display: flex; justify-content: space-between; align-items: center; }
.date-strip-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font: inherit; cursor: pointer; }
.day.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.day.off:not(.on) { color: #9A9AA3; background: #FAF9F6; }
.day[disabled] { cursor: not-allowed; opacity: .4; }
.day-dow { font-size: 12px; font-weight: 700; }
.day-num { font-size: 20px; font-weight: 800; }
.day-note { font-size: 11px; min-height: 14px; }
.slot-group { display: flex; flex-direction: column; gap: 8px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; }
.slot:hover { border-color: var(--ink); }
.slot.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* My bookings */
.booking-list { display: flex; flex-direction: column; gap: 10px; }
.booking-card { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); padding: 14px 18px; }
.booking-card:hover { border-color: var(--line-strong); color: var(--ink); }
.booking-card-date { width: 54px; display: flex; flex-direction: column; align-items: center; border-radius: 12px; background: var(--ground); padding: 6px 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.booking-card-date strong { font-size: 22px; color: var(--ink); }
.booking-card-main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.booking-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Partner: online booking & marketing */
.link-box { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ground); }
.link-box code { flex-grow: 1; font-size: 14px; overflow-wrap: anywhere; }
.sms-balance { display: flex; flex-direction: column; align-items: flex-end; padding: 12px 16px; }
.sms-balance strong { font-size: 24px; }
.status-chip.msg-pending, .status-chip.msg-processing { background: #EAF3FB; color: #1D4F7A; }
.status-chip.msg-sent { background: #DCEFE9; color: #0A5C50; }
.status-chip.msg-failed { background: var(--danger-soft); color: var(--danger); }
.status-chip.msg-skipped, .status-chip.msg-cancelled { background: #EDEBE6; color: #3F3F48; }

@media (max-width: 900px) {
    .booking { grid-template-columns: 1fr; }
    .booking-side { position: static; }
    .date-strip-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Phase 5: dashboard ---------- */
.dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.dash-card { min-width: 0; }
.dash-figure { font-size: 28px; font-weight: 800; letter-spacing: -0.4px; margin-top: 4px; }
.dash-sub { font-size: 13px; margin: 2px 0 12px; }
.dash-sub strong { color: var(--ink); }
.empty-body.compact { min-height: 150px; }

.bar-chart { margin: 0; }
.bar-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.bc-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.bc-grid.bc-base { stroke: var(--line-strong); }
.bc-axis { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.bc-axis.bc-today { fill: var(--ink); font-weight: 800; }
.bc-fill { fill: var(--accent); }
.bc-hit { fill: transparent; }
.bc-bar:hover .bc-hit { fill: rgba(14, 124, 107, 0.06); }
.bc-bar:hover .bc-fill { fill: var(--accent-ink); }
.bc-table { margin-top: 6px; font-size: 13px; }
.bc-table summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.bc-table .table { margin-top: 6px; }

.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid #F1EFEA; }
.activity-list li:last-child { border-bottom: 0; }
.activity-when { width: 48px; flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.activity-when strong { font-size: 20px; }
.activity-when span { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.activity-when.time strong { font-size: 15px; }
.activity-when.time span { text-transform: none; }
.activity-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.activity-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Phase 5: reports ---------- */
.report-group { font-size: 16px; font-weight: 800; margin: 22px 0 10px; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.report-tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); padding: 18px 20px; }
.report-tile:hover { border-color: var(--line-strong); background: #FAF9F6; color: var(--ink); }
.report-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.report-table td { white-space: nowrap; }
.page > .toolbar { margin: 14px 0; }

@media (max-width: 900px) {
    .dashboard, .report-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Phase 6: clients+ ---------- */
.row-gap.wrap { flex-wrap: wrap; }
.edit-list { list-style: none; margin: 0 0 12px; padding: 0; }
.edit-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #F1EFEA; }
.edit-list li:last-child { border-bottom: 0; }
.client-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.client-tag.small { height: 20px; padding: 0 8px; font-size: 11px; margin-left: 4px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches .swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatches .swatch.on { border-color: var(--ink); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.segment-count { font-size: 26px; font-weight: 800; letter-spacing: -0.4px; }
.segment-editor .field-label, .segment-editor label { font-size: 13px; }

.wallet-balance { font-size: 22px; }
.wallet-pill { display: inline-block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.wallet-btn { border-color: var(--accent); color: var(--accent-ink); }
td.positive { color: var(--accent-ink); font-weight: 700; }
td.negative { color: var(--ink-2); }

.answers { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.answers dt { font-weight: 700; margin-top: 10px; }
.answers dt.answers-heading { font-size: 15px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; }
.answers dd { margin: 0; color: var(--ink-2); white-space: pre-wrap; }

.section-title { font-size: 18px; font-weight: 800; margin: 22px 0 10px; }
.form-field-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.service-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }

.public-form h1 { font-size: 26px; margin-top: 4px; }
.form-info { border-top: 1px solid var(--line); padding-top: 12px; font-size: 16px; }
.choice-group { border: 0; padding: 0; margin: 0; }
.choice-group legend { font-size: 14px; font-weight: 700; margin-bottom: 6px; padding: 0; }
.check.consent { align-items: flex-start; background: var(--ground); border-radius: var(--radius); padding: 12px 14px; }

@media (max-width: 900px) {
    .grid-4, .service-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Phase 7: gift cards, packages, memberships ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.5px; }
.plan-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.plan-row .chip { height: 28px; font-size: 12px; }
.gift-redeem { display: flex; gap: 8px; }
.gift-redeem .input { flex: 1; text-transform: uppercase; }
.plan-card { padding: 10px 0; border-bottom: 1px solid #F1EFEA; }
.plan-card:last-child { border-bottom: 0; }
.plan-sessions { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.picker-item[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Phase 8: products & inventory ---------- */
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }
.notice a, .notice .link-button { font-weight: 700; }
.notice-warn { background: #FFEFC9; color: #6B4200; }
.notice-ok { background: #DCEFE9; color: #0A5C50; font-weight: 600; }
.stock-low { color: #9A5B00; font-weight: 700; }
.stock-neg { color: var(--danger); font-weight: 700; }
.stock-pos { color: #0A5C50; font-weight: 700; }
.row-gap.end { justify-content: flex-end; }
.table tfoot td { border-top: 1px solid var(--line); }

/* ---------- Phase 9: timesheets & pay runs ---------- */
.clock-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.clock-card.on { border-left: 4px solid var(--accent); }
.clock-state { display: flex; flex-direction: column; gap: 2px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; }
.hours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pct-input { width: 76px; text-align: right; }
.pay-table td, .pay-table th { white-space: nowrap; }
.pay-table td .small { white-space: normal; max-width: 260px; }

/* ---------- Phase 10: campaigns, deals & reviews ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.code-input { text-transform: uppercase; letter-spacing: .04em; max-width: 180px; }
.sms-preview { background: #EDEBE6; border-radius: 16px 16px 16px 4px; padding: 12px 14px; white-space: pre-wrap; max-width: 340px; font-size: 14px; }
.email-preview { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.email-preview-body { white-space: pre-wrap; font-size: 14px; }
.stars { display: inline-flex; gap: 1px; color: #D6D3CC; line-height: 1; }
.stars .star.on { color: #F5B301; }
.stars-pick .star { background: none; border: 0; font-size: 36px; cursor: pointer; padding: 0 2px; color: #D6D3CC; }
.stars-pick .star.on { color: #F5B301; }
.review-pick { display: flex; justify-content: center; }
.review-summary { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.review-average { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 120px; }
.review-average strong { font-size: 40px; font-weight: 800; }
.review-bars { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 220px; }
.review-bar { display: grid; grid-template-columns: 40px 1fr 40px; gap: 8px; align-items: center; background: none; border: 0; font: inherit; cursor: pointer; padding: 2px 4px; border-radius: 6px; text-align: left; }
.review-bar.on, .review-bar:hover { background: var(--ground); }
.review-bar .bar { height: 8px; background: #EDEBE6; border-radius: 999px; overflow: hidden; }
.review-bar .bar span { display: block; height: 100%; background: #F5B301; }
.review-card { display: flex; flex-direction: column; gap: 8px; }
.review-card.hidden-review { opacity: .6; }
.review-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.review-comment { margin: 0; white-space: pre-wrap; }
.review-reply { border-left: 3px solid var(--line-strong); padding-left: 12px; }
.review-reply p { margin: 4px 0; white-space: pre-wrap; }
.public-reviews { margin-top: 16px; }
.public-review p { margin: 4px 0 0; }

/* ---------- Phase 12: online payments, gift card shop, e-gift card, my wallet ---------- */
.pay-button { width: 100%; justify-content: center; padding-top: 12px; padding-bottom: 12px; font-size: 16px; }
.gift-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; text-decoration: none; margin-top: 4px; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gift-option { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.gift-option:hover { border-color: var(--muted); }
.gift-option.selected { border-color: var(--accent); }
.gift-face, .egift-top { display: flex; flex-direction: column; justify-content: space-between; width: 100%; aspect-ratio: 1.6; padding: 14px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #17171B 0%, #4B3B8F 100%); }
.gift-brand { font-size: 13px; font-weight: 600; opacity: .85; }
.gift-value { font-size: 26px; font-weight: 800; }
.egift { max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.egift-top { border-radius: 16px; padding: 22px; }
.egift-top .gift-value { font-size: 40px; }
.egift-to { font-weight: 600; margin: 0; }
.egift-message { font-style: italic; margin: 0; color: var(--muted); }
.egift-code { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 2px dashed var(--line); border-radius: 12px; }
.egift-code strong { font-size: 28px; letter-spacing: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wallet-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.wallet-stats > div { display: flex; flex-direction: column; }
.wallet-stats strong { font-size: 22px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 1px; }
.link-box { display: flex; gap: 8px; align-items: center; }
.link-box .input { flex: 1; min-width: 0; font-size: 13px; }
@media print {
    .public-head, .public-foot { display: none !important; }
    .gift-face, .egift-top { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Phase 13: branch switcher ---------- */
.branch-switch .pill { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; }
.branch-switch .account-menu { min-width: 220px; }
.branch-switch .menu-item { width: 100%; text-align: left; font: inherit; background: none; border: 0; cursor: pointer; }
.branch-switch .menu-item.active { font-weight: 700; color: var(--accent); }

/* ---------- Phase 14: billing ---------- */
.narrow-page { max-width: none; }
.plan-offer.selected { border: 2px solid var(--accent); }
.plan-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.plan-points li { display: flex; align-items: center; gap: 8px; }
.alert-link { margin-left: 8px; font-weight: 700; }

/* ---------- Full-width pages: keep single form fields a readable width ---------- */
.section-content.narrow .card > .field,
.section-content.narrow .card.pad > .field,
.section-content.narrow .stack > .field { max-width: 760px; }
.section-content.narrow .card textarea.input { max-width: 760px; }

/* ---------- Top bar: search and notifications popups ---------- */
.topbar-pop { margin-left: 0; }
.topbar-actions a.icon-btn { text-decoration: none; }
.search-menu { width: 340px; display: flex; flex-direction: column; gap: 6px; }
.search-menu .input { width: 100%; margin-bottom: 4px; }
.search-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.notes-menu { width: 340px; }
.note-item { white-space: normal; line-height: 1.4; }
.note-item.urgent { color: #B42318; font-weight: 600; }
.pad-sm { padding: 8px 10px; margin: 0; }
.icon-btn { position: relative; }
.badge-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #D92D20; border: 2px solid var(--surface); }
