﻿/**
 * 15 themes x day/night. Default: peaky (Острые козырьки).
 * body.theme-{name}.mode-{day|night}
 */

:root {
    --transition-speed: 0.5s;
}

body[class*="theme-"] {
    --bg: var(--bg-primary);
    --bg2: var(--bg-secondary);
    --bg3: var(--bg-tertiary);
    --text: var(--text-primary);
    --muted: var(--text-secondary);
    --gold: var(--accent-color);
    --gold-light: var(--accent-alt);
    --border: var(--border-color);
    --topbar-bg: var(--topbar-surface);
    --on-gold: var(--on-accent);
    /* Bright appointment status palette (same on every theme × day/night) */
    --status-waiting: #a855f7;
    --status-waiting-strong: #9333ea;
    --status-confirmed: #3b82f6;
    --status-confirmed-strong: #2563eb;
    --status-arrived: #22c55e;
    --status-arrived-strong: #16a34a;
    --status-no-show: #f43f5e;
    --status-no-show-strong: #e11d48;
    --status-cancelled: #94a3b8;
    --status-cancelled-strong: #64748b;
    --status-on: #ffffff;
    --status-tg-waiting: #38bdf8;
    --status-tg-confirmed: #0ea5e9;
    --status-tg-arrived: #06b6d4;
    /* Dedicated Telegram booking tint (align with AppointmentService::TELEGRAM_CARD_COLOR) */
    --status-tg-default: #38bdf8;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

body[class*="theme-"] h1,
body[class*="theme-"] h2,
body[class*="theme-"] h3,
body[class*="theme-"] .section-title,
body[class*="theme-"] .site-name,
body[class*="theme-"] .manage-card__title {
    font-family: var(--font-heading);
}

body[class*="theme-"] .nav-link,
body[class*="theme-"] .lang-btn,
body[class*="theme-"] .btn-gold,
body[class*="theme-"] .btn-outline {
    font-family: var(--font-nav);
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease,
        border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, transform 0.2s ease;
}

/* ═══ Readable text contract (all themes × day/night) ═══
   Components should prefer --text-primary / --text-secondary.
   Hardcoded cream/black outside dark surfaces breaks day mode. */
body[class*="theme-"] .text-muted,
body[class*="theme-"] .muted,
body[class*="theme-"] .hint,
body[class*="theme-"] .modal-subtitle,
body[class*="theme-"] .ui-field__label,
body[class*="theme-"] .form-hint,
body[class*="theme-"] .empty-schedule,
body[class*="theme-"] .schedule-emp-meta,
body[class*="theme-"] .schedule-emp-hours {
    color: var(--text-secondary);
}

body[class*="theme-"] .section-title,
body[class*="theme-"] .site-name,
body[class*="theme-"] .panel-header h1,
body[class*="theme-"] .manage-card__title,
body[class*="theme-"] .panel-page,
body[class*="theme-"] .main-content {
    color: var(--text-primary);
}

body[class*="theme-"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body[class*="theme-"] select,
body[class*="theme-"] textarea,
body[class*="theme-"] .ui-input {
    color: var(--text-primary);
}

body[class*="theme-"] .ui-input::placeholder,
body[class*="theme-"] input::placeholder,
body[class*="theme-"] textarea::placeholder {
    color: color-mix(in srgb, var(--text-secondary) 85%, transparent);
}

/* ═══ Header — nav labels stay on one line (desktop) ═══ */
@media (min-width: 768px) {
    body[class*="theme-"] .topbar-inner {
        flex-wrap: nowrap;
    }

    body[class*="theme-"] .nav {
        flex-wrap: nowrap;
        gap: clamp(4px, 0.7vw, 14px);
        align-items: center;
    }

    body[class*="theme-"] .site-name,
    body[class*="theme-"] .nav-link,
    body[class*="theme-"] .lang-btn,
    body[class*="theme-"] .nav-dropdown__toggle,
    body[class*="theme-"] .topbar-logout {
        white-space: nowrap;
        word-break: keep-all;
        overflow-wrap: normal;
        hyphens: none;
    }

    body[class*="theme-"] .nav-link,
    body[class*="theme-"] .lang-btn {
        flex-shrink: 0;
    }
}

/* ═══ PEAKY — Острые козырьки (default) ═══ */
body.theme-peaky.mode-night {
    --bg-primary: #121212;
    --bg-secondary: #1e1a17;
    --bg-tertiary: #2a2420;
    --text-primary: #e8e0d4;
    --text-secondary: #a89c8e;
    --accent-color: #c9a227;
    --accent-alt: #e0bc4a;
    --border-color: #3a322c;
    --shadow-color: rgba(0, 0, 0, 0.35);
    --topbar-surface: rgba(18, 18, 18, 0.97);
    --on-accent: #121212;
    --font-heading: "Playfair Display", Georgia, serif;
    --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    --font-nav: "Cinzel", serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --clip-cap: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    --shadow-card: 0 4px 0 var(--bg-primary), 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border-color);
    --shadow-raised: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 4px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
    --surface-elevated: linear-gradient(165deg, var(--bg-tertiary) 0%, var(--bg-secondary) 55%, #1a1612 100%);
    --input-bg: linear-gradient(180deg, #0f0d0b 0%, var(--bg-primary) 100%);
}

body.theme-peaky.mode-day {
    --bg-primary: #f5f0e8;
    --bg-secondary: #ebe4d6;
    --bg-tertiary: #ddd4c4;
    --text-primary: #1a1510;
    --text-secondary: #5c5348;
    --accent-color: #8a6d12;
    --accent-alt: #a88418;
    --border-color: #c4b8a4;
    --shadow-color: rgba(138, 109, 18, 0.2);
    --topbar-surface: rgba(245, 240, 232, 0.97);
    --on-accent: #121212;
    --surface-elevated: linear-gradient(165deg, #faf6ef, #ebe4d6);
    --input-bg: #faf6ef;
}

@media (min-width: 768px) {
    body.theme-peaky .topbar {
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }
    body.theme-peaky .topbar-inner {
        max-width: min(100%, 1440px);
        margin: 0 auto;
    }
    body.theme-peaky .nav-link {
        letter-spacing: 0.03em;
        text-transform: uppercase;
        font-size: clamp(10px, 0.68vw, 12px);
    }
}

body.theme-peaky .ui-card,
body.theme-peaky .manage-card,
body.theme-peaky .team-card,
body.theme-peaky .stat-card,
body.theme-peaky .modal {
    clip-path: var(--clip-cap);
    box-shadow: var(--shadow-card);
}

/* Модалки выбора услуг/продуктов — без clip, иначе список обрезается */
body.theme-peaky .product-picker-overlay .modal,
body.theme-peaky .add-product-modal {
    clip-path: none;
    box-shadow: var(--shadow-card);
}

body.theme-peaky .btn-gold,
body.theme-peaky .modal-actions .btn-gold,
body.theme-peaky .modal-actions button.btn-gold {
    background: linear-gradient(180deg, var(--accent-alt) 0%, var(--accent-color) 45%, #a8861f 100%);
    border: 1px solid #8a6d12;
    color: #121212 !important;
    -webkit-text-fill-color: #121212 !important;
}

body.theme-peaky .manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* ═══ NATURE ═══ */
body.theme-nature.mode-day {
    --bg-primary: #fbf7f0;
    --bg-secondary: #fffff8;
    --bg-tertiary: #f3ece0;
    --text-primary: #3d2c1e;
    --text-secondary: #6b5a4a;
    --accent-color: #6b8f71;
    --accent-alt: #d48c70;
    --border-color: #d9cfc0;
    --shadow-color: rgba(107, 143, 113, 0.18);
    --topbar-surface: rgba(251, 247, 240, 0.94);
    --on-accent: #1a241c;
    --font-heading: "Playfair Display", Georgia, serif;
    --font-body: "Quicksand", "Nunito", sans-serif;
    --font-nav: "Quicksand", sans-serif;
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 40px;
    --clip-cap: none;
    --shadow-card: 0 0 32px var(--shadow-color);
    --surface-elevated: linear-gradient(145deg, #fffff8, #f3ece0);
    --input-bg: #fffff8;
}

body.theme-nature.mode-night {
    --bg-primary: #1e2b26;
    --bg-secondary: #2a3d35;
    --bg-tertiary: #243530;
    --text-primary: #e8ddd0;
    --text-secondary: #a8c9a0;
    --accent-color: #a8c9a0;
    --accent-alt: #e0a070;
    --border-color: #3a5248;
    --shadow-color: rgba(168, 201, 160, 0.16);
    --topbar-surface: rgba(30, 43, 38, 0.94);
    --on-accent: #1e2b26;
    --font-heading: "Playfair Display", Georgia, serif;
    --font-body: "Quicksand", "Nunito", sans-serif;
    --font-nav: "Quicksand", sans-serif;
    --clip-cap: none;
    --surface-elevated: #2a3d35;
    --input-bg: #243530;
}

body.theme-nature::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
    body.theme-nature .topbar-inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px 28px;
        padding: 18px 28px;
    }
    body.theme-nature .logo-wrap { width: 100%; text-align: center; order: -1; }
    body.theme-nature .nav { margin-left: 0; width: 100%; justify-content: center; flex-wrap: wrap; gap: 8px 18px; }
}

body.theme-nature .section-title::before,
body.theme-nature .panel-header h1::before {
    content: "●";
    display: inline-block;
    margin-right: 10px;
    color: var(--accent-alt);
    font-size: 0.5em;
    vertical-align: middle;
}

body.theme-nature .ui-card,
body.theme-nature .manage-card,
body.theme-nature .team-card {
    border-radius: 40px 10px 40px 10px;
    clip-path: none;
    box-shadow: var(--shadow-card);
}

body.theme-nature .manage-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 14px;
    min-height: 100px;
    padding: 20px 22px;
}

body.theme-nature .btn-gold,
body.theme-nature .btn-outline {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--accent-color) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.theme-nature .panel-header { flex-direction: column; align-items: flex-start; }

/* ═══ GENTLEMEN ═══ */
body.theme-gentlemen.mode-day {
    --bg-primary: #f5efe8;
    --bg-secondary: #ebe3d6;
    --bg-tertiary: #e0d5c4;
    --text-primary: #2a1212;
    --text-secondary: #5c3a3a;
    --accent-color: #c9a84c;
    --accent-alt: #1a3a2a;
    --border-color: #d4c4a8;
    --shadow-color: rgba(201, 168, 76, 0.2);
    --topbar-surface: rgba(245, 239, 232, 0.96);
    --on-accent: #1a0a0a;
    --font-heading: "Cinzel", serif;
    --font-body: "Cormorant Garamond", Georgia, serif;
    --font-nav: "Cinzel", serif;
    --clip-cap: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    --surface-elevated: linear-gradient(165deg, #faf6ef, #ebe3d6);
    --input-bg: #faf6ef;
}

body.theme-gentlemen.mode-night {
    --bg-primary: #1a0a0a;
    --bg-secondary: #2a1214;
    --bg-tertiary: #3a1a1c;
    --text-primary: #e8d5a3;
    --text-secondary: #b8a070;
    --accent-color: #c9a84c;
    --accent-alt: #e0bc4a;
    --border-color: #4a2a2a;
    --shadow-color: rgba(201, 168, 76, 0.28);
    --topbar-surface: rgba(26, 10, 10, 0.96);
    --on-accent: #1a0a0a;
    --surface-elevated: linear-gradient(165deg, #3a1a1c, #2a1214);
    --input-bg: #120808;
}

body.theme-gentlemen.mode-night::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
}

@media (min-width: 768px) {
    body.theme-gentlemen .topbar { border-bottom: 2px solid var(--accent-color); }
    body.theme-gentlemen .topbar-inner { flex-direction: column; align-items: center; gap: 10px; }
    body.theme-gentlemen .nav { margin-left: 0; justify-content: center; width: 100%; max-width: 960px; border-top: 1px solid color-mix(in srgb, var(--accent-color) 40%, transparent); padding-top: 8px; }
    body.theme-gentlemen .user-badge { position: absolute; right: 24px; top: 18px; }
}

body.theme-gentlemen .manage-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
body.theme-gentlemen .topbar,
body.theme-gentlemen .footer { border-color: var(--accent-color); }

/* ═══ FIGHT CLUB ═══ */
body.theme-fightclub.mode-day {
    --bg-primary: #e8e4de;
    --bg-secondary: #ffffff;
    --bg-tertiary: #d8d2c8;
    --text-primary: #1a1a1a;
    --text-secondary: #444444;
    --accent-color: #c0392b;
    --accent-alt: #1a1a1a;
    --border-color: #1a1a1a;
    --shadow-color: transparent;
    --topbar-surface: #e8e4de;
    --on-accent: #ffffff;
    --font-heading: "Roboto Mono", monospace;
    --font-body: "Courier New", Courier, monospace;
    --font-nav: "Roboto Mono", monospace;
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --clip-cap: none;
    --shadow-card: none;
    --shadow-raised: none;
    --surface-elevated: #ffffff;
    --input-bg: #ffffff;
}

body.theme-fightclub.mode-night {
    --bg-primary: #1c1c1c;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333333;
    --text-primary: #e8e8e8;
    --text-secondary: #a8a8a8;
    --accent-color: #e74c3c;
    --accent-alt: #ffffff;
    --border-color: #ffffff;
    --shadow-color: rgba(231, 76, 60, 0.35);
    --topbar-surface: #1c1c1c;
    --on-accent: #ffffff;
    --surface-elevated: #2a2a2a;
    --input-bg: #222222;
}

body.theme-fightclub::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
    body.theme-fightclub .topbar { border-bottom: 3px solid var(--border-color); }
    body.theme-fightclub .topbar-inner { padding: 0; max-width: none; gap: 0; }
    body.theme-fightclub .logo-wrap { padding: 12px 20px; border-right: 3px solid var(--border-color); }
    body.theme-fightclub .nav { margin-left: 0; flex: 1; gap: 0; }
    body.theme-fightclub .nav-link,
    body.theme-fightclub .lang-btn {
        padding: 16px 14px;
        border-right: 1px solid var(--border-color);
        text-transform: uppercase;
        font-size: 11px;
        font-weight: 700;
    }
    body.theme-fightclub .nav-link:hover { background: var(--accent-color); color: #fff; }
}

body.theme-fightclub .ui-card,
body.theme-fightclub .manage-card,
body.theme-fightclub .team-card {
    border-radius: 0;
    clip-path: none;
    box-shadow: none;
    border: 2px solid var(--border-color);
}

body.theme-fightclub .manage-links { display: flex; flex-direction: column; gap: 0; border: 2px solid var(--border-color); }
body.theme-fightclub .manage-card { flex-direction: row; text-align: left; border-radius: 0; border-bottom: 2px solid var(--border-color); min-height: 72px; }
body.theme-fightclub .panel-header__actions,
body.theme-fightclub .modal-actions { flex-direction: column; align-items: stretch; }

/* ═══ GREEN STREET ═══ */
body.theme-greenstreet.mode-day {
    --bg-primary: #e6ddd2;
    --bg-secondary: #f5efe6;
    --bg-tertiary: #d4c8b8;
    --text-primary: #1a2a22;
    --text-secondary: #3d4f45;
    --accent-color: #f4a261;
    --accent-alt: #1a3d2e;
    --border-color: #c4b8a8;
    --shadow-color: rgba(244, 162, 97, 0.25);
    --topbar-surface: rgba(230, 221, 210, 0.95);
    --on-accent: #1a2a22;
    --font-heading: "Bebas Neue", Impact, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
    --font-nav: "Bebas Neue", sans-serif;
    --clip-cap: none;
    --shadow-card: 4px 4px 0 var(--accent-alt);
    --surface-elevated: #f5efe6;
    --input-bg: #fff;
}

body.theme-greenstreet.mode-night {
    --bg-primary: #0b1a15;
    --bg-secondary: #142820;
    --bg-tertiary: #1a3328;
    --text-primary: #d4ccc0;
    --text-secondary: #9aa894;
    --accent-color: #e76f51;
    --accent-alt: #f4a261;
    --border-color: #2a4035;
    --shadow-color: rgba(231, 111, 81, 0.3);
    --topbar-surface: rgba(11, 26, 21, 0.95);
    --on-accent: #0b1a15;
    --surface-elevated: #142820;
    --input-bg: #0f1f19;
}

body.theme-greenstreet::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent, transparent 40px, color-mix(in srgb, var(--accent-alt) 6%, transparent) 40px, color-mix(in srgb, var(--accent-alt) 6%, transparent) 44px);
}

@media (min-width: 768px) {
    body.theme-greenstreet .topbar { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); padding-bottom: 10px; }
    body.theme-greenstreet .nav-link,
    body.theme-greenstreet .lang-btn {
        transform: skewX(-8deg);
        background: var(--bg-secondary);
        border: 2px solid var(--accent-alt);
        padding: 8px 12px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }
}

body.theme-greenstreet .ui-card,
body.theme-greenstreet .manage-card,
body.theme-greenstreet .team-card {
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    border: 2px solid var(--accent-alt);
    box-shadow: var(--shadow-card);
    transform: rotate(-0.8deg);
}

body.theme-greenstreet .manage-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px; }


