:root {
    --bg: #0b1220;
    --panel: #121b2e;
    --panel-2: #1a2742;
    --text: #eef3ff;
    --muted: #a8b2c8;
    --border: rgba(255, 255, 255, 0.08);
    --free: #1f9d55;
    --free-soft: rgba(31, 157, 85, 0.16);
    --reserved: #d64545;
    --reserved-soft: rgba(214, 69, 69, 0.16);
    --blocked: #7a869a;
    --blocked-soft: rgba(122, 134, 154, 0.18);
    --accent: #ffd166;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 209, 102, 0.08), transparent 25%),
        linear-gradient(180deg, #0a1020, #0d1528 50%, #0a1020 100%);
    color: var(--text);
    min-height: 100vh;
}

.page-shell {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 60px;
}

.page-shell.narrow {
    width: min(760px, calc(100% - 32px));
}

.hero,
.legend-card,
.form-card,
.success-card,
.tabs-section {
    background: rgba(18, 27, 46, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero {
    padding: 28px;
    margin-bottom: 20px;
}

.hero.compact {
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 700;
}

h1,
h2 {
    margin: 0 0 10px;
}

.hero-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.legend-card {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 700;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.dot-free { background: var(--free); }
.dot-reserved { background: var(--reserved); }
.dot-blocked { background: var(--blocked); }

.tabs-section {
    padding: 22px;
}

.tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.tab-button,
.button {
    border: 0;
    border-radius: 999px;
    padding: 14px 20px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tab-button {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.tab-button.active,
.tab-button:hover {
    background: var(--accent);
    color: #1e1b12;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 18px;
}

.day-header p {
    margin: 0;
    color: var(--muted);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.slot-card {
    min-height: 112px;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.slot-card:hover {
    transform: translateY(-2px);
}

.slot-free {
    background: linear-gradient(180deg, var(--free-soft), rgba(255,255,255,0.02));
    border-color: rgba(31, 157, 85, 0.35);
}

.slot-reserved {
    background: linear-gradient(180deg, var(--reserved-soft), rgba(255,255,255,0.02));
    border-color: rgba(214, 69, 69, 0.35);
}

.slot-blocked {
    background: linear-gradient(180deg, var(--blocked-soft), rgba(255,255,255,0.02));
    border-color: rgba(122, 134, 154, 0.35);
}

.slot-time {
    font-size: 1.15rem;
    font-weight: 800;
}

.slot-state {
    color: var(--muted);
}

.is-disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.form-card,
.success-card {
    padding: 24px;
}

.booking-form {
    display: grid;
    gap: 20px;
}

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

.form-grid > div:last-child {
    grid-column: span 2;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0f1729;
    color: var(--text);
    padding: 14px 16px;
    font-size: 1rem;
}

input:focus {
    outline: 2px solid rgba(255, 209, 102, 0.3);
    border-color: rgba(255, 209, 102, 0.4);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.form-actions.centered {
    justify-content: center;
}

.button-primary {
    background: var(--accent);
    color: #1e1b12;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.button:hover {
    transform: translateY(-1px);
}

.alert {
    padding: 16px 18px;
    border-radius: 16px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    line-height: 1.5;
}

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

.alert-error {
    background: rgba(214, 69, 69, 0.13);
    border-color: rgba(214, 69, 69, 0.25);
}

.alert-success {
    background: rgba(31, 157, 85, 0.12);
    border-color: rgba(31, 157, 85, 0.24);
}

.summary-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    margin: 20px 0;
}

.summary-box p {
    margin: 10px 0;
}

.mail-status {
    margin: 0 0 20px;
}

.success-note {
    color: #aee6bf;
}

.warning-note {
    color: #ffdba0;
}

@media (max-width: 720px) {
    .page-shell,
    .page-shell.narrow {
        width: min(100% - 20px, 100%);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid > div:last-child {
        grid-column: auto;
    }

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

.admin-shell {
    width: min(1300px, calc(100% - 32px));
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.inline-form {
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(18, 27, 46, 0.92);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin-top: 8px;
}

.stat-label {
    color: var(--muted);
    font-weight: 700;
}

.stat-card-free {
    border-color: rgba(31, 157, 85, 0.35);
}

.stat-card-reserved {
    border-color: rgba(214, 69, 69, 0.35);
}

.stat-card-blocked {
    border-color: rgba(122, 134, 154, 0.35);
}

.admin-legend {
    margin-bottom: 20px;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.03);
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

.status-free {
    background: var(--free-soft);
    border-color: rgba(31, 157, 85, 0.35);
}

.status-reserved {
    background: var(--reserved-soft);
    border-color: rgba(214, 69, 69, 0.35);
}

.status-blocked {
    background: var(--blocked-soft);
    border-color: rgba(122, 134, 154, 0.35);
}

.button-small {
    padding: 10px 14px;
    font-size: 0.92rem;
}

.button-warning {
    background: #f0b429;
    color: #1e1b12;
}

.button-danger {
    background: #dc2626;
    color: #ffffff;
}

.admin-login-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 900px) {
    .admin-hero {
        flex-direction: column;
    }
}
