:root {
    --oxi-primary: #1f7ae0;
    --oxi-primary-strong: #194dc9;
    --oxi-secondary: #15c4ef;
    --oxi-success: #19b36b;
    --oxi-warning: #f4b940;
    --oxi-danger: #ef5f6c;
    --oxi-surface: #ffffff;
    --oxi-surface-soft: #f6f8fc;
    --oxi-border: rgba(37, 73, 128, 0.12);
    --oxi-text: #1e293b;
    --oxi-muted: #64748b;
    --oxi-shadow: 0 24px 60px rgba(31, 58, 121, 0.12);
}

html[data-theme="dark"] {
    --oxi-surface: #0f172a;
    --oxi-surface-soft: #162033;
    --oxi-border: rgba(148, 163, 184, 0.14);
    --oxi-text: #e5edf7;
    --oxi-muted: #94a3b8;
    --oxi-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--oxi-text);
    background:
        radial-gradient(circle at top left, rgba(21, 196, 239, 0.16), transparent 32%),
        radial-gradient(circle at bottom right, rgba(31, 122, 224, 0.18), transparent 28%),
        var(--oxi-surface-soft);
}

.auth-shell {
    background:
        linear-gradient(135deg, rgba(16, 40, 102, 0.92), rgba(17, 118, 201, 0.9)),
        radial-gradient(circle at top right, rgba(255, 214, 102, 0.25), transparent 26%);
}

.auth-brand-panel {
    background:
        linear-gradient(180deg, rgba(20, 183, 230, 0.22), rgba(31, 76, 201, 0.28)),
        rgba(255, 255, 255, 0.05);
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(4px);
}

.auth-brand-panel::before {
    width: 320px;
    height: 320px;
    top: -80px;
    right: -110px;
}

.auth-brand-panel::after {
    width: 260px;
    height: 260px;
    bottom: -90px;
    left: -80px;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 580px;
    color: #fff;
}

.auth-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 0.75rem;
    backdrop-filter: blur(8px);
}

.auth-card,
.metric-card,
.surface-card,
.card,
.hero-panel,
.alert-card,
.calendar-day,
.sidebar-link,
.user-pill,
.chat-bubble,
.timeline-card {
    background: var(--oxi-surface);
    color: var(--oxi-text);
}

.auth-card {
    max-width: 640px;
}

.auth-helper code {
    background: rgba(31, 122, 224, 0.08);
    padding: 0.15rem 0.45rem;
    border-radius: 0.5rem;
    color: var(--oxi-primary-strong);
}

.glass-stat {
    padding: 1rem 1.15rem;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.glass-stat strong {
    display: block;
    margin-bottom: 0.35rem;
}

.app-frame {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(12, 35, 88, 0.98), rgba(24, 77, 201, 0.98));
    color: #fff;
    padding: 1.5rem;
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--oxi-shadow);
    z-index: 1030;
    transition: transform .3s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 0.35rem;
}

.sidebar-brand small {
    display: block;
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-nav {
    display: grid;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    text-decoration: none;
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.05);
    transition: all .2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.16);
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
}

.app-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    backdrop-filter: blur(16px);
    background: rgba(246, 248, 252, 0.85);
    border-bottom: 1px solid var(--oxi-border);
}

html[data-theme="dark"] .topbar {
    background: rgba(15, 23, 42, 0.86);
}

.main-content {
    padding: 1.75rem;
}

.app-footer {
    padding: 1rem 1.75rem 1.5rem;
    border-top: 1px solid var(--oxi-border);
    font-size: 0.95rem;
}

.topbar-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--oxi-danger);
    display: none;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid var(--oxi-border);
    border-radius: 999px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--oxi-secondary), var(--oxi-primary));
    color: #fff;
    font-weight: 700;
}