/* ═══ SNATCH — Большой куш ═══ */
body.theme-snatch.mode-day {
    --bg-primary: #e8dcc8;
    --bg-secondary: #f5efe3;
    --bg-tertiary: #ddd0b8;
    --text-primary: #2a1a0a;
    --text-secondary: #5c4030;
    --accent-color: #c0392b;
    --accent-alt: #d4a017;
    --border-color: #b8a890;
    --shadow-color: rgba(192, 57, 43, 0.22);
    --topbar-surface: rgba(232, 220, 200, 0.96);
    --on-accent: #f5efe3;
    --font-heading: "Abril Fatface", Georgia, serif;
    --font-body: "Lato", system-ui, sans-serif;
    --font-nav: "Lato", sans-serif;
    --clip-cap: none;
    --shadow-card: 0 4px 16px var(--shadow-color);
    --surface-elevated: #f5efe3;
    --input-bg: #faf6ee;
}

body.theme-snatch.mode-night {
    --bg-primary: #1a0808;
    --bg-secondary: #2a1210;
    --bg-tertiary: #3a1a18;
    --text-primary: #e8d5a0;
    --text-secondary: #c4a878;
    --accent-color: #e74c3c;
    --accent-alt: #d4a017;
    --border-color: #5a3028;
    --shadow-color: rgba(231, 76, 60, 0.45);
    --topbar-surface: rgba(26, 8, 8, 0.96);
    --on-accent: #1a0808;
    --surface-elevated: linear-gradient(165deg, #3a1a18, #2a1210);
    --input-bg: #120606;
}

body.theme-snatch::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.45;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
}

body.theme-snatch.mode-night::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(212, 160, 23, 0.55) 0 1px, transparent 2px),
        radial-gradient(circle at 78% 32%, rgba(255, 255, 255, 0.45) 0 1px, transparent 2px),
        radial-gradient(circle at 44% 72%, rgba(212, 160, 23, 0.4) 0 1px, transparent 2px),
        radial-gradient(circle at 88% 84%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px);
    background-size: 220px 220px;
    animation: snatch-sparkle 6s linear infinite;
}

@keyframes snatch-sparkle {
    0%, 100% { opacity: 0.35; transform: translateY(0); }
    50% { opacity: 0.75; transform: translateY(-6px); }
}

@media (min-width: 768px) {
    body.theme-snatch .topbar { border-bottom: 2px solid var(--accent-color); }
    body.theme-snatch .nav-link,
    body.theme-snatch .lang-btn {
        border: 1px solid color-mix(in srgb, var(--accent-color) 35%, transparent);
        border-radius: 999px;
        padding: 6px 12px;
        font-size: 12px;
        letter-spacing: 0.04em;
    }
}

body.theme-snatch .ui-card,
body.theme-snatch .manage-card,
body.theme-snatch .team-card,
body.theme-snatch .stat-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

body.theme-snatch .modal {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

body.theme-snatch.mode-day .ui-card::before,
body.theme-snatch.mode-day .manage-card::before,
body.theme-snatch.mode-day .team-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(225deg, var(--bg-primary) 48%, var(--border-color) 48%, var(--accent-alt) 48%);
    pointer-events: none;
}

body.theme-snatch.mode-night .ui-card,
body.theme-snatch.mode-night .manage-card,
body.theme-snatch.mode-night .team-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-alt);
    box-shadow: 0 0 12px color-mix(in srgb, var(--accent-color) 25%, transparent);
}

body.theme-snatch .btn-gold {
    background: linear-gradient(180deg, var(--accent-alt), #a07810);
    border-color: #8a6010;
}

/* ═══ LOCKSTOCK — Карты, деньги, два ствола ═══ */
body.theme-lockstock.mode-day {
    --bg-primary: #e6dcc3;
    --bg-secondary: #f0e8d4;
    --bg-tertiary: #d4c8b0;
    --text-primary: #1e2a1a;
    --text-secondary: #3d4a35;
    --accent-color: #8b0000;
    --accent-alt: #6b6b6b;
    --border-color: #c4b8a0;
    --shadow-color: rgba(26, 74, 42, 0.25);
    --topbar-surface: rgba(230, 220, 195, 0.96);
    --on-accent: #f0e8d4;
    --font-heading: "Playfair Display SC", Georgia, serif;
    --font-body: "Merriweather", Georgia, serif;
    --font-nav: "Merriweather", serif;
    --clip-cap: none;
    --surface-elevated: #f0e8d4;
    --input-bg: #faf6ea;
}

body.theme-lockstock.mode-night {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #222222;
    --text-primary: #c8c0b0;
    --text-secondary: #9a9488;
    --accent-color: #a02020;
    --accent-alt: #c49a4a;
    --border-color: #3a3a3a;
    --shadow-color: rgba(160, 32, 32, 0.3);
    --topbar-surface: rgba(18, 18, 18, 0.97);
    --on-accent: #121212;
    --surface-elevated: #1a1a1a;
    --input-bg: #0e0e0e;
}

@media (min-width: 768px) {
    body.theme-lockstock .topbar { border-bottom: 3px solid var(--accent-color); }
    body.theme-lockstock .nav-link,
    body.theme-lockstock .lang-btn {
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.06em;
        font-weight: 700;
    }
}

body.theme-lockstock.mode-night .section-title,
body.theme-lockstock.mode-night .site-name,
body.theme-lockstock.mode-night .panel-header h1 {
    animation: lockstock-shake 0.12s ease-in-out infinite;
}

@keyframes lockstock-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-0.4px); }
    75% { transform: translateX(0.4px); }
}

body.theme-lockstock .ui-card,
body.theme-lockstock .manage-card,
body.theme-lockstock .team-card,
body.theme-lockstock .stat-card,
body.theme-lockstock .modal {
    background: #1a4a2a;
    color: #e8e4d8;
    border: 3px solid #f5f5f0;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.25);
}

body.theme-lockstock.mode-night .ui-card,
body.theme-lockstock.mode-night .manage-card,
body.theme-lockstock.mode-night .team-card {
    background: #0f3020;
    border-color: color-mix(in srgb, var(--accent-alt) 60%, #fff);
}

/* Titles on page chrome follow mode tokens; cream only inside dark green surfaces. */
body.theme-lockstock .ui-card h2,
body.theme-lockstock .ui-card h3,
body.theme-lockstock .manage-card__title {
    color: #f5f0e0;
}

body.theme-lockstock .section-title,
body.theme-lockstock .site-name,
body.theme-lockstock .panel-header h1 {
    color: var(--text-primary);
}

body.theme-lockstock .manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* ═══ ROCKNROLLA — Рок-н-рольщик ═══ */
body.theme-rocknrolla.mode-day {
    --bg-primary: #f5edf0;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eadde4;
    --text-primary: #1a0a1a;
    --text-secondary: #4a3048;
    --accent-color: #ff1493;
    --accent-alt: #c0c0c0;
    --border-color: #d8c8d0;
    --shadow-color: rgba(255, 20, 147, 0.28);
    --topbar-surface: rgba(245, 237, 240, 0.95);
    --on-accent: #0a0a0a;
    --font-heading: "Russo One", Impact, sans-serif;
    --font-body: "Montserrat", system-ui, sans-serif;
    --font-nav: "Montserrat", sans-serif;
    --clip-cap: none;
    --surface-elevated: #ffffff;
    --input-bg: #fff;
}

body.theme-rocknrolla.mode-night {
    --bg-primary: #0a0a14;
    --bg-secondary: #14141f;
    --bg-tertiary: #1e1e2e;
    --text-primary: #e8d0d8;
    --text-secondary: #b898a8;
    --accent-color: #ff1493;
    --accent-alt: #ff69b4;
    --border-color: #3a2840;
    --shadow-color: rgba(255, 20, 147, 0.45);
    --topbar-surface: rgba(10, 10, 20, 0.96);
    --on-accent: #0a0a14;
    --surface-elevated: linear-gradient(165deg, #1e1e2e, #14141f);
    --input-bg: #080810;
}

body.theme-rocknrolla.mode-night::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 20, 147, 0.12), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 105, 180, 0.1), transparent 45%),
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255, 20, 147, 0.03) 3px, rgba(255, 20, 147, 0.03) 4px);
    animation: rocknrolla-waves 8s ease-in-out infinite;
}

@keyframes rocknrolla-waves {
    0%, 100% { transform: scaleY(1); opacity: 0.7; }
    50% { transform: scaleY(1.04); opacity: 1; }
}

@media (min-width: 768px) {
    body.theme-rocknrolla .nav-link,
    body.theme-rocknrolla .lang-btn {
        transform: rotate(-2deg);
        background: #0a0a0a;
        color: var(--accent-color);
        border: 1px solid var(--accent-color);
        padding: 6px 10px;
        font-size: 11px;
        text-transform: uppercase;
    }
}

body.theme-rocknrolla .ui-card,
body.theme-rocknrolla .manage-card,
body.theme-rocknrolla .team-card {
    background: #0a0a0a;
    color: #f0e0e8;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 16px color-mix(in srgb, var(--accent-color) 35%, transparent);
}

body.theme-rocknrolla.mode-night .ui-card,
body.theme-rocknrolla.mode-night .manage-card,
body.theme-rocknrolla.mode-night .team-card {
    background: linear-gradient(145deg, #1a0a24, #0a0a14);
    box-shadow: 0 0 24px color-mix(in srgb, var(--accent-color) 45%, transparent);
}

body.theme-rocknrolla .manage-card__icon {
    transform: rotate(-8deg);
}

/* ═══ LEGEND — Легенда ═══ */
body.theme-legend.mode-day {
    --bg-primary: #f5efe6;
    --bg-secondary: #faf6ef;
    --bg-tertiary: #e8dfd0;
    --text-primary: #0a0a1a;
    --text-secondary: #3a3a4a;
    --accent-color: #6b1a2a;
    --accent-alt: #c49a4a;
    --border-color: #c4b8a8;
    --shadow-color: rgba(107, 26, 42, 0.18);
    --topbar-surface: rgba(245, 239, 230, 0.96);
    --on-accent: #f5efe6;
    --font-heading: "Cinzel Decorative", "Cinzel", serif;
    --font-body: "EB Garamond", Georgia, serif;
    --font-nav: "EB Garamond", serif;
    --clip-cap: none;
    --surface-elevated: #faf6ef;
    --input-bg: #fffdf8;
}

body.theme-legend.mode-night {
    --bg-primary: #120a0a;
    --bg-secondary: #1a1010;
    --bg-tertiary: #241818;
    --text-primary: #e8ddc8;
    --text-secondary: #b8a890;
    --accent-color: #c49a4a;
    --accent-alt: #e0bc6a;
    --border-color: #4a3028;
    --shadow-color: rgba(196, 154, 74, 0.35);
    --topbar-surface: rgba(18, 10, 10, 0.96);
    --on-accent: #120a0a;
    --surface-elevated: linear-gradient(165deg, #241818, #1a1010);
    --input-bg: #0c0606;
}

body.theme-legend.mode-night::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.62) 100%);
}

