/* Booking portal — global styles.
   Palette is ported 1:1 from the tablet app's Colors.xaml (comfort palette:
   soft graphite ground, ~88% white text, one teal key accent, champagne-gold
   prices, ink text on accent fills). Mobile-first: the desktop two-column
   layouts are the wide-screen enhancement, not the base. */
:root {
    --portal-bg: #050407;
    --portal-panel: #0c0f14;
    --portal-surface: #191e26;
    --portal-item: #10141a;
    --portal-border: #282b2e;
    --portal-border-card: #34383c;
    --portal-text: #e3e6e4;
    --portal-text-body: #c7ccc9;
    --portal-text-muted: #98a09b;
    --portal-text-faint: #6a726d;
    --portal-accent: #5fcabb;
    --portal-accent-text: #80d4c8;
    --portal-accent-contrast: #14171a;
    --portal-accent-deep: #4fb8a8;
    --portal-wash-bg: rgba(95, 202, 187, 0.09);
    --portal-wash-stroke: rgba(95, 202, 187, 0.18);
    --portal-wash-faint: rgba(95, 202, 187, 0.12);
    --portal-hero-start: #143137;
    --portal-hero-end: #0c1a20;
    --portal-hero-stroke: rgba(95, 202, 187, 0.35);
    --portal-price: #e8c37e;
    --portal-success: #7cb98a;
    --portal-success-bg: #0d2a1a;
    --portal-success-border: #1a4a2a;
    --portal-error: #e57373;
    --portal-error-bg: #3a1a1a;
    --portal-error-border: #5a2a2a;
    --portal-info: #96bcc4;
    --portal-info-bg: #1d2b2e;
    --portal-info-border: #2d4147;
    --portal-radius: 14px;
    --portal-radius-sm: 10px;
    --portal-shadow: 0 1px 2px rgba(0,0,0,0.25), 0 8px 32px rgba(0,0,0,0.30);
    --portal-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--portal-font);
    color: var(--portal-text);
    background: var(--portal-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--portal-accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.container-narrow {
    max-width: 620px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 4, 7, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--portal-border);
}

.site-header-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    font-weight: 700;
    font-size: 16px;
    color: var(--portal-text);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand:hover { text-decoration: none; }

.brand-sub {
    color: var(--portal-text-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-nav a {
    color: var(--portal-text-muted);
    font-size: 14px;
    font-weight: 500;
}

.header-nav a:hover { color: var(--portal-text); text-decoration: none; }

.header-cta {
    background: var(--portal-accent);
    color: var(--portal-accent-contrast) !important;
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 600;
}

.header-cta:hover { filter: brightness(1.06); }

@media (max-width: 640px) {
    .header-nav a:not(.header-cta) { display: none; }
}

/* ── Hero ───────────────────────────────────────────────── */
.landing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
    padding: 36px 0 8px;
}

@media (min-width: 880px) {
    .landing-grid {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 48px;
        padding: 56px 0 24px;
    }
}

.hero h1 {
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 700;
    line-height: 1.12;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.hero .tagline {
    color: var(--portal-text-muted);
    margin: 0 0 24px;
    font-size: clamp(15px, 2.5vw, 17px);
    line-height: 1.55;
    max-width: 44ch;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-hero {
    display: inline-block;
    background: linear-gradient(180deg, var(--portal-accent), var(--portal-accent-deep));
    color: var(--portal-accent-contrast);
    border: none;
    padding: 14px 24px;
    border-radius: var(--portal-radius-sm);
    font-weight: 700;
    font-size: 15px;
    min-height: 48px;
}

.btn-hero:hover { filter: brightness(1.06); text-decoration: none; }

.btn-hero-secondary {
    display: inline-block;
    background: transparent;
    color: var(--portal-text);
    border: 1px solid var(--portal-border-card);
    padding: 14px 24px;
    border-radius: var(--portal-radius-sm);
    font-weight: 600;
    font-size: 15px;
    min-height: 48px;
}

.btn-hero-secondary:hover { border-color: var(--portal-text-muted); text-decoration: none; }

.queue-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--portal-wash-bg);
    border: 1px solid var(--portal-wash-stroke);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--portal-text-body);
    margin-bottom: 20px;
}

.queue-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--portal-accent);
    flex-shrink: 0;
}

.queue-pill strong { color: var(--portal-accent-text); font-weight: 600; }

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--portal-text-muted);
    font-size: 14px;
}

.hero-meta .rating { color: var(--portal-price); font-weight: 600; }
.hero-meta a { color: var(--portal-text-muted); }

/* ── Popular services card ──────────────────────────────── */
.popular-card {
    background: linear-gradient(180deg, var(--portal-hero-start), var(--portal-hero-end));
    border: 1px solid var(--portal-hero-stroke);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    padding: 20px;
}

.popular-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.popular-head .eyebrow { margin: 0; }

