h1:focus { outline: none; }

:root {
    --bg: #081018;
    --panel: rgba(14, 26, 41, 0.88);
    --line: rgba(255, 255, 255, 0.08);
    --text: #f4efe7;
    --muted: #97a9ba;
    --accent: #d56b43;
    --accent-soft: #ffbf8f;
}

/* Anonymous patient-direct video */
.patient-video-layout,
.patient-video-page,
.patient-video-stage {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    margin: 0;
    background: #02070d;
}

.patient-video-layout {
    position: fixed;
    inset: 0;
    z-index: 2000;
    overflow: hidden;
    color: #f6f8fb;
}

.patient-video-page,
.patient-video-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.patient-video-stage:fullscreen,
.patient-video-stage:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    background: #02070d;
}

.patient-video-remote,
.patient-video-local {
    display: block;
    margin: 0;
    border: 0;
    background: #02070d;
    object-fit: cover;
}

.patient-video-remote {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    border-radius: 0;
}

.patient-video-remote-waiting {
    opacity: 0;
    pointer-events: none;
}

.patient-video-remote-active {
    opacity: 1;
}

.patient-video-local-pip {
    position: absolute;
    right: max(0.8rem, env(safe-area-inset-right));
    top: auto;
    bottom: max(0.8rem, env(safe-area-inset-bottom));
    z-index: 3;
    width: clamp(120px, 25vw, 280px);
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.85rem;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.patient-video-local-primary {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: 0;
    border-radius: 0;
}

.patient-video-controls {
    position: absolute;
    left: max(0.8rem, env(safe-area-inset-left));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 5;
    display: flex;
    gap: 0.65rem;
    transform: none;
}

.patient-video-waiting {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    pointer-events: none;
}

.patient-video-waiting-card {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(5, 12, 21, 0.82);
    color: #fff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.patient-video-waiting-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #54d88a;
    box-shadow: 0 0 0 0 rgba(84, 216, 138, 0.5);
    animation: patientVideoWaitingPulse 1.8s ease-out infinite;
}

.patient-video-control,
.patient-video-enter {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(5, 12, 21, 0.78);
    color: #fff;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.patient-video-control {
    min-width: 7.5rem;
    min-height: 3rem;
    padding: 0.7rem 1rem;
}

.patient-video-control:disabled {
    cursor: default;
    opacity: 0.48;
}

.patient-video-gate {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
    background: rgba(2, 7, 13, 0.94);
}

.patient-video-gate-card {
    display: grid;
    justify-items: center;
    gap: 1rem;
    width: min(100%, 28rem);
    text-align: center;
}

.patient-video-gate-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

.patient-video-enter {
    min-width: min(18rem, 82vw);
    min-height: 4rem;
    padding: 0.9rem 1.4rem;
    border-color: rgba(84, 216, 138, 0.6);
    background: #2fbd70;
    color: #03130a;
    font-size: 1.08rem;
    box-shadow: 0 16px 44px rgba(47, 189, 112, 0.24);
}

.patient-video-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #54d88a;
    border-radius: 50%;
    animation: patientVideoSpin 0.85s linear infinite;
}

@keyframes patientVideoSpin {
    to { transform: rotate(360deg); }
}

@keyframes patientVideoWaitingPulse {
    70% { box-shadow: 0 0 0 0.55rem rgba(84, 216, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(84, 216, 138, 0); }
}

@media (max-width: 600px) {
    .patient-video-local-pip {
        width: clamp(100px, 30vw, 150px);
        border-radius: 0.7rem;
    }

    .patient-video-controls {
        gap: 0.45rem;
    }

    .patient-video-control {
        min-width: 0;
        min-height: 2.8rem;
        padding: 0.65rem 0.9rem;
        font-size: 0.86rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .patient-video-spinner,
    .patient-video-waiting-dot {
        animation: none;
    }
}

html, body {
    background:
        radial-gradient(circle at top left, rgba(213, 107, 67, 0.25), transparent 25%),
        radial-gradient(circle at top right, rgba(54, 88, 134, 0.25), transparent 30%),
        linear-gradient(180deg, #081018, #0f1d2d 70%);
    color: var(--text);
    font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
    min-height: 100%;
}

body { margin: 0; }
.app-shell {
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(8, 15, 24, 0.92);
    backdrop-filter: blur(20px);
    transition: transform 180ms ease, opacity 180ms ease;
    will-change: transform;
}

.topnav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.topnav a,
.brand {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.brand-copy,
.session-box span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.session-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-shell {
    padding: 1.5rem;
}

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .session-box {
        width: 100%;
        justify-content: space-between;
    }
}

.topbar.clinical-auto-hide-topbar {
    position: fixed;
    left: 0;
    right: 0;
    transform: translateY(calc(-100% + 0.35rem));
    opacity: 0.16;
}

body.clinical-nav-autohide.clinical-nav-visible .topbar.clinical-auto-hide-topbar,
body.clinical-nav-visible .topbar.clinical-auto-hide-topbar,
.topbar.clinical-auto-hide-topbar:hover,
.topbar.clinical-auto-hide-topbar:focus-within {
    transform: translateY(0);
    opacity: 1;
}

body.clinical-nav-autohide .page-shell,
.app-shell:has(.clinical-auto-hide-topbar) .page-shell {
    padding-top: 0.75rem;
}

a { color: var(--accent-soft); }
.btn { border: 0; border-radius: 999px; padding: 0.8rem 1.2rem; font-weight: 600; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, #d56b43, #f08f61); color: #180f0a; }
.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text); border: 1px solid var(--line); }
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.danger-btn { background: linear-gradient(135deg, #c55050, #ea7a6d); color: #fff5f2; }
.wide { width: 100%; }
.landing-shell, .portal-head, .incident-grid, .management-grid, .stats-grid, .portal-grid { display: grid; gap: 1rem; }
.hero-card, .portal-card, .workspace-card, .video-card, .stat-card, .empty-state {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 1.5rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}
.hero-card { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 1.5rem; padding: 1.5rem; }
.hero-copy h1, .portal-head h1 { margin: 0.25rem 0 0.75rem; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.02; max-width: 14ch; }
.hero-panel, .portal-card, .workspace-card, .video-card, .stat-card, .empty-state { padding: 1.2rem; }
.hero-badges, .action-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.hero-badges span, .status-pill { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); color: var(--text); padding: 0.45rem 0.75rem; border-radius: 999px; font-size: 0.9rem; }

.page-shell:has(.er-ally-landing) {
    padding: 0;
}

.er-ally-landing {
    --er-navy: #06163d;
    --er-blue: #0959c9;
    --er-red: #c90d12;
    --er-green: #087130;
    --er-ink-soft: #4b5e78;
    --er-line: #d7e2ef;
    min-height: 100svh;
    display: grid;
    gap: 0;
    background: #f7f9fc;
    color: var(--er-navy);
}

.er-ally-landing .eyebrow {
    color: var(--er-blue);
}

.er-ally-hero {
    min-height: clamp(420px, 62svh, 620px);
    border-bottom: 1px solid rgba(6, 22, 61, 0.12);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 38%, rgba(255, 255, 255, 0.34) 68%, rgba(255, 255, 255, 0.12) 100%),
        linear-gradient(180deg, rgba(6, 22, 61, 0.02), rgba(6, 22, 61, 0.32)),
        url("/images/er-ally-care-scene.jpg");
    background-position: center bottom;
    background-size: cover;
}

.er-ally-hero-content,
.er-location-section,
.er-presentation,
.er-impact-strip {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.er-ally-hero-content {
    min-height: inherit;
    display: grid;
    align-content: start;
    gap: clamp(2rem, 7svh, 4.8rem);
    padding: 1.1rem 0 2.4rem;
}

.er-ally-hero-top,
.er-location-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.er-ally-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--er-navy);
    text-decoration: none;
}

.er-ally-brand-mark {
    position: relative;
    width: 3.1rem;
    height: 3.1rem;
    flex: 0 0 3.1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--er-navy);
    box-shadow:
        0 0 0 0.28rem rgba(9, 89, 201, 0.16),
        0 0 0 0.56rem rgba(8, 113, 48, 0.1);
}

