:root {
    --bg: #000000;
    --ink: #f7f4ea;
    --muted: #e0c97a;
    --line: #4a3f24;
    --gold: #d4af37;
    --gold-2: #f3e5ab;
    --blue: #1c180f;
    --blue-2: #d4af37;
    --orange: #d4af37;
    --orange-text: #f3e5ab;
    --orange-soft: #2a2414;
    --busy: #121212;
    --rose: #ffb4ab;
    --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    color-scheme: dark;
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.9rem 1rem 2.5rem;
}

.top {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 0;
}
.top::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(
        90deg,
        #7a6228 0%,
        #f8e7b0 22%,
        #d4af37 46%,
        #fff6d0 50%,
        #d4af37 54%,
        #f3e5ab 78%,
        #7a6228 100%
    );
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: inherit;
    text-decoration: none;
    text-align: center;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: min(100%, 28rem);
    height: 9.2rem;
    object-fit: contain;
}

.brand-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.brand-tag {
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.backend-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.7rem;
    border-radius: 6px;
    border: 2px solid transparent;
    background:
        linear-gradient(180deg, #f8e7b0 0%, #e0c15a 38%, #c49a32 100%) padding-box,
        linear-gradient(135deg, #fff6d0 0%, #d4af37 42%, #8a6e2f 68%, #f8e7b0 100%) border-box;
    background-clip: padding-box, border-box;
    box-shadow: inset 0 1px 0 rgba(255, 248, 220, 0.75);
    color: #14120c;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
.backend-link:hover {
    background:
        linear-gradient(180deg, #fff6d0 0%, #f0d78c 40%, #d4af37 100%) padding-box,
        linear-gradient(135deg, #fff6d0 0%, #e6c866 42%, #a68430 68%, #fff1c2 100%) border-box;
    color: #14120c;
}
.brand-balance { visibility: hidden; }

.top-nav {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 0.85rem;
}
.top-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}
.top-nav a:hover { color: var(--orange); }

.intro { margin-bottom: 0.9rem; max-width: 36rem; }
.intro h1 {
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 0.1rem 0 0.3rem;
}
.intro p { margin: 0; color: var(--muted); font-size: 0.8rem; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--muted);
    margin: 0;
}

.crumb {
    color: var(--muted);
    font-size: 0.75rem;
    margin: 0 0 0.7rem;
}
.crumb a { color: inherit; text-decoration: none; }
.crumb a:hover { color: #fff; }

.month-nav {
    display: grid;
    grid-template-columns: 5.5rem 1fr 5.5rem;
    align-items: center;
    gap: 0.35rem;
    margin: 0.15rem 0 0.35rem;
}
.month-nav h1,
.month-nav .month-label {
    margin: 0;
    text-align: center;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.03em;
}
.month-arrow {
    color: var(--gold-2);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
}
.month-nav a.month-arrow:hover { color: #fff; }
.month-arrow.is-disabled { visibility: hidden; }
.month-nav > :last-child { text-align: right; }

.flash {
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.9rem;
    font-weight: 600;
    font-size: 0.8rem;
}
.flash-error { background: #3a1616; color: #ffd0cb; }
.flash-ok { background: #2a2414; color: var(--gold-2); }

.calendar-card {
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background:
        linear-gradient(var(--bg), var(--bg)) padding-box,
        linear-gradient(
            120deg,
            #7a6228 0%,
            #f8e7b0 16%,
            #d4af37 38%,
            #fff6d0 50%,
            #d4af37 62%,
            #f3e5ab 84%,
            #7a6228 100%
        ) border-box;
}

.weekday-row,
.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-row {
    padding: 0.45rem 0.35rem 0.2rem;
    color: var(--muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    text-align: center;
}

.calendar {
    padding: 0.2rem 0.35rem 0.4rem;
    gap: 0.2rem;
}

.day {
    aspect-ratio: 1;
    min-height: 0;
    border-radius: 6px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    color: var(--ink);
    text-decoration: none;
    background: transparent;
    font-size: 0.78rem;
}
.day-num { font-weight: 600; font-variant-numeric: tabular-nums; }

.day.is-outside { color: #5c5344; }
.day.is-weekend,
.day.is-past,
.day.is-full {
    color: #8a7a58;
    background: var(--busy);
}
.day.is-open {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold-2);
    font-weight: 650;
}
.day.is-open:hover {
    background: var(--gold);
    color: #14120c;
}
.day.is-selected {
    box-shadow: 0 0 0 2px var(--orange);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    list-style: none;
    padding: 0.65rem 0.1rem 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
}
.dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    margin-right: 0.3rem;
    vertical-align: 0;
}
.dot.open { background: var(--blue-2); }
.dot.full { background: #5c5344; }
.dot.closed { background: #3a3428; }

.option-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}
.option-chip {
    background: var(--blue);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    font-size: 0.78rem;
    transition: background 0.12s ease, color 0.12s ease;
}
.option-chip strong { font-size: 0.78rem; font-weight: 650; }
.option-chip span { color: inherit; font-size: 0.68rem; opacity: 0.75; }
.option-chip:hover,
.option-chip.is-active {
    background: var(--gold);
    color: #14120c;
}
.option-chip:hover span,
.option-chip.is-active span { opacity: 0.9; }

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr));
    gap: 0.28rem;
}
.slot {
    appearance: none;
    font: inherit;
    text-align: center;
    border: 1px solid transparent;
    background: var(--blue);
    color: var(--ink);
    border-radius: 6px;
    padding: 0.38rem 0.2rem 0.28rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.02rem;
    font-size: 0.75rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    transition: background 0.12s ease, color 0.12s ease;
}
.slot-count {
    font-size: 0.62rem;
    font-weight: 600;
    opacity: 0.7;
}
button.slot { border-color: var(--gold); color: var(--gold-2); }
button.slot:hover,
.slot.is-held {
    background: var(--gold);
    color: #14120c;
}
.slot.is-busy {
    background: var(--busy);
    color: #8a7a58;
    cursor: not-allowed;
    font-weight: 500;
}

.summary {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.9rem;
    font-size: 0.82rem;
}
.summary strong { display: block; font-size: 0.9rem; }
.summary-label {
    display: block;
    color: var(--muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 0.15rem;
}
.hold-timer strong { color: var(--orange-text); font-variant-numeric: tabular-nums; }

.booking-form,
.confirm-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.9rem;
}
.booking-form label,
.booking-form fieldset {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 650;
    font-size: 0.8rem;
}
.booking-form input[type="text"],
.booking-form input[type="tel"],
.booking-form input[type="password"] {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--line);
    font: inherit;
    background: #0a0a0a;
    color: var(--ink);
}
.booking-form fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 0.85rem;
}
.booking-form legend { margin-bottom: 0.4rem; }
.radio-stack { display: grid; gap: 0.3rem; font-weight: 400; }
.radio {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.45rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 400;
    background: var(--blue);
    cursor: pointer;
    transition: background 0.12s ease;
}
.radio:hover,
.radio:has(input:checked) {
    background: var(--gold);
    color: #14120c;
}
.radio strong { display: block; font-size: 0.78rem; }
.hint { color: var(--muted); font-weight: 400; font-size: 0.72rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    text-decoration: none;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    color: var(--ink);
}
.btn.primary { background: var(--gold); color: #14120c; }
.btn.primary:hover { background: var(--gold-2); color: #14120c; }
.btn.ghost { background: transparent; border-color: var(--gold); color: var(--gold-2); }
.btn.ghost:hover { border-color: var(--gold-2); color: #fff; }

.confirm-card dl { margin: 0; display: grid; gap: 0.55rem; }
.confirm-card dt { color: var(--muted); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; }
.confirm-card dd { margin: 0.1rem 0 0; font-size: 0.9rem; font-weight: 650; }

.section-title {
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
    font-size: 0.95rem;
    margin: 1.3rem 0 0.5rem;
}
.section-title small { color: var(--muted); font-weight: 600; }
.empty { color: var(--muted); font-size: 0.8rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.data { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data th, .data td { text-align: left; padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data th { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.data tr:last-child td { border-bottom: 0; }
.link-btn {
    appearance: none;
    border: 0;
    background: none;
    color: var(--rose);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.inline { margin: 0; }

.admin-sub {
    display: flex;
    gap: 0.35rem;
    margin: -0.2rem 0 1rem;
}
.admin-sub a {
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
    color: var(--muted);
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
}
.admin-sub a.is-active,
.admin-sub a:hover {
    background: var(--gold);
    color: #14120c;
}

.toolbar { margin: 0 0 0.75rem; }
.toolbar form { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.avail-toggle { position: relative; }
.avail-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.avail-toggle:not(:has(input:checked)) {
    background: var(--busy);
    color: #8a7a58;
    border-color: #2e291d;
}
.avail-toggle:has(input:checked) {
    background: var(--blue);
    color: var(--gold-2);
    border-color: var(--gold);
}
.avail-toggle:hover {
    background: var(--gold);
    color: #14120c;
}

.demo-login {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.85rem;
}
.demo-login p { margin: 0.2rem 0 0; font-size: 0.85rem; }
.demo-login strong { color: var(--gold-2); font-weight: 700; }

.foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.6rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.72rem;
}
.foot a { color: inherit; }
.foot a:hover { color: var(--orange); }

@media (max-width: 720px) {
    .option-row,
    .summary { grid-template-columns: 1fr; }
    .top { align-items: center; }
    .top-nav { position: static; }
}

@media (max-width: 520px) {
    .page { padding: 0.75rem 0.7rem 2rem; }
    .slot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .legend { flex-direction: column; align-items: flex-start; gap: 0.28rem; }
    .brand-balance { display: none; }
    .brand-line { justify-content: space-between; align-items: center; gap: 0.45rem; }
    .brand-tag { flex: 1; min-width: 0; font-size: 0.62rem; letter-spacing: 0.03em; line-height: 1.25; }
    .backend-link { padding: 0.3rem 0.55rem; font-size: 0.68rem; }
}