.hero-panel {
    border-radius: 1.75rem;
    padding: 1.5rem;
    border: 1px solid var(--oxi-border);
    box-shadow: var(--oxi-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.metric-card,
.surface-card,
.alert-card,
.timeline-card {
    border: 1px solid var(--oxi-border);
    border-radius: 1.4rem;
    box-shadow: var(--oxi-shadow);
}

.metric-card {
    padding: 1.1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-card h3 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 800;
}

.metric-card small {
    color: var(--oxi-muted);
    display: block;
    margin-bottom: 0.15rem;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.surface-card,
.alert-card {
    padding: 1rem 1.1rem;
}

.patient-thumb {
    width: 46px;
    height: 46px;
    border-radius: 1rem;
    object-fit: cover;
    border: 1px solid var(--oxi-border);
}

.patient-photo-lg {
    width: 108px;
    height: 108px;
    border-radius: 2rem;
    object-fit: cover;
    border: 1px solid var(--oxi-border);
}

.qr-card {
    max-width: 180px;
    padding: 0.75rem;
    border-radius: 1.25rem;
    background: var(--oxi-surface);
    border: 1px solid var(--oxi-border);
    box-shadow: var(--oxi-shadow);
}

.chart-shell {
    position: relative;
    height: 320px;
}

.chart-shell.chart-shell-compact {
    height: 280px;
}

.chart-shell canvas {
    width: 100% !important;
    height: 100% !important;
}

.timeline-list {
    display: grid;
    gap: 1rem;
}

.timeline-item {
    position: relative;
    padding-left: 1.25rem;
    border-left: 3px solid rgba(31, 122, 224, 0.18);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -0.47rem;
    top: 0.4rem;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--oxi-secondary), var(--oxi-primary));
}

.chat-panel {
    min-height: 320px;
    max-height: 520px;
    overflow-y: auto;
    display: grid;
    gap: 1rem;
}

.chat-bubble {
    max-width: 80%;
    padding: 1rem 1.1rem;
    border-radius: 1.25rem;
    border: 1px solid var(--oxi-border);
}

.chat-bubble.mine {
    justify-self: end;
    background: linear-gradient(135deg, rgba(21, 196, 239, 0.18), rgba(31, 122, 224, 0.12));
}

.chat-bubble.theirs {
    justify-self: start;
}

.active-thread {
    outline: 2px solid rgba(31, 122, 224, 0.28);
}

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

.calendar-head {
    text-align: center;
    font-weight: 700;
    color: var(--oxi-muted);
}

.calendar-day {
    min-height: 130px;
    padding: 0.85rem;
    border: 1px solid var(--oxi-border);
    border-radius: 1.15rem;
    box-shadow: var(--oxi-shadow);
}

.calendar-day.empty {
    background: transparent;
    box-shadow: none;
    border-style: dashed;
}

.calendar-event {
    margin-top: 0.65rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.85rem;
    font-size: 0.8rem;
    line-height: 1.2;
    color: #fff;
}

.status-pending { background: #64748b; }
.status-confirmed { background: #1f7ae0; }
.status-rescheduled { background: #f4b940; color: #111827; }
.status-cancelled { background: #ef5f6c; }
.status-completed { background: #19b36b; }

.offcanvas {
    background: var(--oxi-surface);
    color: var(--oxi-text);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 0.85rem;
    border: 1px solid var(--oxi-border);
    background: var(--oxi-surface);
    color: var(--oxi-text);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--oxi-text);
    --bs-table-striped-color: var(--oxi-text);
    --bs-table-hover-color: var(--oxi-text);
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--oxi-border);
}

.card {
    border: 1px solid var(--oxi-border) !important;
    box-shadow: var(--oxi-shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--oxi-secondary), var(--oxi-primary));
    border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--oxi-primary), var(--oxi-primary-strong));
    border-color: transparent;
}

.form-control,
.form-select,
.input-group-text {
    background: var(--oxi-surface);
    color: var(--oxi-text);
    border-color: var(--oxi-border);
    border-radius: 1rem;
}

.input-group > .form-control,
.input-group > .form-select {
    border-start-start-radius: 0;
    border-end-start-radius: 0;
}

.input-group > .input-group-text {
    border-end-end-radius: 0;
    border-start-end-radius: 0;
}

.swal2-popup {
    border-radius: 1.5rem;
}

@media (max-width: 1199.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .app-content {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .main-content,
    .topbar,
    .app-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-shell {
        height: 280px;
    }

    .chart-shell.chart-shell-compact {
        height: 240px;
    }

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

    .chat-bubble {
        max-width: 100%;
    }
}

/* OxiLife design system: shared clinical tokens and accessible surfaces. */
:root {
    --oxi-primary: #155fa0;
    --oxi-primary-strong: #123b68;
    --oxi-secondary: #2e78b9;
    --oxi-cyan: #20b8e5;
    --oxi-cyan-soft: #8addf3;
    --oxi-success: #20a66a;
    --oxi-warning: #e8a317;
    --oxi-danger: #d94b55;
    --oxi-surface: #ffffff;
    --oxi-surface-soft: #edf4fa;
    --oxi-text: #12233d;
    --oxi-muted: #63758a;
    --oxi-border: rgba(21, 95, 160, .13);
    --oxi-radius-sm: 14px;
    --oxi-radius: 20px;
    --oxi-radius-lg: 28px;
    --oxi-shadow-soft: 0 6px 18px rgba(18, 59, 104, .09);
    --oxi-shadow-card: 0 12px 30px rgba(18, 59, 104, .12);
    --oxi-transition: 220ms cubic-bezier(.2, .8, .2, 1);
}

body {
    font-family: "Manrope", sans-serif;
    letter-spacing: -.01em;
}

h1, h2, h3, h4, h5, h6, .sidebar-brand strong, .auth-product-label {
    font-family: "Plus Jakarta Sans", sans-serif;
}

:focus-visible {
    outline: 3px solid rgba(32, 184, 229, .48);
    outline-offset: 3px;
}

.auth-shell {
    background: #123b68;
    overflow-x: hidden;
}

.auth-splash { position: fixed; z-index: 2000; inset: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 42%, rgba(32,184,229,.28), transparent 22rem), linear-gradient(145deg, #123b68, #155fa0); animation: auth-splash-enter .2s ease both; }
.auth-splash::before, .auth-splash::after { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; content: ""; }
.auth-splash::before { width: 25rem; height: 25rem; }
.auth-splash::after { width: 34rem; height: 34rem; }
.auth-splash-content { position: relative; z-index: 1; display: grid; justify-items: center; gap: .65rem; min-width: 260px; color: #fff; text-align: center; animation: auth-splash-mark .7s cubic-bezier(.2, .8, .2, 1) both; }
.auth-splash-logo { display: grid; place-items: center; width: 104px; height: 104px; margin-bottom: .45rem; padding: 7px; border: 1px solid rgba(255,255,255,.36); border-radius: 31px; background: linear-gradient(145deg, rgba(255,255,255,.20), rgba(255,255,255,.07)); box-shadow: 0 18px 40px rgba(3,29,58,.24); }
.auth-splash-logo img { width: 100%; height: 100%; border-radius: 23px; }
.auth-splash-wordmark { display: grid; gap: .25rem; }
.auth-splash-content strong { font-family: "Plus Jakarta Sans", sans-serif; font-size: 1rem; font-weight: 800; letter-spacing: .22em; }
.auth-splash-wordmark span { color: rgba(255,255,255,.66); font-size: .68rem; font-weight: 700; letter-spacing: .04em; }
.auth-splash-content p { display: inline-flex; align-items: center; gap: .42rem; margin: .15rem 0 .35rem; color: rgba(255,255,255,.82); font-size: .78rem; font-weight: 600; }
.auth-splash-content p i { color: #8addf3; font-size: .95rem; }
.auth-splash-progress { width: 160px; height: 3px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.16); }
.auth-splash-progress span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8addf3, #fff, #20b8e5); transform: translateX(-100%); animation: auth-splash-progress .84s cubic-bezier(.2,.8,.2,1) .08s forwards; }
.auth-splash.is-leaving { animation: auth-splash-leave .36s ease forwards; pointer-events: none; }

.auth-brand-panel {
    isolation: isolate;
    padding: clamp(3rem, 6vw, 7rem) clamp(3rem, 7vw, 9rem);
    align-items: center;
    background:
        radial-gradient(circle at 72% 18%, rgba(32, 184, 229, .30), transparent 25rem),
        linear-gradient(138deg, #123b68 0%, #155fa0 59%, #2e78b9 100%);
}

.auth-brand-panel::before {
    width: 37rem;
    height: 37rem;
    top: auto;
    right: -16rem;
    bottom: -21rem;
    filter: none;
    opacity: .08;
    background: repeating-radial-gradient(ellipse at center, transparent 0 23px, #fff 24px 26px, transparent 27px 49px);
}

.auth-brand-panel::after {
    width: 34rem;
    height: 18rem;
    top: -8rem;
    left: -12rem;
    filter: blur(34px);
    opacity: .20;
    background: #8addf3;
}

.auth-brand-content { max-width: 650px; animation: auth-reveal .48s ease both; }
.auth-brand-lockup { display: inline-flex; align-items: center; gap: 1rem; margin-bottom: 2.4rem; }
.auth-logo-shell { display: grid; place-items: center; width: 94px; height: 94px; padding: 5px; border: 1px solid rgba(255,255,255,.32); border-radius: 28px; background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.06)); box-shadow: 0 12px 26px rgba(3,29,58,.16); }
.auth-logo { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 21px; background: transparent; box-shadow: none; }
.auth-product-signature { display: grid; gap: .35rem; padding-left: .1rem; }
.auth-product-signature span { color: #fff; font-family: "Plus Jakarta Sans", sans-serif; font-size: .9rem; font-weight: 800; letter-spacing: .17em; }
.auth-product-signature small { color: rgba(255,255,255,.70); font-size: .73rem; font-weight: 600; letter-spacing: .02em; }
.auth-brand-content h1 { max-width: 650px; margin-bottom: 1.25rem; font-size: clamp(2.4rem, 3.7vw, 4.45rem); line-height: 1.12; letter-spacing: -.055em; }
.auth-brand-content .lead { max-width: 570px; font-size: 1.02rem; line-height: 1.75; color: rgba(255,255,255,.80) !important; }
.auth-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 2.4rem; }
.glass-stat { display: flex; gap: .75rem; min-height: 130px; margin: 0; padding: 1rem; border: 1px solid rgba(255,255,255,.18); border-radius: var(--oxi-radius-sm); background: rgba(255,255,255,.09); box-shadow: 0 10px 24px rgba(5, 33, 68, .10); backdrop-filter: blur(10px); transition: transform var(--oxi-transition), background var(--oxi-transition); }
.glass-stat:hover { transform: translateY(-2px); background: rgba(255,255,255,.13); }
.glass-stat > i { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; background: rgba(32,184,229,.38); }
.glass-stat strong { display: block; margin: .08rem 0 .35rem; font-size: .82rem; }
.glass-stat span { display: block; color: rgba(255,255,255,.70); font-size: .73rem; line-height: 1.5; }

.auth-access-panel { position: relative; padding: 2rem; background: radial-gradient(circle at 85% 14%, rgba(138,221,243,.30), transparent 18rem), radial-gradient(circle at 12% 82%, rgba(32,184,229,.18), transparent 17rem), linear-gradient(155deg, #edf4fa, #dcebf6); }
.auth-access-panel::before { content: ""; position: absolute; width: 21rem; height: 21rem; border-radius: 50%; right: -12rem; top: -7rem; background: rgba(255,255,255,.45); filter: blur(12px); }
.auth-card { position: relative; z-index: 1; max-width: 550px; border: 1px solid rgba(255,255,255,.72) !important; border-radius: var(--oxi-radius-lg); background: rgba(255,255,255,.90); box-shadow: var(--oxi-shadow-card), inset 0 1px 0 rgba(255,255,255,.92); backdrop-filter: blur(14px); transform-style: preserve-3d; animation: auth-reveal .42s .07s ease both; }
.auth-card .card-body { transition: opacity 70ms ease-out; }
.auth-card.is-access-switching { pointer-events: none; animation: auth-access-turn .28s cubic-bezier(.4, 0, .2, 1) both; }
.auth-card.is-access-switching .card-body { opacity: 0; }
.auth-card .card-body { padding: clamp(1.7rem, 4vw, 3rem) !important; }
.auth-segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 2rem; border: 1px solid rgba(21,95,160,.11); border-radius: 15px; background: #edf4fa; }
.auth-segmented a { display: flex; justify-content: center; align-items: center; gap: .48rem; min-height: 42px; border-radius: 11px; color: var(--oxi-muted); font-size: .79rem; font-weight: 800; text-decoration: none; transition: background var(--oxi-transition), color var(--oxi-transition), box-shadow var(--oxi-transition); }
.auth-segmented a.active { color: var(--oxi-primary-strong); background: #fff; box-shadow: 0 4px 10px rgba(18,59,104,.10); }
.auth-form-header { margin-bottom: 1.85rem; }
.auth-form-header h2 { margin: .75rem 0 .65rem; color: var(--oxi-text); font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.045em; }
.auth-form-header p { max-width: 430px; margin: 0; color: var(--oxi-muted); font-size: .91rem; line-height: 1.65; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: .4rem; padding: .34rem .62rem; border-radius: 999px; color: var(--oxi-primary-strong); background: rgba(32,184,229,.13); font-size: .7rem; font-weight: 800; }
.auth-eyebrow-success { color: #16784d; background: rgba(32,166,106,.12); }
.auth-form { display: grid; gap: 1.2rem; }
.auth-field label { display: flex; gap: .3rem; margin-bottom: .48rem; color: var(--oxi-text); font-size: .82rem; font-weight: 800; }
.auth-field label span { color: var(--oxi-muted); font-weight: 500; }
.auth-input-wrap { display: flex; align-items: center; min-height: 54px; overflow: hidden; border: 1px solid rgba(21,95,160,.14); border-radius: 15px; background: #f9fcff; box-shadow: inset 2px 2px 5px rgba(18,59,104,.045), inset -2px -2px 5px #fff; transition: border-color var(--oxi-transition), box-shadow var(--oxi-transition), background var(--oxi-transition); }
.auth-input-wrap:focus-within { border-color: var(--oxi-cyan); background: #fff; box-shadow: 0 0 0 4px rgba(32,184,229,.13), inset 1px 1px 3px rgba(18,59,104,.035); }
.auth-input-wrap.is-valid { border-color: rgba(32,166,106,.48); }
.auth-input-wrap.is-valid::after { padding-right: .7rem; color: var(--oxi-success); content: "✓"; font-weight: 800; }
.auth-input-wrap > i { width: 48px; color: var(--oxi-secondary); text-align: center; font-size: 1.03rem; }
.auth-input-wrap input { width: 100%; min-width: 0; min-height: 52px; border: 0; outline: 0; color: var(--oxi-text); background: transparent; font-size: .94rem; }
.auth-input-wrap input::placeholder { color: #9aaabd; opacity: 1; }
.auth-password-toggle { display: grid; flex: 0 0 46px; place-items: center; min-height: 46px; border: 0; color: var(--oxi-muted); background: transparent; transition: color var(--oxi-transition), transform var(--oxi-transition); }
.auth-password-toggle:hover { color: var(--oxi-primary); transform: translateY(-1px); }
.auth-options { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: -.1rem; font-size: .78rem; }
.auth-options a, .auth-back-link { color: var(--oxi-primary); font-weight: 800; text-decoration: none; }
.auth-check { display: inline-flex; align-items: center; gap: .45rem; color: var(--oxi-muted); cursor: pointer; }
.auth-check input { width: 16px; height: 16px; accent-color: var(--oxi-primary); }
.auth-submit { display: flex; justify-content: center; align-items: center; gap: .7rem; width: 100%; min-height: 54px; margin-top: .15rem; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(115deg, var(--oxi-primary-strong), var(--oxi-primary) 47%, var(--oxi-cyan)); box-shadow: 0 10px 18px rgba(21,95,160,.24); font-family: "Plus Jakarta Sans", sans-serif; font-size: .9rem; font-weight: 800; transition: transform var(--oxi-transition), box-shadow var(--oxi-transition), opacity var(--oxi-transition); }
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 22px rgba(21,95,160,.28); }
.auth-submit:active { transform: translateY(0); box-shadow: 0 5px 12px rgba(21,95,160,.22); }
.auth-submit:disabled { cursor: wait; opacity: .72; transform: none; }
.auth-submit.is-loading i { display: none; }
.auth-submit.is-loading::after { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; content: ""; animation: auth-spin .7s linear infinite; }
.auth-demo { margin-top: 1.55rem; padding-top: 1.1rem; border-top: 1px solid var(--oxi-border); color: var(--oxi-muted); font-size: .76rem; }
.auth-demo summary { display: flex; justify-content: space-between; align-items: center; color: var(--oxi-primary); font-weight: 800; cursor: pointer; list-style: none; }
.auth-demo summary::-webkit-details-marker { display: none; }
.auth-demo[open] summary i { transform: rotate(180deg); }
.auth-demo p { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .85rem 0 0; }
.auth-demo p strong { width: 100%; color: var(--oxi-text); }
.auth-demo code { padding: .25rem .45rem; border-radius: 7px; color: var(--oxi-primary-strong); background: #edf4fa; font-family: "Manrope", sans-serif; font-weight: 700; }
.auth-back-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .79rem; }
.auth-form-header-spaced { margin-top: 1.7rem; }
.system-flash { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: 1.25rem; padding: .8rem .9rem; border: 1px solid; border-radius: var(--oxi-radius-sm); font-size: .8rem; line-height: 1.5; }
.system-flash-success { color: #12683f; border-color: rgba(32,166,106,.27); background: rgba(32,166,106,.09); }
.system-flash-warning { color: #8d5b00; border-color: rgba(232,163,23,.30); background: rgba(232,163,23,.10); }
.system-flash-error { color: #a62b35; border-color: rgba(217,75,85,.28); background: rgba(217,75,85,.09); }
.auth-mobile-brand { width: min(550px, 100%); align-items: center; gap: .8rem; margin: 1rem 0; color: #fff; }
.auth-mobile-brand img { width: 48px; height: 48px; padding: .22rem; border-radius: 14px; background: rgba(255,255,255,.15); }
.auth-mobile-brand span, .auth-mobile-brand strong { display: block; }
.auth-mobile-brand span { font-size: .66rem; font-weight: 800; letter-spacing: .14em; }
.auth-mobile-brand strong { font-size: .85rem; }

.app-shell { background: var(--oxi-surface-soft); }
.app-sidebar { width: 268px; padding: 1.35rem; background: linear-gradient(175deg, #123b68, #155fa0 67%, #246daa); box-shadow: 10px 0 30px rgba(18,59,104,.15); }
.sidebar-brand { padding: .35rem .3rem .9rem; }
.sidebar-logo { width: 50px; height: 50px; border-radius: 15px; }
.sidebar-link { padding: .76rem .85rem; border: 1px solid transparent; background: transparent; font-size: .86rem; }
.sidebar-link:hover, .sidebar-link.active { transform: translateX(2px); border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.13); }
.sidebar-footer { color: #fff; border: 1px solid rgba(255,255,255,.11); background: rgba(4,29,62,.15); }
.sidebar-footer .text-secondary { color: rgba(255,255,255,.65) !important; }
.app-content { margin-left: 268px; width: calc(100% - 268px); }
.topbar { padding: 1.15rem 1.75rem; border-bottom-color: rgba(21,95,160,.10); background: rgba(237,244,250,.82); }
.topbar-icon { border-color: var(--oxi-border) !important; background: #fff !important; box-shadow: 0 2px 7px rgba(18,59,104,.09); }
.main-content { padding: 1.75rem; }
.hero-panel, .metric-card, .surface-card, .alert-card, .timeline-card, .card { border-color: var(--oxi-border) !important; box-shadow: var(--oxi-shadow-soft); }
.hero-panel { border-radius: var(--oxi-radius); background: #fff; }
.metric-card { border-radius: var(--oxi-radius); background: #fff; }
.metric-icon { border-radius: 15px; }
.card { border-radius: var(--oxi-radius) !important; background: #fff; }
.table-responsive { border: 1px solid rgba(21,95,160,.08); border-radius: var(--oxi-radius-sm); }
.table > :not(caption) > * > * { padding: .85rem .9rem; }
.table thead th { color: var(--oxi-muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: #f5f9fc; }
.form-control, .form-select, .input-group-text { min-height: 46px; border-color: var(--oxi-border); background: #fbfdff; }
.form-control:focus, .form-select:focus { border-color: var(--oxi-cyan); box-shadow: 0 0 0 4px rgba(32,184,229,.13); }
.btn-primary { box-shadow: 0 7px 14px rgba(21,95,160,.20); transition: transform var(--oxi-transition), box-shadow var(--oxi-transition); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 17px rgba(21,95,160,.25); }

.clinical-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.clinical-section-heading > div > span { display: block; margin-bottom: .28rem; color: var(--oxi-muted); font-size: .67rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.clinical-section-heading h3 { color: var(--oxi-text); letter-spacing: -.025em; }
.alert-count { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: var(--oxi-danger); box-shadow: 0 5px 12px rgba(217,75,85,.22); font-size: .78rem; font-weight: 800; }
.clinical-alert-list { display: grid; gap: .8rem; }
.clinical-alert { display: flex; gap: .85rem; padding: 1rem; border: 1px solid var(--oxi-border); border-radius: 16px; background: #fbfdff; transition: transform var(--oxi-transition), border-color var(--oxi-transition), box-shadow var(--oxi-transition); }
.clinical-alert:hover { transform: translateY(-2px); border-color: rgba(21,95,160,.24); box-shadow: 0 7px 16px rgba(18,59,104,.07); }
.clinical-alert-icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 1rem; }
.clinical-alert.is-critical .clinical-alert-icon { color: var(--oxi-danger); background: rgba(217,75,85,.11); }
.clinical-alert.is-warning .clinical-alert-icon { color: #a66c00; background: rgba(232,163,23,.13); }
.clinical-alert-content { min-width: 0; flex: 1; }
.clinical-alert-title { display: flex; justify-content: space-between; gap: .7rem; align-items: center; }
.clinical-alert-title strong { color: var(--oxi-text); font-size: .91rem; }
.clinical-alert-title span { padding: .25rem .48rem; border-radius: 999px; color: var(--oxi-danger); background: rgba(217,75,85,.11); font-size: .66rem; font-weight: 800; }
.clinical-alert.is-warning .clinical-alert-title span { color: #8d5b00; background: rgba(232,163,23,.14); }
.clinical-alert-content small { display: block; margin-top: .2rem; color: var(--oxi-primary); font-size: .75rem; font-weight: 700; }
.clinical-alert-content p { margin: .48rem 0 0; color: var(--oxi-muted); font-size: .79rem; line-height: 1.52; }
.clinical-section-heading-table > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--oxi-primary); background: rgba(32,184,229,.12); }
.clinical-table-shell { border: 1px solid var(--oxi-border); border-radius: 16px; }
.clinical-evolutions-table { min-width: 720px; table-layout: fixed; }
.clinical-evolutions-table th { padding: .85rem 1rem !important; color: var(--oxi-muted); background: #f5f9fc; font-size: .66rem; letter-spacing: .055em; }
.clinical-evolutions-table td { padding: 1rem !important; color: var(--oxi-text); font-size: .82rem; vertical-align: middle; }
.clinical-evolutions-table tbody tr { transition: background var(--oxi-transition); }
.clinical-evolutions-table tbody tr:hover { background: rgba(32,184,229,.055); }
.clinical-evolutions-table .evolution-date { width: 18%; font-weight: 700; }
.clinical-evolutions-table .evolution-patient { width: 21%; font-weight: 700; }
.clinical-evolutions-table .evolution-diagnosis { width: 28%; color: var(--oxi-muted); }
.clinical-evolutions-table .evolution-status { width: 15%; }
.clinical-evolutions-table .evolution-doctor { width: 18%; color: var(--oxi-muted); }
.clinical-evolutions-table time { white-space: nowrap; }
.clinical-evolutions-table .badge { padding: .42rem .62rem; font-size: .69rem; }

.settings-page { max-width: 1500px; margin: 0 auto; }
.settings-page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.5rem; padding: .2rem .15rem; }
.settings-hero { position: relative; align-items: center; min-height: 166px; padding: 1.5rem 1.65rem; overflow: hidden; border: 1px solid rgba(21,95,160,.13); border-radius: var(--oxi-radius); background: linear-gradient(112deg, #fff 0%, #f8fcff 57%, #e0f4fb 100%); box-shadow: var(--oxi-shadow-soft); }
.settings-hero::before { position: absolute; top: -78px; right: 12%; width: 220px; height: 220px; border: 34px solid rgba(32,184,229,.08); border-radius: 50%; content: ""; }
.settings-hero::after { position: absolute; right: -40px; bottom: -95px; width: 250px; height: 250px; border: 1px solid rgba(21,95,160,.10); border-radius: 50%; box-shadow: 0 0 0 28px rgba(21,95,160,.035), 0 0 0 56px rgba(21,95,160,.025); content: ""; }
.settings-hero-icon { position: relative; z-index: 1; display: grid; flex: 0 0 58px; place-items: center; width: 58px; height: 58px; margin-right: .1rem; border: 1px solid rgba(32,184,229,.20); border-radius: 18px; color: var(--oxi-primary); background: linear-gradient(145deg, rgba(32,184,229,.18), rgba(21,95,160,.09)); font-size: 1.45rem; }
.settings-hero-content { position: relative; z-index: 1; flex: 1; min-width: 0; }
.settings-hero-content h2 { margin: .35rem 0 .32rem; }
.settings-hero-content p { max-width: 700px; }
.settings-hero-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.settings-hero-meta span { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .55rem; border: 1px solid rgba(21,95,160,.11); border-radius: 8px; color: var(--oxi-primary-strong); background: rgba(255,255,255,.68); font-size: .7rem; font-weight: 800; }
.settings-hero-side { position: relative; z-index: 1; display: grid; justify-items: end; gap: .6rem; text-align: right; }
.settings-hero-side small { color: var(--oxi-muted); font-size: .69rem; }
.settings-kicker { display: inline-flex; align-items: center; gap: .4rem; color: var(--oxi-primary); font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.settings-page-header h2 { margin: .35rem 0 .4rem; color: var(--oxi-text); font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -.045em; }
.settings-page-header p { margin: 0; color: var(--oxi-muted); font-size: .9rem; }
.settings-status { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border: 1px solid rgba(32,166,106,.18); border-radius: 999px; color: #16784d; background: rgba(32,166,106,.09); font-size: .76rem; font-weight: 800; }
.settings-form-card, .settings-backup-card, .settings-audit-card { border: 1px solid var(--oxi-border); border-radius: var(--oxi-radius); background: #fff; box-shadow: var(--oxi-shadow-soft); }
.settings-form-card { overflow: hidden; }
.settings-form-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--oxi-border); background: linear-gradient(115deg, rgba(32,184,229,.08), rgba(255,255,255,.4)); }
.settings-form-topbar h3, .settings-backup-card h3, .settings-audit-card h3 { margin: 0; color: var(--oxi-text); font-family: "Plus Jakarta Sans", sans-serif; font-size: 1.02rem; font-weight: 800; }
.settings-form-topbar p, .settings-backup-card p { margin: .3rem 0 0; color: var(--oxi-muted); font-size: .78rem; }
.settings-save-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .45rem; min-height: 42px; padding: .55rem 1rem; border-radius: 12px; font-size: .8rem; font-weight: 800; }
.settings-group { padding: 1.5rem; border-bottom: 1px solid var(--oxi-border); }
.settings-group-last { border-bottom: 0; }
.settings-group-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.15rem; }
.settings-group-icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--oxi-primary); background: rgba(32,184,229,.12); }
.settings-group-heading h4 { margin: 0; color: var(--oxi-text); font-size: .92rem; font-weight: 800; }
.settings-group-heading p { margin: .15rem 0 0; color: var(--oxi-muted); font-size: .75rem; }
.settings-form-card .form-label { margin-bottom: .4rem; color: var(--oxi-text); font-size: .76rem; font-weight: 800; }
.settings-form-card .form-control { min-height: 44px; border-radius: 12px; font-size: .86rem; }
.settings-help { display: block; margin-top: .35rem; color: var(--oxi-muted); font-size: .68rem; }
.settings-aside { position: sticky; top: 1.25rem; display: grid; gap: 1rem; }
.settings-backup-card { display: grid; grid-template-columns: 42px 1fr; gap: .8rem; padding: 1.1rem; }
.settings-backup-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #16784d; background: rgba(32,166,106,.12); }
.settings-backup-card form { grid-column: 1 / -1; }
.settings-backup-card .btn { min-height: 42px; border-radius: 12px; font-size: .8rem; font-weight: 800; }
.settings-audit-card { overflow: hidden; }
.settings-audit-header { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.2rem 1rem; border-bottom: 1px solid var(--oxi-border); }
.settings-audit-header span { display: block; margin-bottom: .25rem; color: var(--oxi-muted); font-size: .67rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.settings-audit-header > i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--oxi-primary); background: rgba(32,184,229,.12); }
.settings-audit-list { max-height: 470px; padding: .45rem 1.2rem; overflow-y: auto; scrollbar-width: thin; }
.settings-audit-item { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--oxi-border); }
.settings-audit-item:last-child { border-bottom: 0; }
.settings-audit-item time { color: var(--oxi-muted); font-size: .69rem; font-weight: 700; line-height: 1.55; }
.settings-audit-content { min-width: 0; }
.settings-audit-content > div { display: flex; align-items: center; gap: .45rem; }
.settings-audit-content span { padding: .2rem .4rem; border-radius: 6px; color: var(--oxi-primary-strong); background: rgba(21,95,160,.09); font-size: .63rem; font-weight: 800; text-transform: uppercase; }
.settings-audit-content strong { color: var(--oxi-text); font-size: .76rem; font-weight: 800; }
.settings-audit-content p { margin: .35rem 0 0; color: var(--oxi-muted); font-size: .75rem; line-height: 1.48; overflow-wrap: anywhere; }

.module-card { overflow: hidden; }
.module-card > .card-body { padding: 1.6rem !important; }
.module-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.45rem; }
.module-title-group { min-width: 0; }
.module-kicker { display: inline-flex; align-items: center; gap: .38rem; margin-bottom: .45rem; color: var(--oxi-primary); font-size: .68rem; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.module-title-group h2 { color: var(--oxi-text); letter-spacing: -.035em; }
.module-title-group p { max-width: 680px; font-size: .84rem; }
.module-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.module-actions .btn, .module-primary-action, .module-month-picker .btn { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; min-height: 41px; border-radius: 11px; font-size: .78rem; font-weight: 800; }
.module-primary-action { padding-right: 1rem; padding-left: 1rem; }
.module-table-shell { border: 1px solid var(--oxi-border); border-radius: 16px; }
.module-table { min-width: 760px; margin: 0; }
.module-table thead th { padding: .82rem .95rem; background: #f5f9fc; font-size: .67rem; letter-spacing: .055em; }
.module-table tbody td { padding: .95rem; font-size: .82rem; }
.module-table .btn { border-radius: 8px; font-size: .7rem; font-weight: 800; }
.module-month-picker { display: flex; gap: .55rem; align-items: center; }
.module-month-picker .form-control { min-width: 165px; }
.calendar-grid { padding: .25rem; border: 1px solid var(--oxi-border); border-radius: 18px; background: #f8fbfe; }
.calendar-head { padding: .65rem .2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.calendar-day { min-height: 142px; border-radius: 14px; box-shadow: none; }
.calendar-day > strong { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--oxi-primary-strong); background: rgba(32,184,229,.10); font-size: .78rem; }
.calendar-event { padding: .42rem .52rem; border-radius: 8px; font-size: .72rem; font-weight: 700; }
.report-export-card { position: relative; overflow: hidden; transition: transform var(--oxi-transition), box-shadow var(--oxi-transition); }
.report-export-card::after { position: absolute; right: -35px; bottom: -45px; width: 120px; height: 120px; border-radius: 50%; background: rgba(32,184,229,.08); content: ""; }
.report-export-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(18,59,104,.13) !important; }
.report-export-card .card-body { position: relative; z-index: 1; }
.report-export-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 1rem; border-radius: 13px; color: var(--oxi-primary); background: rgba(32,184,229,.12); font-size: 1.1rem; }
.report-export-card h2 { color: var(--oxi-text); }
.report-export-card p { min-height: 40px; font-size: .8rem; }
.report-export-actions { display: flex; gap: .5rem; }
.report-export-actions .btn { display: inline-flex; align-items: center; gap: .35rem; border-radius: 9px; font-size: .73rem; font-weight: 800; }
.patient-portal-hero { border-color: rgba(32,166,106,.18); background: linear-gradient(115deg, #fff, rgba(231,250,241,.86)); }
.patient-portal-hero .badge i { margin-right: .35rem; }
.patient-section-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.patient-section-heading span { display: block; margin-bottom: .22rem; color: var(--oxi-muted); font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.patient-section-heading h3 { color: var(--oxi-text); font-size: 1rem; }
.patient-section-heading > i { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: #16784d; background: rgba(32,166,106,.11); }

html[data-theme="dark"] .module-table thead th { background: #172941; }
html[data-theme="dark"] .module-table-shell, html[data-theme="dark"] .calendar-grid { border-color: rgba(138,221,243,.14); background: #101d30; }
html[data-theme="dark"] .patient-portal-hero { background: linear-gradient(115deg, #14243a, #15362f); }

.patient-summary-card, .patient-alerts-card, .patient-chart-card, .patient-timeline-card, .patient-messages-card { overflow: hidden; }
.patient-summary-list { display: grid; gap: .55rem; }
.patient-summary-list > div { padding: .72rem .8rem; border: 1px solid var(--oxi-border); border-radius: 12px; background: #f9fcff; }
.patient-summary-list strong { display: block; margin-bottom: .2rem; color: var(--oxi-text); font-size: .75rem; }
.patient-summary-list p { font-size: .8rem; line-height: 1.45; }
.patient-alerts-card .surface-card { border-left: 3px solid #ef5f6c; }
.patient-chart-card canvas { max-height: 310px; }
.patient-timeline-card .timeline-item { border-radius: 14px; }
.patient-messages-card .chat-panel { min-height: 280px; border: 1px solid var(--oxi-border); border-radius: 16px; background: #f8fbfe; }
.patient-messages-card textarea { resize: vertical; min-height: 112px; }
.professional-messages-card .surface-card { transition: background var(--oxi-transition), border-color var(--oxi-transition), transform var(--oxi-transition); }
.professional-messages-card .surface-card:hover { transform: translateX(3px); }
.professional-messages-card .chat-panel { min-height: 360px; border: 1px solid var(--oxi-border); border-radius: 16px; background: #f8fbfe; }
.professional-messages-card textarea { resize: vertical; min-height: 105px; }
.patient-profile-hero { overflow: hidden; border: 1px solid rgba(32,184,229,.2); background: linear-gradient(112deg, #fff, #edf8ff); }
.patient-profile-hero .patient-photo-lg { border: 4px solid rgba(32,184,229,.18); box-shadow: 0 10px 24px rgba(18,59,104,.13); }
.patient-profile-actions .btn { font-size: .74rem; }
.patient-detail-card { overflow: hidden; }
.patient-detail-card .timeline-item { border-radius: 14px; }
.patient-detail-card .d-grid > div:not(.surface-card) { padding: .72rem .8rem; border: 1px solid var(--oxi-border); border-radius: 12px; background: #f9fcff; }
.patient-detail-card .d-grid strong { color: var(--oxi-text); font-size: .78rem; }
.patient-export-card { overflow: hidden; border-top: 3px solid var(--oxi-primary); }
.evolution-form-card textarea { resize: vertical; min-height: 92px; }

html[data-theme="dark"] .patient-summary-list > div,
html[data-theme="dark"] .patient-messages-card .chat-panel,
html[data-theme="dark"] .professional-messages-card .chat-panel,
html[data-theme="dark"] .patient-detail-card .d-grid > div:not(.surface-card) { border-color: rgba(138,221,243,.14); background: #101d30; }
html[data-theme="dark"] .patient-profile-hero { border-color: rgba(138,221,243,.14); background: linear-gradient(112deg, #14243a, #172941); }

html[data-theme="dark"] .settings-form-card,
html[data-theme="dark"] .settings-backup-card,
html[data-theme="dark"] .settings-audit-card { background: #14243a; }
html[data-theme="dark"] .settings-hero { border-color: rgba(138,221,243,.14); background: linear-gradient(112deg, #14243a, #172941); }
html[data-theme="dark"] .settings-hero-meta span { border-color: rgba(138,221,243,.14); color: #cdeeff; background: rgba(13,24,41,.35); }
html[data-theme="dark"] .settings-form-topbar { background: #172941; }
html[data-theme="dark"] .settings-status { color: #73d8a8; background: rgba(32,166,106,.13); }
html[data-theme="dark"] .settings-form-card .form-label,
html[data-theme="dark"] .settings-audit-content strong { color: var(--oxi-text); }

@media (max-width: 1199.98px) { .settings-aside { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } }
@media (max-width: 767.98px) { .settings-page-header { align-items: flex-start; flex-direction: column; } .settings-hero { align-items: flex-start; min-height: auto; padding: 1.25rem; } .settings-hero-icon { flex-basis: 48px; width: 48px; height: 48px; border-radius: 15px; font-size: 1.15rem; } .settings-hero-side { justify-items: start; text-align: left; } .settings-form-topbar { align-items: flex-start; flex-direction: column; } .settings-save-button { width: 100%; justify-content: center; } .settings-aside { grid-template-columns: 1fr; } .settings-audit-list { max-height: 390px; } }
@media (max-width: 767.98px) { .module-card > .card-body { padding: 1.2rem !important; } .module-header { align-items: flex-start; flex-direction: column; margin-bottom: 1.15rem; } .module-actions, .module-month-picker { width: 100%; } .module-actions .btn { flex: 1 1 auto; } .module-month-picker .form-control { flex: 1; min-width: 0; } .calendar-day { min-height: 100px; } .report-export-card p { min-height: 0; } .patient-section-heading { margin-bottom: .8rem; } }
@media (max-width: 420px) { .settings-group, .settings-form-topbar { padding: 1.1rem; } .settings-audit-item { grid-template-columns: 1fr; gap: .35rem; } .settings-audit-item time { color: var(--oxi-primary); } }

@keyframes auth-reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@keyframes auth-access-turn { 0% { transform: perspective(1100px) rotateY(0); } 50% { transform: perspective(1100px) rotateY(90deg); } 100% { transform: perspective(1100px) rotateY(180deg); } }
@keyframes auth-splash-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes auth-splash-mark { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes auth-splash-leave { to { opacity: 0; visibility: hidden; } }
@keyframes auth-splash-progress { to { transform: translateX(0); } }

@supports not ((backdrop-filter: blur(1px))) { .auth-card { background: rgba(255,255,255,.98); } .glass-stat { background: rgba(255,255,255,.14); } }
@media (max-width: 1199.98px) { .auth-metrics { grid-template-columns: 1fr; max-width: 430px; } .glass-stat { min-height: auto; } }
@media (max-width: 991.98px) {
    .auth-access-panel { flex-direction: column; align-items: center !important; justify-content: flex-start !important; min-height: 100vh; padding: 1.25rem 1rem 2rem; background: linear-gradient(155deg, #123b68, #2e78b9); }
    .auth-mobile-brand { display: flex !important; width: min(550px, 100%); margin: 0 0 1rem; padding: .25rem .2rem; }
    .auth-card { width: min(550px, 100%); margin: 0; }
    .auth-form-header { text-align: center; }
    .auth-form-header p { margin-right: auto; margin-left: auto; }
}
@media (max-width: 767.98px) {
    .auth-access-panel { width: 100vw; min-width: 0; max-width: 100vw; padding: 1rem 16px 1.5rem; overflow-x: clip; }
    .auth-card { box-sizing: border-box; width: calc(100vw - 32px) !important; min-width: 0; max-width: 550px; border-radius: 22px; }
    .auth-card .card-body { min-width: 0; }
    .auth-options { align-items: flex-start; flex-direction: column; }
    .auth-card .card-body { padding: 1.45rem !important; }
    .auth-segmented { min-width: 0; margin-bottom: 1.5rem; overflow: hidden; }
    .auth-segmented a { min-width: 0; padding: 0 .3rem; font-size: .72rem; white-space: normal; }
    .auth-form-header h2 { overflow-wrap: anywhere; }
    .auth-input-wrap, .auth-input-wrap input { min-width: 0; }
    .topbar { align-items: flex-start; padding: .85rem 1rem; }
    .topbar > .d-flex:first-child { min-width: 0; gap: .65rem !important; }
    .topbar h1 { overflow: hidden; font-size: 1.15rem; text-overflow: ellipsis; white-space: nowrap; }
    .topbar > .d-flex:last-child { flex-shrink: 0; gap: .35rem !important; }
    .topbar-icon { width: 40px; height: 40px; }
    .user-pill { padding: .25rem; }
    .user-avatar { width: 36px; height: 36px; }
    .topbar .btn-primary { padding-right: .7rem !important; padding-left: .7rem !important; }
    .app-sidebar { width: 268px; }
    .app-content { margin-left: 0; width: 100%; }
}
@media (max-width: 390px) {
    .auth-access-panel { padding-right: 12px; padding-left: 12px; }
    .auth-card .card-body { padding: 1.2rem !important; }
    .auth-segmented a { gap: .28rem; font-size: .68rem; }
    .auth-form-header h2 { font-size: 1.7rem; }
    .topbar { gap: .45rem; padding-right: .7rem; padding-left: .7rem; }
    .topbar > .d-flex:first-child { gap: .4rem !important; }
    .topbar > .d-flex:last-child { gap: .25rem !important; }
    .topbar .btn-primary { min-height: 40px; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* Dark mode uses solid clinical surfaces; it never inverts light cards. */
html[data-theme="dark"] {
    color-scheme: dark;
    --oxi-surface: #14243a;
    --oxi-surface-soft: #0d1829;
    --oxi-text: #edf6ff;
    --oxi-muted: #a9bed2;
    --oxi-border: rgba(138, 221, 243, .16);
    --oxi-shadow: 0 6px 18px rgba(0, 0, 0, .20);
    --oxi-shadow-soft: 0 7px 20px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .app-shell { color: var(--oxi-text); background: #0d1829; }
html[data-theme="dark"] .topbar { border-bottom-color: rgba(138,221,243,.12); background: #101d30; }
html[data-theme="dark"] .topbar-icon { color: #edf6ff; border-color: rgba(138,221,243,.14) !important; background: #172941 !important; box-shadow: none; }
html[data-theme="dark"] .user-pill { border-color: rgba(138,221,243,.15); background: #14243a; }
html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .surface-card,
html[data-theme="dark"] .alert-card,
html[data-theme="dark"] .timeline-card,
html[data-theme="dark"] .card { background: #14243a; border-color: rgba(138,221,243,.14) !important; box-shadow: var(--oxi-shadow-soft); }
html[data-theme="dark"] .hero-panel { background: linear-gradient(120deg, #172a43, #14243a); }
html[data-theme="dark"] .hero-panel h2,
html[data-theme="dark"] .card h3,
html[data-theme="dark"] .metric-card h3,
html[data-theme="dark"] .app-shell .text-secondary,
html[data-theme="dark"] .metric-card small { color: var(--oxi-text) !important; }
html[data-theme="dark"] .hero-panel p,
html[data-theme="dark"] .card p,
html[data-theme="dark"] .app-shell .text-secondary,
html[data-theme="dark"] .metric-card small { color: var(--oxi-muted) !important; }
html[data-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-color: #edf6ff; --bs-table-striped-color: #edf6ff; --bs-table-hover-color: #ffffff; }
html[data-theme="dark"] .table thead th { color: #a9bed2; background: #172941; }
html[data-theme="dark"] .table-responsive { border-color: rgba(138,221,243,.14); }
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] .offcanvas { color: #edf6ff; border-color: rgba(138,221,243,.14); background: #14243a; }
html[data-theme="dark"] .form-control::placeholder { color: #8ca7c0; }
html[data-theme="dark"] .app-footer { border-top-color: rgba(138,221,243,.12); }
.app-shell { color: var(--oxi-text); background: #edf4fa; }
.app-shell .text-secondary { color: #63758a !important; }

/* Guided support and pharmacy locator share the clinical visual system. */
.oxi-assistant-fab { position: fixed; z-index: 1040; right: 24px; bottom: 24px; display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1rem; color: #fff; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--oxi-primary), #14b9d9); box-shadow: 0 12px 28px rgba(17,103,175,.28); font-weight: 800; }.oxi-assistant-fab:hover { color: #fff; transform: translateY(-2px); }.oxi-assistant-canvas { width: min(420px,100vw); border-left: 1px solid var(--oxi-border); }.oxi-assistant-canvas .offcanvas-header { padding: 1.35rem 1.4rem 1rem; border-bottom: 1px solid var(--oxi-border); }.oxi-assistant-canvas .offcanvas-title { margin-top: .25rem; color: var(--oxi-text); font-family: "Plus Jakarta Sans",sans-serif; font-weight: 800; }
.assistant-welcome { display: flex; gap: .85rem; padding: 1rem; margin-bottom: 1rem; border: 1px solid #cceaf4; border-radius: 18px; color: #173557; background: #edf9fc; }.assistant-welcome > i { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; color: #087b9e; border-radius: 12px; background: #cff3fa; }.assistant-welcome strong { display: block; margin-bottom: .18rem; }.assistant-welcome p,.assistant-disclaimer { margin: 0; color: #61758e; font-size: .82rem; line-height: 1.5; }.assistant-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }.assistant-suggestion { padding: .45rem .7rem; color: #18568b; border: 1px solid #cddfeb; border-radius: 999px; background: #fff; font-size: .8rem; font-weight: 700; }.assistant-suggestion:hover { color: #fff; border-color: var(--oxi-primary); background: var(--oxi-primary); }.assistant-response { min-height: 116px; padding: 1rem; margin-bottom: 1rem; border-radius: 16px; color: #29445f; background: #f3f7fb; line-height: 1.55; }.assistant-response strong { display: block; margin-bottom: .35rem; color: var(--oxi-text); }.assistant-response p { margin-bottom: .65rem; }.assistant-response-link { color: var(--oxi-primary); font-size: .88rem; font-weight: 800; text-decoration: none; }.assistant-form .form-control { min-height: 48px; border-right: 0; border-radius: 14px 0 0 14px; }.assistant-form .btn { min-width: 52px; border-radius: 0 14px 14px 0; }.assistant-disclaimer { padding-top: 1rem; }
.guidance-hero,.pharmacy-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 230px; padding: clamp(1.5rem,3vw,3rem); overflow: hidden; border: 1px solid #c9e3f1; border-radius: 28px; color: #fff; background: linear-gradient(115deg,#123d6b,#176fa6 62%,#18b6c9); box-shadow: 0 14px 32px rgba(26,91,140,.15); }.guidance-hero::after,.pharmacy-hero::after { position: absolute; right: -80px; bottom: -150px; width: 310px; height: 310px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; content: ""; }.guidance-hero-copy,.pharmacy-hero > div { position: relative; z-index: 1; max-width: 720px; }.guidance-eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .7rem; border-radius: 999px; color: #0e547b; background: #dff8fc; font-size: .78rem; font-weight: 800; }.guidance-hero h2,.pharmacy-hero h2 { margin: .9rem 0 .7rem; color: #fff; font-family: "Plus Jakarta Sans",sans-serif; font-size: clamp(1.75rem,3vw,2.55rem); font-weight: 800; letter-spacing: -.045em; }.guidance-hero p,.pharmacy-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.88); font-size: 1.02rem; line-height: 1.65; }.guidance-hero-button { margin-top: 1.25rem; padding: .72rem 1.05rem; color: #164772; border-radius: 999px; background: #fff; font-weight: 800; }.guidance-hero-button:hover { color: #164772; background: #e9f8fb; }.guidance-hero-mark,.pharmacy-hero-icon { position: relative; z-index: 1; display: grid; flex: 0 0 130px; width: 130px; height: 130px; place-content: center; text-align: center; border: 1px solid rgba(255,255,255,.25); border-radius: 36px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }.guidance-hero-mark i,.pharmacy-hero-icon i { font-size: 3.2rem; }.guidance-hero-mark span { margin-top: -.45rem; font-size: .72rem; font-weight: 800; letter-spacing: .18em; }
.guidance-card,.guidance-safety-card,.pharmacy-map-card,.pharmacy-info-card,.pharmacy-disclaimer { border: 1px solid var(--oxi-border) !important; box-shadow: var(--oxi-shadow-soft) !important; }.guidance-card-heading { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.5rem; }.guidance-card-heading > div > span { color: #68809b; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.guidance-card h3,.guidance-safety-card h3,.pharmacy-info-card h3,.pharmacy-disclaimer h3 { margin: .2rem 0 .65rem; color: var(--oxi-text); font-family: "Plus Jakarta Sans",sans-serif; font-size: 1.15rem; font-weight: 800; }.guidance-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; font-size: 1.2rem; }.guidance-icon.blue { color: #147ad1; background: #deefff; }.guidance-icon.green { color: #16865a; background: #def6e9; }.guidance-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }.guidance-action { display: flex; align-items: center; gap: .75rem; min-height: 82px; padding: .85rem; color: #1b4267; border: 1px solid #d8e5ef; border-radius: 16px; text-align: left; background: #fff; font-size: .9rem; font-weight: 800; transition: border-color .18s ease,transform .18s ease,box-shadow .18s ease; }.guidance-action:hover { color: #1b4267; border-color: #7ec5e1; box-shadow: 0 8px 16px rgba(22,89,137,.09); transform: translateY(-2px); }.guidance-action i { color: #1689bd; font-size: 1.2rem; }.guidance-safety-card { background: linear-gradient(150deg,#f2fbf7,#fff) !important; }.guidance-safety-card p,.pharmacy-info-card p,.pharmacy-disclaimer p { color: var(--oxi-muted); line-height: 1.62; }
.pharmacy-map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }.pharmacy-map-toolbar h3 { margin: .35rem 0 0; color: var(--oxi-text); font-size: 1.2rem; font-weight: 800; }.pharmacy-map-wrap { min-height: 430px; overflow: hidden; border: 1px solid #d7e5ef; border-radius: 20px; background: #eaf2f8; }.pharmacy-map-wrap iframe { display: block; width: 100%; height: 430px; border: 0; }.pharmacy-location-note { display: flex; gap: .5rem; align-items: flex-start; padding: .85rem .25rem 0; color: #62778e; font-size: .82rem; }.pharmacy-location-note i { color: #1689bd; }.pharmacy-info-card .guidance-icon { margin-bottom: 1rem; }.pharmacy-disclaimer { background: #fffaf0 !important; }.pharmacy-disclaimer > .card-body > .d-flex > i { color: #be7b11; font-size: 1.25rem; }.pharmacy-registry-link { display: inline-flex; gap: .35rem; margin-top: .5rem; color: #92610d; font-size: .86rem; font-weight: 800; text-decoration: none; }
html[data-theme="dark"] .assistant-welcome,html[data-theme="dark"] .assistant-response { color: #d9ebfa; border-color: rgba(138,221,243,.15); background: #172941; }html[data-theme="dark"] .assistant-welcome p,html[data-theme="dark"] .assistant-disclaimer { color: #a9bed2; }html[data-theme="dark"] .assistant-suggestion,html[data-theme="dark"] .guidance-action { color: #d9ebfa; border-color: rgba(138,221,243,.15); background: #14243a; }html[data-theme="dark"] .guidance-action:hover { color: #fff; border-color: #57c7e6; }html[data-theme="dark"] .guidance-safety-card,html[data-theme="dark"] .pharmacy-disclaimer { background: #14243a !important; }html[data-theme="dark"] .pharmacy-map-wrap { border-color: rgba(138,221,243,.15); background: #101d30; }
@media (max-width:767.98px) { .oxi-assistant-fab { right: 16px; bottom: 16px; padding: .72rem .9rem; }.guidance-hero,.pharmacy-hero { align-items: flex-start; min-height: 0; border-radius: 22px; }.guidance-hero-mark,.pharmacy-hero-icon { display: none; }.guidance-action-grid { grid-template-columns: 1fr; }.pharmacy-map-toolbar { align-items: flex-start; flex-direction: column; }.pharmacy-map-toolbar .btn { width: 100%; }.pharmacy-map-wrap,.pharmacy-map-wrap iframe { min-height: 330px; height: 330px; } }

/* Clinical V2 workspace: grouped tasks reduce scrolling during care delivery. */
.clinical-workspace-hero { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.4rem,3vw,2.4rem); overflow: hidden; border-radius: 26px; color: #fff; background: linear-gradient(115deg,#163d6a,#1478ac 58%,#16b8bd); }.clinical-workspace-hero h2 { margin: .65rem 0; color: #fff; font-family: "Plus Jakarta Sans",sans-serif; font-size: clamp(1.6rem,3vw,2.35rem); font-weight: 800; }.clinical-workspace-hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.88); }.clinical-workspace-hero > i { font-size: 4rem; opacity: .8; }.clinical-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; }.clinical-summary-grid article { display: grid; grid-template-columns: 42px 1fr; gap: 0 .7rem; align-items: center; padding: 1rem; border: 1px solid var(--oxi-border); border-radius: 18px; background: var(--oxi-surface); box-shadow: var(--oxi-shadow-soft); }.clinical-summary-grid i { display: grid; grid-row: span 2; width: 42px; height: 42px; place-items: center; color: #147fc0; border-radius: 13px; background: #e0f3fa; }.clinical-summary-grid span { color: var(--oxi-muted); font-size: .75rem; font-weight: 700; }.clinical-summary-grid strong { color: var(--oxi-text); font-size: 1.2rem; }.clinical-accordion { border: 1px solid var(--oxi-border); border-radius: 22px; overflow: hidden; box-shadow: var(--oxi-shadow-soft); }.clinical-accordion .accordion-item { border: 0; border-bottom: 1px solid var(--oxi-border); }.clinical-accordion .accordion-item:last-child { border-bottom: 0; }.clinical-accordion .accordion-button { padding: 1.15rem 1.3rem; color: var(--oxi-text); background: var(--oxi-surface); font-family: "Plus Jakarta Sans",sans-serif; font-weight: 800; box-shadow: none; }.clinical-accordion .accordion-button:not(.collapsed) { color: #0e6799; background: #edf9fc; }.clinical-accordion .accordion-body { padding: 1.25rem; background: var(--oxi-surface); }.clinical-form-panel,.patient-action-card,.care-plan-card,.clinical-history-card { padding: 1.25rem; border: 1px solid var(--oxi-border); border-radius: 18px; background: var(--oxi-surface); box-shadow: var(--oxi-shadow-soft); }.clinical-form-panel { background: #f7fbfe; }.clinical-form-panel h3,.patient-action-card h3,.care-plan-card h3,.clinical-history-card h3 { margin: 0 0 1rem; color: var(--oxi-text); font-family: "Plus Jakarta Sans",sans-serif; font-size: 1.05rem; font-weight: 800; }.clinical-form-panel h3 { color: #185982; }.clinical-history-card > div { display: grid; gap: .15rem; padding: .85rem 0; border-bottom: 1px solid var(--oxi-border); }.clinical-history-card > div:last-child { border-bottom: 0; }.clinical-history-card span { color: var(--oxi-muted); font-size: .83rem; }.clinical-history-card p { margin: .25rem 0 0; color: var(--oxi-muted); }.clinical-history-card a { color: var(--oxi-primary); font-size: .82rem; font-weight: 800; text-decoration: none; }.care-zones { display: grid; grid-template-columns: repeat(3,1fr); gap: .7rem; margin: 1rem 0; }.care-zone { padding: .75rem; border-radius: 14px; }.care-zone strong { display: block; margin-bottom: .25rem; }.care-zone p { margin: 0; font-size: .83rem; line-height: 1.45; }.care-zone.green { color: #126742; background: #e6f7ed; }.care-zone.yellow { color: #865b08; background: #fff5d9; }.care-zone.red { color: #9b3440; background: #fce9ec; }.patient-care-hero { background: linear-gradient(115deg,#146148,#128978 58%,#16abb4); }.patient-action-card h3 i { margin-right: .4rem; color: #1688bf; }
html[data-theme="dark"] .clinical-summary-grid article,html[data-theme="dark"] .clinical-accordion .accordion-button,html[data-theme="dark"] .clinical-accordion .accordion-body,html[data-theme="dark"] .clinical-form-panel,html[data-theme="dark"] .patient-action-card,html[data-theme="dark"] .care-plan-card,html[data-theme="dark"] .clinical-history-card { color: var(--oxi-text); border-color: rgba(138,221,243,.15); background: #14243a; }html[data-theme="dark"] .clinical-accordion .accordion-button:not(.collapsed) { color: #a9e6f6; background: #172941; }html[data-theme="dark"] .clinical-form-panel h3 { color: #a9e6f6; }html[data-theme="dark"] .care-zone.green { color: #b7f2d1; background: #183d34; }html[data-theme="dark"] .care-zone.yellow { color: #ffe2a6; background: #443818; }html[data-theme="dark"] .care-zone.red { color: #ffc5cc; background: #46252d; }
@media (max-width:991.98px) { .clinical-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:767.98px) { .clinical-workspace-hero { align-items: flex-start; border-radius: 21px; }.clinical-workspace-hero > i { display: none; }.clinical-summary-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }.clinical-summary-grid article { padding: .8rem; }.care-zones { grid-template-columns: 1fr; }.clinical-accordion .accordion-body { padding: 1rem; } }
.clinical-ops-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; border: 1px solid #cde4ef; border-radius: 18px; background: #f5fbfe; }.clinical-ops-strip > div { display: grid; grid-template-columns: 30px 1fr; gap: 0 .55rem; padding: .9rem 1rem; border-right: 1px solid #d7e8f0; }.clinical-ops-strip > div:last-child { border-right: 0; }.clinical-ops-strip i { grid-row: span 2; color: #147eb9; font-size: 1.15rem; }.clinical-ops-strip span { color: #63809b; font-size: .72rem; font-weight: 700; }.clinical-ops-strip strong { color: #143654; font-size: 1.18rem; }html[data-theme="dark"] .clinical-ops-strip { border-color: rgba(138,221,243,.15); background: #14243a; }html[data-theme="dark"] .clinical-ops-strip > div { border-color: rgba(138,221,243,.15); }html[data-theme="dark"] .clinical-ops-strip strong { color: var(--oxi-text); }@media (max-width:767.98px) { .clinical-ops-strip { grid-template-columns: 1fr 1fr; }.clinical-ops-strip > div:nth-child(2) { border-right: 0; }.clinical-ops-strip > div:nth-child(-n+2) { border-bottom: 1px solid #d7e8f0; } }
.hero-panel h2, .card h3, .metric-card h3 { color: #12233d; }
.metric-card small { color: #63758a; }

/* Final theme overrides: calendar and clinical dashboard stay readable in dark mode. */
.clinical-section-heading { flex-wrap: wrap; }
.alert-manage-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .38rem; white-space: nowrap; }
.alert-manage-button strong { font-size: .78rem; }
.clinical-table-shell { overflow-x: auto; -webkit-overflow-scrolling: touch; }

html[data-theme="dark"] .hero-panel h2,
html[data-theme="dark"] .card h3,
html[data-theme="dark"] .metric-card h3 { color: var(--oxi-text); }
html[data-theme="dark"] .metric-card small { color: var(--oxi-muted); }
html[data-theme="dark"] .calendar-grid { border-color: rgba(138, 221, 243, .2); background: #0f1c2f; }
html[data-theme="dark"] .calendar-head { color: #c7d9ea; }
html[data-theme="dark"] .calendar-day { color: var(--oxi-text); border-color: rgba(138, 221, 243, .2); background: #172941; box-shadow: none; }
html[data-theme="dark"] .calendar-day.empty { background: #101d30; border-color: rgba(138, 221, 243, .12); }
html[data-theme="dark"] .calendar-day > strong { color: #d8f5ff; background: rgba(37, 190, 224, .2); }
html[data-theme="dark"] .calendar-event { color: #f8fcff; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 3px 8px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .calendar-event.status-pending { background: #49627d; }
html[data-theme="dark"] .calendar-event.status-confirmed { background: #176fc7; }
html[data-theme="dark"] .calendar-event.status-rescheduled { color: #172033; background: #f0bd4a; }
html[data-theme="dark"] .calendar-event.status-cancelled { background: #ca5261; }
html[data-theme="dark"] .calendar-event.status-completed { background: #158155; }
html[data-theme="dark"] .clinical-alert { border-color: rgba(138, 221, 243, .18); background: #172941; box-shadow: none; }
html[data-theme="dark"] .clinical-alert:hover { border-color: rgba(87, 199, 230, .5); box-shadow: 0 8px 18px rgba(0, 0, 0, .22); }
html[data-theme="dark"] .clinical-alert-title strong { color: #f0f8ff; }
html[data-theme="dark"] .clinical-alert-content small { color: #79d7ef; }
html[data-theme="dark"] .clinical-alert-content p { color: #b9cbdd; }
html[data-theme="dark"] .clinical-alert.is-critical .clinical-alert-title span { color: #ffc2c9; background: rgba(239, 95, 108, .2); }
html[data-theme="dark"] .clinical-alert.is-warning .clinical-alert-title span { color: #ffe0a0; background: rgba(244, 185, 64, .18); }
.alert-count { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: .32rem; min-height: 32px; padding: .38rem .62rem; color: #c83e4c; border: 1px solid rgba(239, 95, 108, .22); border-radius: 999px; background: rgba(239, 95, 108, .12); font-size: .72rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.alert-count i { font-size: .76rem; }
.alert-count strong { color: inherit; font-size: .82rem; }
html[data-theme="dark"] .alert-count { color: #ffc1c8; border-color: rgba(239, 95, 108, .28); background: rgba(239, 95, 108, .16); }

@media (max-width: 575.98px) {
    .clinical-section-heading { align-items: flex-start; flex-direction: column; }
    .alert-manage-button { align-self: stretch; justify-content: center; }
}

/* Shared sidebar states: desktop collapse and compact-screen drawer. */
.sidebar-close { display: none; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 1045; padding: 0; border: 0; background: rgba(0, 0, 0, .32); cursor: pointer; }
.sidebar-backdrop[hidden] { display: none; }

@media (min-width: 1200px) {
    .app-shell.sidebar-collapsed .app-sidebar { transform: translateX(-100%); visibility: hidden; pointer-events: none; }
    .app-shell.sidebar-collapsed .app-content { margin-left: 0; width: 100%; }
}

@media (max-width: 1199.98px) {
    .app-shell .app-content { margin-left: 0; width: 100%; }
    .app-shell .app-sidebar { z-index: 1046; max-width: calc(100vw - 48px); transform: translateX(-100%); visibility: hidden; pointer-events: none; }
    .app-shell .app-sidebar.show { transform: translateX(0); visibility: visible; pointer-events: auto; }
    .app-shell.sidebar-mobile-open { overflow: hidden; }
    .sidebar-brand { position: relative; padding-right: 32px; }
    .sidebar-brand > div { min-width: 0; }
    .sidebar-close { position: absolute; right: 0; top: 6px; display: grid; place-items: center; width: 32px; height: 36px; padding: 0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; color: inherit; background: transparent; }
    .sidebar-close:hover { background: rgba(255, 255, 255, .12); }
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar { transition: none; }
}