.er-ally-brand-mark span,
.er-ally-brand-mark span::before {
    display: block;
    content: "";
    border-radius: 0.18rem;
    background: #ffffff;
}

.er-ally-brand-mark span {
    width: 0.72rem;
    height: 1.85rem;
}

.er-ally-brand-mark span::before {
    width: 1.85rem;
    height: 0.72rem;
    transform: translate(-0.56rem, 0.56rem);
}

.er-ally-brand-lockup strong,
.er-ally-brand-lockup small {
    display: block;
}

.er-ally-brand-lockup strong {
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: 0;
}

.er-ally-brand-lockup small {
    margin-top: 0.2rem;
    color: var(--er-ink-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.er-ally-login-button {
    min-width: 7.5rem;
    box-shadow: 0 12px 28px rgba(201, 13, 18, 0.2);
}

.er-ally-hero-copy {
    width: min(660px, 100%);
}

.er-ally-hero-copy h1 {
    margin: 0.35rem 0 0.9rem;
    max-width: 13ch;
    color: var(--er-navy);
    font-size: clamp(2.25rem, 5.4vw, 4.85rem);
    line-height: 0.98;
}

.er-ally-hero-copy p {
    max-width: 54ch;
    margin: 0;
    color: #243653;
    font-size: clamp(1rem, 1.45vw, 1.25rem);
    font-weight: 650;
    line-height: 1.48;
}

.er-ally-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.er-ally-hero-badges span {
    border: 1px solid rgba(9, 89, 201, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--er-navy);
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
    font-weight: 800;
}

.er-location-section {
    padding: 2rem 0 2.5rem;
}

.er-section-heading {
    margin-bottom: 1rem;
}

.er-section-heading h2 {
    margin: 0.3rem 0 0.35rem;
    color: var(--er-navy);
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    line-height: 1.08;
}

.er-section-heading p,
.er-location-card span,
.er-impact-strip p {
    color: var(--er-ink-soft);
}

.er-section-heading p {
    margin: 0;
    max-width: 56ch;
    font-weight: 650;
}

.er-login-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    justify-items: end;
    align-items: start;
    padding: 6rem max(1rem, calc((100vw - 1180px) / 2)) 1.5rem;
    background: rgba(3, 8, 15, 0.46);
    backdrop-filter: blur(10px);
}

.er-login-modal {
    width: min(960px, 100%);
    max-height: calc(100svh - 7.5rem);
    overflow: auto;
    padding: 1rem;
    border: 1px solid rgba(9, 89, 201, 0.18);
    border-radius: 0.75rem;
    background: #f7f9fc;
    color: var(--er-navy);
    box-shadow: 0 30px 90px rgba(3, 8, 15, 0.28);
}

.er-login-modal-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.er-login-modal .er-section-heading {
    margin-bottom: 0;
}

.er-login-close {
    width: 2.5rem;
    height: 2.5rem;
    border-color: rgba(6, 22, 61, 0.14);
    background: #ffffff;
    color: var(--er-navy) !important;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.er-location-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.er-location-card {
    min-height: 13rem;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 0.65rem;
    align-content: start;
    padding: 1rem;
    border: 2px solid var(--er-line);
    border-radius: 0.5rem;
    background: #ffffff;
    color: var(--er-navy);
    cursor: pointer;
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.er-location-card:hover,
.er-location-card:focus-visible,
.er-location-card.selected {
    border-color: var(--er-blue);
    box-shadow: 0 14px 30px rgba(6, 22, 61, 0.12);
    transform: translateY(-2px);
    outline: none;
}

.er-location-card strong {
    color: var(--er-navy);
    font-size: 1.28rem;
    line-height: 1.1;
}

.er-location-card span {
    line-height: 1.4;
}

.er-location-code {
    width: 3.15rem;
    height: 3.15rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--er-blue);
    color: #ffffff !important;
    font-weight: 900;
}

.er-location-card:nth-child(2) .er-location-code {
    background: #087d91;
}

.er-location-card:nth-child(3) .er-location-code {
    background: var(--er-green);
}

.er-location-card:nth-child(4) .er-location-code {
    background: var(--er-red);
}

.er-location-route {
    align-self: end;
    color: var(--er-blue) !important;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.er-location-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}

.er-location-actions .btn {
    width: auto;
}

.er-login-form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.er-login-credentials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--er-line);
    border-radius: 0.5rem;
    background: #ffffff;
}

.er-login-credentials label {
    color: var(--er-ink-soft);
}

.er-login-credentials input {
    min-height: 3rem;
    border-color: rgba(9, 89, 201, 0.2);
    background: #f7f9fc;
    color: var(--er-navy);
}

.er-login-message {
    margin: 0;
    color: var(--er-red);
    font-weight: 800;
}

.er-presentation {
    display: grid;
    gap: 0;
    padding: 2rem 0 2.75rem;
}

.er-slide {
    display: grid;
    gap: 1rem;
    padding: clamp(1.25rem, 2.8vw, 2rem) 0;
    border-top: 1px solid var(--er-line);
}

.er-slide:first-child {
    border-top: 0;
}

.er-slide-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.er-slide-number {
    width: 3.1rem;
    height: 3.1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--er-navy);
    color: #ffffff;
    font-weight: 950;
}

.er-slide h2,
.er-slide h3 {
    color: var(--er-navy);
}

.er-slide h2 {
    margin: 0.22rem 0 0;
    max-width: 26ch;
    font-size: clamp(1.7rem, 3vw, 3rem);
    line-height: 1.04;
}

.er-slide h3 {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
}

.er-metric-grid,
.er-opportunity-grid,
.er-pool-grid,
.er-experience-grid,
.er-pilot-grid {
    display: grid;
    gap: 0.75rem;
}

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

.er-metric-card,
.er-opportunity-card,
.er-pilot-step,
.er-experience-grid div,
.er-pool-grid > div {
    padding: 1rem;
    border: 1px solid var(--er-line);
    border-radius: 0.5rem;
    background: #ffffff;
}

.er-metric-card {
    min-height: 12rem;
    display: grid;
    align-content: start;
    gap: 0.35rem;
}

.er-metric-card span {
    color: var(--er-blue);
    font-size: clamp(2.2rem, 4.6vw, 4rem);
    font-weight: 950;
    line-height: 0.95;
}

.er-metric-card.warning span,
.er-metric-card.warning strong {
    color: var(--er-red);
}

.er-metric-card.green span,
.er-metric-card.green strong {
    color: var(--er-green);
}

.er-metric-card strong,
.er-opportunity-card strong,
.er-pilot-step strong {
    color: var(--er-navy);
    font-size: 1.02rem;
}

.er-metric-card p,
.er-opportunity-card p,
.er-ring-stat p,
.er-pilot-step p {
    margin: 0;
    color: var(--er-ink-soft);
    line-height: 1.42;
}

.er-opportunity-grid {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.8fr) minmax(0, 1fr);
    align-items: stretch;
}

.er-opportunity-card {
    display: grid;
    align-content: center;
    gap: 0.45rem;
}

.er-ring-stat {
    min-height: 16rem;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.35rem;
    padding: 1.2rem;
    border-radius: 50%;
    border: 1.1rem solid #0f63d6;
    background: #ffffff;
    text-align: center;
}