.popular-head a { font-size: 13px; font-weight: 600; white-space: nowrap; }

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--portal-text-muted);
}

.popular-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(5, 4, 7, 0.35);
    border: 1px solid var(--portal-wash-faint);
    border-radius: var(--portal-radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.popular-row .svc { flex: 1; min-width: 0; }

.popular-row .svc-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px;
    color: var(--portal-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-row .svc-meta { font-size: 12px; color: var(--portal-text-muted); margin: 0; }

.popular-row .svc-price {
    font-weight: 700;
    font-size: 15px;
    color: var(--portal-price);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.popular-row .btn-book {
    background: var(--portal-accent);
    color: var(--portal-accent-contrast);
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.popular-row .btn-book:hover { filter: brightness(1.06); text-decoration: none; }

.popular-foot {
    text-align: center;
    font-size: 13px;
    color: var(--portal-text-muted);
    padding-top: 8px;
}

.popular-foot strong { color: var(--portal-text); font-weight: 700; }

/* ── Section + service list ─────────────────────────────── */
.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--portal-text-muted);
    margin: 28px 0 12px;
}

.card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border-card);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: none; }

.card-link:hover .card {
    transform: translateY(-1px);
    border-color: var(--portal-wash-stroke);
    box-shadow: 0 1px 2px rgba(0,0,0,0.30), 0 12px 36px rgba(0,0,0,0.40);
}

.card-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.card-meta { color: var(--portal-text-muted); font-size: 13px; margin: 2px 0 0; }

.card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.price {
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    color: var(--portal-price);
    font-variant-numeric: tabular-nums;
}

/* The ordinary price beside a markdown. It is the price the salon genuinely charges when
   the sale is off — never a decorative anchor (ACL ss 18/29). */
.was-price {
    margin-left: 6px;
    font-weight: 500;
    font-size: 0.82em;
    color: var(--portal-text-muted);
    font-variant-numeric: tabular-nums;
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 16px;
}

@media (min-width: 880px) {
    .service-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Stepper ────────────────────────────────────────────── */
.stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0 4px;
    font-size: 13px;
    color: var(--portal-text-faint);
    flex-wrap: wrap;
}

.step { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

.step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--portal-border-card);
    color: var(--portal-text-faint);
    background: var(--portal-item);
    flex-shrink: 0;
}

.step.done .step-dot {
    background: var(--portal-wash-bg);
    border-color: var(--portal-wash-stroke);
    color: var(--portal-accent-text);
}

.step.done { color: var(--portal-text-muted); }

.step.active .step-dot {
    background: var(--portal-accent);
    border-color: var(--portal-accent);
    color: var(--portal-accent-contrast);
}

.step.active { color: var(--portal-text); }

.step-line { flex: 0 0 24px; height: 1px; background: var(--portal-border-card); }

/* ── Booking layout: content + summary rail ─────────────── */
.book-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
}

@media (min-width: 880px) {
    .book-grid { grid-template-columns: 1fr 340px; gap: 40px; }
    .book-rail { position: sticky; top: 84px; }
}

.rail-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border-card);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    padding: 20px;
}

.rail-card .eyebrow { display: block; margin-bottom: 14px; }

.rail-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
}

.rail-line .l { color: var(--portal-text-body); }
.rail-line .l small { display: block; color: var(--portal-text-muted); font-size: 12px; margin-top: 2px; }
.rail-line .r { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.rail-divider { border: none; border-top: 1px solid var(--portal-border); margin: 10px 0; }

.rail-total { font-size: 17px; font-weight: 700; }
.rail-total .r { color: var(--portal-text); font-size: 18px; }

.rail-deposit .r { color: var(--portal-accent-text); }

/* Mobile: rail collapses into a sticky bottom bar */
.book-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: rgba(12, 15, 20, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--portal-border-card);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 14px;
}

.book-bar .bar-total { flex: 1; min-width: 0; }
.book-bar .bar-total .amount { font-size: 17px; font-weight: 700; }
.book-bar .bar-total small { display: block; color: var(--portal-text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-bar .btn { width: auto; flex-shrink: 0; padding: 13px 28px; }

@media (min-width: 880px) {
    .book-bar { display: none; }
}

@media (max-width: 879px) {
    .book-rail { display: none; }
    .has-book-bar { padding-bottom: 96px; }
}

/* ── Day strip ──────────────────────────────────────────── */
.day-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: none;
}

.day-strip::-webkit-scrollbar { display: none; }

.day-btn {
    flex: 0 0 64px;
    background: var(--portal-item);
    border: 1px solid var(--portal-border-card);
    border-radius: var(--portal-radius-sm);
    color: var(--portal-text-body);
    padding: 10px 4px;
    text-align: center;
    min-height: 60px;
}

.day-btn .dow { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--portal-text-muted); }
.day-btn .dom { display: block; font-size: 18px; font-weight: 700; margin-top: 3px; }

