/* ============================================================================
   appointments.css — booking board, booking form, staff schedule editor,
   bulk-SMS console and delivery logs. Consumes design-system.css tokens.
   Prefix: "apt-".
   ============================================================================ */

/* ================================================================ HERO ==== */
.apt-hero {
    position: relative;
    padding-block: clamp(3rem, 8vw, 5rem);
    overflow: hidden;
    isolation: isolate;
    text-align: center;
}
.apt-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.apt-hero__blob {
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .3;
}
.apt-hero__blob--1 { background: var(--brand); top: -180px; inset-inline-end: -140px; }
.apt-hero__blob--2 { background: var(--accent); bottom: -220px; inset-inline-start: -160px; opacity: .22; }

.apt-hero__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin: .75rem 0 .5rem;
    color: var(--fg);
    font-weight: 800;
    letter-spacing: -0.01em;
}
.apt-hero__lead {
    max-width: 56ch;
    margin-inline: auto;
    color: var(--fg-muted);
    line-height: 1.9;
    text-wrap: pretty;
}
.apt-hero__staff {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

/* =============================================================== BOARD ==== */
.apt-board__legend {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 0 2rem;
    font-size: .85rem;
    color: var(--fg-muted);
}
.apt-legend { display: inline-flex; align-items: center; gap: .4rem; }
.apt-legend i { font-size: .6rem; }
.apt-legend--open  i { color: var(--brand); }
.apt-legend--taken i { color: var(--danger, #dc2626); }
.apt-legend--past  i { color: var(--fg-subtle); }

.apt-days {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.apt-day {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.apt-day__head {
    padding: .9rem 1.1rem;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--brand) 14%, var(--bg-elevated)),
        var(--bg-elevated));
    border-bottom: 1px solid var(--border);
}
.apt-day__name { margin: 0; font-size: 1.05rem; color: var(--fg); font-weight: 700; }

.apt-day__slots {
    list-style: none;
    margin: 0;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex-grow: 1;
}
.apt-day__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.apt-day__date { font-size: .85rem; color: var(--fg-muted); }
.apt-slot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
}
.apt-slot.is-open { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.apt-slot.is-open:hover { background: var(--brand-soft); border-color: var(--brand); }
.apt-slot.is-closed { border-color: color-mix(in srgb, var(--warning) 35%, var(--border)); }
.apt-slot__top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.apt-slot__time { color: var(--fg); font-size: 1.35rem; font-weight: 800; white-space: nowrap; }
.apt-slot__time-label { font-size: .8rem; font-weight: 400; color: var(--fg-muted); }
.apt-slot__doctor { display: flex; align-items: baseline; gap: .5rem; color: var(--fg); font-size: .9rem; line-height: 1.8; overflow-wrap: anywhere; }
.apt-slot__doctor i { color: var(--brand); flex-shrink: 0; }
.apt-slot__cta { justify-content: center; min-height: 44px; width: 100%; }
.apt-slot__state { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: var(--radius-pill); font-size: .75rem; color: var(--fg-muted); background: var(--bg-elevated); }
.apt-slot__state--open { color: var(--brand-strong); background: var(--brand-soft); }
:root[data-theme="dark"] .apt-slot__state--open { color: var(--brand); }
.apt-slot__state--closed { color: var(--fg); background: color-mix(in srgb, var(--warning) 16%, var(--bg-elevated)); }
.apt-slot__state--closed i, .apt-legend--closed i { color: var(--warning); }
.apt-slot__reason { margin: 0; padding-top: .75rem; border-top: 1px dashed var(--border); color: var(--fg-muted); font-size: .85rem; line-height: 1.9; overflow-wrap: anywhere; }

.apt-week-picker { padding: clamp(1rem, 3vw, 1.5rem); margin-bottom: 1.5rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.apt-week-picker__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1rem; }
.apt-week-picker__head h2 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.1rem; color: var(--fg); }
.apt-week-picker__head h2 i { color: var(--brand); }
.apt-week-picker__head p { margin: 0; font-size: .85rem; }
.apt-week-picker__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: .65rem; }
.apt-week-option { display: flex; flex-direction: column; gap: .65rem; padding: .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--fg); background: var(--bg); text-decoration: none; min-width: 0; }
.apt-week-option:hover, .apt-week-option.is-selected { color: var(--fg); border-color: var(--brand); background: var(--brand-soft); }
.apt-week-option.is-selected { box-shadow: inset 0 0 0 1px var(--brand); }
.apt-week-option:focus-visible, .apt-slot__cta:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.apt-week-option__label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .9rem; font-weight: 700; }
.apt-week-option__label i { color: var(--brand); }
.apt-week-option__dates { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; font-size: .75rem; color: var(--fg-muted); }
.apt-week-picker__hint { display: flex; align-items: baseline; gap: .5rem; margin: 1rem 0 0; font-size: .8rem; line-height: 1.9; color: var(--fg-muted); }
.apt-week-picker__hint i { color: var(--brand); }
@media (max-width: 479.98px) {
    .apt-week-picker__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .apt-week-option { padding: .75rem; }
    .apt-days { grid-template-columns: minmax(0, 1fr); }
}