.er-ring-stat span {
    color: var(--er-navy);
    font-size: clamp(2.8rem, 6vw, 5.25rem);
    font-weight: 950;
    line-height: 0.95;
}

.er-ring-stat strong {
    color: var(--er-blue);
    font-size: 1.15rem;
}

.er-flow-diagram {
    display: grid;
    grid-template-columns: 0.9fr 0.9fr 1.2fr 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

.er-flow-source,
.er-flow-center,
.er-flow-destinations > div {
    display: grid;
    align-content: center;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--er-line);
}

.er-flow-source span,
.er-flow-center span,
.er-flow-destinations span {
    color: var(--er-ink-soft);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.er-flow-source strong,
.er-flow-center strong,
.er-flow-destinations strong {
    color: var(--er-navy);
    font-size: 1.15rem;
}

.er-flow-center {
    border-color: rgba(9, 89, 201, 0.28);
    background: #eef5ff;
    text-align: center;
}

.er-flow-center small {
    color: var(--er-blue);
    font-weight: 900;
}

.er-flow-destinations {
    display: grid;
    gap: 0.55rem;
}

.er-flow-destinations .red strong {
    color: var(--er-red);
}

.er-flow-destinations .blue strong {
    color: var(--er-blue);
}

.er-flow-destinations .green strong {
    color: var(--er-green);
}

.er-slide-banner {
    margin: 0;
    padding: 0.95rem 1rem;
    border-radius: 0.5rem;
    background: var(--er-navy);
    color: #ffffff;
    font-size: clamp(1.1rem, 2.4vw, 2rem);
    font-weight: 950;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: uppercase;
}

.er-pool-grid {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.85fr) minmax(0, 1fr);
    align-items: stretch;
}

.er-check-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.er-check-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
    color: var(--er-ink-soft);
    font-weight: 750;
}

.er-check-list li::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--er-blue);
}

.er-pool-core {
    place-items: center;
    text-align: center;
    background: var(--er-navy) !important;
    color: #ffffff;
}

.er-pool-core span,
.er-pool-core strong,
.er-pool-core small {
    display: block;
}

.er-pool-core span {
    font-size: 1.2rem;
    font-weight: 850;
}

.er-pool-core strong {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 0.98;
}

.er-pool-core small {
    color: #c9ddff;
    font-weight: 850;
}

.er-experience-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.er-experience-grid div {
    min-height: 13rem;
    display: grid;
    align-content: center;
    gap: 0.75rem;
    text-align: center;
}

.er-experience-grid span {
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--er-navy);
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 950;
}

.er-experience-grid strong {
    color: var(--er-navy);
    font-size: clamp(1.2rem, 2vw, 1.75rem);
    line-height: 1.1;
}

.er-pilot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.er-pilot-step {
    min-height: 11rem;
    display: grid;
    align-content: start;
    gap: 0.4rem;
}

.er-pilot-step span {
    color: var(--er-blue);
    font-size: 1.45rem;
    font-weight: 950;
}

.er-benefit-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.er-benefit-row span {
    padding: 0.8rem;
    border: 1px solid rgba(8, 113, 48, 0.2);
    border-radius: 999px;
    background: rgba(8, 113, 48, 0.08);
    color: var(--er-green);
    font-weight: 900;
    text-align: center;
}

.er-impact-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 2rem;
    margin-bottom: 2.75rem;
}

.er-impact-strip article {
    min-height: 10rem;
    display: grid;
    align-content: start;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid var(--er-line);
    border-radius: 0.5rem;
    background: #ffffff;
}

.er-impact-strip span {
    color: var(--er-blue);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 950;
    line-height: 1;
}

.er-impact-strip strong {
    color: var(--er-navy);
    font-size: 1.05rem;
}

.er-impact-strip p {
    margin: 0;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .er-metric-grid,
    .er-flow-diagram,
    .er-benefit-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .er-opportunity-grid,
    .er-pool-grid,
    .er-experience-grid,
    .er-pilot-grid {
        grid-template-columns: 1fr;
    }

    .er-ring-stat {
        width: min(100%, 18rem);
        min-height: 0;
        aspect-ratio: 1;
        justify-self: center;
    }

    .er-location-grid,
    .er-impact-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .er-ally-hero {
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.88) 58%, rgba(255, 255, 255, 0.36) 100%),
            linear-gradient(180deg, rgba(6, 22, 61, 0.02), rgba(6, 22, 61, 0.26)),
            url("/images/er-ally-care-scene.jpg");
        background-position: center bottom;
        background-size: cover;
    }
}

