/* Sentinel Health white-label overlay. Keeps upstream license files intact. */
:root {
    --sh-bg: #f5f7fb;
    --sh-surface: #ffffff;
    --sh-surface-soft: #f8fafc;
    --sh-border: #d8e2ef;
    --sh-border-soft: #e5edf6;
    --sh-text: #172033;
    --sh-muted: #64748b;
    --sh-heading: #0b1f3a;
    --sh-primary: #0f766e;
    --sh-primary-strong: #115e59;
    --sh-blue: #1d4ed8;
    --sh-cyan: #0891b2;
    --sh-danger: #b91c1c;
    --sh-warning: #c2410c;
    --sh-success: #047857;
    --sh-radius: 12px;
    --sh-radius-sm: 8px;
    --sh-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    --sh-shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.06);
    --sh-font: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html {
    background: var(--sh-bg);
}

body.sentinel-brand-active {
    background: var(--sh-bg);
    color: var(--sh-text);
    font-family: var(--sh-font);
    letter-spacing: 0;
    overflow-x: hidden;
}

body.sentinel-brand-active.sentinel-module-home {
    background:
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.34), transparent 32%),
        radial-gradient(circle at 85% 18%, rgba(96, 165, 250, 0.14), transparent 24%),
        linear-gradient(160deg, #06152d 0%, #0b2245 45%, #0f3b82 100%);
    color: #f8fafc;
}

body.sentinel-brand-active *,
body.sentinel-brand-active *::before,
body.sentinel-brand-active *::after {
    box-sizing: border-box;
}

body.sentinel-brand-active a {
    color: var(--sh-primary-strong);
}

body.sentinel-brand-active h1,
body.sentinel-brand-active h2,
body.sentinel-brand-active h3,
body.sentinel-brand-active h4 {
    color: var(--sh-heading);
    letter-spacing: 0;
}

body.sentinel-brand-active input,
body.sentinel-brand-active select,
body.sentinel-brand-active textarea,
body.sentinel-brand-active .form-control {
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: var(--sh-radius-sm);
    background: #ffffff;
    color: var(--sh-text);
    font-family: var(--sh-font);
    font-size: 14px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

body.sentinel-module-home input,
body.sentinel-module-home select,
body.sentinel-module-home textarea,
body.sentinel-module-home .form-control {
    background: rgba(15, 23, 42, 0.68);
    border-color: rgba(147, 197, 253, 0.22);
    color: #f8fafc;
}

body.sentinel-module-home input::placeholder {
    color: rgba(219, 234, 254, 0.68);
}

body.sentinel-brand-active input:focus,
body.sentinel-brand-active select:focus,
body.sentinel-brand-active textarea:focus,
body.sentinel-brand-active .form-control:focus {
    border-color: var(--sh-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    outline: none;
}

body.sentinel-brand-active button,
body.sentinel-brand-active .btn,
body.sentinel-brand-active input[type="button"],
body.sentinel-brand-active input[type="submit"] {
    min-height: 36px;
    border-radius: var(--sh-radius-sm);
    font-family: var(--sh-font);
    font-weight: 800;
    letter-spacing: 0;
}

body.sentinel-brand-active .btn-primary,
body.sentinel-brand-active .confirm,
body.sentinel-brand-active input[type="submit"] {
    border-color: var(--sh-primary);
    background: var(--sh-primary);
    color: #ffffff;
}

body.sentinel-brand-active .btn-primary:hover,
body.sentinel-brand-active .confirm:hover,
body.sentinel-brand-active input[type="submit"]:hover {
    background: var(--sh-primary-strong);
}

body.sentinel-brand-active .btn-danger,
body.sentinel-brand-active .cancel,
body.sentinel-brand-active .danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: var(--sh-danger);
}

body.sentinel-module-home form,
body.sentinel-module-home .sentinel-login-form {
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* Shared shell, top navigation, and professional attribution. */
.sentinel-shellbar {
    position: sticky;
    top: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--sh-border);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(14px);
}

.sentinel-shellbar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.sentinel-shellbar-brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 59, 130, 0.18);
}

