/* Shared UI foundation, loaded after the original template and brand styles. */
:root {
    --ui-background: #f5f6f8;
    --ui-surface: #fff;
    --ui-text: #1e1e1e;
    --ui-muted: #615d68;
    --ui-border: #dcdde3;
    --ui-success: #176a43;
    --ui-warning: #795100;
    --ui-danger: #ad243c;
    --ui-radius: 8px;
    --ui-shadow: 0 2px 8px rgb(30 30 30 / 5%);
    --ui-control: 44px;
    --ui-header: 72px;
    --ui-sidebar: 240px;
    --ui-content: 1600px;
    --ui-z-header: 1020;
    --ui-z-backdrop: 1030;
    --ui-z-sidebar: 1040;
    --muted: var(--ui-muted);
    --line: var(--ui-border);
}
html, body { overflow-x: visible; }
body { color: var(--ui-text); }
body.app-shell { background: var(--ui-background); --ui-sidebar-current: var(--ui-sidebar); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.vertical-menu :focus-visible { outline-color: var(--brand-secondary); outline-offset: -3px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; padding: 12px; background: var(--ui-surface); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.btn, .form-control, .form-select, .input-group-text, .page-link { min-height: var(--ui-control); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; line-height: 1.4; white-space: normal; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; }
.btn-sm { min-height: var(--ui-control); }
.btn i { flex-shrink: 0; }
.btn-primary { color: #fff; box-shadow: none; }
.form-control, .form-select { font-size: 1rem; border-color: var(--ui-border); }
.form-control::placeholder { color: var(--ui-muted); opacity: 1; }
textarea.form-control { min-height: 112px; resize: vertical; }
.form-check { min-height: var(--ui-control); display: flex; align-items: center; gap: .55rem; }
.form-check .form-check-input { flex-shrink: 0; width: 20px; height: 20px; margin-top: 0; }
.form-check-label { padding-block: .55rem; }
.form-required { color: var(--ui-danger); margin-left: .2rem; }
.field-error { margin-top: .35rem; color: var(--ui-danger); font-size: .875rem; }
.form-control[aria-invalid="true"], .form-select[aria-invalid="true"] { border: 2px solid var(--ui-danger); }
.form-submit-status { display: block; margin-top: .5rem; font-size: .875rem; }
.password-field { display: flex; flex-wrap: nowrap; }
.password-field > .form-control { flex: 1; width: 1%; }
.password-toggle { min-width: 44px; }
.card, .modal-content { border-color: var(--ui-border); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); }
.card, .dashboard-panel, .dashboard-kpi-card, .student-metric-card { background: var(--ui-surface); }
.card-header, .card-footer { background: var(--ui-surface); }
.text-muted, .form-text { color: var(--ui-muted) !important; }
.badge { white-space: normal; line-height: 1.4; }
.bg-success, .text-bg-success { background-color: var(--ui-success) !important; color: #fff !important; }
.bg-danger, .text-bg-danger { background-color: var(--ui-danger) !important; color: #fff !important; }
.bg-warning, .text-bg-warning { background-color: #ffe6a7 !important; color: #624300 !important; }
.text-success { color: var(--ui-success) !important; }
.text-warning { color: var(--ui-warning) !important; }
.text-danger { color: var(--ui-danger) !important; }
.text-secondary { color: #7041ad !important; }

.app-shell #page-topbar { inset: 0 0 auto; z-index: var(--ui-z-header); }
.app-shell .topbar-pro { height: var(--ui-header); padding: 0 16px 0 0; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; background: var(--ui-surface); }
.app-shell .navbar-brand-box { width: var(--ui-sidebar-current); min-width: var(--ui-sidebar-current); height: var(--ui-header); padding: 12px 20px; align-items: center; transition: width 240ms ease, min-width 240ms ease, padding 240ms ease; }
.app-shell .navbar-brand-box .logo { line-height: 1; display: flex; }
.app-shell .navbar-brand-box .logo-dark { display: none; }
.app-shell .dashboard-logo-wordmark { width: 160px; max-height: 46px; }
.app-shell .header-item { height: 44px; min-width: 44px; padding: 8px; color: var(--ui-text); }
body.app-shell[data-sidebar] #vertical-menu-btn { margin-left: 8px; margin-right: 8px; color: var(--ui-text); }
.app-shell .header-profile-user { width: 32px; height: 32px; object-fit: cover; }
.app-shell .topbar-search { min-width: 0; padding: 0; position: relative; max-width: 520px; }
.app-shell .topbar-search .form-control { height: 44px; background: var(--ui-background); box-shadow: none; }
.topbar-search-toggle { display: none; }
.navigation-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(420px, 65dvh); overflow-y: auto; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: 8px; box-shadow: 0 8px 24px #0002; padding: 8px; }
.navigation-results a { display: flex; align-items: center; min-height: 44px; padding: 8px; color: var(--ui-text); }
.navigation-results a:hover, .navigation-results a:focus { background: var(--soft); }
.navigation-results p { padding: 8px; margin: 0; }
.app-shell .vertical-menu { top: var(--ui-header); bottom: 0; width: var(--ui-sidebar-current); max-width: none; height: auto; z-index: var(--ui-z-header); overflow: visible; box-shadow: none; display: flex; flex-direction: column; transition: width 240ms ease, transform 240ms ease; }
.app-shell .sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.app-shell .sidebar-scroll .simplebar-content-wrapper { scrollbar-width: none; }
.app-shell .sidebar-scroll::-webkit-scrollbar,
.app-shell .sidebar-scroll .simplebar-content-wrapper::-webkit-scrollbar { display: none; width: 0; height: 0; }
.app-shell .sidebar-scroll > .simplebar-track { display: none; }
.app-shell #sidebar-menu { padding: 12px 0 24px; }
.app-shell #sidebar-menu a { min-height: 44px; display: flex; align-items: center; gap: 8px; white-space: normal; transition: color 220ms ease, background-color 220ms ease, padding 240ms ease; }
.app-shell #sidebar-menu > ul > li > a { position: relative; }
.app-shell #sidebar-menu > ul > li > a::before { content: ''; position: absolute; inset: 8px auto 8px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-secondary); transform: scaleY(0); transition: transform 220ms ease; }
.app-shell #sidebar-menu > ul > li > a.active::before, .app-shell #sidebar-menu > ul > li.mm-active > a::before { transform: scaleY(1); }
.app-shell #sidebar-menu > ul > li > a > span { max-width: 180px; opacity: 1; overflow: hidden; transition: opacity 180ms ease, max-width 240ms ease; }
.app-shell #sidebar-menu a i { flex: 0 0 24px; }
.app-shell #sidebar-menu a:hover i { transform: translateX(2px); }
.app-shell #sidebar-menu a i { transition: transform 220ms ease; }
.app-shell #sidebar-menu .sub-menu a { padding: 10px 20px 10px 48px; }
.app-shell #sidebar-menu .sub-menu { display: block; overflow: hidden; transition: height 240ms ease, opacity 200ms ease; }
.app-shell #sidebar-menu .has-arrow::after { position: static; margin-left: auto; transition: transform 220ms ease; }
.app-shell #sidebar-menu .has-arrow[aria-expanded="true"]::after { transform: rotate(90deg); }
.app-shell .main-content { margin-left: var(--ui-sidebar-current); min-height: 100dvh; display: flex; flex-direction: column; transition: margin-left 240ms ease; }
.app-shell .page-content { padding: calc(var(--ui-header) + 24px) 24px 24px; flex: 1; }
.app-shell .page-content > .container-fluid { padding: 0; max-width: var(--ui-content); margin-inline: auto; }
.app-shell .footer { position: static; padding: 20px 24px; height: auto; background: transparent; }
.app-shell.sidebar-collapsed { --ui-sidebar-current: 76px; }
.app-shell.sidebar-collapsed .navbar-brand-box { padding-inline: 16px; }
.app-shell.sidebar-collapsed .navbar-brand-box .logo-lg { display: none; }
.app-shell.sidebar-collapsed .navbar-brand-box .logo-sm { display: block; }
.app-shell.sidebar-collapsed .dashboard-logo-icon { width: 36px; height: 36px; object-fit: contain; }
.app-shell.sidebar-collapsed #sidebar-menu .menu-title,
.app-shell.sidebar-collapsed #sidebar-menu .menu-divider,
.app-shell.sidebar-collapsed #sidebar-menu .has-arrow::after,
.app-shell.sidebar-collapsed #sidebar-menu .sub-menu { display: none !important; }
.app-shell.sidebar-collapsed #sidebar-menu > ul { margin: 0; padding: 0; }
.app-shell.sidebar-collapsed #sidebar-menu > ul > li { margin: 0; padding: 0; }
.app-shell.sidebar-collapsed #sidebar-menu > ul > li > a > span { display: none; }
.app-shell.sidebar-collapsed #sidebar-menu > ul > li > a { box-sizing: border-box; height: 44px; min-height: 44px; justify-content: center; gap: 0; padding: 0; border-left-width: 0; }
.app-shell.sidebar-collapsed #sidebar-menu > ul > li > a i { margin: 0; font-size: 22px; }
.app-shell.sidebar-collapsed #sidebar-menu > ul > li.mm-active,
.app-shell.sidebar-collapsed #sidebar-menu > ul > li.mm-active > a,
.app-shell.sidebar-collapsed #sidebar-menu > ul > li > a.active {
    background: transparent !important;
    border-left-color: transparent !important;
}
.app-shell.sidebar-collapsed #sidebar-menu > ul > li.mm-active > a::before,
.app-shell.sidebar-collapsed #sidebar-menu > ul > li > a.active::before { transform: scaleY(1); }
.menu-divider { height: 1px; margin: 10px 20px; background: rgb(255 255 255 / 12%); }
.sidebar-account { flex: 0 0 auto; min-height: 68px; padding: 10px 12px; border-top: 1px solid rgb(255 255 255 / 12%); display: flex; align-items: center; gap: 8px; background: #181818; }
.sidebar-account-profile { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; color: #fff; }
.sidebar-account-profile:hover, .sidebar-account-profile:focus { color: var(--brand-secondary); }
.sidebar-account-avatar { width: 38px; height: 38px; flex: 0 0 38px; object-fit: cover; border-radius: 50%; }
.sidebar-account-profile span { min-width: 0; transition: opacity 200ms ease; }
.sidebar-account-profile strong, .sidebar-account-profile small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-account-profile small { color: #beb8c8; font-size: .75rem; }
.sidebar-account-logout { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; border-radius: 6px; font-size: 20px; }
.sidebar-account-logout:hover, .sidebar-account-logout:focus { color: #fff; background: rgb(var(--brand-rgb) / 45%); }
.app-shell.sidebar-collapsed .sidebar-account { justify-content: center; padding-inline: 8px; }
.app-shell.sidebar-collapsed .sidebar-account-profile { display: none; }
#admin-enrollment-chart .apexcharts-datalabel,
.app-shell .apexcharts-text.apexcharts-pie-label {
    fill: #fff !important;
    font-weight: 700;
    paint-order: stroke;
    stroke: rgb(30 30 30 / 18%);
    stroke-width: 2px;
}
.site-credit { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .25rem; text-align: center; }
.site-credit a { font-weight: 600; }
.sidebar-mobile-heading { display: none; }

.enrollment-card { max-width: 860px; margin-inline: auto; }
.enrollment-eyebrow { color: var(--brand); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: 0; }
.enrollment-person { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ui-background); border: 1px solid var(--ui-border); border-radius: 8px; }
.enrollment-person-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); font-size: 20px; }
.enrollment-person small, .enrollment-person strong { display: block; }
.enrollment-notice { padding: 18px; border-left: 4px solid #c98000; border-radius: 6px; background: #fff4dc; color: #523800; }
.enrollment-notice-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.enrollment-notice-title i { font-size: 21px; }
.enrollment-notice p { margin-bottom: 8px; }
.enrollment-notice p:last-child { margin-bottom: 0; }
.consent-group { min-width: 0; padding: 0; border: 0; }
.consent-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; min-height: 52px; padding: 12px 0; border-top: 1px solid var(--ui-border); }
.consent-option .form-check-input { width: 20px; height: 20px; margin: 2px 0 0; }
.consent-option > label { grid-column: 2; grid-row: 1; min-width: 0; }
.consent-option:has(.form-check-input[aria-invalid="true"]) { margin-inline: -12px; padding-inline: 12px; border-left: 3px solid var(--ui-danger); background: rgb(173 36 60 / 6%); }
.consent-option .field-error { grid-column: 2; grid-row: 2; }
.consent-option label { line-height: 1.55; }
.consent-option a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.legal-page-container { max-width: 900px; }
.legal-back-link { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.legal-section { padding: 20px 0; border-top: 1px solid var(--ui-border); }
.legal-section p { line-height: 1.7; }
.consent-snapshot summary { color: var(--brand); font-weight: 600; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.consent-snapshot-content { min-width: min(560px, 70vw); max-height: 320px; overflow: auto; padding: 14px; border: 1px solid var(--ui-border); border-radius: 6px; background: var(--ui-background); white-space: normal; line-height: 1.6; }
.page-title-box { padding-bottom: 16px; }
.page-content h1 { font-size: 1.5rem; line-height: 1.3; }
.row { max-width: none; }
.page-content > .container-fluid > .d-flex { flex-wrap: wrap; gap: 12px; }
.dashboard-panel-heading { flex-wrap: wrap; }
.dashboard-kpi-grid, .student-summary-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.dashboard-kpi-card { overflow: visible; }
.dashboard-kpi-card strong, .student-metric-card strong, .stat-number { font-size: 1.5rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.student-metric-card { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 8px; }
.student-metric-card > i { position: static; grid-column: 2; grid-row: 1; }
.student-metric-card > strong, .student-metric-card > small { grid-column: 1 / -1; }
.dashboard-chart { overflow: visible; min-width: 0; }
.chart-summary { margin-top: 8px; color: var(--ui-muted); font-size: .85rem; }
.chart-summary summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; }
.chart-values { padding-left: 20px; }
.chart-empty { display: grid; place-items: center; min-height: 180px; color: var(--ui-muted); }
.student-calendar-legend { flex-wrap: wrap; }
.course-card-cover { min-height: 0; aspect-ratio: 4 / 5; object-fit: contain; background: var(--soft); }
.auth-page .row { margin: 0; }
.auth-body .auth-page > .container-fluid > .row { display: block; }
.auth-body .auth-cover { display: none !important; }
.auth-body .auth-page .col-xl-4 { width: 100%; }
.auth-body .auth-full-page-content { padding: 32px 20px !important; min-height: 100dvh; display: grid; place-items: center; }
.auth-body .auth-full-page-content > .w-100 { width: min(100%, 440px) !important; min-height: 0; }
.auth-body .auth-full-page-content .d-flex.flex-column.h-100 { min-height: 0; height: auto !important; }
.auth-body .auth-brand-logo { width: 220px; max-width: 100%; height: auto; }
.auth-body .auth-form h1 { font-size: 1.5rem; color: var(--ui-text) !important; }
.auth-body .auth-form .mt-4 a { display: inline-flex; min-height: 44px; align-items: center; }
.table-responsive { max-width: 100%; overscroll-behavior-x: contain; scrollbar-width: thin; }
.table-responsive:focus-visible { outline-offset: -3px; }
.table td, .table th { padding: 12px; }
.table th { color: var(--ui-text); font-weight: 600; }
.table th[scope="col"] { vertical-align: middle; }
.table td .btn + .btn { margin-left: 4px; }
.table-tools, .table-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px; }
.table-tools input { flex: 1 1 180px; width: auto; }
.table-pagination { justify-content: flex-end; border-top: 1px solid var(--ui-border); }
.table-pagination [role="status"] { margin-right: auto; color: var(--ui-muted); }
.table-sort { background: none; border: 0; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; text-align: left; }
.dashboard-filter-bar { flex-wrap: wrap; padding: 8px; }
.dashboard-filter-query { width: auto; flex: 1 1 180px; min-height: 44px; flex-wrap: wrap; gap: 8px; }
.dashboard-filter-query > span:first-of-type { flex: 1; text-align: left; }
.dashboard-filter-tags { flex-wrap: wrap; overflow: visible; }
.dashboard-filter-tags > span { white-space: normal; overflow: visible; text-overflow: clip; max-width: 100%; }
.dashboard-filter-actions { width: auto; }
.dashboard-filter-actions .btn, .smart-filter-actions .btn, .payment-row-actions .btn, .table .btn { min-height: 44px; min-width: 44px; }
.auth-form a:not(.auth-logo), .dashboard-panel-heading a { min-height: 44px; display: inline-flex; align-items: center; }
.apexcharts-text, .apexcharts-legend-text { fill: var(--ui-muted); color: var(--ui-muted) !important; }
.smart-filter-shell { border-color: var(--ui-border); box-shadow: none; }
.smart-filter-chip { min-height: 44px; }
.smart-filter-menu { max-height: min(480px, 70dvh); overflow-y: auto; }
.smart-filter-chip strong { white-space: normal; overflow: visible; }
.dropdown-menu { max-width: calc(100vw - 24px); max-height: calc(100dvh - 88px); overflow-y: auto; }
.dropdown-item { white-space: normal; min-height: 44px; display: flex; align-items: center; }
.modal-dialog { width: calc(100% - 24px); max-width: var(--bs-modal-width, 500px); margin: 12px auto; }
.modal-dialog-centered { min-height: calc(100% - 24px); }
.modal-content { max-height: calc(100dvh - 24px); overflow: hidden; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; }
.modal-header, .modal-footer { flex-shrink: 0; flex-wrap: wrap; gap: 8px; }
.modal-header .btn-close { min-width: 44px; min-height: 44px; padding: 0; margin: 0 0 0 auto; }
.proof-frame, .certificate-preview-frame { height: min(65dvh, 720px); }
.nav-tabs .nav-link { min-height: 44px; }
.nav-tabs { max-width: 100%; }

@media (max-width: 1199px) {
    .app-shell .topbar-pro { display: flex; justify-content: space-between; padding: 0 12px; gap: 8px; }
    .app-shell .navbar-brand-box { min-width: 44px; width: 44px !important; height: 44px; padding: 8px; border-radius: 8px; }
    .app-shell .navbar-brand-box .logo-lg { display: none; }
    .app-shell .navbar-brand-box .logo-sm { display: block; }
    .app-shell .dashboard-logo-icon { width: 28px; height: 28px; }
    .app-shell .header-item { padding: 8px; }
    .app-shell .topbar-left { flex: 0 0 auto; }
    .app-shell .topbar-context { display: none !important; }
    .app-shell .topbar-courses { display: none; }
    .topbar-search-toggle { display: inline-flex; }
    .app-shell .topbar-search { display: none; }
    .app-shell.search-open .topbar-search { display: block; position: fixed; top: 80px; left: 12px; right: 12px; width: auto; max-width: none; }
    .app-shell .main-content { margin-left: 0; }
    .app-shell .vertical-menu { display: flex; flex-direction: column; top: 0; width: min(300px, calc(100% - 32px)); max-width: none; z-index: var(--ui-z-sidebar); transform: translateX(-105%); visibility: hidden; pointer-events: none; }
    .app-shell.sidebar-enable .vertical-menu { transform: translateX(0); visibility: visible; pointer-events: auto; }
    .app-shell.sidebar-enable { overflow: hidden; }
    .vertical-menu > [data-simplebar] { flex: 1; height: auto !important; min-height: 0; }
    .app-shell.sidebar-collapsed .sidebar-account-profile { display: flex; }
    .app-shell.sidebar-collapsed .sidebar-account { justify-content: initial; padding: 10px 12px; }
    .sidebar-mobile-heading { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; padding: 12px 16px; color: #fff; }
    .sidebar-close { color: #fff; min-width: 44px; font-size: 24px; }
    .sidebar-backdrop { position: fixed; inset: 0; background: #0008; z-index: var(--ui-z-backdrop); }
    .app-shell .page-content { padding: 88px 20px 24px; }
}
@media (max-width: 767px) {
    .app-shell .page-content { padding: 88px 16px 20px; }
    .app-shell .footer { padding: 16px; }
    .page-title-box { display: block; }
    .page-title-right { margin-top: 6px; }
    .dashboard-filter-panel { grid-template-columns: 1fr; }
    form .row > [class*="col-"] { width: 100%; flex: 0 0 100%; }
    .student-metric-card > i { grid-row: 1; }
    .billing-info-grid { grid-template-columns: 1fr; }
    .auth-body .auth-full-page-content { padding: 24px 20px !important; }
    .smart-filter-label, .smart-filter-actions { width: auto; }
    .smart-filter-scroll { flex-basis: 100%; }
    .enrollment-card .card-body { padding: 20px !important; }
    .consent-snapshot-content { min-width: 260px; }
}
@media (max-width: 374px) {
    .app-shell .topbar-pro { padding: 0 8px; gap: 0; }
    body.app-shell[data-sidebar] #vertical-menu-btn { margin-left: 2px; margin-right: 2px; }
    .app-shell .topbar-actions { gap: 0; }
    .app-shell .page-content { padding-inline: 12px; }
    .dashboard-filter-actions { margin-left: auto; }
    .enrollment-page .container { padding-inline: 12px; }
    .enrollment-page .row { margin-inline: 0; }
    .enrollment-page .row > [class*="col-"] { min-width: 0; padding-inline: 0; }
    .enrollment-card, .enrollment-form, .consent-group, .consent-option { width: 100%; min-width: 0; }
    .consent-option label, .enrollment-notice, .site-credit { overflow-wrap: anywhere; }
    .enrollment-form .btn[type="submit"] { width: 100%; }
}
@media (min-width: 992px) { .modal-lg, .modal-xl { --bs-modal-width: 800px; } }
@media (min-width: 1200px) { .modal-xl { --bs-modal-width: 1140px; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.app-shell[data-bs-theme="dark"] {
    --ui-background: #17171b; --ui-surface: #242429; --ui-text: #f3f1f7; --ui-muted: #c6c1cf; --ui-border: #49454f;
    --ink: #f3f1f7; --soft: #37264d; --ui-success: #91dbb1; --ui-warning: #ffd78a; --ui-danger: #ffb5bf;
    --bs-body-color: var(--ui-text); --bs-body-bg: var(--ui-background); --bs-border-color: var(--ui-border);
    --muted: var(--ui-muted); --line: var(--ui-border);
}
.app-shell[data-bs-theme="dark"] .dashboard-kpi-dark > i { background: #3c3c44; color: #fff; }
.app-shell[data-bs-theme="dark"] .dashboard-filter-query, .app-shell[data-bs-theme="dark"] .dashboard-eyebrow, .app-shell[data-bs-theme="dark"] .dashboard-mini-stat i { color: #caa3ff; }
.app-shell[data-bs-theme="dark"] .bg-success, .app-shell[data-bs-theme="dark"] .text-bg-success { background-color: #176a43 !important; }
.app-shell[data-bs-theme="dark"] .bg-danger, .app-shell[data-bs-theme="dark"] .text-bg-danger { background-color: #ad243c !important; }
.app-shell .apexcharts-text { fill: var(--ui-muted) !important; }
.app-shell[data-bs-theme="dark"] .vertical-menu, .app-shell[data-bs-theme="dark"] .navbar-brand-box { background: #1e1e1e; }
.app-shell[data-bs-theme="dark"] .card-body, .app-shell[data-bs-theme="dark"] .form-control, .app-shell[data-bs-theme="dark"] .form-select, .app-shell[data-bs-theme="dark"] .dropdown-menu, .app-shell[data-bs-theme="dark"] .dashboard-filter-bar, .app-shell[data-bs-theme="dark"] .dashboard-filter-panel, .app-shell[data-bs-theme="dark"] .smart-filter-shell { background: var(--ui-surface); color: var(--ui-text); }
.app-shell[data-bs-theme="dark"] .dashboard-mini-stat, .app-shell[data-bs-theme="dark"] .student-calendar-day, .app-shell[data-bs-theme="dark"] .student-upcoming-item, .app-shell[data-bs-theme="dark"] .billing-method-pill { background: var(--ui-background); color: var(--ui-text); }
.app-shell[data-bs-theme="dark"] .text-primary, .app-shell[data-bs-theme="dark"] a:not(.btn-primary):not(.badge), .app-shell[data-bs-theme="dark"] .btn-outline-primary { color: #caa3ff !important; }
.app-shell[data-bs-theme="dark"] .table { --bs-table-color: var(--ui-text); --bs-table-bg: var(--ui-surface); }
@media print {
    .app-shell #page-topbar, .app-shell .vertical-menu, .skip-link, .sidebar-backdrop, .table-tools, .table-pagination { display: none !important; }
    .app-shell .main-content { margin: 0; }
    .app-shell .page-content { padding: 0; }
    .table-responsive { overflow: visible; }
}
