html[dir="rtl"] body {
    direction: rtl;
    text-align: start;
}

.walk-in-intake {
    max-width: 70rem;
}

.intake-progress ol {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .5rem;
    padding: 0;
    list-style: none;
}

.intake-progress li {
    border-bottom: .25rem solid var(--border, #d7dde3);
    padding: .75rem .25rem;
}

.intake-progress li.active {
    border-color: var(--primary, #176b5b);
    font-weight: 700;
}

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

.intake-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

.consent-wording {
    border-inline-start: .3rem solid var(--primary, #176b5b);
    margin-block: 1rem;
    padding-inline-start: 1rem;
}

.queue-token {
    font-size: 1.5rem;
}

@media (max-width: 48rem) {
    .intake-progress ol {
        grid-template-columns: 1fr;
    }

    .intake-progress li:not(.active) {
        display: none;
    }

    .intake-actions .btn {
        flex: 1 1 100%;
    }
}

@media print {
    .walk-in-intake > :not(.confirmation) {
        display: none;
    }
}

html[dir="rtl"] .profile-heading,
html[dir="rtl"] .admin-heading {
    flex-direction: row-reverse;
}

.language-preferences select {
    display: block;
    max-width: 28rem;
    margin-block: .5rem 1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ---------------------------------------------------------------------------
   Shifa design tokens and layout.
   Contrast meets WCAG 2.2 AA and interactive targets are at least 44px
   (BR-S0-06). Layout is mobile-first for low-cost devices (BR-S0-05).
   --------------------------------------------------------------------------- */

:root {
    --teal-700: #0f5f5c;
    --teal-600: #14807c;
    --teal-50: #e8f5f4;
    --ink-900: #16232b;
    --ink-600: #4a5b66;
    --ink-300: #d3dce1;
    --paper: #ffffff;
    --surface: #f6f9fa;
    --danger-700: #9b1c1c;
    --danger-600: #c62828;
    --danger-50: #fdeaea;
    --radius: 10px;
    --tap: 44px;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink-900);
    background: var(--paper);
    line-height: 1.6;
}

.container { width: min(100% - 2rem, 68rem); min-width: 0; margin-inline: auto; }

.section { padding-block: 2rem; }

h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.25; margin-block: 0 .5rem; }
h2 { font-size: clamp(1.2rem, 3.5vw, 1.5rem); margin-block: 2rem .75rem; }

a { color: var(--teal-700); }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--ink-900); color: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--teal-600); outline-offset: 2px; }

/* Header ------------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--ink-300); background: var(--paper); }
.header-inner { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5rem; min-height: var(--tap); font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--teal-700); }
.brand-mark { color: var(--teal-600); }
.site-nav { display: flex; gap: .25rem; margin-inline-start: auto; }
.site-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: .75rem; text-decoration: none; border-radius: var(--radius); }
.site-nav a:hover { background: var(--teal-50); }
.desktop-header-actions { display: flex; align-items: center; gap: 1rem; }
.mobile-menu { display: none; margin-inline-start: auto; }
.mobile-menu summary {
    display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap);
    padding-inline: 1rem; border: 1px solid var(--ink-300); border-radius: var(--radius);
    color: var(--teal-700); background: var(--paper); font-weight: 700; cursor: pointer;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after {
    content: ""; width: .5rem; height: .5rem; margin: -.2rem 0 0 .6rem;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}
.mobile-menu[open] summary::after { margin-top: .2rem; transform: rotate(-135deg); }
.mobile-menu-panel {
    position: absolute; z-index: 200; inset-inline: 1rem; margin-top: .5rem;
    padding: .75rem; border: 1px solid var(--ink-300); border-radius: var(--radius);
    background: var(--paper); box-shadow: 0 12px 28px rgb(15 23 42 / 18%);
}
.mobile-site-nav, .mobile-menu-actions { display: grid; gap: .25rem; }
.mobile-site-nav a {
    display: flex; align-items: center; min-height: var(--tap); padding-inline: .75rem;
    border-radius: var(--radius); text-decoration: none;
}
.mobile-menu-actions {
    margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--ink-300);
}
.mobile-menu-actions .header-action,
.mobile-menu-actions .emergency-link { width: 100%; justify-content: center; }
.emergency-link {
    display: inline-flex; align-items: center; gap: .35rem; min-height: var(--tap);
    padding-inline: .9rem; border-radius: var(--radius); font-weight: 600;
    color: var(--danger-700); background: var(--danger-50); text-decoration: none;
}
.header-action {
    display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: .9rem;
    border: 1px solid var(--ink-300); border-radius: var(--radius); background: var(--paper);
    color: var(--teal-700); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.header-action:hover { background: var(--teal-50); border-color: var(--teal-600); }
.logout-form { margin: 0; }

.site-main,
.site-main :where(header, section, article, aside, nav, form, fieldset, div, dl, ul, ol) {
    min-width: 0;
}

.site-main :where(img, video, canvas, svg) {
    max-width: 100%;
    height: auto;
}

.site-main :where(pre, code, td, th, dd) {
    overflow-wrap: anywhere;
}

@media (max-width: 42rem) {
    .container { width: min(100% - 32px, 68rem); }
    .header-inner { gap: 8px; min-height: 60px; }
    .site-nav, .desktop-header-actions { display: none; }
    .mobile-menu { display: block; min-width: 0; max-width: 100%; }
    .mobile-menu summary { max-width: 100%; padding-inline: 16px; overflow-wrap: anywhere; }
    .mobile-menu-panel { inset-inline: 16px; padding: 12px; }
    .mobile-site-nav a { padding-inline: 12px; overflow-wrap: anywhere; }
    .mobile-menu-actions { margin-top: 12px; padding-top: 12px; }
    .mobile-menu-actions .header-action,
    .mobile-menu-actions .emergency-link { padding-inline: 14px; overflow-wrap: anywhere; }

    .site-main table {
        display: block;
        width: 100%;
        min-width: 100% !important;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        contain: inline-size paint;
    }

    .site-main :where(button, input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea, summary, .btn, .button) {
        min-height: var(--tap);
        min-width: 0;
        max-width: 100%;
    }

    .site-main :where(h1, h2, h3, h4, h5, h6, p, span, a, button, label, legend, dt, dd),
    .site-footer :where(p, span, a, li) {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .site-main :where([class$="-panel"], [class*="-panel "], [class$="-card"], [class*="-card "]) {
        padding-inline: 16px !important;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .site-main :where(.btn, .button, [class$="-action"]) {
        padding-inline: 16px !important;
    }

    .site-main li > a {
        display: flex;
        align-items: center;
        min-height: var(--tap);
    }

    .site-main a {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .site-main .cards h3 a {
        display: flex;
        align-items: center;
        min-height: var(--tap);
    }

    .site-footer li > a {
        display: flex;
        align-items: center;
        min-height: var(--tap);
    }
}

/* Hero -------------------------------------------------------------------- */
.hero { background: var(--teal-50); padding-block: 2.5rem; }
.hero-lead { font-size: 1.1rem; color: var(--ink-600); max-width: 42rem; }
.symptom-search { display: flex; gap: .5rem; flex-wrap: wrap; margin-block: 1.25rem; max-width: 40rem; }
.symptom-search-inline { margin-block: 1rem 2rem; }
.symptom-search-input {
    flex: 1 1 16rem; min-height: var(--tap); padding: .6rem .9rem; font-size: 1rem;
    border: 2px solid var(--ink-300); border-radius: var(--radius); background: #fff;
}
.symptom-search-input:focus { border-color: var(--teal-600); }
.hero-emergency { color: var(--ink-600); }
.hero-alt { color: var(--ink-600); }