.sentinel-shellbar-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.sentinel-shellbar-title {
    color: var(--sh-heading);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.sentinel-shellbar-subtitle {
    color: var(--sh-muted);
    font-size: 12px;
    font-weight: 700;
}

.sentinel-shellbar-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.sentinel-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.sentinel-badge--live {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #065f46;
}

.sentinel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1440px, calc(100% - 32px));
    margin: 24px auto 18px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow-soft);
    color: var(--sh-muted);
    font-size: 12px;
}

body.sentinel-module-home .sentinel-footer {
    background: rgba(8, 20, 43, 0.74);
    border-color: rgba(147, 197, 253, 0.16);
    box-shadow: 0 18px 52px rgba(2, 6, 23, 0.24);
    color: rgba(219, 234, 254, 0.78);
}

body.sentinel-module-home .sentinel-footer strong,
body.sentinel-module-home .sentinel-footer button {
    color: #f8fafc;
}

body.sentinel-module-home .sentinel-footer button {
    background: rgba(15, 23, 42, 0.44);
    border-color: rgba(147, 197, 253, 0.2);
}

.sentinel-footer strong {
    color: var(--sh-heading);
}

.sentinel-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sentinel-footer button,
.sentinel-outline-button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
}

.sentinel-footer button:hover,
.sentinel-outline-button:hover {
    border-color: var(--sh-primary);
    color: var(--sh-primary-strong);
}

.sentinel-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.52);
}

.sentinel-modal[hidden] {
    display: none;
}

.sentinel-modal-panel {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
}

.sentinel-modal-panel h2 {
    margin: 0 0 8px;
    color: var(--sh-heading);
    font-size: 22px;
}

.sentinel-modal-panel p,
.sentinel-modal-panel li {
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

.sentinel-modal-panel ul {
    margin: 12px 0 0;
    padding-left: 20px;
}

.sentinel-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    min-height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 18px;
    font-weight: 900;
}

/* Module-wide modernization for Bahmni Angular surfaces. */
body.sentinel-module-clinical,
body.sentinel-module-registration {
    background:
        radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.1), transparent 28%),
        radial-gradient(circle at 88% 8%, rgba(15, 118, 110, 0.1), transparent 26%),
        var(--sh-bg);
}

body.sentinel-module-clinical .opd-wrapper,
body.sentinel-module-registration .reg-wrapper {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 22px;
}

body.sentinel-module-clinical .opd-content-wrapper,
body.sentinel-module-registration #view-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

body.sentinel-brand-active .reg-header,
body.sentinel-brand-active .opd-header,
body.sentinel-brand-active .dashboard-header,
body.sentinel-brand-active .patient-header,
body.sentinel-brand-active .patient-info,
body.sentinel-brand-active .visit-details,
body.sentinel-brand-active .dashboard-section,
body.sentinel-brand-active .form-field,
body.sentinel-brand-active .form-field-group,
body.sentinel-brand-active .section,
body.sentinel-brand-active .section-grid,
body.sentinel-brand-active .tabs-content,
body.sentinel-brand-active .tab-content,
body.sentinel-brand-active .content-wrapper,
body.sentinel-brand-active .encounter-section,
body.sentinel-brand-active .dashboard-widget,
body.sentinel-brand-active .patient-summary,
body.sentinel-brand-active .patient-search-wrapper,
body.sentinel-brand-active .registration-container,
body.sentinel-brand-active .registration-section {
    border-radius: var(--sh-radius);
}

body.sentinel-brand-active .dashboard-section,
body.sentinel-brand-active .encounter-section,
body.sentinel-brand-active .dashboard-widget,
body.sentinel-brand-active .patient-summary,
body.sentinel-brand-active .patient-search-wrapper,
body.sentinel-brand-active .registration-container,
body.sentinel-brand-active .registration-section,
body.sentinel-brand-active .tab-content,
body.sentinel-brand-active form {
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    box-shadow: var(--sh-shadow-soft);
}

body.sentinel-brand-active table {
    border-collapse: separate;
    border-spacing: 0;
}

body.sentinel-brand-active table thead th,
body.sentinel-brand-active table thead td {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

body.sentinel-brand-active table tbody tr {
    transition: background-color 120ms ease;
}

body.sentinel-brand-active table tbody tr:hover {
    background: #f8fafc;
}

body.sentinel-brand-active table td,
body.sentinel-brand-active table th {
    border-color: #e2e8f0;
    vertical-align: middle;
}

body.sentinel-brand-active .nav-tabs,
body.sentinel-brand-active .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--sh-border);
}

