:root {
    --page-bg: #f6f7f9;
    --ink: #1d252d;
    --muted: #65717d;
    --line: #dce2e8;
    --surface: #ffffff;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --accent-soft: #d9f3ef;
    --future-soft: #eef1f4;
    --future-ink: #58636f;
    --scheduled-soft: #e0ecff;
    --scheduled-ink: #174ea6;
    --warn-soft: #fff1d6;
    --warn-ink: #8a5a00;
    --danger-soft: #ffe1e1;
    --danger-ink: #9f1d1d;
    --day-bg: #eef8f7;
    --day-border: #879d9c;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: var(--page-bg);
}

.page-shell {
    min-height: 100vh;
}

.top-band {
    padding: 32px 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    color: var(--accent-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-active-bg: var(--accent-dark);
    --bs-btn-active-border-color: var(--accent-dark);
}

.book-button {
    min-width: 104px;
}

.summary-band {
    padding: 18px 0;
    background: #eef3f4;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
}

.summary-item {
    min-height: 84px;
    padding: 16px;
    color: inherit;
    background: var(--surface);
    border: 0;
    text-align: left;
    transition:
        background-color 120ms ease,
        box-shadow 120ms ease;
}

.summary-item:hover {
    background: #f8fbfc;
}

.summary-item.active {
    position: relative;
    background: #f0fbfa;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.summary-item:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.35);
    outline-offset: -3px;
}

.summary-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.summary-label {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.content-band {
    padding: 24px 0 48px;
}

.filters {
    width: min(100%, 520px);
}

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.table {
    --bs-table-bg: var(--surface);
}

.table thead th {
    padding: 14px 16px;
    color: #47525e;
    background: #f8fafb;
    border-bottom-color: var(--line);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.table tbody td {
    padding: 13px 16px;
    border-color: var(--line);
}

.table tbody tr:not(.day-row):hover td {
    background: #f9fdfc;
}

.day-row th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 12px 16px;
    color: var(--accent-dark);
    background: var(--day-bg);
    border-top: 1px solid var(--day-border);
    border-bottom: 1px solid var(--day-border);
    font-size: 0.92rem;
    font-weight: 750;
}

.time-cell {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
    opacity: 0.8;
    text-align: center;
    white-space: nowrap;
}

.table thead th:first-child {
    text-align: center;
}

.class-name {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-weight: 650;
}

.regular-marker {
    color: #d08700;
    font-size: 1rem;
    line-height: 1;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-scheduled {
    color: var(--scheduled-ink);
    background: var(--scheduled-soft);
}

.status-future {
    color: var(--future-ink);
    background: var(--future-soft);
}

.status-available {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.status-booked {
    color: #174ea6;
    background: #e0ecff;
}

.status-full {
    color: var(--warn-ink);
    background: var(--warn-soft);
}

.status-error {
    color: var(--danger-ink);
    background: var(--danger-soft);
}

.empty-cell {
    height: 180px;
    color: var(--muted);
    text-align: center;
    vertical-align: middle;
}

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

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

    .summary-band {
        padding: 10px 0;
    }

    .summary-item {
        min-height: 54px;
        padding: 9px 8px;
        text-align: center;
    }

    .summary-value {
        font-size: 1.25rem;
    }

    .summary-label {
        margin-top: 4px;
        font-size: 0.68rem;
    }

    .book-button {
        width: 100%;
    }

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

    .table {
        min-width: 0;
        table-layout: fixed;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 8px;
    }

    .table thead th:nth-child(1),
    .table tbody td:nth-child(1) {
        width: 58px;
    }

    .table thead th:nth-child(3),
    .table tbody td:nth-child(3) {
        width: 104px;
    }

    .class-name {
        gap: 4px;
        font-size: 0.92rem;
    }

    .status-pill {
        min-height: 24px;
        padding: 3px 7px;
        font-size: 0.72rem;
    }
}

@media (max-width: 420px) {
    .filters,
    .filters .form-control {
        width: 100%;
    }
}