/* Registration calls to action, shown only to a signed-out visitor. They wrap rather than
   truncate on a narrow screen, because a clipped label is unusable on a phone. */
.hero-signup {
    display: flex; flex-wrap: wrap; align-items: stretch; gap: .75rem;
    max-width: 36rem; margin-top: 1.5rem;
}
.hero-signup .btn { flex: 1 1 16rem; text-align: center; }

/* Booking: consultation mode and identity ---------------------------------- */
.booking-mode-banner {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem;
    padding: .85rem 1rem; margin: 0 0 1.5rem; max-width: 48rem;
    border: 1px solid var(--ink-300); border-left: 6px solid var(--teal-700);
    border-radius: var(--radius); background: #fff;
}
.booking-mode-online { border-left-color: #1d4ed8; }
.booking-identity {
    padding: .75rem 1rem; margin: 0 0 1.25rem; max-width: 40rem;
    border: 1px solid var(--ink-300); border-radius: var(--radius); background: var(--teal-50);
}
.booking-signin { max-width: 24rem; }

.mode-choice { border: 0; padding: 0; margin: 0 0 1.25rem; }
.mode-choice legend { font-weight: 600; padding: 0; margin-bottom: .5rem; }
.mode-options { display: flex; flex-wrap: wrap; gap: .6rem; }
.mode-option {
    display: flex; flex-direction: column; gap: .1rem;
    min-height: var(--tap); padding: .7rem 1rem; flex: 1 1 13rem;
    border: 2px solid var(--ink-300); border-radius: var(--radius);
    background: #fff; text-decoration: none; color: var(--ink-900);
}
.mode-option:hover { border-color: var(--teal-600); background: var(--teal-50); }
/* Selection is shown by weight and border width, not colour alone. */
.mode-option-selected { border-color: var(--teal-700); border-width: 3px; font-weight: 700; }
.mode-option-title { font-weight: 600; }
.mode-option-note { font-size: .85rem; color: var(--ink-600); }
.provider-symptom-rating {
    margin: .35rem 0 0; max-width: 34rem; line-height: 1.4;
}
.provider-symptom-rating .provider-reviews { display: block; font-size: .875rem; color: var(--ink-600); }
.provider-symptom-rating-none { color: var(--ink-600); font-size: .9rem; }

/* Footer policy links and policy pages ------------------------------------ */
.footer-links ul {
    list-style: none; padding: 0; margin: 0 0 .75rem;
    display: flex; flex-wrap: wrap; gap: .25rem 1.25rem;
}
.footer-links a {
    display: inline-flex; align-items: center; min-height: var(--tap);
    color: var(--ink-600);
}
.policy { max-width: 46rem; }
.policy section { margin-top: 2rem; }
.policy p, .policy li { max-width: 42rem; }
.policy-review {
    padding: .85rem 1rem; background: #fff8e1; border: 1px solid #e0b400;
    border-radius: var(--radius);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: var(--tap); padding-inline: 1.25rem; border: 0; cursor: pointer;
    border-radius: var(--radius); font-size: 1rem; font-weight: 600; text-decoration: none;
    font-family: inherit;
}
.btn:disabled,
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover,
.btn-primary:focus-visible { background: var(--teal-600); color: #fff; }
.btn-primary:active { background: #0a4d4a; color: #fff; }
.btn-secondary {
    background: var(--paper); color: var(--teal-700);
    border: 2px solid var(--teal-700);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--teal-50); color: var(--teal-700);
    border-color: var(--teal-600);
}
.btn-secondary:active {
    background: #d6ecea; color: var(--teal-700);
    border-color: var(--teal-700);
}
.btn-emergency { background: var(--danger-700); color: #fff; }
.btn-large { font-size: 1.15rem; min-height: 56px; padding-inline: 2rem; }

/* Shared provider workflows ------------------------------------------------
   Dense clinical tools use one bounded treatment so controls do not fall
   back to browser defaults and remain usable on narrow screens. */
.provider-workflow {
    --provider-control-width: 36rem;
}
.provider-workflow > section,
.provider-workflow .record-panel,
.provider-workflow .profile-card,
.provider-workflow > form {
    max-width: 52rem; margin-block: 1.5rem; padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--ink-300); border-radius: var(--radius); background: var(--surface);
}
.provider-workflow :where(section, article, form) > :first-child { margin-top: 0; }
.provider-workflow :where(form, .record-panel, .profile-card) {
    display: grid; gap: 1rem;
}
.provider-workflow label {
    display: grid; gap: .35rem; max-width: var(--provider-control-width);
    color: var(--ink-900); font-weight: 600;
}
.provider-workflow :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
    width: 100%; min-height: var(--tap); padding: .6rem .75rem;
    border: 2px solid var(--ink-300); border-radius: var(--radius);
    background: var(--paper); color: var(--ink-900); font: inherit;
}
.provider-workflow textarea { min-height: 7rem; resize: vertical; }
.provider-workflow :where(input, select, textarea):hover:not(:disabled) {
    border-color: var(--teal-600);
}
.provider-workflow :where(input, select, textarea):focus-visible {
    border-color: var(--teal-700); outline: 3px solid color-mix(in srgb, var(--teal-600) 35%, transparent);
    outline-offset: 2px;
}
.provider-workflow :where(input, select, textarea).invalid,
.provider-workflow :where(input, select, textarea)[aria-invalid="true"] {
    border-color: var(--danger-600); outline-color: var(--danger-600);
}
.provider-workflow :where(input, select, textarea).valid.modified {
    border-color: var(--teal-600);
}
.provider-workflow :where(input, select, textarea):disabled,
.provider-workflow .btn:disabled {
    cursor: not-allowed; opacity: .6; background: var(--surface);
}
.provider-workflow :where(input[type="checkbox"], input[type="radio"]) {
    width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--teal-700);
}
.provider-workflow label:has(> input[type="checkbox"]),
.provider-workflow label:has(> input[type="radio"]) {
    min-height: var(--tap); grid-template-columns: 1.25rem minmax(0, 1fr); align-items: center;
}
.provider-workflow fieldset {
    display: grid; gap: .5rem; max-width: var(--provider-control-width);
    margin: 0; padding: 1rem; border: 1px solid var(--ink-300);
    border-radius: var(--radius);
}
.provider-workflow legend { padding-inline: .35rem; font-weight: 700; }
.provider-workflow .card {
    max-width: 52rem; padding: 1rem 1.25rem;
    border: 1px solid var(--ink-300); border-radius: var(--radius); background: var(--paper);
}
.provider-workflow .card:hover { border-color: var(--teal-600); }
.provider-workflow :where(form, section, article) > .btn {
    width: fit-content; max-width: 100%;
}
.provider-workflow [role="status"] {
    max-width: 52rem; padding: .75rem 1rem; border-left: 4px solid #26734d;
    border-radius: var(--radius); background: #e9f7ef; color: #174b34;
}
.provider-workflow [role="alert"] {
    max-width: 52rem; padding: .75rem 1rem; border-left: 4px solid var(--danger-600);
    border-radius: var(--radius); background: var(--danger-50); color: var(--danger-700);
    font-weight: 600;
}
@media (max-width: 42rem) {
    .provider-workflow > section,
    .provider-workflow .record-panel,
    .provider-workflow .profile-card,
    .provider-workflow > form,
    .provider-workflow .card {
        width: 100%; padding-inline: 1rem;
    }
    .provider-workflow .btn { width: 100%; white-space: normal; }
}