.day-btn:hover { border-color: var(--portal-text-muted); }

.day-btn.selected {
    background: var(--portal-wash-bg);
    border-color: var(--portal-accent);
    color: var(--portal-text);
}

.day-btn.selected .dow { color: var(--portal-accent-text); }

/* ── Technician chips ───────────────────────────────────── */
.tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px;
}

.tech-chip {
    background: var(--portal-item);
    border: 1px solid var(--portal-border-card);
    border-radius: 999px;
    color: var(--portal-text-body);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    min-height: 38px;
}

.tech-chip:hover { border-color: var(--portal-text-muted); }

.tech-chip.selected {
    background: var(--portal-wash-bg);
    border-color: var(--portal-wash-stroke);
    color: var(--portal-accent-text);
}

/* ── Time slots ─────────────────────────────────────────── */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    margin: 10px 0 20px;
}

.slot-btn {
    background: var(--portal-item);
    color: var(--portal-text);
    border: 1px solid var(--portal-border-card);
    border-radius: var(--portal-radius-sm);
    padding: 12px 8px;
    text-align: center;
    min-height: 48px;
    font-weight: 600;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.slot-btn:hover { border-color: var(--portal-accent); }

.slot-btn.selected {
    background: var(--portal-accent);
    color: var(--portal-accent-contrast);
    border-color: var(--portal-accent);
}

.slot-note { font-size: 13px; color: var(--portal-text-muted); margin: 4px 0 16px; }

/* ── Buttons + forms ────────────────────────────────────── */
.btn {
    display: inline-block;
    background: linear-gradient(180deg, var(--portal-accent), var(--portal-accent-deep));
    color: var(--portal-accent-contrast);
    border: none;
    padding: 14px 22px;
    border-radius: var(--portal-radius-sm);
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    width: 100%;
    min-height: 48px;
    transition: filter 0.12s;
}

.btn:hover:not(:disabled) { filter: brightness(1.06); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: var(--portal-surface);
    color: var(--portal-text);
    border: 1px solid var(--portal-border-card);
}

.field { display: block; margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--portal-text);
}

.field input, .field textarea, .field select {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 16px; /* iOS won't zoom on focus when font-size ≥ 16px */
    border: 1px solid var(--portal-border-card);
    border-radius: var(--portal-radius-sm);
    background: var(--portal-surface);
    color: var(--portal-text);
    min-height: 48px;
}

.field input:focus, .field textarea:focus, .field select:focus {
    outline: 2px solid var(--portal-accent);
    outline-offset: -1px;
    border-color: var(--portal-accent);
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
    padding: 12px 14px;
    border-radius: var(--portal-radius-sm);
    background: var(--portal-error-bg);
    color: var(--portal-error);
    border: 1px solid var(--portal-error-border);
    margin: 12px 0;
    font-size: 14px;
}

.alert-info {
    background: var(--portal-info-bg);
    color: var(--portal-info);
    border-color: var(--portal-info-border);
}

/* ── Confirmed page ─────────────────────────────────────── */
.confirm-hero { text-align: center; padding: 44px 0 8px; }

.confirm-tick {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--portal-wash-bg);
    border: 1px solid var(--portal-hero-stroke);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: var(--portal-accent-text);
}

.confirm-hero h1 {
    font-size: clamp(26px, 4.5vw, 36px);
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.confirm-hero .sub { color: var(--portal-text-muted); font-size: 15px; margin: 0; }

.receipt {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border-card);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    padding: 8px 20px;
    margin: 28px 0 16px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--portal-border);
}

.receipt-row:last-child { border-bottom: none; }
.receipt-row .l { color: var(--portal-text-muted); }
.receipt-row .r { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.receipt-row .r.paid { color: var(--portal-success); }

.confirm-actions { display: flex; gap: 12px; margin: 16px 0; }
.confirm-actions .btn { flex: 1; }

.app-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--portal-item);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    padding: 16px 18px;
    margin-top: 20px;
}

.app-card .qr {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    padding: 4px;
}

.app-card .qr svg, .app-card .qr img { width: 100%; height: 100%; display: block; }

.app-card .app-copy p { margin: 0; }
.app-card .app-copy .t { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.app-card .app-copy .d { color: var(--portal-text-muted); font-size: 13px; line-height: 1.45; }

/* ── Home (salon directory) ─────────────────────────────── */
.home-hero { text-align: center; padding: 56px 20px 28px; }

.home-hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.home-hero p { color: var(--portal-text-muted); margin: 0; font-size: 16px; }

/* ── Utilities ──────────────────────────────────────────── */
.muted { color: var(--portal-text-muted); }
.center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

@media (max-width: 480px) {
    .container, .container-narrow { padding: 16px 14px 40px; }
}