body.sentinel-brand-active .nav-tabs > li > a,
body.sentinel-brand-active .tabs a {
    border-radius: 8px 8px 0 0;
    color: #475569;
    font-weight: 800;
}

body.sentinel-brand-active .nav-tabs > li.active > a,
body.sentinel-brand-active .tabs .active a {
    color: var(--sh-primary-strong);
}

.sentinel-command-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    width: min(1440px, calc(100% - 44px));
    margin: 18px auto 0;
}

.sentinel-command-card {
    min-height: 96px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow-soft);
}

.sentinel-command-card span {
    display: block;
    color: var(--sh-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.sentinel-command-card strong {
    display: block;
    margin-top: 8px;
    color: var(--sh-heading);
    font-size: 24px;
    font-weight: 900;
}

.sentinel-command-card em {
    display: block;
    margin-top: 4px;
    color: var(--sh-muted);
    font-size: 12px;
    font-style: normal;
}

/* Phase 5 operational intelligence layer. */
.sentinel-ops-layer {
    width: min(1440px, calc(100% - 44px));
    margin: 18px auto 0;
}

.sentinel-command-center {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.sentinel-command-metric {
    min-height: 82px;
    padding: 13px;
    background: #ffffff;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow-soft);
}

.sentinel-command-metric span,
.sentinel-kpi-card span,
.sentinel-staff-card span,
.sentinel-status-card span,
.sentinel-flow-lane span,
.sentinel-map-card span {
    display: block;
    color: var(--sh-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sentinel-command-metric strong,
.sentinel-kpi-card strong,
.sentinel-staff-card strong,
.sentinel-status-card strong,
.sentinel-flow-lane strong,
.sentinel-map-card strong {
    display: block;
    margin-top: 7px;
    color: var(--sh-heading);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
}

.sentinel-severity-high,
.sentinel-pressure-high {
    border-color: #fecaca !important;
    background: #fff1f2 !important;
}

.sentinel-severity-high strong,
.sentinel-pressure-high strong,
.sentinel-pressure-high em {
    color: #991b1b !important;
}

.sentinel-severity-medium,
.sentinel-pressure-medium,
.sentinel-severity-moderate {
    border-color: #fed7aa !important;
    background: #fff7ed !important;
}

.sentinel-severity-medium strong,
.sentinel-pressure-medium strong,
.sentinel-severity-moderate strong,
.sentinel-pressure-medium em {
    color: #9a3412 !important;
}

.sentinel-severity-normal,
.sentinel-pressure-normal {
    border-color: #bbf7d0 !important;
    background: #f0fdf4 !important;
}

.sentinel-ops-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.sentinel-ops-panel {
    grid-column: span 6;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow-soft);
}

.sentinel-flow-panel {
    grid-column: span 12;
}

.sentinel-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.sentinel-panel-head h2 {
    margin: 0;
    color: var(--sh-heading);
    font-size: 17px;
    font-weight: 900;
}

.sentinel-panel-head p {
    margin: 4px 0 0;
    color: var(--sh-muted);
    font-size: 12px;
}

.sentinel-panel-head button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #99f6e4;
    border-radius: 9px;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 900;
}

.sentinel-flow-lanes,
.sentinel-ipd-flow-grid,
.sentinel-operational-map,
.sentinel-kpi-grid,
.sentinel-provider-grid,
.sentinel-staff-grid,
.sentinel-status-grid,
.sentinel-intelligence-summary,
.sentinel-trend-grid,
.sentinel-watch-grid,
.sentinel-chronic-grid,
.sentinel-executive-grid,
.sentinel-belief-grid,
.sentinel-population-grid,
.sentinel-forecast-grid,
.sentinel-catchment-map,
.sentinel-public-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.sentinel-ipd-flow-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dbeafe;
}

.sentinel-flow-lane,
.sentinel-map-card,
.sentinel-kpi-card,
.sentinel-provider-card,
.sentinel-staff-card,
.sentinel-status-card,
.sentinel-intel-card,
.sentinel-trend-card,
.sentinel-watch-card,
.sentinel-chronic-card,
.sentinel-executive-card,
.sentinel-belief-card,
.sentinel-population-card,
.sentinel-forecast-card,
.sentinel-region-card,
.sentinel-public-card {
    min-height: 88px;
    padding: 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.sentinel-ipd-flow-card {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.sentinel-ipd-flow-card em {
    display: block;
    margin-top: 5px;
    color: var(--sh-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.sentinel-intelligence-panel {
    grid-column: span 12;
}

.sentinel-executive-panel,
.sentinel-public-health-panel {
    grid-column: span 12;
}

.sentinel-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.sentinel-intelligence-summary {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-bottom: 12px;
}

.sentinel-trend-grid,
.sentinel-executive-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.sentinel-watch-grid,
.sentinel-chronic-grid,
.sentinel-belief-grid,
.sentinel-population-grid,
.sentinel-forecast-grid,
.sentinel-catchment-map,
.sentinel-public-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sentinel-map-card em,
.sentinel-kpi-card em,
.sentinel-staff-card em,
.sentinel-provider-card em,
.sentinel-intel-card em,
.sentinel-trend-card em,
.sentinel-watch-card em,
.sentinel-chronic-card em,
.sentinel-executive-card em,
.sentinel-belief-card em,
.sentinel-population-card em,
.sentinel-forecast-card em,
.sentinel-region-card em,
.sentinel-public-card em {
    display: block;
    margin-top: 5px;
    color: var(--sh-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.sentinel-intel-card span,
.sentinel-trend-card span,
.sentinel-watch-card span,
.sentinel-chronic-card span,
.sentinel-executive-card span,
.sentinel-belief-card span,
.sentinel-population-card span,
.sentinel-forecast-card span,
.sentinel-region-card span,
.sentinel-public-card span {
    display: block;
    color: var(--sh-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.sentinel-intel-card strong,
.sentinel-trend-card strong,
.sentinel-watch-card strong,
.sentinel-chronic-card strong,
.sentinel-executive-card strong,
.sentinel-belief-card strong,
.sentinel-population-card strong,
.sentinel-forecast-card strong,
.sentinel-region-card strong,
.sentinel-public-card strong {
    display: block;
    margin-top: 7px;
    color: var(--sh-heading);
    font-size: 21px;
    font-weight: 900;
    line-height: 1.12;
}

.sentinel-trend-card b {
    color: inherit;
    font-size: 17px;
}

.sentinel-watch-card {
    border-color: #fed7aa;
    background: #fff7ed;
}

.sentinel-chronic-card,
.sentinel-belief-card {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.sentinel-population-card {
    border-color: #ddd6fe;
    background: #f5f3ff;
}

.sentinel-forecast-card {
    border-color: #bae6fd;
    background: #ecfeff;
}

.sentinel-region-card {
    min-height: 118px;
    border-color: #cbd5e1;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.94)),
        repeating-linear-gradient(45deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0.08) 8px, rgba(29, 78, 216, 0.07) 8px, rgba(29, 78, 216, 0.07) 16px);
}

.sentinel-public-health-panel {
    background: #f8fafc;
}

.sentinel-executive-card {
    min-height: 116px;
    background: #ffffff;
}

body.sentinel-executive-mode .sentinel-ops-panel:not(.sentinel-executive-panel):not(.sentinel-intelligence-panel):not(.sentinel-public-health-panel) {
    display: none;
}

body.sentinel-executive-mode .sentinel-executive-card strong {
    font-size: 28px;
}

body.sentinel-report-mode .sentinel-shellbar,
body.sentinel-report-mode .sentinel-command-strip,
body.sentinel-report-mode .sentinel-footer {
    display: none;
}

body.sentinel-report-mode .sentinel-ops-layer {
    width: min(1280px, calc(100% - 32px));
    margin-top: 16px;
}

body.sentinel-report-mode .sentinel-ops-panel {
    box-shadow: none;
}

.sentinel-provider-card h3 {
    margin: 0 0 10px;
    color: var(--sh-heading);
    font-size: 14px;
    font-weight: 900;
}

.sentinel-provider-card div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.sentinel-provider-card div span {
    color: var(--sh-muted);
    font-size: 12px;
    font-weight: 800;
}

.sentinel-provider-card div strong {
    color: var(--sh-heading);
    font-size: 13px;
}

.sentinel-status-card.is-online {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.sentinel-status-card.is-limited {
    background: #fff7ed;
    border-color: #fed7aa;
}

.sentinel-alert-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.sentinel-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    box-shadow: var(--sh-shadow-soft);
}

.sentinel-alert strong,
.sentinel-alert span {
    display: block;
}

.sentinel-alert strong {
    color: #9a3412;
    font-size: 13px;
}

.sentinel-alert span {
    margin-top: 2px;
    color: #7c2d12;
    font-size: 12px;
}

.sentinel-alert button {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    background: #ffffff;
    color: #9a3412;
    font-weight: 900;
}

.sentinel-ops-empty {
    padding: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: var(--sh-muted);
    font-size: 13px;
    font-weight: 800;
}

.sentinel-triage-mode {
    position: fixed;
    inset: 0;
    z-index: 4500;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.55);
}

.sentinel-triage-mode[hidden] {
    display: none;
}

.sentinel-triage-panel {
    position: relative;
    width: min(820px, 100%);
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
}

.sentinel-triage-panel h2 {
    margin: 0;
    color: var(--sh-heading);
    font-size: 24px;
}

.sentinel-triage-panel p {
    margin: 8px 0 18px;
    color: var(--sh-muted);
}

.sentinel-triage-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.sentinel-triage-actions button {
    min-height: 86px;
    padding: 12px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f766e, #0f3b82);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
}

/* Login/home refinement that complements the existing home theme. */
body.sentinel-module-home .sentinel-login-card,
body.sentinel-module-home .sentinel-login-brand,
body.sentinel-module-home .sentinel-panel,
body.sentinel-module-home .sentinel-app-card {
    border-radius: 22px;
}

body.sentinel-module-home .sentinel-dashboard-overview {
    background:
        linear-gradient(135deg, rgba(15, 59, 130, 0.92), rgba(15, 118, 110, 0.82)),
        #0f3b82;
}

body.sentinel-module-home .sentinel-dashboard-overview h1,
body.sentinel-module-home .sentinel-dashboard-overview p {
    color: #ffffff;
}

body.sentinel-module-home .sentinel-login-card h1,
body.sentinel-module-home .sentinel-login-card h2,
body.sentinel-module-home .sentinel-login-card h3,
body.sentinel-module-home .sentinel-login-card label,
body.sentinel-module-home .sentinel-login-card .sentinel-control-label,
body.sentinel-module-home .sentinel-login-brand,
body.sentinel-module-home .sentinel-login-brand p,
body.sentinel-module-home .sentinel-wordmark,
body.sentinel-module-home .sentinel-shell-badge {
    color: #f8fafc;
}

body.sentinel-module-home .sentinel-login-card p,
body.sentinel-module-home .sentinel-login-card span,
body.sentinel-module-home .sentinel-login-warning {
    color: rgba(219, 234, 254, 0.82);
}

/* Registration-specific density and patient intake styling. */
body.sentinel-module-registration .patient-image,
body.sentinel-module-registration .patient-img,
body.sentinel-module-registration img[src*="patient"] {
    border: 4px solid #ffffff;
    border-radius: 16px;
    box-shadow: var(--sh-shadow-soft);
}

body.sentinel-module-registration fieldset,
body.sentinel-module-registration .form-field-group,
body.sentinel-module-registration .section {
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
}

body.sentinel-module-registration legend,
body.sentinel-module-registration .section-title {
    color: var(--sh-heading);
    font-size: 16px;
    font-weight: 900;
}

body.sentinel-module-registration label,
body.sentinel-module-registration .field-attribute,
body.sentinel-module-registration .field-attribute label,
body.sentinel-module-registration .form-field label {
    color: #1f2937;
}

body.sentinel-module-registration .field-value,
body.sentinel-module-registration .form-field,
body.sentinel-module-registration .registration-section {
    color: #1f2937;
}

body.sentinel-module-registration button,
body.sentinel-module-registration .btn,
body.sentinel-module-registration input[type="button"],
body.sentinel-module-registration input[type="submit"] {
    min-height: 42px;
}

/* Clinical density management. */
body.sentinel-module-clinical .patient-header,
body.sentinel-module-clinical .patient-summary {
    background: #ffffff;
    border: 1px solid var(--sh-border);
    box-shadow: var(--sh-shadow-soft);
}

body.sentinel-module-clinical .obs-section,
body.sentinel-module-clinical .vitals,
body.sentinel-module-clinical .medication,
body.sentinel-module-clinical .diagnosis,
body.sentinel-module-clinical .treatment-section {
    border-radius: var(--sh-radius);
}

body.sentinel-module-clinical label,
body.sentinel-module-clinical .field-attribute,
body.sentinel-module-clinical .control-label,
body.sentinel-module-clinical .patient-header,
body.sentinel-module-clinical .patient-summary,
body.sentinel-module-clinical .tab-content {
    color: #1f2937;
}

body.sentinel-module-clinical .nav-tabs > li > a,
body.sentinel-module-clinical .tabs a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

body.sentinel-module-clinical .opd-content-wrapper,
body.sentinel-module-registration #view-content {
    min-width: 0;
}

body.sentinel-module-clinical table,
body.sentinel-module-registration table {
    max-width: 100%;
}

body.sentinel-module-clinical .table-responsive,
body.sentinel-module-registration .table-responsive,
body.sentinel-module-clinical [class*="table"],
body.sentinel-module-registration [class*="table"] {
    overflow-x: auto;
}

/* Empty states, notifications, and loading states. */
.sentinel-empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--sh-radius);
    color: var(--sh-muted);
}

.sentinel-empty-state strong {
    color: var(--sh-heading);
    font-size: 16px;
}

body.sentinel-brand-active .message-container,
body.sentinel-brand-active .notification,
body.sentinel-brand-active .alert,
body.sentinel-brand-active .note {
    border-radius: var(--sh-radius-sm);
    box-shadow: var(--sh-shadow-soft);
}

.sentinel-loader {
    display: grid;
    min-height: 160px;
    place-items: center;
    color: var(--sh-muted);
}

.sentinel-loader::before {
    width: 42px;
    height: 42px;
    border: 4px solid #dbeafe;
    border-top-color: var(--sh-primary);
    border-radius: 50%;
    content: "";
    animation: sentinel-spin 900ms linear infinite;
}

@keyframes sentinel-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 980px) {
    .sentinel-shellbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .sentinel-shellbar-meta {
        justify-content: flex-start;
    }

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

    .sentinel-command-center {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sentinel-ops-panel,
    .sentinel-flow-panel {
        grid-column: span 12;
    }

    .sentinel-flow-lanes,
    .sentinel-ipd-flow-grid,
    .sentinel-operational-map,
    .sentinel-kpi-grid,
    .sentinel-provider-grid,
    .sentinel-staff-grid,
    .sentinel-status-grid,
    .sentinel-intelligence-summary,
    .sentinel-trend-grid,
    .sentinel-watch-grid,
    .sentinel-chronic-grid,
    .sentinel-executive-grid,
    .sentinel-belief-grid,
    .sentinel-population-grid,
    .sentinel-forecast-grid,
    .sentinel-catchment-map,
    .sentinel-public-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body.sentinel-module-clinical .opd-wrapper,
    body.sentinel-module-registration .reg-wrapper {
        padding: 12px;
    }

    .sentinel-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .sentinel-command-strip {
        grid-template-columns: 1fr;
        width: calc(100% - 24px);
    }

    .sentinel-ops-layer {
        width: calc(100% - 24px);
    }

    .sentinel-command-center,
    .sentinel-flow-lanes,
    .sentinel-ipd-flow-grid,
    .sentinel-operational-map,
    .sentinel-kpi-grid,
    .sentinel-provider-grid,
    .sentinel-staff-grid,
    .sentinel-status-grid,
    .sentinel-intelligence-summary,
    .sentinel-trend-grid,
    .sentinel-watch-grid,
    .sentinel-chronic-grid,
    .sentinel-executive-grid,
    .sentinel-belief-grid,
    .sentinel-population-grid,
    .sentinel-forecast-grid,
    .sentinel-catchment-map,
    .sentinel-public-grid,
    .sentinel-triage-actions {
        grid-template-columns: 1fr;
    }

    .sentinel-command-metric {
        min-height: 68px;
    }

    .sentinel-panel-head {
        flex-direction: column;
    }

    .sentinel-shellbar {
        padding: 10px 14px;
    }

    .sentinel-shellbar-title {
        font-size: 14px;
    }
}

@media print {
    html,
    body.sentinel-brand-active {
        background: #ffffff !important;
        color: #111827 !important;
    }

    .sentinel-shellbar,
    .sentinel-command-strip,
    .sentinel-footer,
    .sentinel-alert-stack,
    .sentinel-panel-actions,
    .sentinel-triage-mode,
    .sentinel-modal {
        display: none !important;
    }

    .sentinel-ops-layer {
        width: 100% !important;
        margin: 0 !important;
    }

    .sentinel-ops-grid {
        display: block !important;
    }

    .sentinel-ops-panel {
        break-inside: avoid;
        margin: 0 0 12px !important;
        padding: 12px !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
    }

    .sentinel-flow-lanes,
    .sentinel-operational-map,
    .sentinel-kpi-grid,
    .sentinel-provider-grid,
    .sentinel-staff-grid,
    .sentinel-status-grid,
    .sentinel-intelligence-summary,
    .sentinel-trend-grid,
    .sentinel-watch-grid,
    .sentinel-chronic-grid,
    .sentinel-executive-grid,
    .sentinel-belief-grid,
    .sentinel-population-grid,
    .sentinel-forecast-grid,
    .sentinel-catchment-map,
    .sentinel-public-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .sentinel-flow-lane,
    .sentinel-map-card,
    .sentinel-kpi-card,
    .sentinel-provider-card,
    .sentinel-staff-card,
    .sentinel-status-card,
    .sentinel-intel-card,
    .sentinel-trend-card,
    .sentinel-watch-card,
    .sentinel-chronic-card,
    .sentinel-executive-card,
    .sentinel-belief-card,
    .sentinel-population-card,
    .sentinel-forecast-card,
    .sentinel-region-card,
    .sentinel-public-card {
        min-height: auto !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }
}


/* BMC_INTELLIGENCE_STYLES */
.sentinel-bmc-panel { grid-column: span 12; border-color: #bfdbfe; }
.sentinel-bmc-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.sentinel-bmc-card { min-height: 88px; padding: 13px; background: linear-gradient(145deg, #f8fafc, #eff6ff); border: 1px solid #dbeafe; border-radius: 10px; }
.sentinel-bmc-card span { display: block; color: var(--sh-muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.sentinel-bmc-card strong { display: block; margin-top: 7px; color: var(--sh-ink); font-size: 20px; line-height: 1.1; overflow-wrap: anywhere; }
.sentinel-bmc-card em { display: block; margin-top: 6px; color: var(--sh-muted); font-size: 11px; font-style: normal; font-weight: 800; }
.sentinel-bmc-sync { color: var(--sh-muted); font-size: 11px; font-weight: 800; }
.sentinel-moh-panel { border-color: #99f6e4; }
.sentinel-moh-panel .sentinel-bmc-card { background: linear-gradient(145deg, #f8fafc, #ecfdf5); border-color: #ccfbf1; }
@media (max-width: 1200px) { .sentinel-bmc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sentinel-bmc-grid { grid-template-columns: 1fr; } }
@media print { .sentinel-bmc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .sentinel-bmc-card { min-height: auto !important; background: #fff !important; } }


/* BMC_REVENUE_INTELLIGENCE_STYLES */
.sentinel-revenue-panel { border-color: #fcd34d; }
.sentinel-revenue-panel .sentinel-bmc-card { background: linear-gradient(145deg, #fffdf5, #fffbeb); border-color: #fde68a; }
.sentinel-demo-panel { border-color: #c4b5fd; }
.sentinel-demo-panel .sentinel-bmc-card { background: linear-gradient(145deg, #fafafa, #f5f3ff); border-color: #ddd6fe; }
.sentinel-bmc-subhead { margin: 18px 0 9px; padding-top: 12px; border-top: 1px solid #e2e8f0; color: var(--sh-ink); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }


/* BMC_OUTCOMES_DASHBOARD_STYLES */
.sentinel-outcomes-panel { border-color: #f9a8d4; }
.sentinel-outcomes-panel .sentinel-bmc-card { background: linear-gradient(145deg, #fffafa, #fdf2f8); border-color: #fbcfe8; }
.sentinel-outcomes-warning { margin: 8px 0 2px; padding: 9px 11px; border-left: 3px solid #db2777; background: #fdf2f8; color: #831843; font-size: 11px; font-weight: 800; }
.sentinel-window-card { grid-column: span 1; }
.sentinel-window-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.sentinel-window-values b { color: var(--sh-ink); font-size: 16px; }
.sentinel-window-values small { display: block; margin-top: 3px; color: var(--sh-muted); font-size: 8px; text-transform: uppercase; }