/* ======================================================= BOOKING FORM ==== */
.apt-form-head { text-align: center; margin-bottom: 1.5rem; }
.apt-form-head__title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: .5rem 0 0;
    color: var(--fg);
    font-weight: 800;
}

.apt-chosen {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--brand-soft);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
    border-radius: var(--radius-lg);
}
.apt-chosen__row {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--brand-strong);
    font-weight: 600;
    font-size: .95rem;
}
:root[data-theme="dark"] .apt-chosen__row { color: var(--brand); }

.apt-form-panel,
.apt-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    box-shadow: var(--shadow-sm);
}
.apt-panel__title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 1.25rem;
    padding-bottom: .85rem;
    border-bottom: 1px dashed var(--border);
    font-size: 1.1rem;
    color: var(--fg);
    font-weight: 700;
}
.apt-panel__title i { color: var(--brand); }

.apt-form { display: flex; flex-direction: column; gap: 1rem; }
.apt-form__field { display: flex; flex-direction: column; gap: .4rem; }
.apt-form__field > label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--fg-muted);
}
.apt-form__field .req { color: var(--danger, #dc2626); margin-inline-start: .2rem; }

.apt-form__field input[type="text"],
.apt-form__field input[type="time"],
.apt-form__field input[type="number"],
.apt-form__field select,
.apt-form__field textarea {
    width: 100%;
    padding: .75rem .95rem;
    font: inherit;
    font-size: .95rem;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.apt-form__field input:focus,
.apt-form__field select:focus,
.apt-form__field textarea:focus {
    outline: none;
    color: var(--fg);
    border-color: var(--brand);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.apt-form__field textarea { resize: vertical; line-height: 1.8; }
.apt-form__field select option { background: var(--bg-elevated); color: var(--fg); }
.apt-form__field.has-error input,
.apt-form__field.has-error select,
.apt-form__field.has-error textarea { border-color: var(--danger, #dc2626); }

.apt-form__hint,
.apt-form__note {
    display: inline-flex;
    align-items: flex-start;
    gap: .4rem;
    font-size: .82rem;
    color: var(--fg-subtle);
    margin: 0;
    line-height: 1.7;
}
.apt-form__hint i, .apt-form__note i { color: var(--brand); margin-top: .2rem; }
.apt-form__error {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    font-size: .82rem;
    color: var(--danger, #dc2626);
}
.apt-form__alert {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    background: color-mix(in srgb, var(--danger, #dc2626) 12%, transparent);
    color: var(--danger, #dc2626);
    border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 30%, transparent);
}
.apt-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
    padding-top: .5rem;
}

/* ========================================================= STAFF PAGES ==== */
.apt-page__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px dashed var(--border);
}
.apt-page__title {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .5rem 0 .35rem;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    color: var(--fg);
    font-weight: 800;
}
.apt-page__title i { color: var(--brand); }
.apt-page__lead { margin: 0; color: var(--fg-muted); font-size: .95rem; max-width: 60ch; }
.apt-page__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.apt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 .5rem;
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-radius: var(--radius-pill);
    font-size: .8rem;
    font-weight: 700;
}
:root[data-theme="dark"] .apt-badge { color: var(--brand); }

.apt-manage-grid {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.apt-manage-grid--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }

/* ---- Slot rows (staff) ---- */
.apt-slot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.apt-slot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .8rem 1rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.apt-slot-row.is-inactive { opacity: .6; }
.apt-slot-row__main { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; }
.apt-slot-row__day { font-weight: 700; color: var(--fg); }
.apt-slot-row__time { color: var(--brand-strong); font-weight: 700; }
:root[data-theme="dark"] .apt-slot-row__time { color: var(--brand); }
.apt-slot-row__doctor {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    color: var(--fg-muted);
}
.apt-slot-row__side { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.apt-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .6rem;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    font-weight: 600;
}
.apt-tag--free  { background: var(--brand-soft); color: var(--brand-strong); }
:root[data-theme="dark"] .apt-tag--free { color: var(--brand); }
.apt-tag--taken { background: color-mix(in srgb, var(--danger, #dc2626) 14%, transparent); color: var(--danger, #dc2626); }
.apt-tag--off   { background: var(--bg); color: var(--fg-subtle); }

.apt-icon-btn {
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--fg-muted);
    cursor: pointer;
    font-size: .85rem;
    transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.apt-icon-btn:hover { transform: translateY(-1px); }
.apt-icon-btn--del:hover {
    color: var(--danger, #dc2626);
    border-color: var(--danger, #dc2626);
    background: color-mix(in srgb, var(--danger, #dc2626) 8%, transparent);
}

/* ---- Booking list ---- */
.apt-booking-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.apt-booking {
    display: grid;
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.apt-booking__when {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding-inline-end: 1rem;
    border-inline-end: 1px dashed var(--border);
}
.apt-booking__day { font-weight: 700; color: var(--fg); }
.apt-booking__time { color: var(--brand-strong); font-weight: 700; font-size: 1.1rem; }
:root[data-theme="dark"] .apt-booking__time { color: var(--brand); }
.apt-booking__date { font-size: .78rem; color: var(--fg-subtle); }

.apt-booking__who { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.apt-booking__name { color: var(--fg); font-size: 1rem; }
.apt-booking__meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--fg-muted); }
.apt-booking__meta a { color: var(--fg-muted); text-decoration: none; }
.apt-booking__meta a:hover { color: var(--brand); }
.apt-booking__meta i { color: var(--brand); }
.apt-booking__note {
    margin: .25rem 0 0;
    font-size: .85rem;
    color: var(--fg-muted);
    padding: .5rem .75rem;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
}
.apt-booking__doctor { font-size: .8rem; color: var(--fg-subtle); }
.apt-booking__doctor i { color: var(--brand); }
.apt-cancel-btn:hover { color: var(--danger, #dc2626); border-color: var(--danger, #dc2626); }

/* ============================================================== LOGS ==== */
.apt-log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.apt-log-list--full .apt-log { padding: 1rem 1.25rem; }
.apt-log {
    padding: .75rem .9rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-inline-start: 3px solid var(--fg-subtle);
    border-radius: var(--radius-sm);
}
.apt-log--sent    { border-inline-start-color: var(--brand); }
.apt-log--failed  { border-inline-start-color: var(--danger, #dc2626); }
.apt-log--partial { border-inline-start-color: var(--warning, #f59e0b); }
.apt-log__head {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .35rem;
}
.apt-log__kind { font-weight: 700; color: var(--fg); font-size: .85rem; }
.apt-log__status { font-size: .75rem; color: var(--fg-muted); }
.apt-log__time { margin-inline-start: auto; font-size: .75rem; color: var(--fg-subtle); }
.apt-log__message { margin: 0 0 .35rem; font-size: .85rem; color: var(--fg-muted); line-height: 1.7; }
.apt-log__meta { font-size: .78rem; color: var(--fg-subtle); }
.apt-log__error {
    margin: .4rem 0 0;
    font-size: .78rem;
    color: var(--danger, #dc2626);
}

/* ================================================== SMS GROUP PICKER ==== */
.sms-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: .5rem;
}
.sms-group {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .65rem .8rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.sms-group:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.sms-group input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--brand);
    cursor: pointer;
    flex-shrink: 0;
}
/* :has lets the whole tile reflect the checked state; browsers without it
   simply keep the default look, which is still perfectly usable. */
.sms-group:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
}
.sms-group__body { display: flex; flex-direction: column; min-width: 0; }
.sms-group__name {
    font-size: .88rem;
    color: var(--fg);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================= EMPTY ==== */
.apt-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--fg-muted);
    max-width: 520px;
    margin-inline: auto;
}
/* Direct child only. Unqualified, this also hit the icon inside the button
   below, blowing a 1em glyph up to 2.75rem. */
.apt-empty > i { display: block; font-size: 2.75rem; color: var(--fg-subtle); margin-bottom: 1rem; }
.apt-empty h3 { margin: 0 0 .5rem; color: var(--fg); }
.apt-empty p { margin: 0; }
.apt-empty__actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }
.apt-empty--inline { padding: 2rem 1rem; box-shadow: none; max-width: none; }
.apt-empty--inline > i { font-size: 2rem; }

/* ======================================================== BRANCH SECTIONS ==== */
/*
 * The public board is grouped per practice. Each group is a card so the two
 * cities read as two distinct schedules rather than one long list that
 * happens to change city partway down.
 */
.apt-branch {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.1rem, 2.5vw, 1.75rem);
    margin-bottom: 1.75rem;
}
.apt-branch:last-child { margin-bottom: 0; }

.apt-branch__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px dashed var(--border);
}
.apt-branch__id { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.apt-branch__name {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--fg);
}
.apt-branch__name i { color: var(--brand); font-size: .85em; }
.apt-branch__address {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin: 0;
    font-size: .85rem;
    line-height: 1.7;
    color: var(--fg-muted);
}
.apt-branch__address i { color: var(--brand); font-size: .85em; margin-top: .25rem; }

.apt-branch__side { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.apt-branch__count {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .85rem;
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-radius: var(--radius-pill);
    font-size: .8rem;
    font-weight: 700;
}
:root[data-theme="dark"] .apt-branch__count { color: var(--brand); }
.apt-branch__count.is-zero {
    background: var(--bg-muted);
    color: var(--fg-subtle);
}

.apt-branch__hours {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin: 0 0 1.25rem;
    padding: .7rem 1rem;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    line-height: 1.8;
    color: var(--fg-muted);
}
.apt-branch__hours i { color: var(--brand); margin-top: .25rem; }

/* Branch on the staff slot list + the booking list. */
.apt-slot-row__branch {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .18rem .6rem;
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-radius: var(--radius-pill);
    font-size: .76rem;
    font-weight: 600;
}
:root[data-theme="dark"] .apt-slot-row__branch { color: var(--brand); }
/* A slot with no branch is a real problem — the patient is not told the city
 * — so it is flagged rather than left to look like ordinary metadata. */
.apt-slot-row__branch.is-missing {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--warning);
}

.apt-booking__branch {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: var(--fg-subtle);
}
.apt-booking__branch i { color: var(--brand); }

.apt-chosen__row--branch span { font-weight: 700; }
.apt-chosen__row--address { align-items: flex-start; }

/* ======================================================== RESPONSIVE ==== */
@media (max-width: 991.98px) {
    .apt-manage-grid,
    .apt-manage-grid--wide { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .apt-booking { grid-template-columns: 1fr; gap: .85rem; }
    .apt-booking__when {
        flex-direction: row;
        align-items: baseline;
        gap: .6rem;
        padding-inline-end: 0;
        border-inline-end: 0;
        padding-bottom: .6rem;
        border-bottom: 1px dashed var(--border);
    }
    .apt-booking__side { justify-self: stretch; }
    .apt-booking__side .ds-btn { width: 100%; justify-content: center; }

    .apt-page__head { flex-direction: column; }
    .apt-form__actions { flex-direction: column-reverse; align-items: stretch; }
    .apt-form__actions .ds-btn { width: 100%; justify-content: center; }
}

@media (max-width: 767.98px) {
    .apt-branch__head { flex-direction: column; align-items: stretch; }
    .apt-branch__side { justify-content: flex-start; }
    .apt-branch__side .ds-btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 479.98px) {
    .apt-branch { padding: 1rem .85rem; border-radius: var(--radius-lg); }
    .apt-slot-row__main { gap: .5rem; }
    .apt-slot-row__branch { font-size: .7rem; }
}