@media (max-width: 700px) {
    .er-ally-hero {
        min-height: auto;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9) 58%, rgba(255, 255, 255, 0.34)),
            url("/images/er-ally-care-scene.jpg");
        background-position: center bottom;
        background-size: cover;
    }

    .er-ally-hero-content {
        gap: 2rem;
        padding: 0.9rem 0 10rem;
    }

    .er-ally-hero-top {
        align-items: flex-start;
    }

    .er-ally-hero-top .btn {
        width: auto;
        min-height: 2.75rem;
        border-radius: 999px;
    }

    .er-ally-brand-mark {
        width: 2.65rem;
        height: 2.65rem;
        flex-basis: 2.65rem;
    }

    .er-ally-brand-lockup strong {
        font-size: 1.25rem;
    }

    .er-ally-brand-lockup small {
        max-width: 13rem;
        font-size: 0.72rem;
    }

    .er-ally-hero-copy h1 {
        max-width: 12ch;
        font-size: 2.45rem;
    }

    .er-ally-hero-copy p {
        font-size: 1rem;
    }

    .er-location-section {
        padding: 1.5rem 0 2rem;
    }

    .er-presentation {
        width: min(100% - 1rem, 1180px);
        padding: 1.25rem 0 1.75rem;
    }

    .er-slide {
        gap: 0.8rem;
        padding: 1.1rem 0;
    }

    .er-slide-head {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .er-slide-number {
        width: 2.4rem;
        height: 2.4rem;
        font-size: 0.9rem;
    }

    .er-slide h2 {
        max-width: none;
        font-size: 1.55rem;
        line-height: 1.08;
    }

    .er-metric-grid,
    .er-flow-diagram,
    .er-benefit-row {
        grid-template-columns: 1fr;
    }

    .er-metric-card,
    .er-opportunity-card,
    .er-pilot-step,
    .er-experience-grid div,
    .er-pool-grid > div,
    .er-flow-source,
    .er-flow-center,
    .er-flow-destinations > div {
        padding: 0.85rem;
    }

    .er-metric-card,
    .er-pilot-step,
    .er-experience-grid div {
        min-height: auto;
    }

    .er-ring-stat {
        width: min(100%, 15rem);
        border-width: 0.75rem;
    }

    .er-flow-destinations {
        grid-template-columns: 1fr;
    }

    .er-slide-banner {
        font-size: 1rem;
        line-height: 1.25;
    }

    .er-pool-core strong {
        font-size: 2rem;
    }

    .er-experience-grid span {
        width: 3.2rem;
        height: 3.2rem;
    }

    .er-login-modal-backdrop {
        justify-items: center;
        padding: 4.8rem 0.75rem 0.75rem;
    }

    .er-login-modal {
        max-height: calc(100svh - 5.55rem);
        padding: 0.85rem;
    }

    .er-login-modal-head {
        gap: 0.75rem;
    }

    .er-login-modal .er-section-heading h2 {
        font-size: 1.45rem;
        line-height: 1.05;
    }

    .er-login-modal .er-section-heading p {
        font-size: 0.88rem;
        line-height: 1.32;
    }

    .er-login-close {
        width: 2.25rem;
        height: 2.25rem;
        border-color: rgba(201, 13, 18, 0.2);
        background: #fff8f5;
        color: var(--er-red) !important;
    }

    .er-login-modal .er-location-card {
        min-height: auto;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        gap: 0.28rem 0.7rem;
        padding: 0.65rem;
    }

    .er-login-modal .er-location-code {
        grid-row: 1 / 4;
        width: 2.55rem;
        height: 2.55rem;
        margin-top: 0.1rem;
    }

    .er-login-modal .er-location-card strong {
        font-size: 1.05rem;
    }

    .er-login-modal .er-location-card span {
        line-height: 1.22;
    }

    .er-login-modal .er-location-route {
        font-size: 0.72rem;
    }

    .er-login-modal .er-location-actions {
        margin-top: 0.7rem;
    }

    .er-login-form {
        gap: 0.7rem;
        margin-top: 0.7rem;
    }

    .er-login-credentials {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        padding: 0.65rem;
    }

    .er-location-grid,
    .er-impact-strip {
        grid-template-columns: 1fr;
    }

    .er-location-card {
        min-height: 11rem;
    }

    .er-location-actions {
        display: grid;
    }
}
.portal-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}
.triage-portal-head h1,
.redimedi-portal-head h1,
.portal-heading-link {
    margin: 0.2rem 0 0.35rem;
    max-width: none;
    font-size: 1.55rem;
    line-height: 1.15;
}
.triage-portal-head-compact {
    margin-bottom: 0.75rem;
}
.triage-portal-head .muted {
    margin: 0.25rem 0 0;
}
.queue-mode-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0.35rem 0 0 0.5rem;
    padding: 0.32rem 0.6rem;
    border: 1px solid rgba(84, 216, 138, 0.32);
    border-radius: 999px;
    background: rgba(84, 216, 138, 0.08);
    color: #baf4cf;
    font-size: 0.78rem;
    font-weight: 700;
    vertical-align: middle;
}
.portal-heading-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    background: transparent;
    color: var(--accent-soft);
    cursor: pointer;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 800;
    padding: 0;
    text-align: left;
}
.portal-heading-link::before {
    content: "<";
    font-size: 1rem;
}
.portal-heading-link:hover {
    color: #ffd9bf;
}
.icon-button {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
}
.icon-button svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}
.icon-button:hover,
.icon-button.active {
    border-color: rgba(240, 143, 97, 0.42);
    background: rgba(240, 143, 97, 0.14);
    color: var(--accent-soft);
}
.triage-presence {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: -0.25rem 0 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    text-align: left;
}
button.triage-presence {
    cursor: pointer;
}
button.triage-presence:disabled {
    cursor: default;
    opacity: 1;
}
.triage-presence strong {
    display: block;
    font-size: 0.95rem;
}
.triage-presence span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}
.presence-dot {
    width: 0.75rem;
    height: 0.75rem;
    flex: 0 0 0.75rem;
    border-radius: 999px;
    background: #f0b45e;
    box-shadow: 0 0 0 0.25rem rgba(240, 180, 94, 0.16);
}
.triage-presence-ready {
    border-color: rgba(84, 216, 138, 0.32);
    background: rgba(84, 216, 138, 0.08);
}
.triage-presence-ready .presence-dot {
    background: #54d88a;
    box-shadow: 0 0 0 0.25rem rgba(84, 216, 138, 0.16);
}
.portal-grid, .incident-grid, .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.incident-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.triage-queue-grid { grid-template-columns: minmax(0, 1fr); }
.management-grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
.management-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
}
.triage-performance-card {
    margin-bottom: 1rem;
}
.triage-performance-list .list-item {
    align-items: center;
}
.management-tab {
    border: 1px solid transparent;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
}
.management-tab.active {
    background: rgba(240, 143, 97, 0.14);
    border-color: rgba(240, 143, 97, 0.32);
    color: var(--accent-soft);
}
.management-cases-card { grid-column: 1 / -1; }
.management-case-list {
    display: grid;
    gap: 0.85rem;
}
.management-case-item {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}
.management-case-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}
.management-case-summary h3,
.management-case-details h4 {
    margin: 0.2rem 0 0.35rem;
}
.management-case-meta {
    display: grid;
    gap: 0.75rem;
    justify-items: end;
}
.management-case-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.management-case-details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}
.user-management-item {
    display: grid;
    gap: 0.85rem;
}
.user-management-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    width: 100%;
}
.user-management-identity span {
    color: var(--muted);
    display: block;
}
.user-management-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    text-align: right;
}
.user-management-actions > span:not(.status-pill) {
    color: var(--muted);
}
.redimedi-list-item {
    align-items: flex-start;
}
.redimedi-list-item .user-management-actions {
    min-width: 14rem;
}
.schedule-board {
    grid-column: 1 / -1;
}
.schedule-template-list,
.schedule-shift-list {
    display: grid;
    gap: 0.85rem;
}
.schedule-calendar-list {
    display: grid;
    gap: 1rem;
}
.schedule-pool-calendar {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.025);
}
.schedule-pool-head {
    margin-bottom: 0;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.schedule-pool-head h3 {
    margin: 0.15rem 0 0.35rem;
}
.schedule-calendar-day {
    display: grid;
    grid-template-columns: minmax(7.5rem, 0.18fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.schedule-calendar-date {
    position: sticky;
    top: 0.75rem;
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem;
    border: 1px solid rgba(240, 143, 97, 0.2);
    border-radius: 0.85rem;
    background: rgba(240, 143, 97, 0.1);
}
.schedule-calendar-date span {
    color: var(--muted);
}
.schedule-shift-block {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.025);
}
.schedule-shift-block-head,
.schedule-pool-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}
.schedule-shift-block-head h3,
.schedule-pool-card-head h3 {
    margin: 0.15rem 0 0.35rem;
}
.schedule-pool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.schedule-missing-pool {
    min-height: 14rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.schedule-add-staff {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) auto minmax(12rem, 0.8fr);
    gap: 0.75rem;
    align-items: end;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.035);
}
.schedule-add-staff .muted {
    align-self: center;
}
.schedule-roster-list {
    gap: 0.65rem;
}
.schedule-roster-item {
    align-items: flex-start;
}
.schedule-template-item,
.staff-shift-item {
    align-items: flex-start;
}
.schedule-template-edit-panel,
.schedule-shift-edit-panel {
    width: 100%;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.schedule-shift-edit-panel {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    padding: 0.85rem;
    border: 1px solid rgba(240, 143, 97, 0.2);
    border-radius: 0.85rem;
    background: rgba(240, 143, 97, 0.08);
}
.schedule-template-item h3,
.schedule-shift-item h3,
.staff-shift-item h3 {
    margin: 0.2rem 0 0.35rem;
}
.schedule-inactive {
    opacity: 0.58;
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.05);
    filter: grayscale(0.45);
}
.staff-schedule-card {
    margin-bottom: 1rem;
}
.staff-shift-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
}
.scan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.scan-panel {
    padding: 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}
.scan-panel h3 {
    margin: 0.2rem 0 0;
    font-size: 1rem;
}
.scan-panel input[type="file"] {
    margin-top: 0;
}
.scan-panel .muted {
    margin: 0.65rem 0 0;
}
.scan-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}
.scan-file-action {
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(240, 143, 97, 0.34);
    border-radius: 0.9rem;
    background: rgba(240, 143, 97, 0.12);
    color: var(--accent-soft);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}