/* Accounts and profiles --------------------------------------------------- */
.account-page { display: grid; place-items: start center; }
.account-card {
    width: min(100%, 32rem); padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid var(--ink-300); border-radius: var(--radius); background: var(--surface);
}
.account-card form { margin-top: 1.5rem; }
.eyebrow {
    margin: 0 0 .25rem; color: var(--teal-700); font-size: .85rem;
    font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.profile-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.profile-role {
    display: inline-flex; padding: .35rem .75rem; border-radius: 999px;
    background: var(--teal-50); color: var(--teal-700); font-weight: 700;
}
.profile-page form { max-width: 52rem; }
.profile-section {
    margin-block: 1.5rem; padding: 1.25rem; border: 1px solid var(--ink-300);
    border-radius: var(--radius); background: var(--surface);
}
.profile-section h2 { margin-top: 0; }
.profile-form-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
}
.profile-field-wide { grid-column: 1 / -1; }
.form-success {
    max-width: 52rem; padding: .75rem 1rem; border-left: 4px solid #26734d;
    border-radius: 4px; background: #e9f7ef; color: #174b34;
}

@media (max-width: 42rem) {
    .profile-form-grid { grid-template-columns: 1fr; }
    .profile-field-wide { grid-column: auto; }
    .profile-heading { display: block; }
}