@media (min-width: 768px) {
    body.theme-legend .topbar { border-bottom: double 4px var(--accent-alt); }
    body.theme-legend .topbar-inner { justify-content: center; gap: 16px; }
    body.theme-legend .nav { margin-left: 0; }
}

body.theme-legend .ui-card,
body.theme-legend .manage-card,
body.theme-legend .team-card,
body.theme-legend .stat-card,
body.theme-legend .modal {
    border: 3px double var(--accent-alt);
    box-shadow: var(--shadow-card, 0 4px 20px var(--shadow-color));
}

body.theme-legend.mode-night .ui-card,
body.theme-legend.mode-night .manage-card,
body.theme-legend.mode-night .team-card {
    background: linear-gradient(165deg, var(--bg-tertiary), var(--bg-secondary));
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.35), 0 0 12px color-mix(in srgb, var(--accent-color) 20%, transparent);
}

body.theme-legend .manage-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ═══ FIRM — Фирма ═══ */
body.theme-firm.mode-day {
    --bg-primary: #e6e0d8;
    --bg-secondary: #f2ece4;
    --bg-tertiary: #d8d0c8;
    --text-primary: #111111;
    --text-secondary: #444444;
    --accent-color: #1a2a5a;
    --accent-alt: #cc3333;
    --border-color: #c0b8b0;
    --shadow-color: rgba(26, 42, 90, 0.2);
    --topbar-surface: rgba(230, 224, 216, 0.96);
    --on-accent: #ffffff;
    --font-heading: "Oswald", Impact, sans-serif;
    --font-body: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
    --font-nav: "Oswald", sans-serif;
    --clip-cap: none;
    --surface-elevated: #f2ece4;
    --input-bg: #faf8f4;
}

body.theme-firm.mode-night {
    --bg-primary: #0a0a1a;
    --bg-secondary: #121228;
    --bg-tertiary: #1a1a38;
    --text-primary: #c8c8d0;
    --text-secondary: #9898a8;
    --accent-color: #3a5aff;
    --accent-alt: #ffffff;
    --border-color: #2a2a48;
    --shadow-color: rgba(58, 90, 255, 0.35);
    --topbar-surface: rgba(10, 10, 26, 0.96);
    --on-accent: #0a0a1a;
    --surface-elevated: #121228;
    --input-bg: #080814;
}

body.theme-firm.mode-night::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        conic-gradient(from 250deg at 15% 0%, transparent 0deg, rgba(255, 255, 255, 0.06) 18deg, transparent 36deg),
        conic-gradient(from 290deg at 85% 0%, transparent 0deg, rgba(255, 255, 255, 0.05) 16deg, transparent 32deg);
    animation: firm-floodlights 5s ease-in-out infinite alternate;
}

@keyframes firm-floodlights {
    0% { opacity: 0.45; }
    100% { opacity: 0.9; }
}

@media (min-width: 768px) {
    body.theme-firm .topbar { border-bottom: 4px solid var(--accent-color); }
    body.theme-firm .nav-link,
    body.theme-firm .lang-btn {
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-size: 12px;
    }
}

body.theme-firm .ui-card,
body.theme-firm .manage-card,
body.theme-firm .team-card {
    border-left: 6px solid var(--accent-color);
    box-shadow: 0 2px 12px var(--shadow-color);
}

body.theme-firm.mode-night .ui-card,
body.theme-firm.mode-night .manage-card,
body.theme-firm.mode-night .team-card {
    border-left-color: var(--accent-color);
    background: var(--bg-secondary);
}

body.theme-firm .manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

/* ═══ ENGLAND — Это – Англия ═══ */
body.theme-england.mode-day {
    --bg-primary: #d8d4ce;
    --bg-secondary: #ece8e2;
    --bg-tertiary: #c8c4be;
    --text-primary: #0a0a0a;
    --text-secondary: #3a3a3a;
    --accent-color: #cc0000;
    --accent-alt: #1a2a6a;
    --border-color: #b0aca6;
    --shadow-color: rgba(204, 0, 0, 0.18);
    --topbar-surface: rgba(216, 212, 206, 0.96);
    --on-accent: #ffffff;
    --font-heading: "Ruda", sans-serif;
    --font-body: "Work Sans", system-ui, sans-serif;
    --font-nav: "Ruda", sans-serif;
    --clip-cap: none;
    --surface-elevated: #ece8e2;
    --input-bg: #f4f2ee;
}

body.theme-england.mode-night {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --text-primary: #c8c4be;
    --text-secondary: #989490;
    --accent-color: #e02020;
    --accent-alt: #ffffff;
    --border-color: #3a3a3a;
    --shadow-color: rgba(224, 32, 32, 0.35);
    --topbar-surface: rgba(18, 18, 18, 0.97);
    --on-accent: #121212;
    --surface-elevated: #1a1a1a;
    --input-bg: #0e0e0e;
}

body.theme-england::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}

body.theme-england.mode-night::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.04) 2px, rgba(255, 255, 255, 0.04) 3px);
}

@media (min-width: 768px) {
    body.theme-england .topbar { border-bottom: 3px solid var(--accent-color); }
}

body.theme-england .ui-card,
body.theme-england .manage-card,
body.theme-england .team-card {
    border-top: 4px solid var(--accent-color);
    border-left: 4px solid var(--accent-alt);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

body.theme-england.mode-night .ui-card,
body.theme-england.mode-night .manage-card,
body.theme-england.mode-night .team-card {
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
}

body.theme-england .manage-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ═══ PEAKYMODERN — «Острые Козырьки» модерн ═══
   Contemporary salon: cool graphite, champagne accent, soft glass cards.
   Distinct from classic peaky (warm brown + antique gold + clip-cap). */
body.theme-peakymodern.mode-night {
    --bg-primary: #0c0e12;
    --bg-secondary: #141820;
    --bg-tertiary: #1c2230;
    --text-primary: #f0ece6;
    --text-secondary: #9aa3b5;
    --accent-color: #d4b896;
    --accent-alt: #e8d4b8;
    --border-color: #2a3344;
    --shadow-color: rgba(212, 184, 150, 0.16);
    --topbar-surface: rgba(12, 14, 18, 0.92);
    --on-accent: #0c0e12;
    --font-heading: "Syne", "Segoe UI", system-ui, sans-serif;
    --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;
    --font-nav: "Outfit", system-ui, sans-serif;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --clip-cap: none;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px color-mix(in srgb, var(--border-color) 80%, transparent);
    --shadow-raised: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 12px 28px rgba(0, 0, 0, 0.3);
    --surface-elevated: linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 45%), linear-gradient(165deg, #1c2230, #141820);
    --input-bg: rgba(8, 10, 14, 0.85);
}

body.theme-peakymodern.mode-day {
    --bg-primary: #eef0f4;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e6ee;
    --text-primary: #12151c;
    --text-secondary: #5a6478;
    --accent-color: #8a6f4e;
    --accent-alt: #a88860;
    --border-color: #c8ceda;
    --shadow-color: rgba(18, 21, 28, 0.1);
    --topbar-surface: rgba(238, 240, 244, 0.94);
    --on-accent: #ffffff;
    --font-heading: "Syne", "Segoe UI", system-ui, sans-serif;
    --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;
    --font-nav: "Outfit", system-ui, sans-serif;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --clip-cap: none;
    --shadow-card: 0 10px 28px rgba(18, 21, 28, 0.08), 0 0 0 1px var(--border-color);
    --surface-elevated: linear-gradient(165deg, #ffffff, #eef0f4);
    --input-bg: #ffffff;
}

body.theme-peakymodern::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 40% at 10% -10%, color-mix(in srgb, var(--accent-color) 14%, transparent), transparent 55%),
        radial-gradient(ellipse 50% 35% at 90% 0%, rgba(90, 120, 180, 0.1), transparent 50%);
}

@media (min-width: 768px) {
    body.theme-peakymodern .topbar {
        border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
    body.theme-peakymodern .nav-link,
    body.theme-peakymodern .lang-btn {
        letter-spacing: 0.04em;
        text-transform: uppercase;
        font-size: clamp(10px, 0.65vw, 11px);
        font-weight: 500;
    }
}

body.theme-peakymodern .ui-card,
body.theme-peakymodern .manage-card,
body.theme-peakymodern .team-card,
body.theme-peakymodern .stat-card,
body.theme-peakymodern .modal {
    clip-path: none;
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--border-color) 85%, transparent);
    background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.theme-peakymodern .btn-gold,
body.theme-peakymodern .modal-actions .btn-gold {
    background: linear-gradient(135deg, var(--accent-alt), var(--accent-color));
    border: none;
    border-radius: 999px;
    color: var(--on-accent) !important;
    -webkit-text-fill-color: var(--on-accent) !important;
    box-shadow: 0 4px 16px var(--shadow-color);
    font-weight: 600;
    letter-spacing: 0.04em;
}

body.theme-peakymodern .btn-outline {
    border-radius: 999px;
    border-width: 1.5px;
}

body.theme-peakymodern .manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* ═══ PEAKYCYBER — «Острые козырьки» киберпанк ═══
   Neon cyan/magenta on void, subtle grid + glow (tasteful, not cluttered). */
body.theme-peakycyber.mode-night {
    --bg-primary: #07070d;
    --bg-secondary: #0e0e18;
    --bg-tertiary: #161624;
    --text-primary: #e6e8f0;
    --text-secondary: #7a7e9a;
    --accent-color: #00e8f0;
    --accent-alt: #ff2d95;
    --border-color: #1e2a3a;
    --shadow-color: rgba(0, 232, 240, 0.28);
    --topbar-surface: rgba(7, 7, 13, 0.94);
    --on-accent: #07070d;
    --font-heading: "Orbitron", "Segoe UI", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-nav: "Space Grotesk", system-ui, sans-serif;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --clip-cap: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    --shadow-card: 0 0 0 1px color-mix(in srgb, var(--accent-color) 22%, transparent), 0 0 20px rgba(0, 232, 240, 0.08);
    --shadow-raised: 0 0 12px rgba(0, 232, 240, 0.15);
    --surface-elevated: linear-gradient(165deg, #161624, #0e0e18);
    --input-bg: #05050a;
}

body.theme-peakycyber.mode-day {
    --bg-primary: #e8eef5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #d5dee8;
    --text-primary: #0a0e18;
    --text-secondary: #4a5568;
    --accent-color: #008a94;
    --accent-alt: #c4186e;
    --border-color: #b0becc;
    --shadow-color: rgba(0, 138, 148, 0.2);
    --topbar-surface: rgba(232, 238, 245, 0.96);
    --on-accent: #ffffff;
    --font-heading: "Orbitron", "Segoe UI", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-nav: "Space Grotesk", system-ui, sans-serif;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --clip-cap: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    --shadow-card: 0 0 0 1px color-mix(in srgb, var(--accent-color) 35%, transparent), 0 4px 16px rgba(0, 0, 0, 0.06);
    --surface-elevated: #ffffff;
    --input-bg: #f5f8fb;
}

body.theme-peakycyber::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.55;
    background-image:
        linear-gradient(color-mix(in srgb, var(--accent-color) 6%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--accent-color) 6%, transparent) 1px, transparent 1px);
    background-size: 48px 48px;
}

body.theme-peakycyber.mode-night::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 40% 30% at 15% 10%, rgba(0, 232, 240, 0.07), transparent 60%),
        radial-gradient(ellipse 35% 25% at 85% 80%, rgba(255, 45, 149, 0.06), transparent 55%);
}

@media (min-width: 768px) {
    body.theme-peakycyber .topbar {
        border-bottom: 1px solid color-mix(in srgb, var(--accent-color) 35%, transparent);
        box-shadow: 0 0 24px rgba(0, 232, 240, 0.08);
    }
    body.theme-peakycyber .nav-link,
    body.theme-peakycyber .lang-btn {
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-size: clamp(9px, 0.62vw, 11px);
        font-weight: 500;
    }
    body.theme-peakycyber .nav-link:hover {
        color: var(--accent-color);
        text-shadow: 0 0 10px color-mix(in srgb, var(--accent-color) 45%, transparent);
    }
}

body.theme-peakycyber .ui-card,
body.theme-peakycyber .manage-card,
body.theme-peakycyber .team-card,
body.theme-peakycyber .stat-card,
body.theme-peakycyber .modal {
    clip-path: var(--clip-cap);
    border-radius: 0;
    background: var(--bg-secondary);
    border: 1px solid color-mix(in srgb, var(--accent-color) 28%, var(--border-color));
    box-shadow: var(--shadow-card);
}

body.theme-peakycyber .product-picker-overlay .modal,
body.theme-peakycyber .add-product-modal {
    clip-path: none;
}

body.theme-peakycyber .btn-gold,
body.theme-peakycyber .modal-actions .btn-gold {
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 0;
    color: var(--accent-color) !important;
    -webkit-text-fill-color: var(--accent-color) !important;
    box-shadow: 0 0 12px color-mix(in srgb, var(--accent-color) 25%, transparent), inset 0 0 12px color-mix(in srgb, var(--accent-color) 8%, transparent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-nav);
    font-weight: 600;
}

body.theme-peakycyber .btn-gold:hover {
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--accent-color) 40%, transparent);
}

body.theme-peakycyber .btn-outline {
    border-radius: 0;
    border-color: var(--accent-alt);
    color: var(--accent-alt);
}

body.theme-peakycyber .section-title,
body.theme-peakycyber .site-name {
    letter-spacing: 0.06em;
    text-shadow: 0 0 18px color-mix(in srgb, var(--accent-color) 25%, transparent);
}

body.theme-peakycyber .manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

/* ═══ ATELIER — светлый редакционный / boutique salon ═══
   Cool gallery white, ink teal accent — not cream+terracotta, not purple. */
