* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f8fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #475569;
    --line: #cbd5e1;
    --line-soft: #e2e8f0;
    --azure-50: #f0f9ff;
    --azure-100: #e0f2fe;
    --azure-200: #bae6fd;
    --azure-700: #0369a1;
    --azure-800: #075985;
    --azure-900: #0c4a6e;
    --emerald-50: #ecfdf5;
    --emerald-500: #10b981;
    --emerald-800: #065f46;
    --amber-50: #fffbeb;
    --amber-500: #f59e0b;
    --amber-800: #92400e;
    --rose-50: #fff1f2;
    --rose-200: #fecdd3;
    --rose-600: #e11d48;
    --rose-700: #be123c;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a {
    color: inherit;
}

.topbar {
    border-bottom: 4px solid var(--azure-700);
    background: var(--surface);
}

.topbar-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar-inner.narrow {
    max-width: 48rem;
}

.brand-kicker {
    color: var(--azure-700);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.24em;
}

.brand-title {
    margin-top: 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.brand-aside {
    color: var(--muted);
    font-size: 0.95rem;
}

.page-shell {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

.page-shell.narrow {
    max-width: 48rem;
}

.page-center {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
}

.hero-card,
.card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow);
}

.hero-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.hero-badge,
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--azure-200);
    background: var(--azure-50);
    color: var(--azure-800);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.badge-success {
    border-color: #a7f3d0;
    background: var(--emerald-50);
    color: var(--emerald-800);
}

.badge-error {
    border-color: var(--rose-200);
    background: var(--rose-50);
    color: var(--rose-700);
}

.hero-title,
.page-title {
    margin: 1.25rem 0 0;
    color: var(--azure-900);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-text,
.page-text,
.text-muted {
    color: var(--muted);
    line-height: 1.7;
}

.hero-text {
    max-width: 48rem;
    margin-top: 1rem;
}

.layout-grid {
    display: grid;
    gap: 1.25rem;
}

.layout-grid.booking {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.layout-grid.admin {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
}

.card {
    padding: 1.5rem;
}

.section-title {
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line-soft);
    color: var(--azure-900);
    font-size: 1.5rem;
    font-weight: 600;
}

.stack {
    display: grid;
    gap: 1.25rem;
}

.substack {
    display: grid;
    gap: 1rem;
}

.surface-soft {
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
    padding: 1rem;
}

.field-grid-2,
.field-grid-3,
.field-grid-special {
    display: grid;
    gap: 1rem;
}

.field-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid-3 {
    grid-template-columns: minmax(0, 1fr) 140px 120px;
}

.field-grid-special {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.field label,
.label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 0.875rem 1rem;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--azure-700);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.textarea {
    min-height: 6rem;
    resize: vertical;
}

.checkbox-row,
.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.checkbox-row {
    justify-content: space-between;
    width: 100%;
}

.field-note,
.field-error {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.field-note {
    color: var(--muted);
}

.service-information {
    margin-top: 0.75rem;
    border-left: 4px solid var(--azure-700);
    background: var(--azure-50);
    color: var(--azure-900);
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.field-error {
    color: var(--rose-600);
}

.button,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background-color 0.2s ease;
}

.button {
    background: var(--azure-700);
    color: #ffffff;
}

.button:hover {
    background: var(--azure-800);
}

.button.block {
    width: 100%;
}

.button-danger {
    background: var(--rose-600);
    color: #ffffff;
}

.button-danger:hover {
    background: var(--rose-700);
}

.alert,
.notice {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.alert-success {
    border-left: 4px solid var(--emerald-500);
    background: var(--emerald-50);
    color: var(--emerald-800);
}

.alert-warning,
.notice {
    border-left: 4px solid var(--amber-500);
    background: var(--amber-50);
    color: var(--amber-800);
}

.debug-list {
    margin: 0.75rem 0 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.summary-grid {
    display: grid;
    gap: 1rem;
}

.summary-item {
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
    padding: 1rem;
}

.summary-label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--azure-700);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.slot-list {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.slot-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--azure-200);
    background: var(--azure-50);
    color: var(--azure-800);
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.holiday-list {
    display: grid;
    gap: 0.75rem;
}

.holiday-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line-soft);
}

.holiday-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--emerald-500);
    background: var(--emerald-50);
    color: var(--emerald-800);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pill.warning {
    border-color: var(--amber-500);
    background: var(--amber-50);
    color: var(--amber-800);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.hidden-mobile {
    display: block;
}

@media (max-width: 1024px) {
    .layout-grid.booking,
    .layout-grid.admin {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar-inner,
    .page-shell,
    .page-shell.narrow {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .field-grid-2,
    .field-grid-3,
    .field-grid-special {
        grid-template-columns: 1fr;
    }

    .hero-title,
    .page-title {
        font-size: 1.75rem;
    }

    .hidden-mobile {
        display: none;
    }

    .checkbox-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .holiday-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