.scan-file-action input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.scan-file-name {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}
.scan-success-alert {
    margin: 0.75rem 0 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(118, 214, 180, 0.24);
    border-radius: 0.65rem;
    background: rgba(67, 150, 118, 0.12);
    color: #b9f7df;
    font-size: 0.9rem;
}
.scan-camera-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(3, 8, 15, 0.78);
    backdrop-filter: blur(10px);
}
.scan-camera-modal {
    width: min(100%, 860px);
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 1rem;
    background: rgba(14, 26, 41, 0.97);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}
.scan-camera-modal .section-head {
    margin-bottom: 0;
}
.scan-camera-status {
    margin: 0;
}
.scan-camera-video {
    width: 100%;
    max-height: 70svh;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border-radius: 0.8rem;
    background: #02070d;
}
.user-edit-panel {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.user-edit-panel .form-grid {
    grid-template-columns: 1fr;
}
.phone-verification-panel {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.phone-verification-panel h4 {
    margin: 0 0 0.35rem;
}
.phone-verification-panel p {
    margin: 0;
}
.verification-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}
.verification-code-input {
    width: 8rem;
    margin-top: 0;
}
.voucher-panel {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 0.95rem;
    border: 1px solid rgba(84, 216, 138, 0.18);
    border-radius: 1rem;
    background: rgba(84, 216, 138, 0.07);
}
.voucher-panel h4 {
    margin: 0.2rem 0 0.3rem;
}
.voucher-panel p {
    margin: 0 0 0.35rem;
}
.disposition-handoff-panel {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.95rem;
    border: 1px solid rgba(240, 143, 97, 0.24);
    border-radius: 0.9rem;
    background: rgba(240, 143, 97, 0.08);
}
.disposition-handoff-panel.patient-declined {
    border-color: rgba(255, 193, 7, 0.28);
    background: rgba(255, 193, 7, 0.08);
}
.disposition-handoff-panel h4 {
    margin: 0.2rem 0 0;
    font-size: 1rem;
}
.disposition-handoff-panel p {
    margin: 0;
}
.urgent-care-routing-panel {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(84, 216, 138, 0.18);
    border-radius: 1rem;
    background: rgba(84, 216, 138, 0.055);
}
.urgent-care-routing-panel h4 {
    margin: 0.2rem 0 0;
    font-size: 1rem;
}
.routing-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.routing-context-grid div,
.selected-urgent-care-summary {
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.045);
}
.routing-context-grid strong,
.routing-context-grid span,
.selected-urgent-care-summary strong,
.selected-urgent-care-summary span {
    display: block;
    overflow-wrap: anywhere;
}
.segmented-control {
    display: inline-grid;
    grid-auto-flow: column;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
}
.segment-button {
    min-height: 2.5rem;
    border: 0;
    border-radius: 0.7rem;
    padding: 0.55rem 0.85rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
}
.segment-button.active {
    background: rgba(240, 143, 97, 0.18);
    color: var(--accent-soft);
}
.segment-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.urgent-care-map {
    min-height: 320px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.95rem;
    background: rgba(6, 12, 20, 0.68);
}
.urgent-care-map-message {
    min-height: 320px;
    display: grid;
    place-items: center;
    padding: 1rem;
    color: var(--muted);
    text-align: center;
}
.urgent-care-location-list {
    display: grid;
    gap: 0.65rem;
    max-height: 280px;
    overflow: auto;
    padding-right: 0.25rem;
}
.urgent-care-location-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.urgent-care-location-item.selected,
.urgent-care-location-item:hover {
    border-color: rgba(240, 143, 97, 0.38);
    background: rgba(240, 143, 97, 0.12);
}
.urgent-care-location-item span,
.urgent-care-distance-stack span,
.selected-urgent-care-summary span {
    color: var(--muted);
    font-size: 0.9rem;
}
.urgent-care-distance-stack {
    flex: 0 0 auto;
    text-align: right;
}
.urgent-care-reservation-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.urgent-care-voucher-panel {
    margin-top: 0;
}
.urgent-care-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.voucher-shell {
    min-height: calc(100svh - 11rem);
    display: grid;
    place-items: center;
}
.voucher-card {
    width: min(100%, 520px);
    padding: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.4rem;
    background: rgba(244, 239, 231, 0.96);
    color: #102033;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}
.voucher-card .eyebrow,
.voucher-card label {
    color: #587086;
}
.voucher-header {
    text-align: center;
}
.voucher-header h1 {
    margin: 0.25rem 0 0.5rem;
    font-size: 2.2rem;
    line-height: 1.05;
}
.voucher-header p {
    margin: 0;
    color: #587086;
}
.fake-qr {
    width: min(70vw, 280px);
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 3px;
    margin: 1.35rem auto 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(16, 32, 51, 0.12);
}
.qr-cell {
    border-radius: 0.12rem;
    background: #f3f5f7;
}
.qr-cell.on {
    background: #102033;
}
.voucher-code {
    margin: 0 auto 1.1rem;
    padding: 0.65rem 0.85rem;
    width: fit-content;
    border: 1px dashed rgba(16, 32, 51, 0.26);
    border-radius: 0.85rem;
    background: rgba(16, 32, 51, 0.04);
    color: #102033;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.voucher-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.voucher-details div {
    padding: 0.8rem;
    border-radius: 0.85rem;
    background: rgba(16, 32, 51, 0.05);
}
.voucher-details strong {
    display: block;
    margin-top: 0.25rem;
}
.status-pill.verified {
    color: #8ee6c0;
    border-color: rgba(142, 230, 192, 0.25);
    background: rgba(67, 150, 118, 0.12);
}
.status-pill.live-presence {
    color: #8ee6c0;
    border-color: rgba(142, 230, 192, 0.25);
    background: rgba(67, 150, 118, 0.12);
}
.status-pill.pending {
    color: #ffd59a;
    border-color: rgba(255, 213, 154, 0.25);
    background: rgba(213, 107, 67, 0.1);
}
.portal-card.interactive { cursor: pointer; transition: transform 160ms ease, border-color 160ms ease; }
.portal-card.interactive:hover { transform: translateY(-4px); border-color: rgba(240, 143, 97, 0.45); }
.triage-queue-card {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.triage-queue-card.incoming-call {
    animation: incomingCallPulse 1.35s ease-in-out infinite;
}
.status-pill.incoming-call-pill {
    color: #ffd59a;
    border-color: rgba(255, 213, 154, 0.38);
    background: rgba(213, 107, 67, 0.18);
}
.triage-queue-card h2 {
    margin: 0.2rem 0 0;
    font-size: 1.12rem;
    line-height: 1.2;
}
.triage-vitals-panel {
    position: relative;
    margin: 0.85rem 0 0.95rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}
.triage-queue-card .triage-vitals-panel {
    margin: 0;
}
.triage-vitals-panel h3, .vitals-detail-card h3 {
    margin: 0.25rem 0 0;
    font-size: 1rem;
}
.triage-vitals-panel.vitals-pending {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.22);
}
.triage-vitals-panel.vitals-ready {
    background: rgb(8 227 126 / 15%);
    border-color: rgb(40 237 16 / 97%);
}
.triage-vitals-panel.vitals-closed {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.14);
    filter: grayscale(0.25);
}
.triage-queue-card.closed {
    opacity: 0.76;
}
.triage-vitals-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content minmax(11rem, max-content);
    gap: 1rem;
    align-items: start;
}
.triage-vitals-content > p {
    padding-bottom: 1.55rem;
}
.triage-vitals-queue {
    min-width: 10rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    text-align: right;
}
.triage-vitals-queue label,
.triage-vitals-queue strong {
    display: block;
}
.triage-vitals-queue strong {
    margin-top: 0.2rem;
    color: var(--text);
    font-size: 1rem;
    white-space: nowrap;
}
.triage-vitals-copy, .triage-vitals-panel p {
    margin: 0;
    color: var(--text);
    line-height: 1.45;
    white-space: pre-wrap;
}
.triage-vitals-actions {
    align-self: start;
    display: grid;
    gap: 0.55rem;
    margin-top: 0;
    min-width: 11rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.triage-vitals-actions .btn { width: 100%; }
.triage-vitals-incident-number {
    position: absolute;
    bottom: 0.95rem;
    left: 1rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.eyebrow, label { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.validation-message {
    color: #ffd0c7;
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(234, 122, 109, 0.28);
    border-radius: 0.8rem;
    background: rgba(197, 80, 80, 0.12);
    font-size: 0.94rem;
}
.form-fieldset {
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.required-indicator {
    color: #ffd59a;
    font-weight: 900;
    letter-spacing: 0;
}
.field-validation {
    display: block;
    margin-top: 0.32rem;
    color: #ffd59a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
input[aria-invalid="true"],
input[aria-invalid="True"],
input.input-validation-error,
select[aria-invalid="true"],
select[aria-invalid="True"],
select.input-validation-error,
textarea[aria-invalid="true"],
textarea[aria-invalid="True"],
textarea.input-validation-error {
    border-color: rgba(240, 143, 97, 0.54);
    box-shadow: inset 0 0 0 1px rgba(240, 143, 97, 0.18);
}
.vitals-requirement {
    margin: -0.35rem 0 0.75rem;
    color: #ffd59a;
    font-size: 0.92rem;
}
.workflow-sections {
    display: grid;
    gap: 0.75rem;
}
.workflow-section {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
}
.workflow-section.complete.collapsed {
    border-color: rgba(84, 216, 138, 0.2);
    background: rgba(84, 216, 138, 0.06);
}
.redimedi-workflow-sections .workflow-section,
.redimedi-workflow-sections .workflow-section.complete.collapsed {
    border: 0;
}
.redimedi-workflow-sections .workflow-section-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
}
.workflow-section-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    padding: 0.85rem 0.95rem;
    text-align: left;
}
.workflow-section-toggle strong {
    display: block;
    font-size: 0.98rem;
}
.workflow-section-toggle small {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.84rem;
    letter-spacing: 0;
    text-transform: none;
}
.workflow-section-body {
    padding: 0 0.95rem 0.95rem;
}
.workflow-section-body.scan-grid {
    margin-bottom: 0;
}
.workflow-section-body.vital-entry-section {
    border: 0;
    border-radius: 0;
    background: transparent;
}
.workflow-chevron {
    color: var(--accent-soft);
    font-size: 0.86rem;
    font-weight: 800;
}
.medtech-vitals-actions {
    position: sticky;
    bottom: 0.5rem;
    z-index: 2;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    background: rgba(14, 26, 41, 0.92);
    backdrop-filter: blur(12px);
}
.form-grid, .metric-grid, .video-grid, .workspace-shell, .workspace-stage, .workspace-side, .stack-list { display: grid; gap: 1rem; }
.form-grid, .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-grid strong, .stat-card strong { display: block; margin-top: 0.2rem; }
.span-2 { grid-column: span 2; }
input, select, textarea { width: 100%; margin-top: 0.4rem; border-radius: 1rem; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(4, 10, 18, 0.65); color: var(--text); padding: 0.85rem 0.95rem; box-sizing: border-box; }
textarea { min-height: 96px; resize: vertical; }
.workspace-shell { grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.35fr); align-items: start; }
.workspace-shell-single { grid-template-columns: minmax(0, 1fr); }
.workspace-overlay-shell { position: relative; }
.triage-workspace-shell {
    grid-template-columns: minmax(340px, 0.86fr) minmax(0, 1.5fr);
    min-height: calc(100svh - 9rem);
    align-items: stretch;
}
.triage-workspace-shell .workspace-side {
    max-height: calc(100svh - 9rem);
    overflow-y: auto;
    padding-right: 0.35rem;
    align-content: start;
    scrollbar-gutter: stable;
}
.triage-workspace-shell .workspace-stage {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100svh - 9rem);
    overflow: hidden;
    align-content: start;
}
.triage-workspace-shell .video-card {
    min-height: 0;
}
.triage-workspace-shell .video-stage {
    min-height: min(58svh, 560px);
}
.triage-workspace-shell .primary-video {
    height: min(58svh, 560px);
    min-height: 360px;
}
.ems-video-ready-shell {
    min-height: calc(100svh - 9rem);
    align-items: stretch;
}
.ems-video-ready-shell .workspace-side {
    max-height: calc(100svh - 9rem);
    overflow-y: auto;
    padding-right: 0.35rem;
    align-content: start;
    scrollbar-gutter: stable;
}
.ems-video-ready-shell .workspace-stage {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100svh - 9rem);
    overflow: hidden;
    align-content: start;
}
.workspace-side-tabs {
    display: grid;
    gap: 1rem;
    align-content: start;
}
.workspace-side-tablist {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(10, 20, 32, 0.94);
    backdrop-filter: blur(12px);
}
.workspace-side-tab {
    position: relative;
    flex: 1 1 7.2rem;
    min-height: 3rem;
    min-width: min(100%, 6.8rem);
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}
.workspace-side-tab.active {
    background: rgba(240, 143, 97, 0.18);
    color: var(--accent-soft);
}
.workspace-side-tab.has-indicator::after {
    content: "";
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #ff4d4f;
    box-shadow: 0 0 0 2px rgba(10, 20, 32, 0.94);
}
.workspace-side-tab-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
}
.workspace-side-tab-panel-highlight > .workspace-card {
    border-color: rgba(255, 77, 79, 0.45);
    background: rgba(255, 77, 79, 0.08);
    box-shadow: 0 0 0 1px rgba(255, 77, 79, 0.16);
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.workspace-side-tabs .scroll-card {
    max-height: none;
    overflow: visible;
}
.attachment-list-item {
    align-items: center;
}
.workspace-list-item-highlight,
.attachment-list-item-highlight {
    border-color: rgba(255, 77, 79, 0.45);
    background: rgba(255, 77, 79, 0.12);
    box-shadow: 0 0 0 1px rgba(255, 77, 79, 0.18);
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.attachment-file-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
}
.attachment-file-copy {
    min-width: 0;
}
.attachment-file-copy strong,
.attachment-file-copy span {
    overflow-wrap: anywhere;
}
.attachment-thumb-button {
    width: 9.75rem;
    height: 9.75rem;
    flex: 0 0 9.75rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}
.attachment-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
    align-items: center;
}
.link-button {
    border: 0;
    background: transparent;
    color: var(--accent-soft);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0;
}
.scroll-card { max-height: 420px; overflow: auto; }
.slide-card { animation: slideIn 220ms ease; }
.ems-step-card { display: grid; gap: 0.85rem; }
.permission-row {
    margin: -0.25rem 0 0.8rem;
}
.triage-vitals-focused-shell .triage-compact-card {
    padding: 0.8rem 0.95rem;
}
.triage-vitals-focused-shell .triage-compact-card .section-head {
    margin-bottom: 0;
}
.triage-vitals-focused-shell .triage-compact-card h2,
.triage-vitals-focused-shell .triage-compact-card h3 {
    margin: 0.1rem 0 0;
    font-size: 1rem;
}
.triage-vitals-focused-shell .incident-summary-card .metric-grid {
    display: none;
}
.triage-vitals-focused-shell .triage-pool-card .action-row {
    gap: 0.5rem;
    margin-top: 0.65rem;
}
.triage-vitals-focused-shell .triage-pool-card .btn {
    padding: 0.65rem 0.9rem;
}
.ems-choice-toggle {
    padding: 0.2rem 0;
    color: var(--text);
}
.ems-choice-toggle input {
    width: auto;
    margin: 0;
}
.ems-vitals-input {
    min-height: 200px;
    font-size: 1.05rem;
    line-height: 1.4;
}
.ems-vitals-grid { margin-bottom: 0.35rem; }
.vital-entry-section, .vital-config-section, .vital-config-field {
    padding: 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}