body.theme-atelier.mode-day {
    --bg-primary: #f7f8fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eceef2;
    --text-primary: #14171c;
    --text-secondary: #5c6570;
    --accent-color: #1a4a4a;
    --accent-alt: #2a6a6a;
    --border-color: #d8dde5;
    --shadow-color: rgba(20, 23, 28, 0.07);
    --topbar-surface: rgba(247, 248, 250, 0.96);
    --on-accent: #ffffff;
    --font-heading: "Fraunces", "Libre Baskerville", Georgia, serif;
    --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
    --font-nav: "Manrope", system-ui, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --clip-cap: none;
    --shadow-card: 0 1px 0 rgba(20, 23, 28, 0.04), 0 12px 32px rgba(20, 23, 28, 0.05);
    --shadow-raised: 0 2px 8px rgba(20, 23, 28, 0.06);
    --surface-elevated: #ffffff;
    --input-bg: #ffffff;
}

body.theme-atelier.mode-night {
    --bg-primary: #12151a;
    --bg-secondary: #1a1e26;
    --bg-tertiary: #242a34;
    --text-primary: #eef0f4;
    --text-secondary: #9aa3b0;
    --accent-color: #6eb5b0;
    --accent-alt: #8fd0cb;
    --border-color: #2e3644;
    --shadow-color: rgba(110, 181, 176, 0.14);
    --topbar-surface: rgba(18, 21, 26, 0.96);
    --on-accent: #12151a;
    --font-heading: "Fraunces", "Libre Baskerville", Georgia, serif;
    --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
    --font-nav: "Manrope", system-ui, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --clip-cap: none;
    --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.3);
    --surface-elevated: linear-gradient(165deg, #242a34, #1a1e26);
    --input-bg: #0e1116;
}

body.theme-atelier::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
    body.theme-atelier .topbar {
        border-bottom: 1px solid var(--border-color);
    }
    body.theme-atelier .nav-link,
    body.theme-atelier .lang-btn {
        letter-spacing: 0.12em;
        text-transform: uppercase;
        font-size: clamp(9px, 0.6vw, 11px);
        font-weight: 500;
    }
    body.theme-atelier .site-name {
        font-family: var(--font-heading);
        font-weight: 500;
        letter-spacing: 0.02em;
    }
}

body.theme-atelier .ui-card,
body.theme-atelier .manage-card,
body.theme-atelier .team-card,
body.theme-atelier .stat-card,
body.theme-atelier .modal {
    clip-path: none;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-card);
}

body.theme-atelier .btn-gold,
body.theme-atelier .modal-actions .btn-gold {
    background: var(--accent-color);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--on-accent) !important;
    -webkit-text-fill-color: var(--on-accent) !important;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.8rem;
    box-shadow: none;
}

body.theme-atelier .btn-gold:hover {
    background: var(--accent-alt);
}

body.theme-atelier .btn-outline {
    border-radius: var(--radius-sm);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

body.theme-atelier .section-title,
body.theme-atelier .panel-header h1 {
    font-weight: 500;
    letter-spacing: -0.01em;
}

body.theme-atelier .manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

/* ═══ YCLIENTS — мобильное приложение (Inter + жёлтый акцент) ═══ */
body.theme-yclients.mode-day {
    --bg-primary: #f7f8fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f3;
    --text-primary: #111111;
    --text-secondary: #5c5c5c;
    --accent-color: #ffcc00;
    --accent-alt: #ffd400;
    --border-color: #e6e6e6;
    --shadow-color: rgba(17, 17, 17, 0.06);
    --topbar-surface: rgba(255, 255, 255, 0.98);
    --on-accent: #111111;
    --yc-month-dock: #2a2a2a;
    --yc-shift-cell: #e8eef5;
    --yc-slot-empty: #e8f0fa;
    --yc-appt-mint: #22c55e;
    --yc-appt-mint-head: #16a34a;
    --yc-appt-salmon: #f43f5e;
    --yc-appt-salmon-head: #e11d48;
    --yc-appt-lilac: #a855f7;
    --yc-appt-lilac-head: #9333ea;
    --yc-weekend: #f59e0b;
    --yc-appt-ink: #ffffff;
    --yc-appt-cancelled-bg: #94a3b8;
    --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-nav: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --clip-cap: none;
    --shadow-card: 0 1px 3px rgba(17, 17, 17, 0.05);
    --shadow-raised: 0 2px 8px rgba(17, 17, 17, 0.07);
    --surface-elevated: #ffffff;
    --input-bg: #ffffff;
}

body.theme-yclients.mode-night {
    --bg-primary: #12151a;
    --bg-secondary: #1a1e26;
    --bg-tertiary: #242a34;
    --text-primary: #eef0f4;
    --text-secondary: #9aa3b0;
    --accent-color: #ffcc00;
    --accent-alt: #ffd400;
    --border-color: #2e3644;
    --shadow-color: rgba(0, 0, 0, 0.35);
    --topbar-surface: rgba(18, 21, 26, 0.96);
    --on-accent: #111111;
    --yc-month-dock: #1a1a1a;
    --yc-shift-cell: #2a3340;
    --yc-slot-empty: #1e2836;
    --yc-appt-mint: #22c55e;
    --yc-appt-mint-head: #16a34a;
    --yc-appt-salmon: #f43f5e;
    --yc-appt-salmon-head: #e11d48;
    --yc-appt-lilac: #a855f7;
    --yc-appt-lilac-head: #9333ea;
    --yc-weekend: #f59e0b;
    --yc-appt-ink: #ffffff;
    --yc-appt-cancelled-bg: #64748b;
    --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-nav: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --clip-cap: none;
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.28);
    --surface-elevated: #1a1e26;
    --input-bg: #0e1116;
}

body.theme-yclients::before {
    content: none;
}

@media (min-width: 768px) {
    body.theme-yclients .topbar {
        border-bottom: 1px solid var(--border-color);
        box-shadow: none;
    }
    body.theme-yclients .nav-link,
    body.theme-yclients .lang-btn {
        letter-spacing: 0.01em;
        text-transform: none;
        font-size: clamp(12px, 0.75vw, 14px);
        font-weight: 500;
    }
    body.theme-yclients .site-name {
        font-family: var(--font-heading);
        font-weight: 600;
        letter-spacing: -0.01em;
    }
}

body.theme-yclients .ui-card,
body.theme-yclients .manage-card,
body.theme-yclients .team-card,
body.theme-yclients .stat-card,
body.theme-yclients .modal {
    clip-path: none;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-card);
}

body.theme-yclients .btn-gold,
body.theme-yclients .modal-actions .btn-gold,
body.theme-yclients .booking-widget .btn-gold {
    background: var(--accent-color);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--on-accent) !important;
    -webkit-text-fill-color: var(--on-accent) !important;
    font-family: var(--font-nav);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    font-size: 0.95rem;
    box-shadow: none;
}

body.theme-yclients .btn-gold:hover,
body.theme-yclients .booking-widget .btn-gold:hover:not(:disabled) {
    background: var(--accent-alt);
}

body.theme-yclients .btn-outline {
    border-radius: var(--radius-sm);
    border-color: var(--accent-color);
    color: var(--text-primary);
    font-family: var(--font-nav);
    text-transform: none;
    letter-spacing: 0.01em;
}

body.theme-yclients .section-title,
body.theme-yclients .panel-header h1,
body.theme-yclients .site-name,
body.theme-yclients .manage-card__title,
body.theme-yclients .booking-times__title {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

body.theme-yclients .booking-times__title {
    color: var(--text-primary);
}

body.theme-yclients .manage-card {
    color: var(--text-primary);
}

body.theme-yclients .manage-card__title {
    color: var(--text-primary);
}

body.theme-yclients .manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

body.theme-yclients input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.theme-yclients select,
body.theme-yclients textarea {
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    border: 1px solid var(--border-color);
    background: var(--input-bg);
}

body.theme-yclients .booking-time-btn.active,
body.theme-yclients .booking-date-btn.active,
body.theme-yclients .month-calendar__day--selected,
body.theme-yclients .month-calendar__day--active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--on-accent) !important;
}