/* Tiles ------------------------------------------------------------------- */
.tile-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.tile {
    display: flex; flex-direction: column; gap: .25rem; height: 100%;
    min-height: var(--tap); padding: .9rem 1rem; text-decoration: none; color: var(--ink-900);
    background: var(--surface); border: 1px solid var(--ink-300); border-radius: var(--radius);
}
.tile:hover { border-color: var(--teal-600); background: var(--teal-50); }
.tile-title { font-weight: 600; }
.tile-note { font-size: .875rem; color: var(--ink-600); }
.tile-flag { font-size: .8rem; font-weight: 600; color: var(--danger-700); }

.symptom-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.symptom-list a { display: block; padding: .9rem 1rem; text-decoration: none; color: var(--ink-900); border: 1px solid var(--ink-300); border-radius: var(--radius); }
.symptom-list a:hover { border-color: var(--teal-600); background: var(--teal-50); }
.symptom-list-name { display: block; font-weight: 600; color: var(--teal-700); }
.symptom-list-desc { display: block; font-size: .9rem; color: var(--ink-600); }

/* Breadcrumb -------------------------------------------------------------- */
.breadcrumb ol { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 1rem; padding: 0; font-size: .9rem; }
.breadcrumb li { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--tap); line-height: 1.25; }
.breadcrumb a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); }
.breadcrumb li + li::before { content: "/"; color: var(--ink-600); line-height: 1; }

/* Symptom page ------------------------------------------------------------ */
.lead { font-size: 1.1rem; color: var(--ink-600); max-width: 48rem; }
.bullet-list { max-width: 48rem; }
.bullet-list li { margin-block: .35rem; }

.red-flags {
    border: 2px solid var(--danger-600); background: var(--danger-50);
    border-radius: var(--radius); padding: 1rem 1.25rem; margin-block: 1.5rem;
}
.red-flags-high { border-width: 3px; }
.red-flags h2 { margin-top: 0; color: var(--danger-700); }
.red-flags-action { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 0; }
.red-flags-phone { color: var(--ink-900); }

.doctor-section { margin-block: 2rem; }
.specialty-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.specialty { display: block; padding: .9rem 1rem; text-decoration: none; color: var(--ink-900); border: 1px solid var(--ink-300); border-radius: var(--radius); }
.specialty:hover { border-color: var(--teal-600); background: var(--teal-50); }
.specialty-name { display: block; font-weight: 600; color: var(--teal-700); }
.specialty-reason { display: block; font-size: .9rem; color: var(--ink-600); }
.not-sure { margin-top: .75rem; }

.faq dt { font-weight: 600; margin-top: 1rem; }
.faq dd { margin: .25rem 0 0; color: var(--ink-600); max-width: 48rem; }

.medical-review {
    margin-block: 2.5rem; padding: 1rem 1.25rem; background: var(--surface);
    border-left: 4px solid var(--teal-600); border-radius: 0 var(--radius) var(--radius) 0;
}
.medical-review p { margin: .25rem 0; font-size: .925rem; }

.empty-state { padding: 1.25rem; background: var(--surface); border-radius: var(--radius); max-width: 40rem; }
.next-actions { margin: .5rem 0 0; padding-inline-start: 1.25rem; }
.next-actions li { margin-block: .35rem; }

/* Emergency page ---------------------------------------------------------- */
.emergency-page h1 { color: var(--danger-700); }
.emergency-lead { font-size: 1.15rem; max-width: 46rem; }
.emergency-call { margin-block: 1.5rem; }

/* Footer ------------------------------------------------------------------ */
.site-footer { margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid var(--ink-300); background: var(--surface); }
.disclaimer { font-size: .875rem; color: var(--ink-600); max-width: 52rem; }
.copyright { font-size: .875rem; color: var(--ink-600); }

