:root {
    --exec-ink: #102a43;
    --exec-muted: #627d98;
    --exec-primary: #0e7490;
    --exec-primary-deep: #0b4f6c;
    --exec-accent: #2bb3a3;
    --exec-surface: #ffffff;
    --exec-canvas: #f4f7fb;
    --exec-border: #e5ecf3;
    --exec-shadow: 0 12px 32px rgba(16, 42, 67, 0.08);
    --exec-shadow-hover: 0 18px 42px rgba(16, 42, 67, 0.14);
    --exec-radius: 16px;
}

html { background: var(--exec-canvas); }
body.executive-dashboard,
body:has(.top-navbar) {
    background: var(--exec-canvas) !important;
    color: var(--exec-ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}

.top-navbar {
    position: sticky !important;
    top: 0;
    z-index: 1030;
    min-height: 78px !important;
    padding: 0.85rem 1.35rem !important;
    background: linear-gradient(105deg, var(--exec-primary-deep), var(--exec-primary)) !important;
    border: 0 !important;
    box-shadow: 0 8px 24px rgba(11, 79, 108, 0.18) !important;
}
.top-navbar .container-fluid { max-width: 1680px; }
.navbar-brand-custom { gap: 0.75rem !important; align-items: center; }
.navbar-brand-custom .brand-icon {
    width: 42px !important; height: 42px !important; border-radius: 12px !important;
    background: rgba(255,255,255,0.16) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}
.navbar-brand-custom .brand-icon img { max-width: 30px !important; max-height: 30px !important; }
.navbar-brand-custom .brand-icon i { font-size: 1.05rem !important; }
.navbar-brand-custom .brand-text h5 { font-size: 0.98rem !important; font-weight: 700 !important; letter-spacing: 0.01em; }
.navbar-brand-custom .brand-text p { font-size: 0.68rem !important; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.top-navbar .text-center small { font-size: 0.72rem !important; opacity: 0.85; letter-spacing: 0.03em; }
.user-info { gap: 0.65rem !important; }
.user-avatar { width: 38px !important; height: 38px !important; border: 2px solid rgba(255,255,255,0.55) !important; background: rgba(255,255,255,0.18) !important; }
.user-details .user-name { font-size: 0.78rem !important; font-weight: 700 !important; }
.user-details .user-role { font-size: 0.66rem !important; opacity: 0.78; }

.container-fluid.mt-3 { max-width: 1680px; margin-top: 1.35rem !important; }
/*.main-content { padding: 0 0.35rem 2rem !important; }*/
.main-content { 
    padding: 15px !important;
}
.welcome-section {
    border: 1px solid rgba(255,255,255,0.35) !important;
    border-radius: var(--exec-radius) !important;
    padding: 1.4rem 1.5rem !important;
    margin-bottom: 1.2rem !important;
    background: linear-gradient(120deg, #0b4f6c 0%, #0e7490 60%, #2b9eb3 100%) !important;
    box-shadow: 0 14px 30px rgba(11, 79, 108, 0.16) !important;
}
.welcome-section h4 { font-size: 1.3rem !important; font-weight: 750 !important; letter-spacing: -0.03em; }
.welcome-section p { font-size: 0.82rem !important; opacity: 0.82 !important; }
.welcome-section .badge { border: 1px solid rgba(16,42,67,0.08); padding: 0.48rem 0.65rem; font-size: 0.68rem; font-weight: 600; }

.stat-card, .chart-card, .dashboard-card, .card, .table-card, .sidebar-card, .stats-info-card, .hospital-info-card {
    border: 1px solid var(--exec-border) !important;
    border-radius: var(--exec-radius) !important;
    box-shadow: var(--exec-shadow) !important;
    background: var(--exec-surface) !important;
}
.stat-card { min-height: 126px; padding: 1.15rem !important; transition: transform 160ms ease, box-shadow 160ms ease; }
.stat-card:hover, .chart-card:hover, .dashboard-card:hover { transform: translateY(-2px); box-shadow: var(--exec-shadow-hover) !important; }
.stat-label { color: var(--exec-muted) !important; font-size: 0.69rem !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value {
    color: var(--exec-ink);
    font-size: clamp(1rem, 1.25vw, 1.45rem) !important;
    font-weight: 780 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
/* Page-level rules use .stat-card .stat-value, so match that specificity. */
.stat-card .stat-value {
    font-size: clamp(0.95rem, 1.15vw, 1.3rem) !important;
    line-height: 1.08 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-small { font-size: 0.7rem !important; font-weight: 600; }
.stat-icon { width: 42px !important; height: 42px !important; border-radius: 12px !important; display: grid; place-items: center; }

.card-header, .chart-header, .section-header {
    padding: 1rem 1.2rem !important;
    border-bottom: 1px solid var(--exec-border) !important;
    background: #fbfcfe !important;
}
.card-header h5, .card-header h6, .chart-header h5, .chart-header h6 { color: var(--exec-ink); font-weight: 750 !important; letter-spacing: -0.02em; }
.card-body { padding: 1.15rem !important; }
.table { margin-bottom: 0; }
.table thead th { color: var(--exec-muted); background: #f8fafc; border-bottom: 1px solid var(--exec-border); font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
.table tbody td { border-color: #edf2f7; font-size: 0.78rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f4fbfc; }
.progress { height: 7px !important; border-radius: 999px !important; background: #edf2f7 !important; }
.progress-bar { border-radius: 999px !important; }
.badge { border-radius: 999px !important; font-weight: 650 !important; letter-spacing: 0.01em; }
.form-control, .form-select { border-radius: 10px !important; border-color: #d8e2ec !important; font-size: 0.82rem !important; min-height: 40px; }
.form-control:focus, .form-select:focus { border-color: var(--exec-accent) !important; box-shadow: 0 0 0 0.2rem rgba(43,179,163,0.16) !important; }
.btn { border-radius: 10px !important; font-size: 0.78rem !important; font-weight: 650 !important; }
.btn-primary { background: var(--exec-primary) !important; border-color: var(--exec-primary) !important; }
.btn-primary:hover { background: var(--exec-primary-deep) !important; border-color: var(--exec-primary-deep) !important; }

.sidebar-wrapper { position: sticky !important; top: 96px; }
.sidebar-card { overflow: hidden; }
.sidebar-header {
    padding: 1.15rem 1.2rem !important;
    background: linear-gradient(120deg, #0b4f6c, #0e7490) !important;
    border: 0 !important;
}
.sidebar-header h6 { font-size: 0.82rem !important; text-transform: uppercase; letter-spacing: 0.08em; }
.sidebar-header p { opacity: 0.72; font-size: 0.72rem !important; }
.menu-group-label {
    margin: 0.5rem 0.7rem 0.2rem !important; border-radius: 10px !important;
    padding: 0.58rem 0.7rem !important; color: var(--exec-muted) !important;
    font-size: 0.66rem !important; font-weight: 750 !important; letter-spacing: 0.08em; text-transform: uppercase;
}
.menu-group-label:hover { background: #f3f8fa !important; color: var(--exec-primary) !important; }
.menu-group-items { padding: 0.05rem 0.7rem 0.35rem !important; }
.list-group-item {
    margin: 0.12rem 0 !important; padding: 0.62rem 0.72rem !important; border: 0 !important;
    border-radius: 10px !important; color: #46637a !important; font-size: 0.76rem !important; font-weight: 600 !important;
}
.list-group-item i { width: 1.25rem !important; color: #8aa3b8 !important; }
.list-group-item:hover { background: #f1f8fa !important; color: var(--exec-primary-deep) !important; padding-left: 0.9rem !important; }
.list-group-item:hover i, .list-group-item.active i { color: var(--exec-primary) !important; }
.list-group-item.active { background: #e9f7f8 !important; color: var(--exec-primary-deep) !important; box-shadow: inset 3px 0 0 var(--exec-accent); }
.sidebar-card .dropdown-divider { border-color: var(--exec-border); margin: 0.5rem 1rem; }
.stats-info-card, .hospital-info-card { margin-top: 1rem; overflow: hidden; }
.stats-info-card .card-header, .hospital-info-card .card-header { background: #fbfcfe !important; color: var(--exec-ink) !important; }
.stats-info-card .card-body { font-size: 0.75rem; }

.alert { border: 0 !important; border-radius: 12px !important; font-size: 0.8rem; box-shadow: 0 6px 18px rgba(16,42,67,0.06); }
.dropdown-menu-custom { border: 1px solid var(--exec-border) !important; border-radius: 12px !important; box-shadow: var(--exec-shadow) !important; }
.loading-overlay { background: rgba(244,247,251,0.92) !important; backdrop-filter: blur(4px); }

@media (max-width: 991.98px) {
    .sidebar-wrapper { position: relative !important; top: auto; }
    .top-navbar { min-height: 68px !important; }
    .main-content { padding-top: 0.25rem !important; }
}
@media (max-width: 575.98px) {
    .top-navbar { padding: 0.7rem 0.85rem !important; }
    .navbar-brand-custom .brand-text h5 { font-size: 0.8rem !important; }
    .navbar-brand-custom .brand-text p { display: none; }
    .container-fluid.mt-3 { margin-top: 0.85rem !important; padding-left: 0.65rem; padding-right: 0.65rem; }
    .welcome-section { padding: 1rem !important; }
    .welcome-section h4 { font-size: 1rem !important; }
    .stat-card { min-height: 108px; padding: 0.85rem !important; }
    .stat-card .stat-value { font-size: 0.95rem !important; }
    .stat-icon { width: 34px !important; height: 34px !important; }
}

/* --------------------------------------------------------------------------
   Compact all-pages typography normalization
   -------------------------------------------------------------------------- */
body.executive-dashboard,
body:has(.top-navbar) {
    font-size: 0.82rem !important;
}

body.executive-dashboard h1,
body:has(.top-navbar) h1 { font-size: clamp(1.35rem, 1.8vw, 1.75rem) !important; line-height: 1.15 !important; }
body.executive-dashboard h2,
body:has(.top-navbar) h2 { font-size: clamp(1.18rem, 1.55vw, 1.5rem) !important; line-height: 1.18 !important; }
body.executive-dashboard h3,
body:has(.top-navbar) h3 { font-size: clamp(1.05rem, 1.35vw, 1.3rem) !important; line-height: 1.2 !important; }
body.executive-dashboard h4,
body:has(.top-navbar) h4 { font-size: clamp(0.98rem, 1.2vw, 1.15rem) !important; line-height: 1.22 !important; }
body.executive-dashboard h5,
body:has(.top-navbar) h5 { font-size: 0.96rem !important; line-height: 1.25 !important; }
body.executive-dashboard h6,
body:has(.top-navbar) h6 { font-size: 0.82rem !important; line-height: 1.3 !important; }

body.executive-dashboard .display-1,
body:has(.top-navbar) .display-1 { font-size: 2rem !important; }
body.executive-dashboard .display-2,
body:has(.top-navbar) .display-2 { font-size: 1.75rem !important; }
body.executive-dashboard .display-3,
body:has(.top-navbar) .display-3 { font-size: 1.5rem !important; }
body.executive-dashboard .display-4,
body:has(.top-navbar) .display-4 { font-size: 1.3rem !important; }

body.executive-dashboard .stat-number,
body:has(.top-navbar) .stat-number,
body.executive-dashboard .metric-value,
body:has(.top-navbar) .metric-value,
body.executive-dashboard .financial-metric,
body:has(.top-navbar) .financial-metric,
body.executive-dashboard .clinical-value,
body:has(.top-navbar) .clinical-value,
body.executive-dashboard .dept-value,
body:has(.top-navbar) .dept-value,
body.executive-dashboard .dist-value,
body:has(.top-navbar) .dist-value,
body.executive-dashboard .gender-value,
body:has(.top-navbar) .gender-value,
body.executive-dashboard .percentage-text,
body:has(.top-navbar) .percentage-text,
body.executive-dashboard .kpi-value,
body:has(.top-navbar) .kpi-value {
    font-size: clamp(0.92rem, 1.12vw, 1.25rem) !important;
    line-height: 1.1 !important;
    font-weight: 730 !important;
    letter-spacing: -0.025em !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

body.executive-dashboard .stat-label,
body:has(.top-navbar) .stat-label,
body.executive-dashboard .metric-label,
body:has(.top-navbar) .metric-label,
body.executive-dashboard .filter-label,
body:has(.top-navbar) .filter-label,
body.executive-dashboard .clinical-label,
body:has(.top-navbar) .clinical-label,
body.executive-dashboard .target-label,
body:has(.top-navbar) .target-label,
body.executive-dashboard .purchase-label,
body:has(.top-navbar) .purchase-label,
body.executive-dashboard .revenue-label,
body:has(.top-navbar) .revenue-label,
body.executive-dashboard .payment-type-label,
body:has(.top-navbar) .payment-type-label,
body.executive-dashboard .customer-type-label,
body:has(.top-navbar) .customer-type-label {
    font-size: 0.64rem !important;
    line-height: 1.2 !important;
    letter-spacing: 0.055em !important;
}

body.executive-dashboard .card-title,
body:has(.top-navbar) .card-title,
body.executive-dashboard .section-title,
body:has(.top-navbar) .section-title,
body.executive-dashboard .page-header,
body:has(.top-navbar) .page-header,
body.executive-dashboard .chart-title,
body:has(.top-navbar) .chart-title,
body.executive-dashboard .module-group-header,
body:has(.top-navbar) .module-group-header,
body.executive-dashboard .category-group-header,
body:has(.top-navbar) .category-group-header {
    font-size: 0.88rem !important;
    line-height: 1.25 !important;
    font-weight: 720 !important;
}

body.executive-dashboard .card-header,
body:has(.top-navbar) .card-header,
body.executive-dashboard .section-header,
body:has(.top-navbar) .section-header,
body.executive-dashboard .kpi-header,
body:has(.top-navbar) .kpi-header {
    font-size: 0.78rem !important;
}
body.executive-dashboard .card-header small,
body:has(.top-navbar) .card-header small,
body.executive-dashboard small,
body:has(.top-navbar) small { font-size: 0.68rem !important; }
body.executive-dashboard .stat-small,
body:has(.top-navbar) .stat-small { font-size: 0.64rem !important; }

body.executive-dashboard .table,
body:has(.top-navbar) .table { font-size: 0.72rem !important; }
body.executive-dashboard .table thead th,
body:has(.top-navbar) .table thead th { font-size: 0.62rem !important; letter-spacing: 0.055em !important; }
body.executive-dashboard .table tbody td,
body:has(.top-navbar) .table tbody td { font-size: 0.72rem !important; }
body.executive-dashboard .form-label,
body:has(.top-navbar) .form-label,
body.executive-dashboard .form-label-custom,
body:has(.top-navbar) .form-label-custom,
body.executive-dashboard .form-check-label,
body:has(.top-navbar) .form-check-label { font-size: 0.7rem !important; }
body.executive-dashboard .form-control,
body:has(.top-navbar) .form-control,
body.executive-dashboard .form-select,
body:has(.top-navbar) .form-select,
body.executive-dashboard .btn,
body:has(.top-navbar) .btn { font-size: 0.72rem !important; }
body.executive-dashboard .list-group-item,
body:has(.top-navbar) .list-group-item { font-size: 0.72rem !important; }
body.executive-dashboard .menu-group-label,
body:has(.top-navbar) .menu-group-label { font-size: 0.62rem !important; }
body.executive-dashboard .badge,
body:has(.top-navbar) .badge { font-size: 0.64rem !important; }
body.executive-dashboard .user-details .user-name,
body:has(.top-navbar) .user-details .user-name { font-size: 0.72rem !important; }
body.executive-dashboard .user-details .user-role,
body:has(.top-navbar) .user-details .user-role { font-size: 0.62rem !important; }

@media (max-width: 767.98px) {
    body.executive-dashboard,
    body:has(.top-navbar) { font-size: 0.78rem !important; }
    body.executive-dashboard h1,
    body:has(.top-navbar) h1 { font-size: 1.25rem !important; }
    body.executive-dashboard h2,
    body:has(.top-navbar) h2 { font-size: 1.1rem !important; }
    body.executive-dashboard h3,
    body:has(.top-navbar) h3 { font-size: 1rem !important; }
    body.executive-dashboard .stat-number,
    body:has(.top-navbar) .stat-number,
    body.executive-dashboard .metric-value,
    body:has(.top-navbar) .metric-value,
    body.executive-dashboard .kpi-value,
    body:has(.top-navbar) .kpi-value { font-size: 0.92rem !important; }
    body.executive-dashboard .card-body,
    body:has(.top-navbar) .card-body { font-size: 0.74rem !important; }
}

body.executive-dashboard .stat-icon i,
body:has(.top-navbar) .stat-icon i { font-size: 1rem !important; }
body.executive-dashboard .sidebar-header > i,
body:has(.top-navbar) .sidebar-header > i { font-size: 1.1rem !important; }
body.executive-dashboard .mobile-menu-btn i,
body:has(.top-navbar) .mobile-menu-btn i { font-size: 0.9rem !important; }

/* Sidebar summaries are intentionally denser than main KPI cards. */
body.executive-dashboard .sidebar-wrapper .stat-value,
body:has(.top-navbar) .sidebar-wrapper .stat-value {
    font-size: 0.7rem !important;
    line-height: 1.15 !important;
    letter-spacing: -0.015em !important;
    font-weight: 700 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48%;
}
body.executive-dashboard .sidebar-wrapper .stat-label,
body:has(.top-navbar) .sidebar-wrapper .stat-label {
    font-size: 0.61rem !important;
    line-height: 1.2 !important;
}
body.executive-dashboard .sidebar-wrapper .stats-info-card .card-body,
body:has(.top-navbar) .sidebar-wrapper .stats-info-card .card-body {
    font-size: 0.7rem !important;
}
@media (max-width: 575.98px) {
    body.executive-dashboard .sidebar-wrapper .stat-value,
    body:has(.top-navbar) .sidebar-wrapper .stat-value { font-size: 0.66rem !important; }
    body.executive-dashboard .sidebar-wrapper .stat-label,
    body:has(.top-navbar) .sidebar-wrapper .stat-label { font-size: 0.58rem !important; }
}

/* Persistent desktop sidebar collapse / expand */
.sidebar-collapse-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 9px;
    color: #fff;
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}
.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
    color: #fff;
    background: rgba(255,255,255,0.24);
    transform: scale(1.04);
    outline: none;
}
.sidebar-header-content { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.sidebar-header-content > div:last-child { min-width: 0; }
.sidebar-header { display: flex !important; align-items: center; justify-content: space-between; gap: 0.6rem; }
.sidebar-header-icon { display: grid; place-items: center; min-width: 26px; }
.sidebar-header-icon i { font-size: 1.05rem !important; margin: 0 !important; }
.sidebar-header h6, .sidebar-header p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 992px) {
    .container-fluid.mt-3 > .row > .sidebar-column-collapsed {
        display: none !important;
    }
    .container-fluid.mt-3 > .row > .content-column-expanded {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .sidebar-collapsed .main-content { padding-left: 0 !important; padding-right: 0 !important; }
}

@media (max-width: 991.98px) {
    .sidebar-collapse-btn { display: none; }
    .sidebar-header-content { width: 100%; }
}

/* --------------------------------------------------------------------------
   Edge alignment and reversible sidebar state
   -------------------------------------------------------------------------- */
.top-navbar .container-fluid {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto;
    margin-right: auto;
}
.container-fluid.mt-3 {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    box-sizing: border-box;
}
.container-fluid.mt-3 > .row {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.container-fluid.mt-3 > .row > [class*="col-"] {
    box-sizing: border-box;
}
.main-content {
    width: 100%;
    max-width: none !important;
    box-sizing: border-box;
}

.sidebar-reopen-btn {
    position: fixed;
    left: 0.75rem;
    top: 6.4rem;
    z-index: 1040;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 66px;
    padding: 0;
    border: 1px solid rgba(14,116,144,0.24);
    border-radius: 0 12px 12px 0;
    color: #fff;
    background: linear-gradient(180deg, #0b4f6c, #0e7490);
    box-shadow: 0 8px 20px rgba(16,42,67,0.18);
    cursor: pointer;
    transition: width 160ms ease, background 160ms ease;
}
.sidebar-reopen-btn:hover,
.sidebar-reopen-btn:focus-visible {
    width: 40px;
    color: #fff;
    background: #0b4f6c;
    outline: none;
}
.sidebar-reopen-btn i { font-size: 0.82rem; }
.sidebar-reopen-btn[hidden] { display: none !important; }

@media (max-width: 991.98px) {
    .container-fluid.mt-3 {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }
    .sidebar-reopen-btn { display: none !important; }
}

.sidebar-wrapper.sidebar-is-collapsed { display: none !important; }
@media (min-width: 992px) {
    .sidebar-reopen-btn { top: 6.75rem; }
}

/* Final page frame: equal breathing room on all four sides, including full-width mode. */
body.executive-dashboard,
body:has(.top-navbar) {
    margin: 0 !important;
    min-height: 100vh;
    overflow-x: hidden;
}
.container-fluid.mt-3 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 1.25rem !important;
}
.container-fluid.mt-3 > .row {
    min-height: calc(100vh - 7.25rem);
    align-items: flex-start;
}
.container-fluid.mt-3 > .row > .content-column-expanded {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}
.sidebar-toggle-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}
.sidebar-toggle-glyph > i:first-child { font-size: 0.82rem !important; }
.sidebar-toggle-glyph .sidebar-toggle-arrow { font-size: 0.54rem !important; opacity: 0.9; }
.sidebar-collapse-btn,
.sidebar-reopen-btn { box-sizing: border-box; }
.sidebar-reopen-btn {
    width: 38px;
    height: 58px;
    left: 0;
    border-left: 0;
    border-radius: 0 12px 12px 0;
}
.sidebar-reopen-btn:hover,
.sidebar-reopen-btn:focus-visible { width: 44px; }
@media (max-width: 991.98px) {
    .container-fluid.mt-3 {
        margin-top: 0.65rem !important;
        margin-bottom: 0.65rem !important;
        padding-top: 0 !important;
        padding-bottom: 0.85rem !important;
    }
    .container-fluid.mt-3 > .row { min-height: auto; }
}

/* Reliable mobile navigation behavior */
.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1045;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(16, 42, 67, 0.42);
    cursor: pointer;
}
.mobile-sidebar-overlay[hidden] { display: none !important; }
body.mobile-sidebar-open { overflow: hidden !important; }

@media (max-width: 991.98px) {
    .sidebar-wrapper {
        position: relative !important;
        z-index: auto;
        width: 100%;
        transition: opacity 160ms ease, transform 160ms ease;
    }
    .sidebar-wrapper.mobile-sidebar-hidden {
        display: none !important;
    }
    .sidebar-wrapper.mobile-open {
        display: block !important;
        position: fixed !important;
        top: 68px !important;
        left: 0.65rem !important;
        right: 0.65rem !important;
        width: auto !important;
        max-height: calc(100vh - 78px) !important;
        padding: 0 !important;
        overflow-y: auto !important;
        z-index: 1050 !important;
        transform: translateZ(0);
    }
    .sidebar-wrapper.mobile-open .sidebar-card,
    .sidebar-wrapper.mobile-open .stats-info-card,
    .sidebar-wrapper.mobile-open .hospital-info-card {
        box-shadow: 0 18px 42px rgba(16,42,67,0.22) !important;
    }
}

/* Balanced padding for the full-width content state. */
@media (min-width: 992px) {
    .container-fluid.mt-3 > .row > .content-column-expanded {
        padding: 0.85rem 1rem 1.15rem !important;
        box-sizing: border-box;
    }
    .sidebar-collapsed .content-column-expanded .main-content {
        padding: 15px !important;
        margin: 0 !important;
    }
}

/* Project-specific overrides retained after uploaded stylesheet integration. */
/* --------------------------------------------------------------------------
   Compact all-pages typography normalization
   -------------------------------------------------------------------------- */
body.executive-dashboard,
body:has(.top-navbar) {
    font-size: 0.82rem !important;
}

body.executive-dashboard h1,
body:has(.top-navbar) h1 { font-size: clamp(1.35rem, 1.8vw, 1.75rem) !important; line-height: 1.15 !important; }
body.executive-dashboard h2,
body:has(.top-navbar) h2 { font-size: clamp(1.18rem, 1.55vw, 1.5rem) !important; line-height: 1.18 !important; }
body.executive-dashboard h3,
body:has(.top-navbar) h3 { font-size: clamp(1.05rem, 1.35vw, 1.3rem) !important; line-height: 1.2 !important; }
body.executive-dashboard h4,
body:has(.top-navbar) h4 { font-size: clamp(0.98rem, 1.2vw, 1.15rem) !important; line-height: 1.22 !important; }
body.executive-dashboard h5,
body:has(.top-navbar) h5 { font-size: 0.96rem !important; line-height: 1.25 !important; }
body.executive-dashboard h6,
body:has(.top-navbar) h6 { font-size: 0.82rem !important; line-height: 1.3 !important; }

body.executive-dashboard .display-1,
body:has(.top-navbar) .display-1 { font-size: 2rem !important; }
body.executive-dashboard .display-2,
body:has(.top-navbar) .display-2 { font-size: 1.75rem !important; }
body.executive-dashboard .display-3,
body:has(.top-navbar) .display-3 { font-size: 1.5rem !important; }
body.executive-dashboard .display-4,
body:has(.top-navbar) .display-4 { font-size: 1.3rem !important; }

body.executive-dashboard .stat-number,
body:has(.top-navbar) .stat-number,
body.executive-dashboard .metric-value,
body:has(.top-navbar) .metric-value,
body.executive-dashboard .financial-metric,
body:has(.top-navbar) .financial-metric,
body.executive-dashboard .clinical-value,
body:has(.top-navbar) .clinical-value,
body.executive-dashboard .dept-value,
body:has(.top-navbar) .dept-value,
body.executive-dashboard .dist-value,
body:has(.top-navbar) .dist-value,
body.executive-dashboard .gender-value,
body:has(.top-navbar) .gender-value,
body.executive-dashboard .percentage-text,
body:has(.top-navbar) .percentage-text,
body.executive-dashboard .kpi-value,
body:has(.top-navbar) .kpi-value {
    font-size: clamp(0.92rem, 1.12vw, 1.25rem) !important;
    line-height: 1.1 !important;
    font-weight: 730 !important;
    letter-spacing: -0.025em !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

body.executive-dashboard .stat-label,
body:has(.top-navbar) .stat-label,
body.executive-dashboard .metric-label,
body:has(.top-navbar) .metric-label,
body.executive-dashboard .filter-label,
body:has(.top-navbar) .filter-label,
body.executive-dashboard .clinical-label,
body:has(.top-navbar) .clinical-label,
body.executive-dashboard .target-label,
body:has(.top-navbar) .target-label,
body.executive-dashboard .purchase-label,
body:has(.top-navbar) .purchase-label,
body.executive-dashboard .revenue-label,
body:has(.top-navbar) .revenue-label,
body.executive-dashboard .payment-type-label,
body:has(.top-navbar) .payment-type-label,
body.executive-dashboard .customer-type-label,
body:has(.top-navbar) .customer-type-label {
    font-size: 0.64rem !important;
    line-height: 1.2 !important;
    letter-spacing: 0.055em !important;
}

body.executive-dashboard .card-title,
body:has(.top-navbar) .card-title,
body.executive-dashboard .section-title,
body:has(.top-navbar) .section-title,
body.executive-dashboard .page-header,
body:has(.top-navbar) .page-header,
body.executive-dashboard .chart-title,
body:has(.top-navbar) .chart-title,
body.executive-dashboard .module-group-header,
body:has(.top-navbar) .module-group-header,
body.executive-dashboard .category-group-header,
body:has(.top-navbar) .category-group-header {
    font-size: 0.88rem !important;
    line-height: 1.25 !important;
    font-weight: 720 !important;
}

body.executive-dashboard .card-header,
body:has(.top-navbar) .card-header,
body.executive-dashboard .section-header,
body:has(.top-navbar) .section-header,
body.executive-dashboard .kpi-header,
body:has(.top-navbar) .kpi-header {
    font-size: 0.78rem !important;
}
body.executive-dashboard .card-header small,
body:has(.top-navbar) .card-header small,
body.executive-dashboard small,
body:has(.top-navbar) small { font-size: 0.68rem !important; }
body.executive-dashboard .stat-small,
body:has(.top-navbar) .stat-small { font-size: 0.64rem !important; }

body.executive-dashboard .table,
body:has(.top-navbar) .table { font-size: 0.72rem !important; }
body.executive-dashboard .table thead th,
body:has(.top-navbar) .table thead th { font-size: 0.62rem !important; letter-spacing: 0.055em !important; }
body.executive-dashboard .table tbody td,
body:has(.top-navbar) .table tbody td { font-size: 0.72rem !important; }
body.executive-dashboard .form-label,
body:has(.top-navbar) .form-label,
body.executive-dashboard .form-label-custom,
body:has(.top-navbar) .form-label-custom,
body.executive-dashboard .form-check-label,
body:has(.top-navbar) .form-check-label { font-size: 0.7rem !important; }
body.executive-dashboard .form-control,
body:has(.top-navbar) .form-control,
body.executive-dashboard .form-select,
body:has(.top-navbar) .form-select,
body.executive-dashboard .btn,
body:has(.top-navbar) .btn { font-size: 0.72rem !important; }
body.executive-dashboard .list-group-item,
body:has(.top-navbar) .list-group-item { font-size: 0.72rem !important; }
body.executive-dashboard .menu-group-label,
body:has(.top-navbar) .menu-group-label { font-size: 0.62rem !important; }
body.executive-dashboard .badge,
body:has(.top-navbar) .badge { font-size: 0.64rem !important; }
body.executive-dashboard .user-details .user-name,
body:has(.top-navbar) .user-details .user-name { font-size: 0.72rem !important; }
body.executive-dashboard .user-details .user-role,
body:has(.top-navbar) .user-details .user-role { font-size: 0.62rem !important; }

@media (max-width: 767.98px) {
    body.executive-dashboard,
    body:has(.top-navbar) { font-size: 0.78rem !important; }
    body.executive-dashboard h1,
    body:has(.top-navbar) h1 { font-size: 1.25rem !important; }
    body.executive-dashboard h2,
    body:has(.top-navbar) h2 { font-size: 1.1rem !important; }
    body.executive-dashboard h3,
    body:has(.top-navbar) h3 { font-size: 1rem !important; }
    body.executive-dashboard .stat-number,
    body:has(.top-navbar) .stat-number,
    body.executive-dashboard .metric-value,
    body:has(.top-navbar) .metric-value,
    body.executive-dashboard .kpi-value,
    body:has(.top-navbar) .kpi-value { font-size: 0.92rem !important; }
    body.executive-dashboard .card-body,
    body:has(.top-navbar) .card-body { font-size: 0.74rem !important; }
}

body.executive-dashboard .stat-icon i,
body:has(.top-navbar) .stat-icon i { font-size: 1rem !important; }
body.executive-dashboard .sidebar-header > i,
body:has(.top-navbar) .sidebar-header > i { font-size: 1.1rem !important; }
body.executive-dashboard .mobile-menu-btn i,
body:has(.top-navbar) .mobile-menu-btn i { font-size: 0.9rem !important; }

/* Sidebar summaries are intentionally denser than main KPI cards. */
body.executive-dashboard .sidebar-wrapper .stat-value,
body:has(.top-navbar) .sidebar-wrapper .stat-value {
    font-size: 0.7rem !important;
    line-height: 1.15 !important;
    letter-spacing: -0.015em !important;
    font-weight: 700 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48%;
}
body.executive-dashboard .sidebar-wrapper .stat-label,
body:has(.top-navbar) .sidebar-wrapper .stat-label {
    font-size: 0.61rem !important;
    line-height: 1.2 !important;
}
body.executive-dashboard .sidebar-wrapper .stats-info-card .card-body,
body:has(.top-navbar) .sidebar-wrapper .stats-info-card .card-body {
    font-size: 0.7rem !important;
}
@media (max-width: 575.98px) {
    body.executive-dashboard .sidebar-wrapper .stat-value,
    body:has(.top-navbar) .sidebar-wrapper .stat-value { font-size: 0.66rem !important; }
    body.executive-dashboard .sidebar-wrapper .stat-label,
    body:has(.top-navbar) .sidebar-wrapper .stat-label { font-size: 0.58rem !important; }
}

/* Persistent desktop sidebar collapse / expand */
.sidebar-collapse-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 9px;
    color: #fff;
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}
.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
    color: #fff;
    background: rgba(255,255,255,0.24);
    transform: scale(1.04);
    outline: none;
}
.sidebar-header-content { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.sidebar-header-content > div:last-child { min-width: 0; }
.sidebar-header { display: flex !important; align-items: center; justify-content: space-between; gap: 0.6rem; }
.sidebar-header-icon { display: grid; place-items: center; min-width: 26px; }
.sidebar-header-icon i { font-size: 1.05rem !important; margin: 0 !important; }
.sidebar-header h6, .sidebar-header p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 992px) {
    .container-fluid.mt-3 > .row > .sidebar-column-collapsed {
        display: none !important;
    }
    .container-fluid.mt-3 > .row > .content-column-expanded {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .sidebar-collapsed .main-content { padding-left: 0 !important; padding-right: 0 !important; }
}

@media (max-width: 991.98px) {
    .sidebar-collapse-btn { display: none; }
    .sidebar-header-content { width: 100%; }
}

/* --------------------------------------------------------------------------
   Edge alignment and reversible sidebar state
   -------------------------------------------------------------------------- */
.top-navbar .container-fluid {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto;
    margin-right: auto;
}
.container-fluid.mt-3 {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    box-sizing: border-box;
}
.container-fluid.mt-3 > .row {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.container-fluid.mt-3 > .row > [class*="col-"] {
    box-sizing: border-box;
}
.main-content {
    width: 100%;
    max-width: none !important;
    box-sizing: border-box;
}

.sidebar-reopen-btn {
    position: fixed;
    left: 0.75rem;
    top: 6.4rem;
    z-index: 1040;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 66px;
    padding: 0;
    border: 1px solid rgba(14,116,144,0.24);
    border-radius: 0 12px 12px 0;
    color: #fff;
    background: linear-gradient(180deg, #0b4f6c, #0e7490);
    box-shadow: 0 8px 20px rgba(16,42,67,0.18);
    cursor: pointer;
    transition: width 160ms ease, background 160ms ease;
}
.sidebar-reopen-btn:hover,
.sidebar-reopen-btn:focus-visible {
    width: 40px;
    color: #fff;
    background: #0b4f6c;
    outline: none;
}
.sidebar-reopen-btn i { font-size: 0.82rem; }
.sidebar-reopen-btn[hidden] { display: none !important; }

@media (max-width: 991.98px) {
    .container-fluid.mt-3 {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }
    .sidebar-reopen-btn { display: none !important; }
}

.sidebar-wrapper.sidebar-is-collapsed { display: none !important; }
@media (min-width: 992px) {
    .sidebar-reopen-btn { top: 6.75rem; }
}

/* Final page frame: equal breathing room on all four sides, including full-width mode. */
body.executive-dashboard,
body:has(.top-navbar) {
    margin: 0 !important;
    min-height: 100vh;
    overflow-x: hidden;
}
.container-fluid.mt-3 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 1.25rem !important;
}
.container-fluid.mt-3 > .row {
    min-height: calc(100vh - 7.25rem);
    align-items: flex-start;
}
.container-fluid.mt-3 > .row > .content-column-expanded {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}
.sidebar-toggle-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}
.sidebar-toggle-glyph > i:first-child { font-size: 0.82rem !important; }
.sidebar-toggle-glyph .sidebar-toggle-arrow { font-size: 0.54rem !important; opacity: 0.9; }
.sidebar-collapse-btn,
.sidebar-reopen-btn { box-sizing: border-box; }
.sidebar-reopen-btn {
    width: 38px;
    height: 58px;
    left: 0;
    border-left: 0;
    border-radius: 0 12px 12px 0;
}
.sidebar-reopen-btn:hover,
.sidebar-reopen-btn:focus-visible { width: 44px; }
@media (max-width: 991.98px) {
    .container-fluid.mt-3 {
        margin-top: 0.65rem !important;
        margin-bottom: 0.65rem !important;
        padding-top: 0 !important;
        padding-bottom: 0.85rem !important;
    }
    .container-fluid.mt-3 > .row { min-height: auto; }
}

/* Reliable mobile navigation behavior */
.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1045;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(16, 42, 67, 0.42);
    cursor: pointer;
}
.mobile-sidebar-overlay[hidden] { display: none !important; }
body.mobile-sidebar-open { overflow: hidden !important; }

@media (max-width: 991.98px) {
    .sidebar-wrapper {
        position: relative !important;
        z-index: auto;
        width: 100%;
        transition: opacity 160ms ease, transform 160ms ease;
    }
    .sidebar-wrapper.mobile-sidebar-hidden {
        display: none !important;
    }
    .sidebar-wrapper.mobile-open {
        display: block !important;
        position: fixed !important;
        top: 68px !important;
        left: 0.65rem !important;
        right: 0.65rem !important;
        width: auto !important;
        max-height: calc(100vh - 78px) !important;
        padding: 0 !important;
        overflow-y: auto !important;
        z-index: 1050 !important;
        transform: translateZ(0);
    }
    .sidebar-wrapper.mobile-open .sidebar-card,
    .sidebar-wrapper.mobile-open .stats-info-card,
    .sidebar-wrapper.mobile-open .hospital-info-card {
        box-shadow: 0 18px 42px rgba(16,42,67,0.22) !important;
    }
}

/* Balanced padding for the full-width content state. */
@media (min-width: 992px) {
    .container-fluid.mt-3 > .row > .content-column-expanded {
        padding: 0.85rem 1rem 1.15rem !important;
        box-sizing: border-box;
    }
    .sidebar-collapsed .content-column-expanded .main-content {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* User-requested expanded content spacing. Keep the reduced flex width so
   10px outer margins do not create a horizontal scrollbar. */
@media (min-width: 992px) {
    .container-fluid.mt-3 > .row > .content-column-expanded {
        flex: 0 0 calc(100% - 20px) !important;
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        padding: 15px !important;
        margin: 10px !important;
        box-sizing: border-box;
    }
    .sidebar-collapsed .content-column-expanded .main-content,
    .container-fluid.mt-3 > .row > .content-column-expanded .main-content {
        width: calc(100% - 20px) !important;
        max-width: none !important;
        padding: 15px !important;
        margin: 10px !important;
        box-sizing: border-box;
    }
}

/* Shared scroll-to-top control */
#scrollTopButton {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1035;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(14,116,144,0.22);
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--exec-primary-deep), var(--exec-primary));
    box-shadow: 0 10px 24px rgba(16,42,67,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease, box-shadow 160ms ease;
    cursor: pointer;
}
#scrollTopButton.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#scrollTopButton:hover,
#scrollTopButton:focus-visible {
    color: #fff;
    box-shadow: 0 14px 30px rgba(16,42,67,0.28);
    outline: none;
}
#scrollTopButton i { font-size: 0.9rem; }
@media (max-width: 575.98px) {
    #scrollTopButton { right: 0.85rem; bottom: 0.85rem; width: 38px; height: 38px; border-radius: 10px; }
}

/* Precise centering for the sidebar collapse control. */
.sidebar-collapse-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1 !important;
}
.sidebar-collapse-btn .sidebar-toggle-glyph {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
    margin: 0 auto !important;
    transform: translateX(0) !important;
}
.sidebar-collapse-btn .sidebar-toggle-glyph > i {
    flex: 0 0 auto;
    margin: 0 !important;
}

/* --------------------------------------------------------------------------
   Shared card-title normalization
   -------------------------------------------------------------------------- */
.card-header,
.chart-header,
.section-header,
.kpi-header,
.settings-card-header,
.module-group-header,
.category-group-header,
.page-header {
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem;
    min-height: 2.55rem;
    color: var(--exec-ink) !important;
    background-color: #fbfcfe !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    box-sizing: border-box;
}

.card-header > i,
.chart-header > i,
.section-header > i,
.kpi-header > i,
.settings-card-header > i,
.module-group-header > i,
.category-group-header > i,
.page-header > i {
    flex: 0 0 auto;
    color: var(--exec-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .card-title,
.chart-header h1,
.chart-header h2,
.chart-header h3,
.chart-header h4,
.chart-header h5,
.chart-header h6,
.chart-header .chart-title,
.section-header h1,
.section-header h2,
.section-header h3,
.section-header h4,
.section-header h5,
.section-header h6,
.section-header .section-title,
.kpi-header h1,
.kpi-header h2,
.kpi-header h3,
.kpi-header h4,
.kpi-header h5,
.kpi-header h6,
.settings-card-header h1,
.settings-card-header h2,
.settings-card-header h3,
.settings-card-header h4,
.settings-card-header h5,
.settings-card-header h6,
.module-group-header h1,
.module-group-header h2,
.module-group-header h3,
.module-group-header h4,
.module-group-header h5,
.module-group-header h6,
.category-group-header h1,
.category-group-header h2,
.category-group-header h3,
.category-group-header h4,
.category-group-header h5,
.category-group-header h6,
.page-header h1,
.page-header h2,
.page-header h3,
.page-header h4,
.page-header h5,
.page-header h6,
.page-header .page-title {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    color: var(--exec-ink) !important;
    font-size: 0.88rem !important;
    font-weight: 720 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.section-title,
.chart-title,
.card-title,
.page-title {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
    min-width: 0;
    color: var(--exec-ink) !important;
    font-size: 0.88rem !important;
    font-weight: 720 !important;
    line-height: 1.25 !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.section-title > i,
.chart-title > i,
.card-title > i,
.page-title > i {
    flex: 0 0 auto;
    color: var(--exec-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.card-header .text-muted,
.chart-header .text-muted,
.section-header .text-muted,
.page-header .text-muted,
.card-header small,
.chart-header small,
.section-header small,
.page-header small {
    color: var(--exec-muted) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 767.98px) {
    .card-header,
    .chart-header,
    .section-header,
    .kpi-header,
    .settings-card-header,
    .module-group-header,
    .category-group-header,
    .page-header { min-height: 2.25rem; gap: 0.45rem; }
    .card-header h1,
    .card-header h2,
    .card-header h3,
    .card-header h4,
    .card-header h5,
    .card-header h6,
    .card-header .card-title,
    .chart-header .chart-title,
    .section-header .section-title,
    .page-header .page-title,
    .section-title,
    .chart-title,
    .card-title,
    .page-title { font-size: 0.8rem !important; }
}

/* --------------------------------------------------------------------------
   Shared AMSI system footer
   -------------------------------------------------------------------------- */
.system-footer {
    width: calc(100% - 2.5rem);
    margin: 0 auto 1.25rem;
    padding: 1.15rem 1.35rem 0.85rem;
    border: 1px solid var(--exec-border);
    border-radius: var(--exec-radius);
    color: var(--exec-muted);
    background: var(--exec-surface);
    box-shadow: 0 8px 22px rgba(16,42,67,0.05);
    box-sizing: border-box;
}
.system-footer-main,
.system-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.system-footer-main { flex-wrap: wrap; }
.system-footer-brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.system-footer-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, var(--exec-primary-deep), var(--exec-primary));
}
.system-footer-mark i { font-size: 0.82rem !important; }
.system-footer-system {
    color: var(--exec-ink);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
}
.system-footer-company {
    margin-top: 0.2rem;
    color: var(--exec-muted);
    font-size: 0.66rem;
    line-height: 1.2;
}
.footer-attribution {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: var(--exec-muted);
    font-size: 0.64rem;
    line-height: 1.35;
    text-align: right;
}
.footer-attribution-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.footer-attribution-item i { color: var(--exec-primary); font-size: 0.66rem; }
.footer-attribution strong { color: var(--exec-ink); font-weight: 700; }
.footer-attribution-separator { color: #b4c3d0; }
.system-footer-bottom {
    margin-top: 0.85rem;
    padding-top: 0.7rem;
    border-top: 1px solid #edf2f7;
    color: #8aa0b3;
    font-size: 0.61rem;
}
.system-footer-status { display: inline-flex; align-items: center; gap: 0.35rem; }
.system-footer-status i { color: #2bb3a3; font-size: 0.42rem; }

@media (max-width: 767.98px) {
    .system-footer {
        width: calc(100% - 1.3rem);
        margin-bottom: 0.85rem;
        padding: 0.95rem 0.9rem 0.75rem;
    }
    .system-footer-main,
    .system-footer-bottom { align-items: flex-start; flex-direction: column; gap: 0.65rem; }
    .footer-attribution { justify-content: flex-start; text-align: left; }
    .system-footer-bottom { margin-top: 0.65rem; }
}

/* --------------------------------------------------------------------------
   Formal footer presentation
   -------------------------------------------------------------------------- */
.system-footer {
    position: relative;
    width: calc(100% - 2.5rem);
    margin: 1.1rem auto 1.25rem;
    padding: 1.15rem 1.4rem 0.85rem;
    border: 1px solid var(--exec-border) !important;
    border-top: 3px solid var(--exec-primary) !important;
    border-radius: 12px !important;
    color: var(--exec-muted);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    box-shadow: 0 8px 22px rgba(16,42,67,0.055) !important;
}
.system-footer-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 0.95rem;
}
.system-footer-brand { gap: 0.75rem !important; }
.system-footer-mark {
    width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--exec-primary-deep), var(--exec-primary)) !important;
    box-shadow: 0 5px 12px rgba(14,116,144,0.18);
}
.system-footer-mark i { font-size: 0.86rem !important; }
.system-footer-brand-copy { min-width: 0; }
.system-footer-kicker {
    margin-bottom: 0.22rem;
    color: var(--exec-primary);
    font-size: 0.57rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}
.system-footer-system {
    color: var(--exec-ink) !important;
    font-size: 0.84rem !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
}
.system-footer-company {
    margin-top: 0.22rem !important;
    color: var(--exec-muted) !important;
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
}
.system-footer-credit {
    padding-left: 1.25rem;
    border-left: 1px solid var(--exec-border);
    text-align: right;
}
.system-footer-credit-label {
    color: var(--exec-muted);
    font-size: 0.59rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.system-footer-credit-name {
    margin-top: 0.2rem;
    color: var(--exec-ink);
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1.2;
}
.system-footer-credit-department {
    margin-top: 0.2rem;
    color: var(--exec-muted);
    font-size: 0.63rem;
    line-height: 1.2;
}
.system-footer-bottom {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0 !important;
    padding-top: 0.7rem !important;
    border-top: 1px solid #edf2f7 !important;
    color: #8498aa !important;
    font-size: 0.61rem !important;
}
.system-footer-status {
    color: var(--exec-muted) !important;
    font-weight: 600;
}
.system-footer-status i { color: var(--exec-accent) !important; }

@media (max-width: 767.98px) {
    .system-footer {
        width: calc(100% - 1.3rem);
        margin-top: 0.85rem;
        margin-bottom: 0.85rem;
        padding: 1rem 0.95rem 0.8rem;
    }
    .system-footer-main {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .system-footer-credit {
        padding-top: 0.75rem;
        padding-left: 0;
        border-top: 1px solid var(--exec-border);
        border-left: 0;
        text-align: left;
    }
    .system-footer-bottom { align-items: flex-start; flex-direction: column; gap: 0.4rem; }
}

/* --------------------------------------------------------------------------
   Footer clearance for fixed action controls
   -------------------------------------------------------------------------- */
.system-footer {
    margin-bottom: 5.75rem !important;
    isolation: isolate;
}
#scrollTopButton {
    right: 1.25rem !important;
    bottom: 1.15rem !important;
    z-index: 1035 !important;
}
@media (max-width: 767.98px) {
    .system-footer { margin-bottom: 5.25rem !important; }
    #scrollTopButton { right: 0.85rem !important; bottom: 0.85rem !important; }
}

/* --------------------------------------------------------------------------
   Bottom-aligned footer and footer-safe scroll control
   -------------------------------------------------------------------------- */
body.executive-dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.executive-dashboard > #mainContent {
    flex: 1 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
body.executive-dashboard > #mainContent > .container-fluid.mt-3,
body.executive-dashboard > .container-fluid.mt-3 {
    flex: 1 0 auto;
}
body.executive-dashboard > .system-footer {
    flex: 0 0 auto;
    margin-top: 1.1rem !important;
    margin-bottom: 1.25rem !important;
}
#scrollTopButton {
    bottom: 6.35rem !important;
}
@media (max-width: 767.98px) {
    body.executive-dashboard > .system-footer {
        margin-top: 0.85rem !important;
        margin-bottom: 0.85rem !important;
    }
    #scrollTopButton { bottom: 7.9rem !important; }
}

/* Specialized shells do not use the shared bottom-aligned application footer. */
body.executive-dashboard:has(.login-container),
body.executive-dashboard:has(.error-container) {
    display: block !important;
}
body.executive-dashboard:has(.login-container) > #mainContent,
body.executive-dashboard:has(.error-container) > #mainContent {
    display: block !important;
}

/* Footer-relative scroll control: footer clearance + button height + visual gap. */
:root {
    --system-footer-height: 0px;
    --scroll-top-height: 42px;
    --scroll-top-gap: 12px;
}
#scrollTopButton {
    bottom: calc(var(--system-footer-height) + var(--scroll-top-height) + var(--scroll-top-gap)) !important;
}
@media (max-width: 575.98px) {
    :root { --scroll-top-height: 38px; --scroll-top-gap: 10px; }
    #scrollTopButton {
        bottom: calc(var(--system-footer-height) + var(--scroll-top-height) + var(--scroll-top-gap)) !important;
    }
}

/* --------------------------------------------------------------------------
   Formal login-page footer
   -------------------------------------------------------------------------- */
.login-card .login-footer {
    display: block !important;
    margin: 0 !important;
    padding: 1rem 1.35rem 0.85rem !important;
    border-top: 3px solid var(--exec-primary) !important;
    color: var(--exec-muted) !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    text-align: left !important;
}
.login-footer-main,
.login-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.login-footer-identity { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.login-footer-mark {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, var(--exec-primary-deep), var(--exec-primary));
}
.login-footer-mark i { font-size: 0.75rem !important; }
.login-footer-system {
    color: var(--exec-ink) !important;
    font-size: 0.72rem !important;
    font-weight: 750 !important;
    line-height: 1.2;
}
.login-footer-company {
    margin-top: 0.15rem;
    color: var(--exec-muted) !important;
    font-size: 0.6rem !important;
    line-height: 1.2;
}
.login-footer-credit {
    padding-left: 0.9rem;
    border-left: 1px solid var(--exec-border);
    text-align: right;
}
.login-footer-credit-label,
.login-footer-credit span:last-child {
    display: block;
    color: var(--exec-muted) !important;
    font-size: 0.56rem !important;
    line-height: 1.25;
}
.login-footer-credit-label {
    font-weight: 650;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.login-footer-credit strong {
    display: block;
    margin: 0.14rem 0;
    color: var(--exec-ink) !important;
    font-size: 0.64rem !important;
    font-weight: 750 !important;
    line-height: 1.2;
}
.login-footer-bottom {
    margin-top: 0.8rem;
    padding-top: 0.65rem;
    border-top: 1px solid #edf2f7;
}
.login-footer-bottom small {
    color: #8498aa !important;
    font-size: 0.57rem !important;
    font-weight: 500 !important;
}
.login-footer .security-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0 !important;
    padding: 0.3rem 0.55rem !important;
    border: 1px solid rgba(43,179,163,0.2);
    border-radius: 999px !important;
    color: var(--exec-primary-deep) !important;
    background: #effaf8 !important;
    font-size: 0.56rem !important;
    font-weight: 650 !important;
}
.login-footer .security-badge i { margin-right: 0 !important; color: var(--exec-accent); }

@media (max-width: 550px) {
    .login-card .login-footer { padding: 0.9rem 1rem 0.75rem !important; }
    .login-footer-main { align-items: flex-start; flex-direction: column; gap: 0.7rem; }
    .login-footer-credit {
        width: 100%;
        padding-top: 0.65rem;
        padding-left: 0;
        border-top: 1px solid var(--exec-border);
        border-left: 0;
        text-align: left;
    }
    .login-footer-bottom { align-items: flex-start; flex-direction: column; gap: 0.45rem; }
}

/* --------------------------------------------------------------------------
   Canonical dashboard section-title format
   -------------------------------------------------------------------------- */
html body.executive-dashboard .main-content .section-title,
html body.executive-dashboard .main-content .morbidity-section-label,
html body.executive-dashboard .main-content .mortality-section-label {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-height: 1.25rem !important;
    margin: 1.15rem 0 0.65rem !important;
    padding: 0 !important;
    color: var(--exec-ink) !important;
    background: transparent !important;
    border: 0 !important;
    font-size: 0.72rem !important;
    font-weight: 780 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.25 !important;
    text-transform: uppercase !important;
    visibility: visible !important;
    opacity: 1 !important;
}
html body.executive-dashboard .main-content .section-title > i,
html body.executive-dashboard .main-content .morbidity-section-label > i,
html body.executive-dashboard .main-content .mortality-section-label > i {
    flex: 0 0 auto !important;
    width: 1rem !important;
    margin: 0 !important;
    color: var(--exec-primary) !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
    text-align: center !important;
}
@media (max-width: 767.98px) {
    html body.executive-dashboard .main-content .section-title,
    html body.executive-dashboard .main-content .morbidity-section-label,
    html body.executive-dashboard .main-content .mortality-section-label {
        margin-top: 0.9rem !important;
        margin-bottom: 0.55rem !important;
        font-size: 0.65rem !important;
    }
}