.vital-entry-section h4 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}
.vital-entry-field {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}
.vital-entry-field > span {
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.vital-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.35rem;
}
.vital-choice {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}
.vital-choice input {
    width: auto;
    margin: 0;
}
.vitals-fixed-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}
.vitals-config-card { grid-column: 1 / -1; order: -1; }
.vitals-config-card .section-head p { margin: 0.3rem 0 0; }
.vital-config-list, .vital-option-editor {
    display: grid;
    gap: 0.9rem;
}
.vital-config-section {
    display: grid;
    gap: 0.9rem;
}
.vital-config-field {
    display: grid;
    gap: 0.75rem;
    background: rgba(4, 10, 18, 0.28);
}
.vital-config-header, .vital-config-option {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 0.75rem;
    align-items: end;
}
.vital-config-field .vital-config-header {
    grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.6fr) auto auto;
}
.vital-config-option {
    grid-template-columns: minmax(160px, 1fr) auto auto;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
video { width: 100%; min-height: 260px; object-fit: cover; background: #02070d; border-radius: 1rem; border: 1px solid var(--line); }
.video-stage {
    position: relative;
    min-height: 420px;
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #02070d;
}
.patient-direct-video-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    color: var(--muted);
    text-align: center;
    background: radial-gradient(circle at center, rgba(28, 48, 68, 0.52), rgba(2, 7, 13, 0.94));
}
.patient-direct-video-placeholder strong {
    color: var(--text);
}
.primary-video {
    width: 100%;
    height: 420px;
    min-height: 420px;
    border: 0;
    border-radius: 0;
}
.ems-video-ready-shell .video-stage {
    min-height: min(58svh, 560px);
}
.ems-video-ready-shell .primary-video {
    height: min(58svh, 560px);
    min-height: 360px;
}
.pip-shell {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 24%;
    min-width: 150px;
    max-width: 240px;
    padding: 0.4rem;
    border-radius: 1rem;
    background: rgba(3, 8, 15, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}
.pip-shell.pip-large {
    width: 34%;
    max-width: 320px;
}
.pip-video {
    width: 100%;
    min-height: 120px;
    border-radius: 0.8rem;
}
.pip-video-floating {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 24%;
    min-width: 150px;
    max-width: 240px;
    min-height: 120px;
    z-index: 1;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}
.video-stage:fullscreen,
.video-stage:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    background: #02070d;
}
.video-stage:fullscreen .primary-video,
.video-stage:-webkit-full-screen .primary-video {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    object-fit: contain;
}
.video-stage:fullscreen .pip-video-floating,
.video-stage:-webkit-full-screen .pip-video-floating {
    right: 1.25rem;
    bottom: 1.25rem;
    width: min(24vw, 360px);
    min-width: 160px;
    max-width: 360px;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.18);
    z-index: 3;
}
.video-stage:fullscreen .pip-shell,
.video-stage:-webkit-full-screen .pip-shell {
    right: 1.25rem;
    bottom: 1.25rem;
    width: min(24vw, 360px);
    min-width: 160px;
    max-width: 360px;
    z-index: 4;
}
.pip-toggle {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    margin: 0 0.35rem 0.35rem 0;
    cursor: pointer;
}
.section-head, .list-item, .timeline-item { display: flex; justify-content: space-between; gap: 1rem; }
.section-head { align-items: flex-start; margin-bottom: 1rem; }
.list-item, .timeline-item { padding: 0.9rem 1rem; border-radius: 1rem; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.05); }
.list-item span, .timeline-item span { color: var(--muted); display: block; }
.timeline-item { flex-direction: column; }
.toggle { display: flex; gap: 0.6rem; align-items: center; }
.toggle input { width: auto; margin: 0; }
.inline-input, .top-gap { margin-top: 1rem; }
.grow-input { min-height: 120px; flex: 1; }
.status-pill { color: var(--accent-soft); }
.queue-alert {
    align-self: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(240, 143, 97, 0.12);
    border: 1px solid rgba(240, 143, 97, 0.25);
    color: var(--accent-soft);
    font-size: 0.82rem;
}
@keyframes incomingCallPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(240, 143, 97, 0.25);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 0 0 0.45rem rgba(240, 143, 97, 0);
        transform: translateY(-2px);
    }
}
.stat-card label { display: block; margin-bottom: 0.3rem; }
.empty-state { text-align: center; padding: 2rem; }
.case-closed-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(3, 8, 15, 0.72);
    backdrop-filter: blur(8px);
}
.case-closed-card {
    max-width: 420px;
    padding: 1.4rem;
    border-radius: 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(14, 26, 41, 0.95);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}