/* Directory, profile and booking ------------------------------------------ */
.filters { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; padding: 1rem; background: var(--surface); border-radius: var(--radius); margin-block: 1rem 1.5rem; }
.field { display: flex; flex-direction: column; gap: .25rem; }
.field label { font-weight: 600; font-size: .9rem; }
.field-hint { font-size: .85rem; color: var(--ink-600); margin: .15rem 0 0; }
.filters select, .input {
    min-height: var(--tap); padding: .5rem .75rem; font-size: 1rem;
    border: 2px solid var(--ink-300); border-radius: var(--radius); background: #fff; color: var(--ink-900);
    font-family: inherit;
}
.input { width: 100%; max-width: 28rem; min-width: 0; }
.input-narrow { max-width: 8rem; }
.filters select:focus, .input:focus { border-color: var(--teal-600); }
.input:hover:not(:disabled) { border-color: var(--ink-600); }
.input:disabled { color: var(--ink-600); background: var(--surface); cursor: not-allowed; }
.input.invalid,
.input:user-invalid { border-color: var(--danger-600); }
.input.valid.modified { border-color: var(--teal-600); }
.form-stack { display: grid; gap: 1rem; width: min(100%, 36rem); }
.form-stack fieldset { min-width: 0; }
.action-group { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.choice-group {
    display: grid; gap: .25rem; margin: 0; padding: 1rem;
    border: 1px solid var(--ink-300); border-radius: var(--radius);
}
.choice-field {
    display: flex; align-items: center; gap: .75rem; min-height: var(--tap);
    padding: .25rem .5rem; border-radius: var(--radius); cursor: pointer;
}
.choice-field:hover { background: var(--teal-50); }
.choice-input {
    width: 1.35rem; height: 1.35rem; margin: 0; flex: 0 0 auto;
    accent-color: var(--teal-700);
}
.choice-input:disabled { cursor: not-allowed; opacity: .6; }

@media (max-width: 30rem) {
    .action-group > .btn { flex: 1 1 100%; }
}

.provider-list, .appointment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.provider-card {
    display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between;
    padding: 1rem 1.25rem; border: 1px solid var(--ink-300); border-radius: var(--radius); background: #fff;
}
.provider-card:hover { border-color: var(--teal-600); }
.provider-main { flex: 1 1 22rem; }
.provider-name { margin: 0 0 .25rem; font-size: 1.15rem; }
.provider-name a { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: none; }
.provider-meta { margin: .15rem 0; font-size: .9rem; color: var(--ink-600); }
.provider-modes { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0 0; }
.chip { display: inline-block; padding: .2rem .6rem; font-size: .8rem; border-radius: 999px; background: var(--teal-50); color: var(--teal-700); }
.chip-verified { background: #e7f5ec; color: #1b5e34; font-weight: 600; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .5rem 0 0; }

.provider-booking { flex: 0 0 13rem; text-align: right; display: flex; flex-direction: column; gap: .35rem; align-items: flex-end; }
.provider-fee { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--ink-900); }
.provider-rating { margin: 0; font-size: .9rem; }
.provider-reviews { color: var(--ink-600); }
.provider-soonest { margin: 0; font-size: .9rem; color: var(--teal-700); font-weight: 600; }
.provider-none { color: var(--ink-600); font-weight: 400; }

.profile-head { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
.profile-fee-box { flex: 0 0 14rem; padding: 1rem; background: var(--surface); border-radius: var(--radius); text-align: center; }
.profile-fee-box .btn { width: 100%; margin-top: .5rem; }
.bio { max-width: 48rem; }

.date-strip { display: flex; gap: .5rem; overflow-x: auto; padding-block: .5rem; margin-block: 1rem; }
.date-chip {
    flex: 0 0 auto; min-height: var(--tap); display: inline-flex; align-items: center;
    padding-inline: 1rem; border: 2px solid var(--ink-300); border-radius: var(--radius);
    text-decoration: none; color: var(--ink-900); background: #fff; white-space: nowrap;
}
.date-chip-selected { border-color: var(--teal-700); background: var(--teal-50); font-weight: 700; }

.slot-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.slot {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
    min-height: 56px; padding: .5rem; text-decoration: none; color: var(--ink-900);
    border: 2px solid var(--teal-600); border-radius: var(--radius); background: #fff; font-weight: 600;
}
.slot:hover { background: var(--teal-700); color: #fff; }
.slot-mode { font-size: .75rem; font-weight: 400; }
.slot-online { border-style: dashed; }

.booking-layout { display: flex; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.booking-form { flex: 1 1 24rem; }
.booking-form .field { margin-block: 1rem; }
.booking-summary { flex: 0 1 20rem; padding: 1.25rem; background: var(--surface); border-radius: var(--radius); }
.booking-summary h2 { margin-top: 0; }
.booking-summary dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-600); margin-top: .75rem; }
.booking-summary dd { margin: .15rem 0 0; }
.summary-fee { font-size: 1.15rem; font-weight: 700; }
.hold-note { margin-top: 1rem; font-size: .85rem; color: var(--ink-600); }
.pay-note { padding: .75rem 1rem; background: var(--teal-50); border-radius: var(--radius); font-size: .92rem; }
.muted { color: var(--ink-600); font-size: .9rem; }

.form-error,
.validation-summary {
    padding: .75rem 1rem; background: var(--danger-50); border-left: 4px solid var(--danger-600);
    color: var(--danger-700); font-weight: 600;
}
.validation-summary:empty { display: none; }
.validation-summary ul { margin-block: 0; padding-inline-start: 1.25rem; }
.validation-message { color: var(--danger-700); font-size: .875rem; }

.notice { padding: 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.notice h1 { margin-top: 0; }
.notice-confirmed { background: #e7f5ec; border: 2px solid #1b5e34; }
.notice-cancelled { background: var(--surface); border: 2px solid var(--ink-300); }
.reference { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.2rem; letter-spacing: .06em; }

.appointment-detail dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-600); margin-top: .85rem; }
.appointment-detail dd { margin: .2rem 0 0; }

.appointment-row { display: grid; gap: .2rem; padding: 1rem 1.25rem; border: 1px solid var(--ink-300); border-radius: var(--radius); text-decoration: none; color: var(--ink-900); }
.appointment-row:hover { border-color: var(--teal-600); background: var(--teal-50); }
.appointment-when { font-weight: 700; color: var(--teal-700); }
.appointment-who { font-size: .95rem; }
.appointment-status { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.status-confirmed { color: #1b5e34; }
.status-cancelled { color: var(--danger-700); }

.btn-danger { background: #fff; color: var(--danger-700); border: 2px solid var(--danger-700); }
.btn-danger:hover { background: var(--danger-50); }
.lookup-form { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin-block: 1rem 2rem; }

@media (max-width: 40rem) {
    .provider-booking { flex: 1 1 100%; text-align: left; align-items: flex-start; }
    .profile-fee-box { flex: 1 1 100%; }
}

/* Body map --------------------------------------------------------------- */
.bodymap-who { margin: 0 0 1.5rem; }
.bodymap-who fieldset { border: 0; padding: 0; margin: 0; }
.bodymap-who legend { font-weight: 600; padding: 0; margin-bottom: .5rem; }
.bodymap-who-fields { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.bodymap-who-fields select {
    min-height: var(--tap); padding: .5rem .75rem; font-size: 1rem;
}
.bodymap-layout {
    display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr;
    gap: 2rem; align-items: start;
}
.bodymap-views { display: flex; gap: .5rem; margin-bottom: 1rem; }
.bodymap-views .is-current { background: var(--teal-700); color: #fff; }
.bodymap-svg { width: 100%; max-width: 20rem; height: auto; }
.bodymap-body rect,
.bodymap-body ellipse { fill: #dbeafe; stroke: #64748b; stroke-width: 1.5; }
.bodymap-hotspot rect {
    fill: transparent; stroke: #64748b; stroke-width: 1.5; stroke-dasharray: 4 3;
}
.bodymap-hotspot:hover rect,
.bodymap-hotspot[aria-current="true"] rect,
.bodymap-hotspot:focus rect,
.bodymap-hotspot:focus-visible rect {
    fill: rgba(13, 148, 136, .28); stroke: var(--teal-700);
    stroke-width: 3; stroke-dasharray: none; outline: none;
}
.bodymap-regions {
    list-style: none; padding: 0; margin: 0 0 1.25rem;
    display: grid; gap: .4rem;
}
.bodymap-regions a {
    display: flex; align-items: center; min-height: var(--tap); padding: .5rem .85rem;
    border: 2px solid #cbd5e1; border-radius: .5rem; background: #fff;
    text-decoration: none; color: var(--ink-900);
}
.bodymap-regions a:hover { border-color: var(--teal-700); background: var(--teal-50); }
.bodymap-regions a[aria-current="true"] {
    border-color: var(--teal-700); border-left-width: 6px; font-weight: 700;
}
.bodymap-whole { width: 100%; justify-content: center; }
.bodymap-results { margin-top: 2rem; }
.tile-secondary {
    display: inline-flex; align-items: center; min-height: var(--tap);
    padding: 0 .85rem; font-size: .9rem;
}

@media (max-width: 40rem) {
    .bodymap-layout { grid-template-columns: 1fr; }
}

/* Provider schedule ------------------------------------------------------- */
.schedule-summary { color: var(--ink-600); font-weight: 600; }
.schedule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.schedule-row {
    display: grid; gap: .5rem 1rem; align-items: start;
    grid-template-columns: 6rem 1fr auto; grid-template-areas: "time patient meta" "ref ref ref";
    padding: .9rem 1rem; border: 1px solid var(--ink-300); border-radius: var(--radius); background: #fff;
}
.schedule-cancelled { opacity: .6; border-style: dashed; }
.schedule-time { grid-area: time; font-weight: 700; color: var(--teal-700); }
.schedule-patient { grid-area: patient; display: grid; gap: .15rem; }
.schedule-reason { font-size: .9rem; color: var(--ink-600); }
.schedule-meta { grid-area: meta; display: flex; gap: .35rem; flex-wrap: wrap; }
.schedule-ref { grid-area: ref; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--ink-600); }
.chip-pay { background: #eef4ff; color: #1c3f94; }
.chip-cancelled { background: var(--danger-50); color: var(--danger-700); }

@media (max-width: 40rem) {
    .schedule-row { grid-template-columns: 1fr; grid-template-areas: "time" "patient" "meta" "ref"; }
}

/* Triage ------------------------------------------------------------------ */
.triage-cta { padding: 1.25rem; background: var(--teal-50); border-radius: var(--radius); margin-block: 1.5rem; }
.triage-cta h2 { margin-top: 0; }
.triage-question { padding: 1.25rem; border: 1px solid var(--ink-300); border-radius: var(--radius); margin-block: 1rem; background: #fff; }
.triage-progress { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-600); margin: 0; }
.triage-options { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.btn-option {
    width: 100%; justify-content: flex-start; text-align: left; background: #fff;
    border: 2px solid var(--teal-600); color: var(--ink-900); padding-inline: 1rem;
}
.btn-option:hover { background: var(--teal-700); color: #fff; }
.triage-exit { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; font-size: .95rem; }
.triage-exit form { display: inline; }
.triage-exit button { background: none; border: 0; padding: 0; color: var(--teal-700); cursor: pointer; font: inherit; text-decoration: underline; }

.triage-outcome { padding: 1.25rem; border-radius: var(--radius); margin-block: 1rem; border-left: 5px solid var(--teal-600); background: var(--surface); }
.triage-urgent24h { border-left-color: #b45309; background: #fff7ed; }
.triage-routine { border-left-color: var(--teal-600); }
.triage-selfcare { border-left-color: #1b5e34; background: #e7f5ec; }

.emergency-interrupt {
    padding: 1.5rem; border: 3px solid var(--danger-600); background: var(--danger-50);
    border-radius: var(--radius);
}
.emergency-interrupt h1 { margin-top: 0; color: var(--danger-700); }

/* Payment ----------------------------------------------------------------- */
/* A different component from the site-wide synthetic-data banner, which is white on dark brown.
   Sharing that class left white text on cream at a contrast ratio of 1.06:1, so the notice was
   effectively invisible wherever it appeared. */
.notice-banner {
    padding: .85rem 1rem; background: #fff8e1; border: 1px solid #e0b400;
    border-radius: var(--radius); max-width: 48rem; color: var(--ink-900);
}
.method-set { border: 0; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .5rem; }
.method-option {
    display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem; align-items: center;
    padding: .9rem 1rem; border: 2px solid var(--ink-300); border-radius: var(--radius);
    cursor: pointer; background: #fff;
}
.method-option:hover { border-color: var(--teal-600); background: var(--teal-50); }
.method-option:focus-within {
    outline: 3px solid var(--teal-600); outline-offset: 2px;
}
.method-option-selected {
    border-color: var(--teal-700); border-width: 3px; font-weight: 700;
}
.method-name { font-weight: 600; }
.method-note { grid-column: 2; font-size: .875rem; color: var(--ink-600); }
.btn-pay { margin-top: .4rem; margin-inline-end: .5rem; }

/* Reviews ----------------------------------------------------------------- */
.rating-set { border: 0; padding: 0; margin: 0 0 1.5rem; }
.rating-set legend { font-weight: 600; margin-bottom: .5rem; padding: 0; }
.rating-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.rating-option {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .6rem .85rem; border: 2px solid var(--ink-300); border-radius: var(--radius);
    cursor: pointer; background: #fff;
}
.rating-option:hover { border-color: var(--teal-600); background: var(--teal-50); }
.checkbox-field {
    display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 1.5rem; max-width: 40rem;
}

/* Attendance actions on the clinician's schedule ------------------------- */
.btn-attend {
    background: #fff; color: var(--teal-700); border: 2px solid var(--teal-700);
    font-size: .9rem; padding-inline: .9rem;
}
.btn-attend:hover { background: var(--teal-50); }
.btn-noshow { font-size: .9rem; padding-inline: .9rem; }

/* Cross-vertical links ---------------------------------------------------- */
.related { margin-block: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--ink-300); }
.related h3 { font-size: 1rem; margin-block: 1rem .5rem; }
.chip-link { text-decoration: none; }
.chip-link:hover { background: var(--teal-700); color: #fff; }

/* BR-S5-01 teleconsultation room */
.video-room {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.video-room .room-status {
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: #eef2f7;
    font-size: 0.9375rem;
}

.video-room .room-status[data-tone="warn"] {
    background: #fdf3e2;
}

.video-room .room-status[data-tone="error"] {
    background: #fdeaea;
}

.video-stage {
    position: relative;
    background: #10151c;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.video-stage .remote-media,
.video-stage .remote-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-stage .local-media {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    width: 28%;
    max-width: 10rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.35);
}

.video-stage .local-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
}

.room-controls {
    flex-wrap: wrap;
}

/* Shared admin presentation must stay global; CSS isolation would scope it to one page. */
.admin-card,
.admin-tile {
    border: 1px solid #cbd5e1;
    border-radius: .85rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
}

.admin-grid h2 {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.admin-tile {
    min-height: 44px;
    color: #0f172a;
    text-decoration: none;
    display: grid;
    gap: .35rem;
}

.admin-tile small {
    color: #475569;
}

.admin-tile:focus-visible,
.admin-links a:focus-visible {
    outline: 3px solid #0f766e;
    outline-offset: 3px;
}

.admin-tile:hover {
    border-color: #0f766e;
    background: #f0fdfa;
}

.admin-tile strong {
    font-size: 2rem;
}

.admin-links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: .6rem;
    padding-left: 0;
    margin: 0;
}

.admin-links a {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-height: 44px;
    padding: .7rem .9rem;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #0f766e;
    border-radius: .5rem;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
}

.admin-links a:hover {
    background: #f0fdfa;
    border-color: #0f766e;
}

.admin-page {
    display: grid;
    gap: 1.5rem;
}

/* Dense administration editors share the public Shifa form primitives. */
.admin-page .admin-card { min-width: 0; }
.admin-page .admin-form {
    display: grid;
    gap: 1rem;
}
.admin-page .admin-form + .admin-form { margin-top: 1.5rem; }
.admin-page .admin-form label {
    display: grid;
    gap: .35rem;
    min-width: 0;
    color: var(--ink-900);
    font-weight: 600;
}
.admin-page .admin-form .input {
    width: 100%;
    max-width: none;
    appearance: none;
    font: inherit;
}
.admin-page .admin-form select.input {
    padding-inline-end: 2.5rem;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--teal-700) 50%),
        linear-gradient(135deg, var(--teal-700) 50%, transparent 50%);
    background-position:
        calc(100% - 1.15rem) 50%,
        calc(100% - .8rem) 50%;
    background-size: .4rem .4rem, .4rem .4rem;
    background-repeat: no-repeat;
}
.admin-page .admin-form textarea.input {
    min-height: 7rem;
    resize: vertical;
}
.admin-page .admin-form .input:focus-visible {
    border-color: var(--teal-700);
}
.admin-page .admin-form .input[readonly] {
    color: var(--ink-600);
    background: var(--surface);
}
.admin-page .admin-form .admin-checkbox {
    width: var(--tap);
    height: var(--tap);
    margin: 0;
    appearance: none;
    border: 2px solid var(--ink-300);
    border-radius: var(--radius);
    background: var(--paper) center / 1.4rem no-repeat;
}
.admin-page .admin-form .admin-checkbox:hover:not(:disabled) { border-color: var(--teal-600); }
.admin-page .admin-form .admin-checkbox:checked {
    border-color: var(--teal-700);
    background-color: var(--teal-700);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='white' stroke-width='3' d='m4 10 4 4 8-9'/%3E%3C/svg%3E");
}
.admin-page .admin-form .admin-checkbox:disabled {
    opacity: .55;
    cursor: not-allowed;
    background-color: var(--surface);
}
.admin-page .admin-form label:has(> .admin-checkbox) {
    display: flex;
    align-items: center;
    min-height: var(--tap);
}
.admin-page input[type="checkbox"]:not(.admin-checkbox),
.admin-page input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    justify-self: start;
    margin: 0;
    accent-color: var(--teal-700);
}
.admin-page .admin-record {
    margin-block: 1rem;
    background: var(--surface);
}
.admin-page :where(td, .admin-form, .admin-heading) > .btn {
    margin: .25rem .25rem .25rem 0;
}
.admin-page > [role="status"] {
    padding: .75rem 1rem;
    border-left: 4px solid #26734d;
    border-radius: var(--radius);
    background: #e9f7ef;
    color: #174b34;
}
.admin-page > [role="alert"] {
    padding: .75rem 1rem;
    border-left: 4px solid var(--danger-600);
    border-radius: var(--radius);
    background: var(--danger-50);
    color: var(--danger-700);
    font-weight: 600;
}

.admin-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.admin-actor {
    color: #475569;
}

.admin-denied {
    border-left: 6px solid #b91c1c;
}

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

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

.admin-table th,
.admin-table td {
    padding: .75rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

@media (max-width: 42rem) {
    .admin-heading {
        display: grid;
    }

    .admin-page .profile-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-page .btn {
        max-width: 100%;
        white-space: normal;
    }
}

@media (max-width: 30rem) {
    .admin-page .admin-form > .btn,
    .admin-page .admin-heading .btn {
        width: 100%;
    }
}

.admin-link-title {
    font-weight: 600;
}

.admin-link-note {
    font-size: .85rem;
    color: #475569;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
}

.admin-stats div {
    border-left: 4px solid #0f766e;
    padding-left: .75rem;
}

.admin-stats dt {
    font-weight: 700;
}

.admin-stats dd {
    margin: .25rem 0 0;
    font-size: 1.4rem;
}

@media (max-width: 40rem) {
    .video-stage {
        aspect-ratio: 3 / 4;
    }

    .video-stage .local-media {
        width: 34%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .video-stage,
    .video-stage video {
        transition: none;
    }
}
/* Safety-critical directory warnings must also style nested and interruption components. */
.directory-warning {
    background: #fff7ed;
    border: 3px solid #c2410c;
    border-radius: .5rem;
    color: #7c2d12;
    font-weight: 700;
    padding: 1rem;
}

.department-card {
    border: 1px solid #cbd5e1;
    border-radius: .75rem;
    margin: .75rem 0;
    overflow-wrap: anywhere;
    padding: 1rem;
}

.department-card h4 {
    margin-top: 0;
}

.department-card.department-stale {
    border-color: #c2410c;
}

.triage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
}

.triage-safety {
    background: #fff7ed;
    border: .25rem solid #9a3412;
    border-radius: .75rem;
    color: #431407;
    margin-block: 1rem;
    padding: 1rem;
}

.triage-safety label,
.red-flag-decisions label {
    display: block;
    margin-block: .5rem;
}

.triage-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    border-top: .2rem solid #0f766e;
    box-shadow: 0 -.3rem .8rem rgb(15 23 42 / 12%);
    padding: 1rem;
}

@media (max-width: 48rem) {
    .triage-grid {
        grid-template-columns: 1fr;
    }

    .walk-in-triage .btn {
        min-height: 3rem;
        width: 100%;
    }
}

@media (prefers-contrast: more) {
    .triage-safety,
    .triage-actions {
        border-color: currentColor;
        box-shadow: none;
    }
}
