:root {
    --bg: #120905;
    --bg-soft: #24120b;
    --panel: rgba(22, 11, 8, 0.88);
    --panel-strong: rgba(31, 15, 10, 0.96);
    --line: rgba(216, 179, 114, 0.18);
    --text: #f5ebdd;
    --muted: #d4bf9f;
    --gold: #d6a55c;
    --gold-deep: #9f6b29;
    --danger: #ffb4b4;
    --success: #b9efca;
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.38);
    --radius: 28px;
    --radius-sm: 18px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(153, 78, 33, 0.28), transparent 35%),
        radial-gradient(circle at top right, rgba(117, 83, 42, 0.25), transparent 34%),
        linear-gradient(180deg, #1b0c07 0%, #0d0503 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 30%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'%3E%3Cpath d='M10 70h120M70 10v120'/%3E%3Ccircle cx='70' cy='70' r='42'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.shell {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero {
    padding: 42px 0 28px;
}

.hero__layout {
    width: min(100%, 920px);
    margin: 0 auto;
}

.hero__form {
    background: linear-gradient(180deg, rgba(40, 19, 13, 0.85), rgba(17, 8, 6, 0.98));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: static;
    padding: 0;
}

.admin-title,
.login-card h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.section-title {
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-weight: 800;
    letter-spacing: 0;
}

.hero__image {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 5, 4, 0.55);
}

.hero__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 4, 3, 0.05), rgba(8, 4, 3, 0.48));
}

.hero__image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero__image-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 32px;
    text-align: center;
    color: var(--muted);
    background:
        radial-gradient(circle at 30% 30%, rgba(214, 165, 92, 0.16), transparent 24%),
        linear-gradient(135deg, rgba(214, 165, 92, 0.08), rgba(0, 0, 0, 0.2));
}

.hero__form-body {
    padding: 30px;
}

.section-title {
    margin: 0 0 10px;
    font-size: 2.3rem;
}

.section-copy {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.7;
}

.alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: 0.96rem;
    line-height: 1.5;
}

.alert--success {
    color: #143220;
    background: rgba(185, 239, 202, 0.92);
    border-color: rgba(185, 239, 202, 0.95);
}

.alert--error {
    color: #490d0d;
    background: rgba(255, 180, 180, 0.94);
    border-color: rgba(255, 180, 180, 0.98);
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

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

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 0.92rem;
    color: #f8dfba;
}

.field input,
.field select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.field input:focus,
.field select:focus,
.calendar__day:focus-visible,
.times__button:focus-visible,
.button:focus-visible {
    outline: none;
    border-color: rgba(214, 165, 92, 0.85);
    box-shadow: 0 0 0 4px rgba(214, 165, 92, 0.12);
}

.field input::placeholder {
    color: rgba(245, 235, 221, 0.48);
}

.field-note {
    font-size: 0.84rem;
    color: rgba(245, 235, 221, 0.6);
}

.form-submit {
    margin-top: 18px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    color: #180a03;
    background: linear-gradient(135deg, #e9c27c, #c78937);
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(199, 137, 55, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(199, 137, 55, 0.28);
}

.button--ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.button--danger {
    color: #fff6f4;
    background: linear-gradient(135deg, #b54d43, #7e251d);
    box-shadow: 0 14px 28px rgba(126, 37, 29, 0.28);
}

.button--small {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.92rem;
}

.selector {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.selector__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.selector__title {
    margin: 0;
    font-size: 1rem;
    color: #f8dfba;
}

.selector__meta {
    font-size: 0.84rem;
    color: rgba(245, 235, 221, 0.6);
}

.selector__months {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.calendar {
    padding: 16px;
    border-radius: 18px;
    background: rgba(10, 5, 4, 0.44);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.calendar__title {
    margin: 0 0 12px;
    font-size: 1rem;
    color: #fff1d8;
}

.calendar__weekdays,
.calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar__weekdays span {
    text-align: center;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(245, 235, 221, 0.48);
}

.calendar__empty {
    min-height: 44px;
}

.calendar__day {
    min-height: 44px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.calendar__day:hover:not(:disabled) {
    transform: translateY(-1px);
}

.calendar__day.is-disabled {
    cursor: not-allowed;
    color: rgba(245, 235, 221, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.08)),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0.03) 5px,
            transparent 5px,
            transparent 10px
        );
}

.calendar__day.is-available {
    border-color: rgba(214, 165, 92, 0.22);
    background: rgba(214, 165, 92, 0.08);
}

.calendar__day.is-selected {
    color: #170901;
    border-color: rgba(233, 194, 124, 0.82);
    background: linear-gradient(135deg, #e9c27c, #cf8f43);
}

.times {
    display: grid;
    gap: 12px;
}

.times__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.times__button {
    min-width: 104px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.times__button.is-selected {
    color: #190b04;
    border-color: rgba(233, 194, 124, 0.85);
    background: linear-gradient(135deg, #e9c27c, #cf8f43);
}

.times__summary {
    min-height: 24px;
    font-size: 0.92rem;
    color: #f8dfba;
}

.slot-select-fallback {
    margin-top: 4px;
}

.js-enhanced .slot-select-fallback {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-footer {
    padding: 0 0 42px;
    color: rgba(245, 235, 221, 0.58);
}

.site-footer__inner {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-shell {
    width: min(calc(100% - 32px), 1280px);
    margin: 0 auto;
    padding: 32px 0 44px;
    position: relative;
    z-index: 1;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.admin-title {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 0.95;
}

.admin-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card,
.table-card,
.login-card {
    background: linear-gradient(180deg, rgba(40, 19, 13, 0.85), rgba(17, 8, 6, 0.98));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 22px;
}

.stat-card__label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(245, 235, 221, 0.54);
}

.stat-card__value {
    display: block;
    margin-top: 10px;
    font-size: clamp(2rem, 4vw, 3rem);
    font-family: "Cormorant Garamond", Georgia, serif;
}

.table-card {
    overflow: hidden;
}

.table-card__header {
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table-card__header h2 {
    margin: 0 0 8px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2rem;
}

.table-card__header p {
    margin: 0;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

th {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(245, 235, 221, 0.58);
    background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(214, 165, 92, 0.13);
    border: 1px solid rgba(214, 165, 92, 0.25);
    color: #fff1d8;
    font-size: 0.84rem;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: min(100%, 480px);
    padding: 30px;
}

.login-card h1 {
    margin: 0 0 10px;
    font-size: 3rem;
    line-height: 0.95;
}

.login-card p {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 900px) {
    .selector__months,
    .stats {
        grid-template-columns: 1fr;
    }

    .form-grid--two,
    .site-footer__inner {
        grid-template-columns: 1fr;
        display: grid;
    }
}

@media (max-width: 680px) {
    .hero {
        padding-top: 24px;
    }

    .hero__form-body,
    .login-card,
    .table-card__header,
    .stat-card {
        padding: 22px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    th,
    td {
        padding: 14px 12px;
    }

    .calendar {
        padding: 14px;
    }
}