.case-closed-card h2 {
    margin: 0.35rem 0 0.6rem;
}
.triage-assessment-review {
    display: grid;
    gap: 0.75rem;
}
.triage-assessment-review > div,
.triage-close-vitals {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.045);
}
.triage-assessment-review label,
.triage-close-vitals label {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.triage-assessment-review p,
.triage-close-vitals p {
    margin: 0.35rem 0 0;
    white-space: pre-wrap;
}
.triage-close-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(3, 8, 15, 0.82);
    backdrop-filter: blur(10px);
}
.triage-close-modal {
    width: min(100%, 620px);
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 1.1rem;
    background: rgba(14, 26, 41, 0.98);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}
.triage-close-modal .section-head {
    margin-bottom: 0;
}
.triage-vitals-confirmation {
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(84, 216, 138, 0.2);
    border-radius: 0.9rem;
    background: rgba(84, 216, 138, 0.06);
}
.attachment-preview-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: rgba(3, 8, 15, 0.78);
    backdrop-filter: blur(10px);
}
.attachment-preview-modal {
    width: min(100%, 1100px);
    max-height: 92svh;
    display: grid;
    gap: 1rem;
    overflow: hidden;
    padding: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 1rem;
    background: rgba(14, 26, 41, 0.97);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}
.attachment-preview-modal .section-head {
    margin-bottom: 0;
}
.attachment-preview-modal img {
    width: 100%;
    max-height: calc(92svh - 8rem);
    object-fit: contain;
    border-radius: 0.8rem;
    background: #02070d;
}