/* ── YClients: выбор мастера в онлайн-записи ── */
body.theme-yclients .booking-master-row {
    background: var(--bg-secondary, #ffffff);
    border-color: var(--border-color, #e6e6e6);
    box-shadow: none;
    border-radius: 12px;
}

body.theme-yclients .booking-master-row:hover:not(.booking-master-row--selected) {
    border-color: #d0d0d0;
}

body.theme-yclients .booking-master-row--selected {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 14%, #ffffff);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-color) 45%, transparent);
}

body.theme-yclients.mode-night .booking-master-row {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.theme-yclients.mode-night .booking-master-row--selected {
    background: color-mix(in srgb, var(--accent-color) 16%, var(--bg-secondary));
}

body.theme-yclients .booking-master-row__name {
    font-weight: 700;
    color: var(--text-primary);
}

body.theme-yclients .booking-master-row__role,
body.theme-yclients .booking-master-row__reviews,
body.theme-yclients .booking-master-row__extra {
    color: var(--text-secondary);
}

body.theme-yclients .booking-master-row__stars {
    color: var(--accent-color);
}

body.theme-yclients .booking-master-info {
    color: #b0b0b0;
    border-color: #d8d8d8;
    background: transparent;
}

body.theme-yclients .booking-master-info:hover {
    color: var(--text-primary);
    border-color: var(--accent-color);
    background: transparent;
}

body.theme-yclients .booking-master-group__title {
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ── YClients: График (work-journal) ── */
body.theme-yclients .work-journal-page .panel-header h1,
body.theme-yclients .work-journal-matrix__title,
body.theme-yclients .wj-chrome h1 {
    color: var(--text-primary);
    font-weight: 700;
}

body.theme-yclients .wj-chrome__cal {
    background: var(--accent-color);
    color: var(--on-accent);
}

body.theme-yclients .wj-chrome__filter {
    background: color-mix(in srgb, var(--bg-tertiary, #eceff1) 92%, var(--text-primary) 4%);
    color: var(--text-primary);
}

body.theme-yclients .wj-chrome__filter[aria-pressed="true"],
body.theme-yclients .wj-chrome__filter--active {
    background: color-mix(in srgb, var(--accent-color) 32%, var(--bg-secondary));
}

body.theme-yclients .work-journal-table__master-inner {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

body.theme-yclients .work-journal-table__master-text {
    width: 100%;
}

body.theme-yclients .work-journal-table__master-name {
    text-align: center;
}

body.theme-yclients .work-journal-table__master-avatar {
    width: 36px;
    height: 36px;
    border-color: var(--border-color);
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

body.theme-yclients .work-journal-table__day-num {
    color: var(--text-secondary);
}

body.theme-yclients .work-journal-table__day-dow {
    color: var(--text-secondary);
}

/* Desktop: hairline matrix; mobile card gutters live in work-journal-mobile.css */
@media (min-width: 768px) {
    body.theme-yclients .work-journal-table__day-col--today .work-journal-table__day-num,
    body.theme-yclients .work-journal-table__day-col--today .work-journal-table__day-dow {
        color: var(--on-accent);
    }

    body.theme-yclients .work-journal-table__day-col--today {
        background: var(--accent-color);
        border-radius: 0;
        box-shadow: none;
    }

    body.theme-yclients .work-journal-table {
        --wj-grid-line: color-mix(in srgb, var(--text-primary, #111) 10%, transparent);
        --wj-grid-master: color-mix(in srgb, var(--text-primary, #111) 16%, transparent);
        background: var(--bg-secondary, #fff);
    }

    body.theme-yclients .work-journal-table th,
    body.theme-yclients .work-journal-table td {
        border-right: 1px solid var(--wj-grid-line);
        border-bottom: 1px solid var(--wj-grid-line);
    }

    body.theme-yclients.mode-night .work-journal-table {
        --wj-grid-line: color-mix(in srgb, var(--text-primary, #eee) 12%, transparent);
        --wj-grid-master: color-mix(in srgb, var(--text-primary, #eee) 18%, transparent);
        background: var(--bg-primary);
    }

    body.theme-yclients .work-journal-table__master,
    body.theme-yclients .work-journal-table__master-col {
        border-right-color: transparent;
        box-shadow: 1px 0 0 var(--wj-grid-master);
    }

    body.theme-yclients .work-journal-table__cell {
        background: var(--bg-secondary, #fff);
    }

    body.theme-yclients.mode-night .work-journal-table__cell {
        background: var(--bg-primary);
    }

    body.theme-yclients .work-journal-cell--work {
        background: var(--yc-shift-cell) !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        color: var(--text-primary);
    }

    body.theme-yclients .work-journal-cell--work:hover {
        background: color-mix(in srgb, var(--yc-shift-cell) 80%, var(--accent-color) 20%) !important;
    }

    body.theme-yclients .work-journal-cell--off,
    body.theme-yclients .work-journal-cell--empty {
        background: transparent !important;
        border: none !important;
    }

    body.theme-yclients .work-journal-cell--off:hover,
    body.theme-yclients .work-journal-cell--empty:hover {
        background: color-mix(in srgb, var(--yc-shift-cell) 45%, transparent) !important;
        border: none !important;
    }

    body.theme-yclients .work-journal-table__day-col--past {
        background: color-mix(in srgb, var(--bg-secondary, #fff) 88%, var(--text-secondary) 12%);
    }

    body.theme-yclients .work-journal-cell--past.work-journal-cell--work:hover {
        background: var(--yc-shift-cell) !important;
    }

    body.theme-yclients .work-journal-cell--past.work-journal-cell--off:hover,
    body.theme-yclients .work-journal-cell--past.work-journal-cell--empty:hover {
        background: transparent !important;
    }
}

body.theme-yclients .work-journal-table__day-col--past .work-journal-table__day-num,
body.theme-yclients .work-journal-table__day-col--past .work-journal-table__day-dow {
    color: var(--text-secondary);
}

body.theme-yclients .work-journal-cell--past {
    opacity: 0.5;
    filter: grayscale(0.28);
}

body.theme-yclients .work-journal-cell--work .work-journal-cell__hours,
body.theme-yclients .work-journal-cell--work .work-journal-cell__time {
    color: var(--text-primary);
    font-weight: 700;
}

body.theme-yclients .work-journal-legend__dot--work {
    background: var(--yc-shift-cell);
    border-color: color-mix(in srgb, var(--yc-shift-cell) 70%, #000 10%);
}

body.theme-yclients .work-journal-month-dock {
    background: var(--yc-month-dock) !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}

body.theme-yclients .work-journal-month-dock__chip {
    color: rgba(255, 255, 255, 0.55);
}

body.theme-yclients .work-journal-month-dock__chip--active {
    background: var(--accent-color) !important;
    color: var(--on-accent) !important;
}

body.theme-yclients .work-journal-table__master--selected {
    background: var(--accent-color) !important;
    color: var(--on-accent) !important;
    box-shadow: 1px 0 0 var(--wj-grid-master, transparent);
}

body.theme-yclients .work-journal-table__master--selected .work-journal-table__master-name,
body.theme-yclients .work-journal-table__master--selected .work-journal-table__master-pos {
    color: var(--on-accent) !important;
}

body.theme-yclients .work-journal-table__master--selected .work-journal-table__master-avatar {
    color: var(--on-accent);
    border-color: color-mix(in srgb, var(--on-accent) 28%, transparent);
    background: color-mix(in srgb, #fff 40%, var(--accent-color));
}

body.theme-yclients .work-journal-table__master-col--all {
    background: var(--accent-color) !important;
    color: var(--on-accent) !important;
}

body.theme-yclients .work-journal-table__day-col--bulk {
    background: var(--accent-color) !important;
    color: var(--on-accent) !important;
    box-shadow: none;
}

body.theme-yclients .work-journal-table__day-col--bulk .work-journal-table__day-num,
body.theme-yclients .work-journal-table__day-col--bulk .work-journal-table__day-dow {
    color: var(--on-accent) !important;
    font-weight: 700;
}

body.theme-yclients .work-journal-cell--bulk {
    box-shadow: inset 0 0 0 2px var(--accent-color) !important;
}
body.theme-yclients .work-journal-cell--bulk.work-journal-cell--work {
    background: color-mix(in srgb, var(--accent-color) 34%, transparent) !important;
}
body.theme-yclients .work-journal-cell--bulk.work-journal-cell--off,
body.theme-yclients .work-journal-cell--bulk.work-journal-cell--empty {
    background: color-mix(in srgb, var(--accent-color) 24%, var(--bg-secondary, var(--bg2))) !important;
}

/* ── YClients: Журнал (schedule-mj) ── */
body.theme-yclients .schedule-dashboard--journal .schedule-journal-dock {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
    box-shadow: 0 -4px 16px rgba(17, 17, 17, 0.06);
}

body.theme-yclients .schedule-week-nav--dock .schedule-week-nav__strip {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    box-shadow: none;
}

body.theme-yclients .schedule-week-nav--dock .schedule-week-nav__day--active {
    background: var(--accent-color);
    color: var(--on-accent);
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.35);
}

body.theme-yclients .schedule-week-nav--dock .schedule-week-nav__day--sun:not(.schedule-week-nav__day--active) .schedule-week-nav__num {
    color: var(--yc-weekend);
}

body.theme-yclients .schedule-time-header__add {
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #fff 18%, var(--accent-color)),
            var(--accent-color)
        );
    color: var(--on-accent);
    border-color: var(--accent-color);
    box-shadow:
        0 1px 0 color-mix(in srgb, #fff 20%, transparent),
        0 4px 12px color-mix(in srgb, var(--accent-color) 28%, transparent);
}

body.theme-yclients .schedule-time-header__add:hover:not(:disabled),
body.theme-yclients .schedule-time-header__add:focus-visible:not(:disabled) {
    filter: brightness(1.05);
}

body.theme-yclients .schedule-empty-day__add {
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #fff 16%, var(--accent-color)),
            var(--accent-color)
        );
    color: var(--on-accent);
    border-color: var(--accent-color);
}

body.theme-yclients .schedule-mj .schedule-slot-line {
    border-bottom-color: transparent;
}

body.theme-yclients .schedule-mj .schedule-slot-line--sub {
    border-bottom: 1px dashed color-mix(in srgb, var(--text-primary) 9%, transparent);
}

body.theme-yclients .schedule-mj .schedule-slot-line--hour {
    border-bottom: 1px solid color-mix(in srgb, var(--text-primary) 20%, transparent);
}

/* Inactive / outside shift: one continuous hatch overlay (.schedule-off-range), not per-cell. */
body.theme-yclients .schedule-slot-line--off,
body.theme-yclients .schedule-mj .schedule-slot-line--off,
body.theme-yclients.mode-night .schedule-slot-line--off,
body.theme-yclients.mode-night .schedule-mj .schedule-slot-line--off,
body.theme-yclients.mode-day .schedule-slot-line--off,
body.theme-yclients.mode-day .schedule-mj .schedule-slot-line--off {
    background: transparent;
    background-image: none;
}

body.theme-yclients .schedule-off-range,
body.theme-yclients .schedule-mj .schedule-off-range,
body.theme-yclients.mode-night .schedule-off-range,
body.theme-yclients.mode-night .schedule-mj .schedule-off-range {
    background-color: color-mix(in srgb, var(--bg-secondary) 88%, #e03232 12%);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent 0,
        transparent 4px,
        rgba(230, 50, 50, 0.48) 4px,
        rgba(230, 50, 50, 0.48) 7px
    );
    background-attachment: scroll;
}

body.theme-yclients.mode-day .schedule-off-range,
body.theme-yclients.mode-day .schedule-mj .schedule-off-range {
    background-color: color-mix(in srgb, var(--bg-secondary) 90%, #505050 10%);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent 0,
        transparent 4px,
        rgba(80, 80, 80, 0.42) 4px,
        rgba(80, 80, 80, 0.42) 7px
    );
}

body.theme-yclients .schedule-slot-line--active,
body.theme-yclients .schedule-mj .schedule-slot-line--active {
    background-color: var(--yc-slot-empty);
    background-image: none;
}

body.theme-yclients .schedule-mj .schedule-slot-line--active:active {
    background-color: color-mix(in srgb, var(--yc-slot-empty) 70%, var(--accent-color) 30%);
}

/* Desktop + mobile grid chrome on white / yclients */
body.theme-yclients .schedule-columns {
    border-color: color-mix(in srgb, var(--text-primary) 20%, transparent);
    background: var(--bg-secondary);
}

body.theme-yclients .schedule-column,
body.theme-yclients .schedule-time-col {
    border-right-color: color-mix(in srgb, var(--text-primary) 18%, transparent);
}

body.theme-yclients .schedule-time-header,
body.theme-yclients .schedule-emp-header {
    background: var(--bg-tertiary);
    border-bottom-color: color-mix(in srgb, var(--text-primary) 18%, transparent);
    color: var(--text-primary);
}

body.theme-yclients .schedule-emp-name,
body.theme-yclients .schedule-emp-meta,
body.theme-yclients .schedule-emp-hours {
    color: var(--text-primary);
}

body.theme-yclients .schedule-emp-meta,
body.theme-yclients .schedule-emp-hours {
    color: var(--text-secondary);
}

body.theme-yclients .schedule-slot-line {
    border-bottom-color: color-mix(in srgb, var(--text-primary) 12%, transparent);
}

body.theme-yclients .schedule-slot-line--sub {
    border-bottom: 1px dashed color-mix(in srgb, var(--text-primary) 9%, transparent);
}

body.theme-yclients .schedule-slot-line--hour {
    border-bottom: 1px solid color-mix(in srgb, var(--text-primary) 20%, transparent);
}

body.theme-yclients .schedule-time-label {
    color: color-mix(in srgb, var(--text-primary) 72%, var(--text-secondary) 28%);
    border-bottom-color: color-mix(in srgb, var(--text-primary) 12%, transparent);
}

body.theme-yclients .schedule-mj__time-col,
body.theme-yclients .schedule-mj__col {
    border-right-color: color-mix(in srgb, var(--text-primary) 14%, transparent);
    background: var(--bg-secondary);
}

body.theme-yclients .schedule-mj__corner,
body.theme-yclients .schedule-mj__emp-header {
    border-bottom-color: color-mix(in srgb, var(--text-primary) 18%, transparent);
    background: var(--bg-secondary);
}

body.theme-yclients .schedule-mj .schedule-time-label,
body.theme-yclients .schedule-mj .schedule-time-end-label {
    color: color-mix(in srgb, var(--text-primary) 72%, var(--text-secondary) 28%);
}

body.theme-yclients .schedule-mj .schedule-time-label--hour {
    color: var(--text-primary);
    font-weight: 600;
}

body.theme-yclients .appointment-card--journal {
    /* Day pastels stay dark text; night pastel cells need light text. */
    color: var(--yc-appt-ink, #222) !important;
    border: none !important;
    box-shadow: 0 1px 2px rgba(17, 17, 17, 0.08) !important;
    border-radius: 8px;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-confirmed,
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-confirmed {
    background: var(--status-confirmed) !important;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-arrived,
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-arrived {
    background: var(--status-arrived) !important;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-waiting {
    background: var(--status-waiting) !important;
}
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-waiting {
    background: var(--status-tg-default, var(--status-tg-waiting, #38bdf8)) !important;
}
body.theme-yclients .appointment-card--journal.appointment-card--custom-color.appointment-card--status-waiting,
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--custom-color.appointment-card--status-waiting {
    background: var(--appt-card-custom, var(--status-waiting)) !important;
    color: #111 !important;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-no_show,
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-no_show {
    background: var(--status-no-show) !important;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-cancelled,
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-cancelled {
    background: var(--status-cancelled) !important;
}

body.theme-yclients .appointment-card--journal .appointment-card__journal-head {
    color: #fff !important;
    background: color-mix(in srgb, currentColor 0%, #000 22%);
}

body.theme-yclients .appointment-card--journal.appointment-card--status-waiting .appointment-card__journal-head {
    background: var(--status-waiting-strong) !important;
}
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-waiting .appointment-card__journal-head {
    background: color-mix(in srgb, var(--status-tg-default, #38bdf8) 75%, #000) !important;
}
body.theme-yclients .appointment-card--journal.appointment-card--custom-color.appointment-card--status-waiting .appointment-card__journal-head {
    background: color-mix(in srgb, #000 14%, transparent) !important;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-confirmed .appointment-card__journal-head,
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-confirmed .appointment-card__journal-head {
    background: var(--status-confirmed-strong) !important;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-arrived .appointment-card__journal-head,
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-arrived .appointment-card__journal-head {
    background: var(--status-arrived-strong) !important;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-no_show .appointment-card__journal-head,
body.theme-yclients .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-no_show .appointment-card__journal-head {
    background: var(--status-no-show-strong) !important;
}

body.theme-yclients .appointment-card--journal.appointment-card--status-cancelled .appointment-card__journal-head {
    background: var(--status-cancelled-strong) !important;
}

body.theme-yclients .appointment-card--journal .appointment-card__client,
body.theme-yclients .appointment-card--journal .appointment-card__service,
body.theme-yclients .appointment-card--journal .appointment-card__status,
body.theme-yclients .appointment-card--journal .appointment-card__phone {
    color: var(--yc-appt-ink, #222) !important;
}

body.theme-yclients .appointment-card--journal .appointment-card__new {
    background: rgba(0, 0, 0, 0.28) !important;
    color: #ffcc00 !important;
}

body.theme-yclients .appointment-card--journal .appointment-card__health-badge,
body.theme-yclients .appointment-card--journal .appointment-card__discount-badge {
    background: rgba(0, 0, 0, 0.28) !important;
    color: #ffcc00 !important;
}

/* ═══ BIRMINGHAM — dark luxury charcoal + brushed gold ═══ */
body.theme-birmingham.mode-night {
    --bg-primary: #0d0d0d;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --text-primary: #e5e0d8;
    --text-secondary: #8c8578;
    --accent-color: #c5a059;
    --accent-alt: #d4b06e;
    --border-color: #3a3428;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --topbar-surface: rgba(13, 13, 13, 0.98);
    --on-accent: #0d0d0d;
    --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body: "Montserrat", "Source Sans 3", system-ui, sans-serif;
    --font-nav: "Montserrat", system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --clip-cap: none;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-raised: 0 1px 0 rgba(197, 160, 89, 0.07) inset, 0 8px 28px rgba(0, 0, 0, 0.4);
    --surface-elevated: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
    --input-bg: #0a0a0a;
    --bh-gold: #c5a059;
    --bh-gold-mid: #b8924a;
    --bh-gold-deep: #9a7a3a;
    --bh-ink-on-gold: #1a1408;
    --bh-sidebar-width: 248px;
}

body.theme-birmingham.mode-day {
    --bg-primary: #f3efe6;
    --bg-secondary: #faf7f0;
    --bg-tertiary: #e8e2d6;
    --text-primary: #1a1510;
    --text-secondary: #6b6458;
    --accent-color: #a8843a;
    --accent-alt: #c5a059;
    --border-color: #d0c4ae;
    --shadow-color: rgba(168, 132, 58, 0.18);
    --topbar-surface: rgba(250, 247, 240, 0.97);
    --on-accent: #1a1408;
    --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body: "Montserrat", "Source Sans 3", system-ui, sans-serif;
    --font-nav: "Montserrat", system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --clip-cap: none;
    --shadow-card: 0 4px 18px rgba(26, 21, 16, 0.08);
    --shadow-raised: 0 2px 10px rgba(26, 21, 16, 0.06);
    --surface-elevated: linear-gradient(180deg, #faf7f0, #f3efe6);
    --input-bg: #fffdf8;
    --bh-gold: #a8843a;
    --bh-gold-mid: #c5a059;
    --bh-gold-deep: #8a6d2e;
    --bh-ink-on-gold: #1a1408;
    --bh-sidebar-width: 248px;
}

body.theme-birmingham::before {
    content: none;
}

/* Slot / legacy wrappers — neutral until Birmingham desktop activates them */
.birmingham-side-slot {
    display: none;
}
.nav-legacy {
    display: contents;
}

/* Birmingham header icon tabs (guests + mobile burger) */
.nav-tabs {
    display: contents;
}
.nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 7px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary, #e5e0d8);
    text-decoration: none;
    font-family: var(--font-nav, "Montserrat", system-ui, sans-serif);
    font-size: clamp(10px, 0.68vw, 12px);
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    white-space: nowrap;
    line-height: 1.15;
    max-width: 100%;
    min-width: 0;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.nav-tab:hover {
    color: var(--accent-color, #c5a059);
    border-color: color-mix(in srgb, var(--accent-color, #c5a059) 45%, transparent);
}
.nav-tab.is-active {
    border-color: var(--accent-color, #c5a059);
    background: color-mix(in srgb, var(--accent-color, #c5a059) 10%, transparent);
    color: var(--text-primary, #e5e0d8);
}
.nav-tab__icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--accent-color, #c5a059);
}
.nav-tab__icon svg,
.nav-tab__icon .birmingham-panel-nav__svg {
    width: 14px;
    height: 14px;
    display: block;
}
.nav-tab__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Match «Записаться онлайн» FAB: solid gold fill */
.nav-tab--primary,
body.theme-birmingham .nav-tab--primary,
[data-theme="birmingham"] .nav-tab--primary {
    flex-shrink: 0;
    background: var(--gold, var(--accent-color, #c5a059));
    color: var(--on-gold, var(--on-accent, #0d0d0d));
    border-color: color-mix(in srgb, var(--bh-gold-deep, #9a7a3a) 55%, #000);
    font-weight: 700;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--gold, #c5a059) 32%, transparent);
}
.nav-tab--primary:hover,
.nav-tab--primary.is-active,
body.theme-birmingham .nav-tab--primary:hover,
body.theme-birmingham .nav-tab--primary.is-active,
[data-theme="birmingham"] .nav-tab--primary:hover,
[data-theme="birmingham"] .nav-tab--primary.is-active {
    background: var(--accent-alt, var(--bh-gold-mid, #d4b06e));
    color: var(--on-gold, var(--on-accent, #0d0d0d));
    border-color: color-mix(in srgb, var(--bh-gold-deep, #9a7a3a) 55%, #000);
    filter: brightness(1.04);
}
.nav-tab--primary .nav-tab__icon,
body.theme-birmingham .nav-tab--primary .nav-tab__icon,
[data-theme="birmingham"] .nav-tab--primary .nav-tab__icon {
    color: var(--on-gold, var(--on-accent, #0d0d0d));
}

body.theme-birmingham .nav:not([data-open="1"]) .nav-tabs,
body.theme-birmingham .topbar .nav .nav-tabs {
    /* display:contents keeps tabs in horizontal .nav flex */
}

@media (min-width: 768px) {
    body.theme-birmingham:not([data-bh-sidebar="1"]) .topbar-inner,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .topbar-inner {
        gap: 12px;
        min-width: 0;
        flex-wrap: nowrap;
        align-items: center;
    }
    /* Logo reserved space — never collide with tabs */
    body.theme-birmingham:not([data-bh-sidebar="1"]) .logo-wrap,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .logo-wrap {
        flex: 0 0 auto;
        flex-shrink: 0;
        min-width: 0;
        max-width: min(240px, 28vw);
        z-index: 2;
        position: relative;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .logo-wrap .logo,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .logo-wrap .logo {
        max-width: 100%;
        height: 44px;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav {
        flex: 1 1 auto;
        flex-wrap: nowrap;
        gap: 2px;
        overflow-x: hidden;
        max-width: 100%;
        min-width: 0;
        justify-content: flex-end;
        scrollbar-width: none;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav::-webkit-scrollbar,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav::-webkit-scrollbar {
        display: none;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab {
        flex: 0 0 auto;
        padding: 4px 6px;
        gap: 3px;
        font-size: clamp(10px, 0.72vw, 12px);
        font-weight: 600;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab--primary,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab--primary {
        flex: 0 0 auto;
        padding: 5px 10px;
        font-size: clamp(11px, 0.78vw, 12px);
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab__icon,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab__icon {
        width: 13px;
        height: 13px;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab__icon svg,
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab__icon .birmingham-panel-nav__svg,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab__icon svg,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab__icon .birmingham-panel-nav__svg {
        width: 13px;
        height: 13px;
    }
}

/* Mid widths (before burger): icon-only tabs — labels hidden, title/aria-label remain */
@media (min-width: 768px) and (max-width: 1199px) {
    body.theme-birmingham:not([data-bh-sidebar="1"]) .logo-wrap,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .logo-wrap {
        max-width: min(200px, 26vw);
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav {
        gap: 3px;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab__label,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab__label {
        display: none;
    }
    /* Text-only tabs (no icon): keep a compact label */
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab:not(:has(.nav-tab__icon)) .nav-tab__label,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab:not(:has(.nav-tab__icon)) .nav-tab__label {
        display: inline;
        font-size: 10px;
        max-width: 4.5em;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab {
        gap: 0;
        padding: 7px;
        min-width: 32px;
        min-height: 32px;
        justify-content: center;
    }
    /* «Запись» stays solid gold — recognizable as the primary CTA when icon-only */
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab--primary,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab--primary {
        padding: 7px 9px;
        min-width: 34px;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab__icon,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab__icon {
        width: 16px;
        height: 16px;
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab__icon svg,
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab__icon .birmingham-panel-nav__svg,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab__icon svg,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab__icon .birmingham-panel-nav__svg {
        width: 16px;
        height: 16px;
    }
}

@media (min-width: 1200px) {
    body.theme-birmingham:not([data-bh-sidebar="1"]) .logo-wrap,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .logo-wrap {
        max-width: min(280px, 30vw);
    }
    body.theme-birmingham:not([data-bh-sidebar="1"]) .nav-tab,
    [data-theme="birmingham"]:not([data-bh-sidebar="1"]) .nav-tab {
        flex: 0 1 auto;
        min-width: 0;
    }
}

@media (max-width: 767px) {
    .nav-tabs {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    .nav-tab {
        width: 100%;
        min-height: 44px;
        padding: 10px 14px;
        font-size: 0.92rem;
        box-sizing: border-box;
        max-width: none;
    }
    .nav-tab__icon {
        width: 18px;
        height: 18px;
    }
    .nav-tab__icon svg,
    .nav-tab__icon .birmingham-panel-nav__svg {
        width: 18px;
        height: 18px;
    }
    body.theme-birmingham .nav-tab.is-active:not(.nav-tab--primary) {
        border-color: var(--accent-color, #c5a059);
    }
}

.nav-logout-form {
    display: contents;
}

body.theme-birmingham .ui-card,
body.theme-birmingham .manage-card,
body.theme-birmingham .team-card,
body.theme-birmingham .stat-card,
body.theme-birmingham .modal {
    clip-path: none;
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--accent-color) 32%, var(--border-color));
    background: var(--bg-secondary);
    box-shadow: var(--shadow-card);
}

body.theme-birmingham .section-title,
body.theme-birmingham .panel-header h1,
body.theme-birmingham .site-name,
body.theme-birmingham .manage-card__title,
body.theme-birmingham .schedule-title,
body.theme-birmingham .profile-chrome__title,
body.theme-birmingham .wj-chrome h1,
body.theme-birmingham .work-journal-matrix__title {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

body.theme-birmingham .btn-gold,
body.theme-birmingham .modal-actions .btn-gold,
body.theme-birmingham .panel-header__actions .btn-gold {
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-sm);
    color: var(--accent-color) !important;
    -webkit-text-fill-color: var(--accent-color) !important;
    font-family: var(--font-nav);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    box-shadow: none;
}

body.theme-birmingham .btn-gold:hover,
body.theme-birmingham .panel-header__actions .btn-gold:hover {
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
}

/* Home «Записаться» — match «Записаться онлайн» solid gold CTA */
body.theme-birmingham .home-seo__cta-primary,
body.theme-birmingham .home-seo__cta .btn-gold.home-seo__cta-primary,
body.theme-birmingham .home-seo__card-cta {
    background: var(--gold, var(--accent-color, #c5a059)) !important;
    color: var(--on-gold, var(--on-accent, #0d0d0d)) !important;
    -webkit-text-fill-color: var(--on-gold, var(--on-accent, #0d0d0d)) !important;
    border: 1px solid color-mix(in srgb, var(--bh-gold-deep, #9a7a3a) 55%, #000) !important;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--gold, #c5a059) 30%, transparent);
}

body.theme-birmingham .home-seo__cta-primary:hover,
body.theme-birmingham .home-seo__cta .btn-gold.home-seo__cta-primary:hover,
body.theme-birmingham .home-seo__card-cta:hover {
    background: var(--accent-alt, var(--bh-gold-mid, #d4b06e)) !important;
    color: var(--on-gold, var(--on-accent, #0d0d0d)) !important;
    -webkit-text-fill-color: var(--on-gold, var(--on-accent, #0d0d0d)) !important;
    filter: brightness(1.04);
}

body.theme-birmingham .btn-outline {
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--accent-color) 55%, transparent);
    color: var(--text-primary);
    font-family: var(--font-nav);
    text-transform: none;
    letter-spacing: 0.03em;
    background: transparent;
}

body.theme-birmingham input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body.theme-birmingham select,
body.theme-birmingham textarea,
body.theme-birmingham .ui-input {
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--accent-color) 28%, var(--border-color));
    background: var(--input-bg);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
    font-family: var(--font-body);
    color: var(--text-primary);
}

body.theme-birmingham.mode-day input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body.theme-birmingham.mode-day select,
body.theme-birmingham.mode-day textarea,
body.theme-birmingham.mode-day .ui-input {
    box-shadow: inset 0 1px 3px rgba(26, 21, 16, 0.08);
}

/* Desktop: Birmingham left sidebar — staff panel + logged-in clients (not guests) */
@media (min-width: 768px) {
    body.theme-birmingham[data-bh-sidebar="1"] .topbar,
    [data-theme="birmingham"][data-bh-sidebar="1"] .topbar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--bh-sidebar-width, 248px);
        height: 100vh;
        height: 100dvh;
        z-index: 200;
        border-bottom: none;
        border-right: 1px solid color-mix(in srgb, var(--accent-color) 38%, transparent);
        background: var(--bg-primary);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
        overflow-y: auto;
        overflow-x: hidden;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .topbar-inner,
    [data-theme="birmingham"][data-bh-sidebar="1"] .topbar-inner {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start;
        max-width: none !important;
        width: 100%;
        min-height: 100%;
        margin: 0;
        padding: 24px 16px 20px;
        gap: 18px;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .logo-wrap,
    [data-theme="birmingham"][data-bh-sidebar="1"] .logo-wrap {
        max-width: none;
        width: 100%;
        justify-content: center;
        margin: 0;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .logo,
    [data-theme="birmingham"][data-bh-sidebar="1"] .logo {
        height: 44px;
        max-width: 100%;
        object-position: center;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .site-name,
    [data-theme="birmingham"][data-bh-sidebar="1"] .site-name {
        font-size: 1.15rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        text-align: center;
        width: 100%;
        color: var(--text-primary);
    }

    body.theme-birmingham[data-bh-sidebar="1"] .nav,
    [data-theme="birmingham"][data-bh-sidebar="1"] .nav {
        margin-left: 0 !important;
        flex: 1 1 auto;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100%;
        display: flex !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Drop legacy top-nav links — sidebar owns navigation */
    body.theme-birmingham[data-bh-sidebar="1"] .nav-legacy,
    [data-theme="birmingham"][data-bh-sidebar="1"] .nav-legacy {
        display: none !important;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-side-slot,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-side-slot {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        flex: 1 1 auto;
        min-height: 0;
    }

    /* Unified panel nav — identical on every staff tab */
    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__item,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        min-height: 42px;
        padding: 10px 14px;
        margin: 0;
        border-radius: var(--radius-sm);
        border: 1px solid transparent;
        background: transparent;
        color: var(--text-primary);
        font-family: var(--font-nav);
        font-size: 0.84rem;
        font-weight: 500;
        letter-spacing: 0.03em;
        text-decoration: none;
        cursor: pointer;
        text-align: left;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__item:hover,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__item:hover {
        color: var(--accent-color);
        border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
        background: color-mix(in srgb, var(--accent-color) 8%, transparent);
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__item.is-active:not(.birmingham-panel-nav__item--primary),
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__item.is-active:not(.birmingham-panel-nav__item--primary) {
        border-color: var(--accent-color);
        background: color-mix(in srgb, var(--accent-color) 10%, transparent);
        color: var(--text-primary);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-color) 22%, transparent);
    }

    /* «Запись» — same solid gold as «Записаться онлайн» FAB */
    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__item--primary,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__item--primary {
        background: var(--gold, var(--accent-color, #c5a059));
        color: var(--on-gold, var(--on-accent, #0d0d0d));
        border-color: color-mix(in srgb, var(--bh-gold-deep, #9a7a3a) 55%, #000);
        font-weight: 700;
        box-shadow: 0 4px 14px color-mix(in srgb, var(--gold, #c5a059) 28%, transparent);
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__item--primary:hover,
    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__item--primary.is-active,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__item--primary:hover,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__item--primary.is-active {
        background: var(--accent-alt, var(--bh-gold-mid, #d4b06e));
        color: var(--on-gold, var(--on-accent, #0d0d0d));
        border-color: color-mix(in srgb, var(--bh-gold-deep, #9a7a3a) 55%, #000);
        box-shadow: 0 4px 14px color-mix(in srgb, var(--gold, #c5a059) 36%, transparent);
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__item--primary .birmingham-panel-nav__icon,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__item--primary .birmingham-panel-nav__icon {
        color: var(--on-gold, var(--on-accent, #0d0d0d));
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__icon,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__icon {
        display: inline-flex;
        width: 18px;
        height: 18px;
        color: var(--accent-color);
        flex-shrink: 0;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__icon svg,
    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__svg,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__icon svg,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__svg {
        width: 18px;
        height: 18px;
        display: block;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .birmingham-panel-nav__label,
    [data-theme="birmingham"][data-bh-sidebar="1"] .birmingham-panel-nav__label {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Hide duplicate page toolbars — sidebar owns nav; keep branch/filters on page */
    body.theme-birmingham.birmingham-sidebar-active .schedule-toolbar > .schedule-toolbar__btn,
    body.theme-birmingham.birmingham-sidebar-active .schedule-toolbar > a.schedule-toolbar__btn,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-toolbar > .schedule-toolbar__btn,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-toolbar > a.schedule-toolbar__btn {
        display: none !important;
    }

    body.theme-birmingham.birmingham-sidebar-active .wj-chrome__nav,
    [data-theme="birmingham"].birmingham-sidebar-active .wj-chrome__nav {
        display: none !important;
    }

    body.theme-birmingham.birmingham-sidebar-active .schedule-toolbar:not(:has(.schedule-toolbar__branch:not([hidden]))),
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-toolbar:not(:has(.schedule-toolbar__branch:not([hidden]))) {
        display: none;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .user-badge,
    body.theme-birmingham[data-bh-sidebar="1"] .user-badge--nav,
    [data-theme="birmingham"][data-bh-sidebar="1"] .user-badge,
    [data-theme="birmingham"][data-bh-sidebar="1"] .user-badge--nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 12px 14px;
        margin: 0;
        border: 1px solid color-mix(in srgb, var(--accent-color) 42%, transparent);
        border-radius: var(--radius-sm);
        width: 100%;
        box-sizing: border-box;
        order: 0;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .user-badge__name,
    [data-theme="birmingham"][data-bh-sidebar="1"] .user-badge__name {
        font-family: var(--font-heading);
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--text-primary);
        letter-spacing: 0.02em;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .user-badge__title,
    [data-theme="birmingham"][data-bh-sidebar="1"] .user-badge__title {
        font-family: var(--font-body);
        font-size: 0.68rem;
        color: var(--text-secondary);
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .nav-logout-form,
    [data-theme="birmingham"][data-bh-sidebar="1"] .nav-logout-form {
        display: block;
        width: 100%;
        margin-top: auto;
        padding-top: 12px;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .nav-logout-form .nav-link--logout,
    [data-theme="birmingham"][data-bh-sidebar="1"] .nav-logout-form .nav-link--logout {
        display: flex;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        padding: 11px 14px;
        border-radius: var(--radius-sm);
        border: 1px solid color-mix(in srgb, var(--accent-color) 35%, transparent);
        font-family: var(--font-nav);
        font-size: 0.82rem !important;
        font-weight: 500;
        letter-spacing: 0.04em;
        text-transform: none !important;
        color: var(--text-secondary);
        background: transparent;
        cursor: pointer;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .nav-logout-form .nav-link--logout:hover,
    [data-theme="birmingham"][data-bh-sidebar="1"] .nav-logout-form .nav-link--logout:hover {
        color: var(--accent-color);
        border-color: var(--accent-color);
    }

    body.theme-birmingham[data-bh-sidebar="1"] .main-content,
    [data-theme="birmingham"][data-bh-sidebar="1"] .main-content {
        margin-left: var(--bh-sidebar-width, 248px);
        min-height: 100vh;
        min-height: 100dvh;
        max-width: none;
        width: auto;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .footer,
    [data-theme="birmingham"][data-bh-sidebar="1"] .footer {
        margin-left: var(--bh-sidebar-width, 248px);
    }

    body.theme-birmingham[data-bh-sidebar="1"] .burger,
    [data-theme="birmingham"][data-bh-sidebar="1"] .burger {
        display: none !important;
    }

    /* Schedule: compact title + meta — actions live in sidebar */
    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .schedule-top,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .schedule-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 4px 8px 2px 2px;
        flex: 0 0 auto;
    }

    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .schedule-title,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .schedule-title {
        font-family: var(--font-heading);
        font-size: 1.05rem;
        line-height: 1.2;
        font-weight: 600;
    }

    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .schedule-chrome-meta,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .schedule-chrome-meta {
        color: var(--text-secondary);
    }

    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .schedule-chrome-meta__name,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .schedule-chrome-meta__name {
        color: var(--text-primary);
        font-family: var(--font-body);
    }

    /* Work journal chrome: brand left; tools moved to sidebar */
    body.theme-birmingham.birmingham-sidebar-active .wj-chrome,
    [data-theme="birmingham"].birmingham-sidebar-active .wj-chrome {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 8px 4px 12px;
    }

    body.theme-birmingham.birmingham-sidebar-active .wj-chrome__brand h1,
    [data-theme="birmingham"].birmingham-sidebar-active .wj-chrome__brand h1 {
        font-family: var(--font-heading);
        font-size: clamp(1.5rem, 2.2vw, 2rem);
        font-weight: 600;
        margin: 0;
    }

    /* Full-viewport schedule / work journal under sidebar */
    body.theme-birmingham.birmingham-sidebar-active.has-schedule-journal .main-content,
    body.theme-birmingham.birmingham-sidebar-active.has-work-journal .main-content,
    [data-theme="birmingham"].birmingham-sidebar-active.has-schedule-journal .main-content,
    [data-theme="birmingham"].birmingham-sidebar-active.has-work-journal .main-content {
        padding: 0 !important;
        margin-left: var(--bh-sidebar-width, 248px);
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal.panel-page,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal.panel-page {
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 8px 14px 8px;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        gap: 0;
    }

    /* Date chrome must stay content-sized — flex:1 here caused the huge empty gap */
    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .schedule-journal-dock,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .schedule-journal-dock {
        flex: 0 0 auto;
        width: 100%;
        margin: 0 0 6px;
        min-height: 0;
    }

    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .schedule-body,
    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal #scheduleGridHost,
    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .schedule-grid-wrap,
    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .sj-board,
    body.theme-birmingham.birmingham-sidebar-active .schedule-dashboard--journal .schedule-empty-day,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .schedule-body,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal #scheduleGridHost,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .schedule-grid-wrap,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .sj-board,
    [data-theme="birmingham"].birmingham-sidebar-active .schedule-dashboard--journal .schedule-empty-day {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
    }

    body.theme-birmingham.birmingham-sidebar-active .work-journal-page.panel-page,
    [data-theme="birmingham"].birmingham-sidebar-active .work-journal-page.panel-page {
        flex: 1 1 auto;
        min-height: 0;
        height: 100% !important;
        max-height: none !important;
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 12px 16px 10px;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        overflow: hidden;
    }

    body.theme-birmingham.birmingham-sidebar-active .wj-chrome,
    [data-theme="birmingham"].birmingham-sidebar-active .wj-chrome {
        border: none;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 4px 2px 10px;
        margin: 0 0 8px;
    }

    body.theme-birmingham.birmingham-sidebar-active .work-journal-page .work-journal-panel,
    body.theme-birmingham.birmingham-sidebar-active .work-journal-page .work-journal-matrix,
    body.theme-birmingham.birmingham-sidebar-active .work-journal-page .work-journal-matrix__frame,
    body.theme-birmingham.birmingham-sidebar-active .work-journal-page .work-journal-matrix__scroll,
    [data-theme="birmingham"].birmingham-sidebar-active .work-journal-page .work-journal-panel,
    [data-theme="birmingham"].birmingham-sidebar-active .work-journal-page .work-journal-matrix,
    [data-theme="birmingham"].birmingham-sidebar-active .work-journal-page .work-journal-matrix__frame,
    [data-theme="birmingham"].birmingham-sidebar-active .work-journal-page .work-journal-matrix__scroll {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        max-width: none;
    }

    body.theme-birmingham.birmingham-sidebar-active .work-journal-matrix__scroll,
    [data-theme="birmingham"].birmingham-sidebar-active .work-journal-matrix__scroll {
        overflow: auto !important;
        height: 100%;
        scrollbar-width: thin;
        scrollbar-color: var(--accent-color) var(--bg-tertiary);
    }

    body.theme-birmingham.birmingham-sidebar-active .work-journal-matrix__scroll::-webkit-scrollbar,
    [data-theme="birmingham"].birmingham-sidebar-active .work-journal-matrix__scroll::-webkit-scrollbar {
        width: 10px;
        height: 10px;
        display: block;
    }

    body.theme-birmingham.birmingham-sidebar-active .work-journal-matrix__scroll::-webkit-scrollbar-thumb,
    [data-theme="birmingham"].birmingham-sidebar-active .work-journal-matrix__scroll::-webkit-scrollbar-thumb {
        background: var(--accent-color);
        border-radius: 8px;
    }
}

.birmingham-side-slot[hidden] {
    display: none !important;
}

body.theme-birmingham .manage-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

/* Schedule grid — gold cards, circular avatars, gold now-line */
body.theme-birmingham .schedule-columns,
body.theme-birmingham .schedule-mj__time-col,
body.theme-birmingham .schedule-mj__col {
    background: var(--bg-primary);
    border-color: color-mix(in srgb, var(--text-primary) 12%, transparent);
}

body.theme-birmingham .schedule-column,
body.theme-birmingham .schedule-time-col {
    border-right-color: color-mix(in srgb, var(--text-primary) 10%, transparent);
}

body.theme-birmingham .schedule-time-header,
body.theme-birmingham .schedule-emp-header,
body.theme-birmingham .schedule-mj__corner,
body.theme-birmingham .schedule-mj__emp-header {
    background: var(--bg-secondary);
    border-bottom-color: color-mix(in srgb, var(--accent-color) 28%, transparent);
}

body.theme-birmingham .schedule-emp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--accent-color) 65%, transparent);
    background: color-mix(in srgb, var(--accent-color) 18%, var(--bg-tertiary));
    color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 8%, transparent);
}

/* Journal sticky heads are only ~64–72px — keep compact avatars so name + hours stay visible */
body.theme-birmingham .schedule-dashboard--journal .schedule-emp-avatar,
body.theme-birmingham .schedule-mj .schedule-emp-avatar {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border-width: 1px;
    box-shadow: none;
}

body.theme-birmingham .schedule-emp-name {
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 500;
}

body.theme-birmingham .schedule-dashboard--journal .schedule-emp-name,
body.theme-birmingham .schedule-mj .schedule-emp-name {
    color: var(--text-primary);
    font-weight: 700;
    opacity: 1;
    visibility: visible;
}

body.theme-birmingham .schedule-emp-meta,
body.theme-birmingham .schedule-emp-hours {
    color: var(--text-secondary);
}

body.theme-birmingham .schedule-dashboard--journal .schedule-emp-meta,
body.theme-birmingham .schedule-dashboard--journal .schedule-emp-hours,
body.theme-birmingham .schedule-mj .schedule-emp-meta,
body.theme-birmingham .schedule-mj .schedule-emp-hours {
    color: var(--text-secondary);
    opacity: 1;
    visibility: visible;
}

body.theme-birmingham .schedule-slot-line {
    border-bottom-color: color-mix(in srgb, var(--text-primary) 8%, transparent);
}

body.theme-birmingham .schedule-slot-line--hour,
body.theme-birmingham .schedule-mj .schedule-slot-line--hour {
    border-bottom: 1px solid color-mix(in srgb, var(--text-primary) 16%, transparent);
}

body.theme-birmingham .schedule-time-label,
body.theme-birmingham .schedule-mj .schedule-time-label {
    color: var(--text-secondary);
    font-family: var(--font-body);
}

body.theme-birmingham .schedule-now-line,
body.theme-birmingham .schedule-dashboard--journal .schedule-now-line,
body.theme-birmingham .schedule-mj .schedule-now-line {
    border-top: 1.5px dashed var(--accent-color) !important;
    box-shadow: none !important;
}

body.theme-birmingham .schedule-now-line::after {
    content: "";
    position: absolute;
    right: 0;
    top: -5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-color) 35%, transparent);
}

body.theme-birmingham .schedule-now-line__time,
body.theme-birmingham .schedule-dashboard--journal .schedule-now-line__time {
    background: var(--accent-color) !important;
    color: var(--on-accent) !important;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--accent-color) 40%, transparent) !important;
}

body.theme-birmingham .appointment-card,
body.theme-birmingham .appointment-card--compact,
body.theme-birmingham .appointment-card--journal,
body.theme-birmingham .schedule-appt-layer .appointment-card,
body.theme-birmingham .schedule-dashboard .appointment-card {
    color: var(--bh-ink-on-gold, #1a1408) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28) !important;
}

/* Birmingham: gold-family status tints — clearly distinct waiting / confirmed / arrived / no_show */
body.theme-birmingham .appointment-card--status-waiting,
body.theme-birmingham .appointment-card--journal.appointment-card--status-waiting,
body.theme-birmingham .schedule-dashboard .appointment-card--status-waiting {
    background: linear-gradient(180deg, var(--bh-gold-mid, #d4b06e) 0%, var(--bh-gold, #c5a059) 48%, var(--bh-gold-deep, #9a7a3a) 100%) !important;
    border: 1px solid color-mix(in srgb, var(--bh-gold-deep, #9a7a3a) 55%, #000) !important;
    color: var(--bh-ink-on-gold, #1a1408) !important;
}

body.theme-birmingham .appointment-card--status-confirmed,
body.theme-birmingham .appointment-card--journal.appointment-card--status-confirmed,
body.theme-birmingham .schedule-dashboard .appointment-card--status-confirmed {
    background: linear-gradient(180deg, #e8d9a8 0%, #d4c078 48%, #a89048 100%) !important;
    border: 1px solid color-mix(in srgb, #6a5a28 50%, #000) !important;
    color: #1a1608 !important;
}

body.theme-birmingham .appointment-card--status-arrived,
body.theme-birmingham .appointment-card--journal.appointment-card--status-arrived,
body.theme-birmingham .schedule-dashboard .appointment-card--status-arrived {
    background: linear-gradient(180deg, #c4c878 0%, #9aaa58 48%, #6a7a38 100%) !important;
    border: 1px solid color-mix(in srgb, #3a4820 55%, #000) !important;
    color: #121808 !important;
}

body.theme-birmingham .appointment-card--status-cancelled,
body.theme-birmingham .appointment-card--journal.appointment-card--status-cancelled {
    background: linear-gradient(180deg, #6b655c 0%, #4a453c 100%) !important;
    color: #e5e0d8 !important;
    border: 1px solid #3a3530 !important;
    opacity: 0.72;
}

body.theme-birmingham .appointment-card--status-no_show,
body.theme-birmingham .appointment-card--journal.appointment-card--status-no_show {
    background: linear-gradient(180deg, #c09070 0%, #a87858 48%, #7a4a38 100%) !important;
    border: 1px solid color-mix(in srgb, #4a2818 60%, #000) !important;
    color: #f5efe6 !important;
}

/* Telegram waiting: dedicated sky tint (same as TELEGRAM_CARD_COLOR / --status-tg-default) */
body.theme-birmingham .appointment-card--source-telegram.appointment-card--status-waiting,
body.theme-birmingham .appointment-card--journal.appointment-card--source-telegram.appointment-card--status-waiting {
    background: linear-gradient(180deg, #7ec8ef 0%, var(--status-tg-default, #38bdf8) 48%, #1a8fc4 100%) !important;
    border: 1px solid color-mix(in srgb, #0c5a7a 55%, #000) !important;
    color: #0a1a24 !important;
}

/* Custom color wins on waiting cards (status palette returns when not waiting) */
body.theme-birmingham .appointment-card--custom-color.appointment-card--status-waiting,
body.theme-birmingham .appointment-card--journal.appointment-card--custom-color.appointment-card--status-waiting {
    background: var(--appt-card-custom, var(--bh-gold, #c5a059)) !important;
    border: 1px solid color-mix(in srgb, var(--appt-card-custom, #c5a059) 40%, #000) !important;
    color: #1a1408 !important;
}

body.theme-birmingham .appointment-card__client,
body.theme-birmingham .appointment-card__service,
body.theme-birmingham .appointment-card__status,
body.theme-birmingham .appointment-card__phone,
body.theme-birmingham .appointment-card--journal .appointment-card__client,
body.theme-birmingham .appointment-card--journal .appointment-card__service,
body.theme-birmingham .appointment-card--journal .appointment-card__status,
body.theme-birmingham .appointment-card--journal .appointment-card__phone {
    color: inherit !important;
}

body.theme-birmingham .appointment-card--journal .appointment-card__journal-head {
    background: color-mix(in srgb, #000 18%, transparent) !important;
    color: inherit !important;
}

body.theme-birmingham .schedule-date-nav__arrow,
body.theme-birmingham .schedule-date-nav__chip,
body.theme-birmingham .schedule-date-nav__today,
body.theme-birmingham .schedule-toolbar__btn {
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--accent-color) 40%, transparent);
    background: var(--input-bg);
    color: var(--text-primary);
}

/* Must beat the base chip rule above (same specificity + .active / .is-today). */
body.theme-birmingham .schedule-date-nav__chip.active,
body.theme-birmingham .schedule-date-nav__chip.is-active {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 22%, var(--input-bg));
    color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-color) 35%, transparent);
}

body.theme-birmingham .schedule-date-nav__chip.is-today:not(.active):not(.is-active) {
    border-color: color-mix(in srgb, var(--accent-color) 75%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-color) 30%, transparent);
}

body.theme-birmingham .schedule-week-nav--dock .schedule-week-nav__day--active {
    background: var(--accent-color);
    color: var(--on-accent, #1a1208);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--accent-color) 40%, transparent);
}

body.theme-birmingham .schedule-week-nav--dock .schedule-week-nav__day--today:not(.schedule-week-nav__day--active) {
    outline: 1px solid color-mix(in srgb, var(--accent-color) 55%, transparent);
    outline-offset: -1px;
}

body.theme-birmingham .schedule-date-nav__today,
body.theme-birmingham .schedule-toolbar__btn--primary {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

body.theme-birmingham .schedule-dashboard--journal .schedule-journal-dock {
    background: var(--bg-secondary);
    border-top-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
}

body.theme-birmingham .work-journal-table {
    background: var(--bg-secondary);
}

body.theme-birmingham .work-journal-cell--work {
    background: color-mix(in srgb, var(--accent-color) 22%, var(--bg-tertiary)) !important;
    color: var(--text-primary);
    border-radius: var(--radius-sm) !important;
}

body.theme-birmingham .profile-chrome,
body.theme-birmingham .profile-page,
body.theme-birmingham .appearance-settings-page,
body.theme-birmingham .panel-page {
    color: var(--text-primary);
}

body.theme-birmingham .theme-settings__card--active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}

/* ═══ Theme settings page ═══ */
.theme-settings__hint { margin-bottom: 16px; }
.theme-settings__modes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.theme-settings__mode.active { border-color: var(--accent-color); color: var(--accent-color); }
.manage-page__theme {
    margin-top: 28px;
}

.theme-settings__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.theme-settings__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.theme-settings__card--active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}
.theme-settings__card-title { font-weight: 700; font-family: var(--font-heading); }
.theme-settings__card-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.45; }
.theme-settings__preview {
    width: 100%;
    height: 48px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
.theme-settings__preview--peaky { background: linear-gradient(135deg, #121212 40%, #c9a227); }
.theme-settings__preview--nature { background: linear-gradient(135deg, #fbf7f0, #6b8f71); }
.theme-settings__preview--gentlemen { background: linear-gradient(135deg, #1a0a0a, #c9a84c); }
.theme-settings__preview--fightclub { background: linear-gradient(135deg, #e8e4de, #c0392b); }
.theme-settings__preview--greenstreet { background: linear-gradient(135deg, #0b1a15, #f4a261); }
.theme-settings__preview--snatch { background: linear-gradient(135deg, #e8dcc8, #c0392b 55%, #d4a017); }
.theme-settings__preview--lockstock { background: linear-gradient(135deg, #e6dcc3, #1a4a2a 50%, #8b0000); }
.theme-settings__preview--rocknrolla { background: linear-gradient(135deg, #f5edf0, #ff1493 45%, #0a0a14); }
.theme-settings__preview--legend { background: linear-gradient(135deg, #f5efe6, #6b1a2a 50%, #c49a4a); }
.theme-settings__preview--firm { background: linear-gradient(135deg, #e6e0d8, #1a2a5a 55%, #0a0a1a); }
.theme-settings__preview--england { background: linear-gradient(135deg, #d8d4ce, #cc0000 40%, #1a2a6a); }
.theme-settings__preview--peakymodern { background: linear-gradient(135deg, #0c0e12 35%, #1c2230 55%, #d4b896); }
.theme-settings__preview--peakycyber { background: linear-gradient(135deg, #07070d 30%, #00e8f0 55%, #ff2d95); }
.theme-settings__preview--atelier { background: linear-gradient(135deg, #f7f8fa 40%, #ffffff 60%, #1a4a4a); }
.theme-settings__preview--yclients { background: linear-gradient(135deg, #ffffff 35%, #f7f8fa 55%, #ffcc00); }
.theme-settings__preview--birmingham { background: linear-gradient(135deg, #0d0d0d 40%, #1a1a1a 55%, #c5a059); }

.cabinet-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

/* ═══ MOBILE — reset desktop layout experiments ═══ */
@media (max-width: 767px) {
    body[class*="theme-"] .main-content { padding-right: 0 !important; }
    body[class*="theme-"] .footer-inner { padding-right: 0 !important; }

    body.theme-nature .topbar-inner,
    body.theme-gentlemen .topbar-inner,
    body.theme-fightclub .topbar-inner,
    body.theme-greenstreet .topbar-inner,
    body.theme-snatch .topbar-inner,
    body.theme-lockstock .topbar-inner,
    body.theme-rocknrolla .topbar-inner,
    body.theme-legend .topbar-inner,
    body.theme-firm .topbar-inner,
    body.theme-england .topbar-inner,
    body.theme-peakymodern .topbar-inner,
    body.theme-peakycyber .topbar-inner,
    body.theme-atelier .topbar-inner,
    body.theme-yclients .topbar-inner,
    body.theme-birmingham .topbar-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 12px 16px;
        max-width: none;
    }

    body.theme-birmingham .topbar {
        position: sticky;
        left: auto;
        top: 0;
        bottom: auto;
        width: auto;
        height: auto;
        border-right: none;
        border-bottom: 1px solid color-mix(in srgb, var(--accent-color) 35%, transparent);
        box-shadow: none;
        overflow: visible;
    }

    body.theme-birmingham .main-content,
    body.theme-birmingham .footer {
        margin-left: 0;
    }

    body.theme-birmingham .nav {
        flex-direction: column;
        align-items: stretch;
    }

    body.theme-birmingham .nav-legacy {
        display: contents;
    }

    body.theme-birmingham .birmingham-side-slot {
        display: none !important;
    }

    body.theme-birmingham .nav-logout-form {
        display: contents;
    }

    body.theme-birmingham .nav-link,
    body.theme-birmingham .lang-btn {
        width: auto;
        white-space: nowrap !important;
    }


    body.theme-legend .nav { margin-left: auto; }
    body.theme-legend .topbar-inner { justify-content: space-between; }
    body.theme-rocknrolla .nav-link,
    body.theme-rocknrolla .lang-btn { transform: none; background: transparent; border: none; padding: 4px 8px; }
    body.theme-snatch .nav-link,
    body.theme-snatch .lang-btn { border: none; border-radius: 0; padding: 4px 8px; }
    body.theme-lockstock.mode-night .section-title,
    body.theme-lockstock.mode-night .site-name,
    body.theme-lockstock.mode-night .panel-header h1 { animation: none; }
    body.theme-legend .manage-links,
    body.theme-firm .manage-links,
    body.theme-lockstock .manage-links { grid-template-columns: 1fr; }

    body.theme-nature .logo-wrap,
    body.theme-gentlemen .logo-wrap {
        width: auto;
        order: 0;
        text-align: left;
    }

    body.theme-gentlemen .user-badge {
        position: static;
    }

    body.theme-fightclub .logo-wrap {
        padding: 0;
        border-right: none;
    }

    body.theme-fightclub .nav-link,
    body.theme-fightclub .lang-btn {
        padding: 8px 10px;
        border-right: none;
    }

    body.theme-greenstreet .topbar {
        clip-path: none;
        padding-bottom: 0;
    }

    body.theme-greenstreet .nav-link,
    body.theme-greenstreet .lang-btn {
        transform: none;
        border: none;
        background: transparent;
        padding: 4px 8px;
    }

    body.theme-greenstreet .ui-card,
    body.theme-greenstreet .manage-card,
    body.theme-greenstreet .team-card {
        transform: none;
    }

    body.theme-greenstreet::after {
        height: 4px;
    }

    body.theme-nature .manage-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    body.theme-gentlemen .manage-links {
        grid-template-columns: 1fr;
    }

    body.theme-fightclub .manage-links {
        border: none;
    }

    body.theme-fightclub .manage-card {
        border: 2px solid var(--border-color);
        margin-bottom: 8px;
    }

    body.theme-fightclub .panel-header__actions,
    body.theme-fightclub .modal-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    body.theme-fightclub .panel-header__actions > *,
    body.theme-fightclub .modal-actions > * {
        width: auto;
    }

    .theme-settings__grid {
        grid-template-columns: 1fr;
    }

    .cabinet-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cabinet-appearance-link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    body.has-mobile-tab-bar .appearance-settings-page {
        padding-bottom: calc(var(--mobile-tab-bar-height, 58px) + 12px);
    }
}

body[class*="theme-"] .btn-gold,
body[class*="theme-"] .btn-outline {
    min-height: 44px;
}

@media (max-width: 767px) {
    body[class*="theme-"] .nav-link,
    body[class*="theme-"] .lang-btn {
        min-height: 44px;
    }
}

/* ═══ Desktop header — force single-line nav labels ═══ */
@media (min-width: 768px) {
    .topbar-inner {
        flex-wrap: nowrap !important;
        max-width: min(100%, 1440px);
    }

    .nav {
        flex-wrap: nowrap !important;
        gap: clamp(4px, 0.7vw, 14px) !important;
    }

    .nav-link,
    .lang-btn,
    .nav-dropdown,
    .nav-dropdown__toggle,
    button.nav-link {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        line-height: 1.15;
        font-size: clamp(10px, 0.68vw, 12px) !important;
        letter-spacing: 0.03em !important;
    }

    body.theme-peaky .nav-link,
    body.theme-peaky .lang-btn {
        letter-spacing: 0.03em;
    }

    /* Birmingham sidebar must win over single-line desktop nav rules */
    body.theme-birmingham[data-bh-sidebar="1"] .topbar-inner,
    [data-theme="birmingham"][data-bh-sidebar="1"] .topbar-inner {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        max-width: none !important;
        align-items: stretch !important;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .nav,
    [data-theme="birmingham"][data-bh-sidebar="1"] .nav {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        margin-left: 0 !important;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .nav-legacy,
    [data-theme="birmingham"][data-bh-sidebar="1"] .nav-legacy {
        display: none !important;
    }

    body.theme-birmingham[data-bh-sidebar="1"] .nav-link,
    body.theme-birmingham[data-bh-sidebar="1"] .lang-btn,
    body.theme-birmingham[data-bh-sidebar="1"] button.nav-link,
    [data-theme="birmingham"][data-bh-sidebar="1"] .nav-link,
    [data-theme="birmingham"][data-bh-sidebar="1"] .lang-btn,
    [data-theme="birmingham"][data-bh-sidebar="1"] button.nav-link {
        white-space: normal !important;
        font-size: 0.82rem !important;
        letter-spacing: 0.04em !important;
        text-transform: none !important;
        width: 100%;
    }
}
