:root {
    color-scheme: light;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f5f6f8;
    color: #20242b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(
            180deg,
            #eef3f6 0,
            #f7f8fa 260px,
            #f7f8fa 100%
        );
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    width: min(100% - 32px, 720px);
    margin: 0 auto;
    padding: 48px 0 80px;
}

.page-header {
    margin-bottom: 30px;
}

.eyebrow,
.section-label {
    margin: 0 0 7px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5f6c78;
}

h1,
h2 {
    margin: 0;
    line-height: 1.15;
    color: #17202a;
}

h1 {
    font-size: clamp(2rem, 8vw, 3.2rem);
    letter-spacing: -0.04em;
}

h2 {
    font-size: 1.3rem;
}

.intro {
    max-width: 560px;
    margin: 14px 0 0;
    color: #59636e;
    line-height: 1.6;
}

.panel {
    margin-top: 18px;
    padding: 24px;
    border: 1px solid #dde2e7;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 12px 35px rgba(24, 36, 48, 0.06);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.today-date {
    margin: 0;
    color: #69737e;
    font-size: 0.9rem;
    text-align: right;
}

.loading-message,
.empty-message,
.closed-session-message {
    padding: 18px;
    border-radius: 12px;
    background: #f4f6f8;
    color: #59636e;
    line-height: 1.5;
}

.session-list {
    display: grid;
    gap: 12px;
}

.session-card {
    width: 100%;
    padding: 18px;
    border: 1px solid #d9dfe5;
    border-radius: 14px;
    background: #fff;
    text-align: left;
    color: inherit;
}

.session-card:hover {
    border-color: #98a9b8;
}

.session-card[aria-pressed="true"] {
    border-color: #263b4a;
    box-shadow: 0 0 0 1px #263b4a;
}

.session-card-heading {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.session-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.session-card p {
    margin: 7px 0 0;
    color: #69737e;
}

.state-label {
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 700;
    color: #55626d;
}

.state-label.open {
    color: #226d49;
}

.state-label.closed,
.state-label.fully_booked {
    color: #9a3f35;
}

.selected-session,
.chosen-token {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 13px;
    background: #f2f5f7;
    line-height: 1.55;
}

.selected-session strong,
.chosen-token strong {
    color: #17202a;
}

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 50px;
    padding: 13px 18px;
    border-radius: 12px;
    font-weight: 700;
}

.primary-button {
    border: 1px solid #243845;
    background: #243845;
    color: #fff;
}

.primary-button:hover {
    background: #192b36;
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.secondary-button {
    border: 1px solid #cfd7de;
    background: #fff;
    color: #243845;
}

.plain-text-action {
    display: block;
    margin: 17px auto 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #343b42;
    font-weight: 400;
    text-align: center;
    box-shadow: none;
    appearance: none;
}

.plain-text-action:hover {
    color: #111820;
}

.plain-text-action:focus-visible {
    outline: 1px dotted #343b42;
    outline-offset: 4px;
}

.preferred-time-area {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.preferred-time-area label,
.form-field label,
fieldset legend {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 700;
}

select,
input[type="text"],
input[type="tel"] {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #cfd6dc;
    border-radius: 10px;
    background: #fff;
    color: #20242b;
}

select:focus,
input:focus {
    border-color: #526c7d;
    outline: 3px solid rgba(82, 108, 125, 0.14);
}

.preferred-time-area .secondary-button {
    margin-top: 12px;
}

fieldset {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.patient-count-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.radio-option {
    position: relative;
}

.radio-option input {
    position: absolute;
    opacity: 0;
}

.radio-option span {
    display: block;
    padding: 13px 16px;
    border: 1px solid #d1d8de;
    border-radius: 10px;
    text-align: center;
}

.radio-option input:checked + span {
    border-color: #243845;
    background: #edf2f5;
    box-shadow: 0 0 0 1px #243845;
    font-weight: 700;
}

.form-field {
    margin-bottom: 18px;
}

.form-error,
.status-message {
    padding: 14px 16px;
    border-radius: 11px;
    line-height: 1.45;
}

.form-error {
    margin: 0 0 16px;
    background: #fff0ee;
    color: #943e34;
}

.status-message {
    margin-bottom: 18px;
    background: #fff0ee;
    color: #943e34;
}

.confirmation-panel {
    text-align: center;
}

.confirmation-mark {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: #e5f4eb;
    color: #237246;
    font-size: 1.5rem;
    font-weight: 800;
}

.confirmation-details {
    margin: 22px 0;
    padding: 18px;
    border-radius: 13px;
    background: #f3f6f7;
    line-height: 1.65;
}

.confirmation-details strong {
    font-size: 1.08rem;
}

.arrival-note {
    margin: 0 0 22px;
    color: #616c76;
}

[hidden] {
    display: none !important;
}

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

    .panel {
        padding: 19px;
        border-radius: 15px;
    }

    .section-heading {
        display: block;
    }

    .today-date {
        margin-top: 8px;
        text-align: left;
    }

    .session-card-heading {
        display: block;
    }

    .state-label {
        display: inline-block;
        margin-top: 8px;
    }
}