@media (max-width: 1100px) {
    .hero-card, .workspace-shell, .management-grid, .management-case-summary, .management-case-details-grid, .user-management-summary, .phone-verification-panel, .portal-grid, .incident-grid, .incident-grid-wide, .stats-grid, .form-grid, .metric-grid, .video-grid, .vitals-fixed-grid, .scan-grid, .staff-shift-item, .schedule-calendar-day, .schedule-shift-block-head, .schedule-pool-card-head, .schedule-pool-grid, .schedule-add-staff, .schedule-shift-edit-panel, .vital-config-header, .vital-config-field .vital-config-header, .vital-config-option, .routing-context-grid, .urgent-care-reservation-grid { grid-template-columns: 1fr; }
    .management-tabs { display: grid; grid-template-columns: 1fr; }
    .management-case-meta { justify-items: stretch; }
    .user-management-summary { flex-direction: column; }
    .user-management-actions { justify-content: flex-start; text-align: left; }
    .verification-row { justify-content: flex-start; }
    .schedule-calendar-date { position: static; }
    .span-2 { grid-column: auto; }
    .voucher-panel {
        display: grid;
    }
    .segmented-control {
        width: 100%;
        grid-auto-flow: row;
    }
    .urgent-care-location-item,
    .urgent-care-actions {
        display: grid;
        justify-content: stretch;
    }
    .urgent-care-distance-stack {
        text-align: left;
    }
    .voucher-details {
        grid-template-columns: 1fr;
    }
    .video-stage {
        min-height: auto;
    }
    .triage-workspace-shell {
        display: flex;
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .primary-video {
        height: 300px;
        min-height: 300px;
    }
    .pip-shell {
        width: 42%;
        min-width: 120px;
        right: 0.75rem;
        bottom: 0.75rem;
    }
    .pip-video-floating {
        width: 42%;
        min-width: 120px;
        right: 0.75rem;
        bottom: 0.75rem;
    }
    .triage-workspace-shell .workspace-side,
    .triage-workspace-shell .workspace-stage {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
    .triage-workspace-shell .workspace-side-tablist {
        position: static;
        top: auto;
        z-index: auto;
    }
    .triage-workspace-shell .primary-video {
        height: 300px;
        min-height: 300px;
    }
}

@media (min-width: 760px) and (max-width: 1100px) {
    .ems-video-ready-shell {
        grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.28fr);
        align-items: stretch;
    }

    .ems-video-ready-shell .workspace-side {
        max-height: calc(100svh - 8rem);
        overflow-y: auto;
        padding-right: 0.35rem;
        scrollbar-gutter: stable;
    }

    .ems-video-ready-shell .workspace-stage {
        position: sticky;
        top: 0.75rem;
        max-height: calc(100svh - 8rem);
        overflow: hidden;
    }

    .ems-video-ready-shell .primary-video {
        height: min(56svh, 520px);
        min-height: 340px;
    }
}

@media (max-width: 700px) {
    html,
    body {
        background: linear-gradient(180deg, #081018, #0f1d2d 70%);
    }

    .page-shell {
        padding: 0.75rem;
    }

    .portal-head {
        gap: 0.75rem;
    }

    .portal-head h1,
    .hero-copy h1 {
        max-width: none;
        font-size: 1.75rem;
        line-height: 1.1;
    }

    .redimedi-intake-card,
    .redimedi-intake-card + .workspace-card {
        border-radius: 0.9rem;
        padding: 0.9rem;
    }

    .redimedi-intake-card .section-head,
    .scan-panel .section-head {
        margin-bottom: 0.7rem;
    }

    .redimedi-intake-card h2,
    .scan-panel h3 {
        margin: 0.15rem 0 0;
        font-size: 1.05rem;
    }

    .redimedi-intake-card p {
        margin-top: 0.35rem;
        line-height: 1.35;
    }

    .triage-vitals-content {
        grid-template-columns: 1fr;
    }

    .triage-vitals-content > p {
        padding-bottom: 0;
    }

    .triage-vitals-queue {
        min-width: 0;
        padding: 0.75rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-left: 0;
        text-align: left;
    }

    .triage-vitals-actions {
        min-width: 0;
        padding: 0.75rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-left: 0;
    }

    .triage-vitals-incident-number {
        position: static;
        margin-top: 0.75rem;
        padding-top: 0.65rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        text-align: left;
    }

    .scan-grid {
        gap: 0.65rem;
        margin-bottom: 0.8rem;
    }

    .scan-panel {
        padding: 0.8rem;
        border-radius: 0.85rem;
    }

    .scan-file-action,
    .btn {
        min-height: 3.2rem;
        width: 100%;
        border-radius: 0.8rem;
    }

    input,
    select,
    textarea {
        min-height: 3.15rem;
        border-radius: 0.75rem;
        font-size: 1rem;
        padding: 0.78rem 0.85rem;
    }

    textarea {
        min-height: 5.75rem;
    }

    .form-grid,
    .stack-list {
        gap: 0.75rem;
    }

    .workflow-section-toggle {
        grid-template-columns: 1fr;
        gap: 0.45rem;
        align-items: start;
    }

    .workflow-section-toggle .status-pill,
    .workflow-chevron {
        justify-self: start;
    }

    .redimedi-list-item {
        display: grid;
        gap: 0.75rem;
    }

    .redimedi-list-item .user-management-actions {
        min-width: 0;
        width: 100%;
        justify-content: stretch;
    }

    .redimedi-list-item .user-management-actions .btn {
        flex: 1 1 100%;
    }

    body:has(.ems-mobile-focus) .topbar,
    body:has(.ems-mobile-focus) .ems-workspace-head {
        display: none;
    }

    body:has(.ems-mobile-focus) .page-shell {
        padding: 0;
    }

    .ems-mobile-focus {
        gap: 0;
    }

    .ems-mobile-focus .workspace-side {
        gap: 0;
    }

    .ems-mobile-focus .incident-summary-card {
        display: none;
    }

    .ems-mobile-focus .ems-step-card {
        min-height: 100svh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
        padding: 1rem;
    }

    .ems-mobile-focus .ems-destination-card {
        align-content: center;
    }

    .ems-mobile-focus .ems-vitals-card {
        align-content: start;
        overflow: auto;
    }

    .ems-video-ready-shell .workspace-stage {
        order: -1;
    }

    .ems-video-ready-shell .incident-summary-card {
        display: none;
    }

    .ems-video-ready-shell .ems-video-card {
        border-radius: 0.9rem;
        padding: 0.9rem;
    }

    .ems-video-ready-shell .video-stage {
        min-height: 45vh;
    }

    .ems-video-ready-shell .primary-video {
        height: 45vh;
        min-height: 45vh;
    }

    .ems-video-ready-shell .ems-live-card {
        padding: 0.9rem;
    }

    .triage-workspace-shell .video-card {
        padding: 0.65rem;
        border-radius: 0.75rem;
    }

    .triage-workspace-shell .video-card > .section-head {
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.45rem;
        margin-bottom: 0.5rem;
    }

    .triage-workspace-shell .video-card > .section-head > div:first-child {
        flex: 0 0 auto;
        min-width: 0;
    }

    .triage-workspace-shell .video-card > .section-head .eyebrow {
        display: none;
    }

    .triage-workspace-shell .video-card > .section-head h3 {
        margin: 0;
        font-size: 0.95rem;
        line-height: 1;
        white-space: nowrap;
    }

    .triage-workspace-shell .video-card > .section-head .action-row,
    .triage-workspace-shell .video-card > .action-row,
    .triage-workspace-shell .video-card .permission-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.25rem;
        justify-content: flex-end;
        overflow-x: auto;
        padding-bottom: 0.05rem;
    }

    .triage-workspace-shell .video-card > .action-row,
    .triage-workspace-shell .video-card .permission-row {
        justify-content: flex-start;
    }

    .triage-workspace-shell .video-card .btn {
        flex: 0 0 auto;
        width: auto;
        min-height: 1.9rem;
        padding: 0.3rem 0.45rem;
        border-radius: 0.55rem;
        font-size: 0;
        line-height: 1;
        white-space: nowrap;
    }

    .triage-workspace-shell .video-card .btn[data-mobile-label]::after {
        content: attr(data-mobile-label);
        font-size: 0.7rem;
        line-height: 1;
    }

    .triage-workspace-shell .video-card > .section-head .btn {
        min-height: 1.8rem;
        padding: 0.28rem 0.42rem;
    }

    .triage-workspace-shell .video-card > .section-head .btn[data-mobile-label]::after {
        font-size: 0.68rem;
    }

    .triage-workspace-shell .video-card .muted {
        margin: 0.45rem 0;
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .triage-workspace-shell .video-card .pip-toggle {
        padding: 0.24rem 0.42rem;
        font-size: 0.68rem;
    }

    .triage-workspace-shell .video-stage {
        min-height: 36vh;
    }

    .triage-workspace-shell .primary-video {
        height: 36vh;
        min-height: 230px;
    }
}
