:root {
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-font-weight: 500;
    --bs-body-color: #28343d;
    --bs-body-bg: #f4f5f3;
    --bs-primary: #43afec;
    --bs-primary-rgb: 67, 175, 236;
    --bs-link-color: #0d1333;
    --bs-link-hover-color: #247fac;
    --bs-border-color: #dfe4e2;
    --bs-border-radius: 6px;
    --bs-border-radius-lg: 8px;

    --ui-canvas: #f4f5f3;
    --ui-surface: #ffffff;
    --ui-surface-muted: #f8f9f7;
    --ui-ink: #28343d;
    --ui-muted: #68757d;
    --ui-subtle: #879198;
    --ui-border: #dfe4e2;
    --ui-border-strong: #cbd3d1;
    --ui-brand: #43afec;
    --ui-brand-hover: #0d1333;
    --ui-brand-navy: #0d1333;
    --ui-focus: rgba(67, 175, 236, .28);
    --ui-radius-sm: 4px;
    --ui-radius: 6px;
    --ui-radius-lg: 8px;
    --ui-shadow: 0 1px 2px rgba(31, 43, 49, .04);
}

html { scroll-behavior: smooth; }

html, body, button, input, select, textarea {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 500;
}

body {
    color: var(--ui-ink);
    background: var(--ui-canvas);
    font-size: .92rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    color: #26323a;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.018em;
}

h1, .h1 { font-size: clamp(1.45rem, 1.18rem + .55vw, 1.85rem); }
h2, .h2 { font-size: clamp(1.25rem, 1.1rem + .35vw, 1.55rem); }
h3, .h3 { font-size: 1.15rem; }
h4, .h4 { font-size: 1.02rem; }

p:last-child { margin-bottom: 0; }
small, .small { line-height: 1.45; }
.text-muted { color: var(--ui-muted) !important; }

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand) {
    text-underline-offset: 2px;
}

:focus-visible {
    outline: 2px solid var(--ui-focus);
    outline-offset: 2px;
}

/* Buttons stay compact, clear, and consistent with the rest of the interface. */
.btn {
    min-height: 38px;
    padding: .48rem .78rem;
    border-radius: var(--ui-radius);
    box-shadow: none;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.35;
    transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}

.btn-sm {
    min-height: 31px;
    padding: .3rem .58rem;
    font-size: .8rem;
}

.btn:hover, .btn:focus { transform: none; box-shadow: none; }
.btn-primary { color: #102b3a; background: var(--ui-brand); border-color: var(--ui-brand); }
.btn-primary:hover, .btn-primary:focus { color: #fff; background: var(--ui-brand-hover); border-color: var(--ui-brand-hover); }
.btn-outline-primary { color: #1479aa; border-color: var(--ui-brand); }
.btn-outline-primary:hover, .btn-outline-primary:focus { color: #102b3a; background: var(--ui-brand); border-color: var(--ui-brand); }

/* Inputs have a steady height and a visible keyboard focus state. */
.form-label { margin-bottom: .42rem; color: #3b4850; font-size: .86rem; font-weight: 500; }
.form-control, .form-select, .input-group-text {
    min-height: 40px;
    border-color: var(--ui-border-strong);
    border-radius: var(--ui-radius);
    color: var(--ui-ink);
    background-color: var(--ui-surface);
    box-shadow: none;
    font-size: .9rem;
    font-weight: 500;
}

textarea.form-control { min-height: auto; }
.form-control::placeholder { color: #929ba0; opacity: 1; }
.form-control:focus, .form-select:focus {
    border-color: #7897ad;
    box-shadow: 0 0 0 3px var(--ui-focus);
}
.form-check-input:checked { background-color: var(--ui-brand); border-color: var(--ui-brand); }
.form-check-input:focus { border-color: #7897ad; box-shadow: 0 0 0 3px var(--ui-focus); }
.input-group-text { background: #f5f7f5; color: var(--ui-muted); }

/* Cards separate related information without floating above the page. */
.card, .modal-content {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
}

.card:hover { box-shadow: var(--ui-shadow); }
.card-header {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg) var(--ui-radius-lg) 0 0 !important;
    background: #fafbf9;
    color: #35424a;
    font-size: .9rem;
    font-weight: 600;
}

.card-body { padding: 1rem; }
.modal-content { overflow: hidden; box-shadow: 0 12px 36px rgba(31, 43, 49, .14); }
.modal-header, .modal-footer { border-color: var(--ui-border); }
.modal-title { font-size: 1.05rem; font-weight: 600; }

/* The dashboard uses the same practical card treatment as the module pages. */
.app-shell .welcome-banner {
    padding: 1.35rem 1.5rem;
    border: 1px solid var(--ui-border);
    border-left: 3px solid var(--ui-brand);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface) !important;
    color: var(--ui-ink) !important;
    box-shadow: var(--ui-shadow);
}

.app-shell .welcome-banner::before { display: none; }
.app-shell .welcome-banner :is(h1, h2, h3, p, .opacity-75, .text-white) { color: var(--ui-ink) !important; opacity: 1; }
.app-shell .stat-card,
.app-shell .chart-container,
.app-shell .recent-card,
.app-shell .module-card,
.app-shell .dashboard-notifications {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
}

.app-shell .stat-card { min-height: 132px; padding: 1.15rem 1.2rem; }
.app-shell .stat-card::before { background: var(--ui-brand) !important; }
.app-shell .stat-card:hover, .app-shell .module-card:hover { transform: none; box-shadow: var(--ui-shadow); }
.app-shell .stat-number { color: var(--ui-ink); background: none; -webkit-text-fill-color: currentColor; font-weight: 600; }
.app-shell .stat-icon { color: #657780; background: none; -webkit-text-fill-color: currentColor; opacity: 1; }
.app-shell .stat-label { color: var(--ui-muted); font-size: .8rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.app-shell .chart-title, .app-shell .dashboard-section-heading h2 { color: var(--ui-ink); font-weight: 600; }
.app-shell .chart-title i { color: var(--ui-brand); }
.app-shell .activity-item { border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface-muted); }
.app-shell .activity-item:hover { transform: none; box-shadow: none; }
.app-shell .quick-action-btn { border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface-muted); color: var(--ui-brand); }
.app-shell .quick-action-btn:hover { transform: none; border-color: var(--ui-border-strong); background: #f0f3f1; color: var(--ui-brand-hover); }
.app-shell .fab, .app-shell .theme-toggle { width: 44px; height: 44px; border: 1px solid var(--ui-border-strong); border-radius: var(--ui-radius); background: var(--ui-brand); box-shadow: 0 2px 5px rgba(31,43,49,.14); }
.app-shell .fab:hover, .app-shell .theme-toggle:hover { transform: none; box-shadow: 0 2px 5px rgba(31,43,49,.14); }

/* Replace repeated gradient banners with a shared, quiet information panel. */
html[data-page] :is(
    .wf-header, .profile-header, .profile-hero, .dept-hero, .dept-header, .partner-header,
    .org-hero, .ticket-header, .task-header, .project-header, .vendor-header,
    .asset-header, .campaign-header, .subscriber-header, .model-hero,
    .detail-header, .alert-hero, .incident-header, .notif-hero, .report-header,
    .dataset-header, .app-header, .stats-card, .knowledge-header, .quantum-header,
    .insight-box, .featured-card
) {
    border: 1px solid var(--ui-border) !important;
    border-left: 3px solid var(--ui-brand) !important;
    border-radius: var(--ui-radius-lg) !important;
    background: var(--ui-surface-muted) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
    box-shadow: none !important;
}

html[data-page] :is(
    .wf-header, .profile-header, .profile-hero, .dept-hero, .dept-header, .partner-header,
    .org-hero, .ticket-header, .task-header, .project-header, .vendor-header,
    .asset-header, .campaign-header, .subscriber-header, .model-hero,
    .detail-header, .alert-hero, .incident-header, .notif-hero, .report-header,
    .dataset-header, .app-header, .stats-card, .knowledge-header, .quantum-header,
    .insight-box, .featured-card
) .text-white,
html[data-page] :is(
    .wf-header, .profile-header, .profile-hero, .dept-hero, .dept-header, .partner-header,
    .org-hero, .ticket-header, .task-header, .project-header, .vendor-header,
    .asset-header, .campaign-header, .subscriber-header, .model-hero,
    .detail-header, .alert-hero, .incident-header, .notif-hero, .report-header,
    .dataset-header, .app-header, .stats-card, .knowledge-header, .quantum-header,
    .insight-box, .featured-card
) .text-white-50 { color: var(--ui-ink) !important; }

html[data-page] .incident-header,
html[data-page] .detail-header:is(.critical, .high, .medium, .low),
html[data-page] .alert-hero:is(.critical, .high, .medium, .low) { border-left-color: var(--ui-brand) !important; }

/* Research screens share the platform surface and avoid novelty gradients. */
html[data-page] .research-card, html[data-page] .ai-card, html[data-page] .stats-card, html[data-page] .module-tile {
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
    box-shadow: var(--ui-shadow) !important;
}

html[data-page] .research-card::after { display: none; }
html[data-page] .research-card::before { display: none; }
html[data-page] .research-card:hover, html[data-page] .module-tile:hover { transform: none; box-shadow: var(--ui-shadow) !important; border-color: var(--ui-border-strong) !important; }
html[data-page] .research-card :is(.stat-number, .stat-label, .stat-icon) { color: var(--ui-ink) !important; background: none !important; -webkit-text-fill-color: currentColor !important; }
html[data-page] .ai-card :is(h1, h2, h3, h4, p, span, .text-white) { color: var(--ui-ink) !important; }
html[data-page] .ai-card i { color: var(--ui-brand-hover) !important; }
html[data-page] .research-card .stat-label { opacity: 1; font-size: .8rem; letter-spacing: 0; text-transform: none; }
.app-shell .dashboard-header { border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); background: var(--ui-surface); box-shadow: var(--ui-shadow); }
.app-shell :is(.experiment-card, .info-card, .filter-bar) { border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); background: var(--ui-surface); box-shadow: var(--ui-shadow); }
.app-shell .experiment-card:hover { transform: none; box-shadow: var(--ui-shadow); }
html[data-page] .live-badge { animation: none !important; border-radius: var(--ui-radius-sm); }
html[data-page] .nav-tabs .nav-link.active { border-color: var(--ui-border) var(--ui-border) var(--ui-surface); border-radius: var(--ui-radius) var(--ui-radius) 0 0; background: var(--ui-surface) !important; background-image: none !important; color: var(--ui-brand-hover) !important; }

/* Keep the brand blue as the only decorative accent across module screens. */
html[data-page] [style*="gradient"],
html[data-page] .bg-gradient {
    border-color: var(--ui-border) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
}
html[data-page] [style*="gradient"] :is(.text-white, .text-white-50),
html[data-page] .bg-gradient :is(.text-white, .text-white-50) { color: var(--ui-ink) !important; }
html[data-page] .badge:is(.bg-primary, .bg-secondary, .bg-success, .bg-danger, .bg-warning, .bg-info) {
    border-color: var(--ui-border);
    background: #edf6fb !important;
    color: #0d1333 !important;
}

/* Severity remains visible as a soft tint and a colored rule. */
html[data-page] .stat-card.critical, html[data-page] .stat-card.high,
html[data-page] .stat-card.medium, html[data-page] .stat-card.low {
    background: var(--ui-surface) !important;
}
html[data-page] .stat-card:is(.critical, .high, .medium, .low)::before { background: var(--ui-brand) !important; }

html[data-page] .dynamic-fields-section {
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    background: var(--ui-surface-muted) !important;
    background-image: none !important;
}

.app-shell .filter-card .card-header { background: #fafbf9 !important; color: #35424a !important; }
.app-shell .export-btn { background: var(--ui-brand) !important; background-image: none !important; border: 1px solid var(--ui-brand) !important; color: #102b3a !important; }
.app-shell .sender-avatar { background: var(--ui-brand) !important; background-image: none !important; color: #102b3a !important; }
.app-shell .quick-action { border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface-muted); box-shadow: none; }
.app-shell .quick-action:hover { border-left: 1px solid var(--ui-border-strong); background: #f1f4f2; box-shadow: none; }
.app-shell .progress-bar-custom { background: #e8ece9 !important; }
.app-shell .progress-bar-custom .bar { background: var(--ui-brand) !important; background-image: none !important; }
.app-shell .btn-primary { color: #102b3a !important; background: var(--ui-brand) !important; background-image: none !important; border-color: var(--ui-brand) !important; }
.app-shell .btn-primary:hover, .app-shell .btn-primary:focus { color: #fff !important; background: var(--ui-brand-hover) !important; border-color: var(--ui-brand-hover) !important; }
.app-shell .panel { border: 1px solid var(--ui-border) !important; border-radius: var(--ui-radius-lg) !important; background: var(--ui-surface) !important; box-shadow: var(--ui-shadow) !important; }
.app-shell .panel-header { padding: .85rem 1rem !important; border-bottom: 1px solid var(--ui-border) !important; background: #fafbf9 !important; color: #35424a !important; font-size: .9rem !important; }
.app-sidebar .dept-badge { background: var(--ui-brand) !important; color: #102b3a !important; border-radius: 4px !important; letter-spacing: 0 !important; }
.app-sidebar .dept-indicator { border-radius: 6px !important; background: rgba(255,255,255,.06); }

/* Public survey form uses the same typography and surfaces as staff forms. */
.survey-card {
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-lg) !important;
    background: var(--ui-surface) !important;
    box-shadow: 0 2px 8px rgba(31,43,49,.06) !important;
}

.survey-card .form-control, .survey-card .form-select { background: #fff; }
.survey-card .form-control, .survey-card .form-select, .survey-card .scale-btn { border-radius: var(--ui-radius); }
.survey-card .progress-bar-custom { height: 5px; border-radius: 3px; background: #e8ece9; }
.survey-card .progress-bar-custom .bar { border-radius: 3px; background: var(--ui-brand); }
.survey-card .btn-submit { border-radius: var(--ui-radius); background: var(--ui-brand); background-image: none; color: #102b3a; }
.survey-card .btn-submit:hover { background: var(--ui-brand-hover); }
.survey-card .progress-fill, .survey-card .progress-bar-fill { background: var(--ui-brand) !important; background-image: none !important; }
.survey-card :is(.role-card, .scale-btn) { border-radius: var(--ui-radius) !important; box-shadow: none; }
.survey-card .role-card:hover, .survey-card .scale-btn:hover { transform: none; box-shadow: none; }

body.dark-mode .app-shell :is(.welcome-banner, .stat-card, .chart-container, .recent-card, .module-card, .dashboard-notifications) {
    border-color: #29374a;
    background: #172235 !important;
    color: #e6edf7 !important;
}

body.dark-mode .app-shell .welcome-banner :is(h1, h2, h3, p, .opacity-75, .text-white),
body.dark-mode .app-shell :is(.stat-number, .chart-title, .dashboard-section-heading h2, .module-count) {
    color: #e6edf7 !important;
}

body.dark-mode .app-shell :is(.stat-label, .dashboard-section-heading p) { color: #9aa8bc !important; }
body.dark-mode .app-shell .activity-item,
body.dark-mode .app-shell .quick-action-btn { border-color: #29374a; background: #1c2a3e; color: #d5deeb; }

/* Tables prioritize scanability over decorative headings. */
.table-responsive { border-radius: var(--ui-radius); }
.table { --bs-table-color: var(--ui-ink); --bs-table-border-color: #e6eae8; margin-bottom: 0; }
.table thead th, .table thead td {
    padding: .72rem .78rem;
    border-bottom: 1px solid var(--ui-border-strong);
    background: #f6f8f6;
    color: #5b6870;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .015em;
    text-transform: none;
    vertical-align: middle;
}

.table tbody td { padding: .72rem .78rem; vertical-align: middle; }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: #f7f9f7; color: var(--ui-ink); }
.table > :not(caption) > * > * { border-bottom-color: #e6eae8; }

/* Status chips remain legible and restrained. */
.badge {
    padding: .34em .56em;
    border: 1px solid transparent;
    border-radius: var(--ui-radius-sm);
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: 0;
}

/* Feedback panels use restrained surfaces and one consistent brand marker. */
.alert { border: 1px solid var(--ui-border); border-radius: var(--ui-radius); line-height: 1.5; }
.alert-success, .alert-warning, .alert-danger, .alert-info {
    color: var(--ui-ink);
    background: var(--ui-surface-muted);
    border-color: var(--ui-border);
    border-left: 3px solid var(--ui-brand);
}

/* Menus and pagination use the same border and surface language. */
.dropdown-menu {
    padding: .35rem;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: 0 6px 18px rgba(31, 43, 49, .1);
}

.dropdown-item { padding: .48rem .65rem; border-radius: var(--ui-radius-sm); color: var(--ui-ink); font-size: .88rem; }
.dropdown-item:hover, .dropdown-item:focus { color: var(--ui-ink); background: #f1f4f2; }
.dropdown-divider { border-color: var(--ui-border); }
.page-link { color: var(--ui-brand); border-color: var(--ui-border); }
.page-link:hover { color: var(--ui-brand-hover); background: #f2f5f3; border-color: var(--ui-border-strong); }
.page-item.active .page-link { color: #fff; background: var(--ui-brand); border-color: var(--ui-brand); }

/* Charts and media stay inside their content column. */
canvas { max-width: 100%; }
img, video { max-width: 100%; }

@media (max-width: 767.98px) {
    .card-body { padding: .9rem; }
    .card-header { padding: .75rem .9rem; }
    .table thead th, .table tbody td { padding: .62rem .65rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* Extracted from includes\header.php */
:root {
        --app-topbar-height: 64px;
        --app-topbar-control-size: 40px;
        --app-sidebar-width: 264px;
        --app-sidebar-collapsed-width: 76px;
    }

    body { padding-top: var(--app-topbar-height); background-color: var(--ui-canvas, #f4f5f3); }

    .app-topbar {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 1040;
        height: var(--app-topbar-height);
        padding: 0 20px;
        display: flex;
        align-items: center;
        gap: 16px;
        background: #fff;
        border-bottom: 1px solid var(--ui-border, #dfe4e2);
        box-shadow: 0 1px 2px rgba(31,43,49,.035);
    }

    .app-topbar-start {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 12px;
        height: 36px;
    }

    .app-brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--ui-ink, #28343d);
        text-decoration: none;
        white-space: nowrap;
    }
    .app-brand:focus-visible { outline: 2px solid var(--ui-focus, rgba(67, 175, 236,.28)); outline-offset: 4px; border-radius: 4px; }

    .app-brand img { width: 34px; height: 34px; object-fit: contain; }
    .app-brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
    .app-brand-copy strong { font-size: .92rem; font-weight: 650; letter-spacing: -.015em; }
    .app-brand-copy small { margin-top: 3px; color: #737f8d; font-size: .68rem; font-weight: 500; letter-spacing: .025em; text-transform: none; }
    .app-topbar-toggle {
        width: var(--app-topbar-control-size);
        height: var(--app-topbar-control-size);
        flex: 0 0 var(--app-topbar-control-size);
        display: inline-grid;
        place-items: center;
        border: 1px solid var(--ui-border, #dfe4e2);
        border-radius: 6px;
        color: #475569;
        background: #fff;
        transition: color .15s ease, background .15s ease, border-color .15s ease;
    }
    .app-topbar-toggle:hover { color: var(--ui-brand-hover, #0d1333); background: #f4f6f4; border-color: var(--ui-border-strong, #cbd3d1); }
    .app-topbar-toggle:focus-visible { outline: 2px solid var(--ui-focus, rgba(49,95,133,.22)); outline-offset: 2px; }
    .app-topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; margin-left: auto; }
    .app-topbar-icon {
        width: var(--app-topbar-control-size);
        height: var(--app-topbar-control-size);
        flex: 0 0 var(--app-topbar-control-size);
        display: inline-grid;
        place-items: center;
        border: 1px solid var(--ui-border, #dfe4e2);
        border-radius: 6px;
        color: #64748b;
        background: #fff;
        font-size: 1rem;
        text-decoration: none;
        transition: color .15s ease, background .15s ease, border-color .15s ease;
    }
    .app-topbar-icon:hover { color: var(--ui-brand-hover, #0d1333); border-color: var(--ui-border-strong, #cbd3d1); background: #f4f6f4; }
    .app-topbar-icon:focus-visible { outline: 2px solid var(--ui-focus, rgba(49,95,133,.22)); outline-offset: 2px; }

    .app-sidebar {
        position: fixed;
        z-index: 1030;
        top: var(--app-topbar-height);
        bottom: 0;
        left: 0;
        width: var(--app-sidebar-width);
        overflow-x: hidden;
        overflow-y: auto;
        color: #e3e8e5;
        background: #2e3b41;
        border-right: 1px solid #3c494d;
        box-shadow: none;
        scrollbar-color: #536579 transparent;
        scrollbar-width: thin;
        transition: width .22s ease, transform .22s ease;
    }

    .app-sidebar-brand {
        display: flex;
        align-items: center;
        gap: 11px;
        min-height: 72px;
        padding: 15px 18px;
        border-bottom: 1px solid rgba(255,255,255,.11);
        color: #fff;
        font-size: .88rem;
        font-weight: 600;
        letter-spacing: 0;
        white-space: nowrap;
    }
    .app-sidebar-brand img {
        width: 35px;
        height: 35px;
        padding: 3px;
        object-fit: contain;
        flex: 0 0 auto;
        border-radius: 6px;
        background: rgba(255,255,255,.96);
    }
    .app-sidebar-nav { padding: 14px 12px 24px; }
    .app-sidebar-section-label {
        padding: 8px 11px 6px;
        color: #b7c1bf;
        font-size: .72rem;
        font-weight: 600;
        letter-spacing: .025em;
        line-height: 1.2;
        text-transform: none;
    }
    .app-sidebar .navbar-nav { gap: 4px; }
    .app-sidebar .nav-link {
        position: relative;
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 43px;
        padding: 9px 11px;
        border: 1px solid transparent;
        border-radius: 6px;
        color: #d0d8e1;
        font-size: .86rem;
        font-weight: 500;
        white-space: nowrap;
        transition: background .15s ease, color .15s ease, border-color .15s ease;
    }
    .app-sidebar .nav-link:hover,
    .app-sidebar .nav-link:focus-visible {
        color: #fff;
        border-color: transparent;
        background: #39484c;
    }
    .app-sidebar .nav-link.active {
        color: #fff;
        border-color: transparent;
        border-left: 3px solid var(--ui-brand, #43afec);
        background: #3b4b4f;
        padding-left: 9px;
    }
    .app-sidebar .nav-link > .bi { width: 21px; flex: 0 0 21px; text-align: center; color: #b2bfbd; font-size: 1.04rem; }
    .app-sidebar .nav-link.active > .bi,
    .app-sidebar .nav-link:hover > .bi { color: #fff; }
    .app-sidebar .nav-link.dropdown-toggle::after { margin-left: auto; opacity: .65; }
    .app-sidebar .dropdown-menu {
        position: static !important;
        float: none;
        width: auto;
        margin: 4px 0 7px 21px;
        padding: 5px 5px 5px 8px;
        border: 0;
        border-left: 1px solid rgba(255,255,255,.16);
        border-radius: 0 6px 6px 0;
        background: #273439;
        box-shadow: none;
        transform: none !important;
    }
    .app-sidebar .dropdown-item {
        padding: 8px 9px;
        border-radius: 5px;
        color: #c9d2dc;
        font-size: .81rem;
        transition: background .15s ease, color .15s ease;
        white-space: normal;
    }
    .app-sidebar .dropdown-item:hover,
    .app-sidebar .dropdown-item:focus-visible { color: #fff; background: rgba(255,255,255,.08); }
    .app-sidebar .dropdown-item.active { color: #fff; background: #3b4b4f; }
    .app-sidebar .dropdown-item > .bi { display: inline-block; width: 20px; margin-right: 7px; color: #b2bfbd; text-align: center; }
    .app-sidebar .dropdown-item.active > .bi,
    .app-sidebar .dropdown-item:hover > .bi { color: #fff; }
    .app-sidebar .dropdown-divider { border-color: rgba(255,255,255,.12); }
    .app-sidebar .dept-indicator {
        position: relative;
        padding: 12px 13px;
        margin: 4px 1px 14px;
        border: 1px solid rgba(255,255,255,.08);
        border-left: 3px solid var(--ui-brand, #43afec);
        border-radius: 6px;
        box-shadow: none;
    }
    .app-sidebar .dept-indicator small { display: block; margin-bottom: 4px; color: #9aa8bc; font-size: .62rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
    .app-sidebar .dept-indicator div { display: flex; align-items: center; color: #fff; font-size: .84rem; font-weight: 650; }
    .app-sidebar .dept-indicator i { margin-right: 7px; color: #c3d6f1; }
    .app-sidebar .sidebar-section-divider { margin: 12px 4px 4px; border-color: rgba(255,255,255,.1); opacity: 1; }
    .app-sidebar .text-center.text-white-50 { color: #8794a8 !important; font-size: .72rem; }
    .app-sidebar .text-center.text-white-50 .badge { padding: 4px 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 4px; font-size: .64rem; font-weight: 550; letter-spacing: 0; text-transform: none; }
    .app-sidebar .dropdown-menu[aria-labelledby="notifBell"] { position: fixed !important; left: 12px; bottom: 12px; top: auto; width: min(390px, calc(100vw - 24px)); max-height: min(500px, calc(100vh - 90px)) !important; overflow-y: auto; z-index: 1060; }

    .app-shell { min-height: calc(100vh - var(--app-topbar-height)); margin-left: var(--app-sidebar-width); display: flex; flex-direction: column; transition: margin-left .2s ease; }
    .app-main { flex: 1; min-width: 0; padding: clamp(22px, 2.2vw, 32px); }
    .app-main > .container-fluid { padding-right: 0 !important; padding-left: 0 !important; }
    .app-footer { padding: 15px clamp(22px, 2.2vw, 32px); border-top: 1px solid var(--ui-border, #dfe4e2); background: transparent; color: var(--ui-muted, #68757d); font-size: .78rem; }
    .app-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
    .app-footer-inner span:last-child { color: var(--ui-subtle, #879198); }

    body.app-sidebar-collapsed .app-sidebar { width: var(--app-sidebar-collapsed-width); overflow-x: visible; }
    body.app-sidebar-collapsed .app-shell { margin-left: var(--app-sidebar-collapsed-width); }
    body.app-sidebar-collapsed .app-sidebar-brand { justify-content: center; padding-right: 10px; padding-left: 10px; }
    body.app-sidebar-collapsed .app-sidebar-brand span,
    body.app-sidebar-collapsed .app-sidebar .dept-indicator,
    body.app-sidebar-collapsed .app-sidebar .nav-link:not(.dropdown-item) { font-size: 0; }
    body.app-sidebar-collapsed .app-sidebar .nav-link:not(.dropdown-item) { justify-content: center; gap: 0; padding-right: 8px; padding-left: 8px; }
    body.app-sidebar-collapsed .app-sidebar .nav-link > .bi { font-size: 1.1rem; }
    body.app-sidebar-collapsed .app-sidebar .nav-link.dropdown-toggle::after { display: none; }
    body.app-sidebar-collapsed .app-sidebar .dropdown-menu:not(.show) { display: none; }
    body.app-sidebar-collapsed .app-sidebar .nav-item.dropdown.sidebar-flyout-open > .dropdown-menu {
        display: block;
        position: fixed !important;
        top: var(--sidebar-flyout-top, 120px);
        left: calc(var(--app-sidebar-collapsed-width) - 24px);
        z-index: 1060;
        min-width: 220px;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        margin: 0;
        border: 1px solid #26345f;
        border-left: 2px solid #43afec;
        border-radius: 6px;
        background: #090f29;
        box-shadow: 0 14px 34px rgba(4, 9, 29, .38);
    }
    body.app-sidebar-collapsed .app-sidebar .nav-item.dropdown > .dropdown-menu .dropdown-item { font-size: .84rem; }
    body.app-sidebar-collapsed .app-sidebar .nav-item.dropdown > .dropdown-menu .dropdown-item .bi { font-size: 1rem; }
    body.app-sidebar-collapsed .app-sidebar .dept-indicator { padding: 0; border: 0; }
    body.app-sidebar-collapsed .app-sidebar .dept-indicator {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        margin: 5px auto 12px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 11px;
    }
    body.app-sidebar-collapsed .app-sidebar .dept-indicator small { display: none; }
    body.app-sidebar-collapsed .app-sidebar .dept-indicator div { justify-content: center; font-size: 0; }
    body.app-sidebar-collapsed .app-sidebar .dept-indicator i { margin: 0; font-size: 1rem; }
    body.app-sidebar-collapsed .app-sidebar-section-label { display: none; }
    body.app-sidebar-collapsed .app-sidebar-nav { padding-right: 9px; padding-left: 9px; }
    body.app-sidebar-collapsed .app-sidebar .sidebar-section-divider { margin-right: 8px; margin-left: 8px; }
    body.app-sidebar-collapsed .app-sidebar-nav > .text-center { display: none; }
    body.app-sidebar-collapsed .app-sidebar .nav-item > .btn { font-size: 0; justify-content: center; padding-right: 8px; padding-left: 8px; }
    body.app-sidebar-collapsed .app-sidebar .nav-item > .btn .bi { font-size: 1rem; }

    .app-sidebar-backdrop { display: none; }
    @media (max-width: 991.98px) {
        .app-topbar { gap: 14px; padding: 0 16px; }
        .app-topbar-start { gap: 10px; }
        .app-brand-copy small { display: none; }
        .app-topbar-actions { gap: 7px; }
        .app-topbar .page-header-meta .role-pill { display: none; }
        .app-topbar .page-header-meta { gap: 0; }
        .app-topbar .page-header-meta .user-badge { max-width: 42px; overflow: hidden; padding: 4px; border-color: transparent; background: transparent; }
        .app-topbar .page-header-meta .user-details { display: none; }
        .app-sidebar,
        body.app-sidebar-collapsed .app-sidebar { width: min(var(--app-sidebar-width), calc(100vw - 56px)); transform: translateX(-105%); }
        body.app-sidebar-open .app-sidebar { transform: translateX(0); }
        .app-shell,
        body.app-sidebar-collapsed .app-shell { margin-left: 0; }
        body.app-sidebar-collapsed .app-sidebar .nav-link:not(.dropdown-item) { justify-content: flex-start; gap: 12px; font-size: .9rem; padding: 9px 12px; }
        body.app-sidebar-collapsed .app-sidebar-brand { justify-content: flex-start; padding: 15px 20px; }
        body.app-sidebar-collapsed .app-sidebar-brand span { display: inline; }
        body.app-sidebar-collapsed .app-sidebar .nav-link.dropdown-toggle::after { display: inline-block; }
        body.app-sidebar-collapsed .app-sidebar .nav-item.dropdown > .dropdown-menu { position: static !important; min-width: 0; margin: 3px 0 6px 32px; }
        body.app-sidebar-collapsed .app-sidebar .nav-item.dropdown > .dropdown-menu {
            border: 0;
            border-left: 1px solid rgba(67, 175, 236, .45);
            border-radius: 0 6px 6px 0;
            background: #090f29;
            box-shadow: none;
        }
        .app-sidebar-backdrop { position: fixed; inset: var(--app-topbar-height) 0 0; z-index: 1020; background: rgba(15,23,42,.45); }
        body.app-sidebar-open .app-sidebar-backdrop { display: block; }
        .app-main { padding: 18px 14px; }
    }

    .page-header-bar {
        background: transparent;
        border-bottom: 1px solid var(--ui-border, #dfe4e2);
        padding: 0 0 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .page-header-bar .breadcrumb {
        margin: 0;
        font-size: 0.875rem;
    }

    .page-header-bar .breadcrumb-item a {
        color: var(--ui-brand, #43afec);
        text-decoration: none;
    }

    .page-header-bar .breadcrumb-item.active {
        color: var(--ui-ink, #28343d);
        font-weight: 600;
    }

    .app-topbar .page-header-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: .8rem;
        color: #64748b;
    }

    .page-header-meta .user-badge {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        min-height: 40px;
        padding: 4px 9px 4px 5px;
        border: 1px solid transparent;
        border-radius: 8px;
        background: transparent;
        font-weight: 600;
        color: #334155;
        text-decoration: none;
        transition: border-color .15s ease, background .15s ease, color .15s ease;
    }
    .app-topbar .page-header-meta .user-badge:hover { border-color: #e3e8ed; background: #f7f9fb; color: #263241; }
    .app-topbar .page-header-meta .user-badge:focus-visible { outline: 2px solid var(--ui-focus, rgba(49,95,133,.22)); outline-offset: 2px; }

    .page-header-meta .user-avatar {
        width: 32px;
        height: 32px;
        display: inline-grid;
        place-items: center;
        border-radius: 50%;
        background: rgba(67, 175, 236,.12);
        color: #17658e;
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .page-header-meta .user-details {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
    }
    .page-header-meta .user-name { max-width: 150px; overflow: hidden; color: #243247; text-overflow: ellipsis; white-space: nowrap; }
    .page-header-meta .role-pill {
        margin-top: 3px;
        color: #778398;
        font-size: .65rem;
        font-weight: 500;
        letter-spacing: .025em;
        text-transform: capitalize;
    }

    @media (max-width: 575.98px) {
        .app-topbar { --app-topbar-control-size: 36px; gap: 10px; padding: 0 10px; }
        .app-topbar-start { gap: 8px; }
        .app-topbar-toggle,
        .app-topbar-icon { width: var(--app-topbar-control-size); height: var(--app-topbar-control-size); flex-basis: var(--app-topbar-control-size); }
        .app-brand { gap: 7px; }
        .app-brand img { width: 30px; height: 30px; }
        .app-brand-copy strong { font-size: .82rem; }
        .app-topbar-actions { gap: 4px; }
        .app-topbar .page-header-meta .user-badge { padding: 3px; }
        .app-footer { padding: 12px 14px; }
        .app-footer-inner { justify-content: center; flex-wrap: wrap; }
    }

/* Extracted from includes\sidebar.php */
/* Dropdown menu styling */
    .offcanvas .dropdown-menu {
        background-color: #090f29;
        border: 1px solid #202b54;
        border-left: 2px solid rgba(67, 175, 236, .6);
        box-shadow: none;
        position: relative !important;
        transform: none !important;
        width: 100%;
        margin-top: 0;
        border-radius: 0 6px 6px 0;
    }

    .offcanvas .dropdown-item {
        color: #c6d0dc;
        padding: 10px 20px 10px 40px;
        transition: background-color .15s ease, color .15s ease;
        white-space: normal;
    }

    .offcanvas .dropdown-item:hover {
        background-color: #172044;
        color: #fff;
    }

    .offcanvas .dropdown-item i {
        margin-right: 10px;
        width: 20px;
    }

    .offcanvas .dropdown-item.active {
        background-color: #1d2a52;
        color: #fff;
        box-shadow: inset 2px 0 #43afec;
    }

    .offcanvas .dropdown-divider {
        border-top-color: #202b54;
        margin: 0;
    }

    .offcanvas .dropdown-toggle {
        cursor: pointer;
    }

    .offcanvas .dropdown-toggle::after {
        float: right;
        margin-top: 8px;
        transition: transform 0.3s;
    }

    .offcanvas .dropdown.show .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .offcanvas .dropdown-menu.show {
        display: block;
        visibility: visible;
        opacity: 1;
    }

    .offcanvas .nav-link {
        white-space: normal;
        word-wrap: break-word;
    }

    .dropdown-submenu-item {
        padding-left: 45px !important;
    }

    /* Department Badge */
    .dept-badge {
        background: var(--ui-brand, #43afec);
        color: #102b3a;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .dept-indicator {
        padding: 12px 16px;
        margin: 8px 0 16px;
        border-radius: 8px;
        border-left: 3px solid;
    }
    .dept-indicator small {
        color: #a0aec0;
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: block;
        margin-bottom: 2px;
    }
    .dept-indicator div {
        color: white;
        font-weight: 600;
        font-size: 0.9rem;
    }
    .dept-indicator i {
        margin-right: 4px;
    }

/* Extracted from assets/js/nexcharts.css */
/* NexCharts Styling */

/* Container */
.nexcharts-container {
    position: relative;
    width: 100%;
}

/* Heatmap */
.nexcharts-heatmap {
    overflow-x: auto;
}

.nexcharts-heatmap table {
    border-collapse: separate;
    border-spacing: 2px;
    width: 100%;
}

.nexcharts-heatmap th {
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: #6c757d;
}

.nexcharts-heatmap td {
    padding: 8px;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
    border-radius: 4px;
    transition: transform 0.15s;
}

.nexcharts-heatmap td:hover {
    transform: scale(1.1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Treemap */
.nexcharts-treemap {
    display: flex;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    gap: 2px;
}

.treemap-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 8px;
    text-align: center;
    overflow: hidden;
    transition: flex 0.3s;
    cursor: pointer;
    position: relative;
}

.treemap-item:hover {
    filter: brightness(1.15);
}

.treemap-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.treemap-value {
    font-size: 0.65rem;
    opacity: 0.85;
    margin-top: 2px;
}

/* Gauge */
.nexcharts-gauge {
    position: relative;
    height: 180px;
}

/* Dark mode */
body.dark-mode .nexcharts-heatmap th {
    color: #94a3b8;
}

body.dark-mode .nexcharts-heatmap td {
    color: #e2e8f0;
}

/* Print */
@media print {
    .nexcharts-container {
        page-break-inside: avoid;
    }
}

@scope (html[data-page$="/entities/view.php"]) {
.dynamic-fields-section {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 10px;
            padding: 20px;
            margin-top: 20px;
        }
        .card {
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            border: none;
        }
        .card-header {
            background: linear-gradient(135deg, #43afec 0%, #2da8e8 100%);
            color: white;
            border-radius: 10px 10px 0 0 !important;
            padding: 15px 20px;
        }
        .info-label {
            font-weight: 600;
            color: #495057;
        }
        .info-value {
            background: #f8f9fa;
            padding: 8px 12px;
            border-radius: 5px;
            border: 1px solid #dee2e6;
        }
}


@scope (html[data-page$="/notifications/view.php"]) {
.notif-hero .icon { font-size: 3rem; margin-bottom: .5rem; }
        .detail-label { font-weight: 600; color: #6c757d; font-size: .75rem; text-transform: uppercase; }
        body.dark-mode .detail-label { color: #94a3b8; }
}


@scope (html[data-page$="/entities/list.php"]) {
.table-hover tbody tr:hover {
            background-color: rgba(102, 126, 234, 0.05);
            cursor: pointer;
        }
        .btn-action {
            padding: 5px 10px;
            margin: 0 2px;
        }
        .filter-card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        .filter-card .card-header {
            background: linear-gradient(135deg, #43afec 0%, #2da8e8 100%);
            color: white;
            border-radius: 10px 10px 0 0;
        }
        .bulk-actions-bar {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            min-width: 300px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
            animation: slideUp 0.3s ease;
        }
        @keyframes slideUp {
            from {
                transform: translateX(-50%) translateY(100px);
                opacity: 0;
            }
            to {
                transform: translateX(-50%) translateY(0);
                opacity: 1;
            }
        }
        .selected-row {
            background-color: rgba(67, 175, 236, 0.1) !important;
        }
        .export-btn {
            background: linear-gradient(135deg, #43afec 0%, #2da8e8 100%);
            border: none;
            color: white;
        }
        .export-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
}


@scope (html[data-page$="/interns/view.php"]) {
.profile-header {
            background: linear-gradient(135deg, #05a7f1 0%, #010c2b 100%);
            color: white;
            padding: 30px;
            border-radius: 10px;
            margin-bottom: 20px;
        }
        .info-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .stat-box {
            text-align: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
            margin-bottom: 15px;
        }
        .stat-number {
            font-size: 28px;
            font-weight: bold;
            color: #43afec;
        }
        .detail-label {
            font-weight: 600;
            color: #666;
            font-size: 12px;
            text-transform: uppercase;
            margin-bottom: 5px;
        }
        .detail-value {
            font-size: 16px;
            color: #333;
            margin-bottom: 15px;
        }
        .status-badge {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }
        .status-pending { background: #e9b44c; color: #000; }
        .status-active { background: #2a9d8f; color: #fff; }
        .status-completed { background: #43afec; color: #fff; }
        .status-withdrawn { background: #d96b5b; color: #fff; }
        .status-not_completed { background: #6c757d; color: #fff; }
        .track-badge {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            background: #43afec;
            color: #fff;
        }
        .alert-fixed {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            min-width: 300px;
            animation: slideIn 0.5s ease-out;
        }
        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
}


@scope (html[data-page$="/entities/edit.php"]) {
.dynamic-fields-section {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 10px;
            padding: 20px;
            margin-top: 20px;
        }
        .required:after {
            content: " *";
            color: red;
        }
        .card {
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            border: none;
        }
        .card-header {
            background: linear-gradient(135deg, #43afec 0%, #2da8e8 100%);
            color: white;
            border-radius: 10px 10px 0 0 !important;
            padding: 15px 20px;
        }
        .form-control:focus, .form-select:focus {
            border-color: #43afec;
            box-shadow: 0 0 0 0.2rem rgba(67, 175, 236, 0.25);
        }
        .btn-primary {
            background: linear-gradient(135deg, #43afec 0%, #2da8e8 100%);
            border: none;
        }
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
}


@scope (html[data-page$="/surveys/view.php"]) {
.detail-label { font-weight: 600; color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .detail-value { font-size: 1rem; margin-bottom: 0.75rem; }
        body.dark-mode .detail-label { color: #94a3b8; }
}


@scope (html[data-page$="/departments/index.php"]) {
.dept-card { background:#fff; border-radius:14px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.06); transition:all .25s; height:100%; border:1px solid rgba(0,0,0,.04); cursor:pointer; text-decoration:none; color:inherit; display:block; }
        .dept-card:hover { transform:translateY(-4px); box-shadow:0 12px 30px rgba(0,0,0,.12); color:inherit; }
        .dept-header { padding:1.5rem; color:white; position:relative; overflow:hidden; }
        .dept-header::after { content:''; position:absolute; top:-30px; right:-30px; width:100px; height:100px; border-radius:50%; background:rgba(255,255,255,.1); }
        .dept-icon { font-size:2.5rem; margin-bottom:.5rem; }
        .dept-name { font-size:1.2rem; font-weight:700; margin:0; }
        .dept-desc { font-size:.8rem; opacity:.85; margin-top:.25rem; }
        .dept-body { padding:1rem 1.25rem; }
        .dept-stat { text-align:center; padding:.5rem 0; }
        .dept-stat .num { font-size:1.5rem; font-weight:700; }
        .dept-stat .lbl { font-size:.7rem; color:#6c757d; text-transform:uppercase; }
        .user-badge { position:absolute; top:12px; right:12px; background:rgba(255,255,255,.95); color:#1a2a4a; padding:2px 10px; border-radius:20px; font-size:.7rem; font-weight:600; }
        body.dark-mode .dept-card { background:#1e293b; color:#e2e8f0; }
        body.dark-mode .dept-body { background:#1e293b; }
        body.dark-mode .dept-stat .lbl { color:#94a3b8; }
}


@scope (html[data-page$="/entities/create.php"]) {
.dynamic-fields-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-top: 20px;
        }
        .required:after {
            content: " *";
            color: red;
        }
}


@scope (html[data-page$="/notifications/index.php"]) {
.notif-item { background:#fff; border-radius:10px; padding:1rem 1.25rem; margin-bottom:.5rem; box-shadow:0 1px 3px rgba(0,0,0,.05); display:flex; gap:1rem; align-items:flex-start; transition:all .2s; border-left:3px solid transparent; }
        .notif-item:hover { box-shadow:0 4px 12px rgba(0,0,0,.08); transform:translateX(2px); }
        .notif-item.unread { background:#f0f7ff; border-left-color:#43afec; }
        .notif-item.unread .notif-title { font-weight:700; }
        .notif-icon { width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1.2rem; flex-shrink:0; color:#fff; }
        .notif-body { flex:1; min-width:0; }
        .notif-title { font-weight:500; color:#1a2a4a; margin-bottom:.15rem; }
        .notif-message { font-size:.9rem; color:#5a7a9a; margin-bottom:.25rem; }
        .notif-meta { font-size:.75rem; color:#94a3b8; }
        body.dark-mode .notif-item { background:#1e293b; color:#e2e8f0; }
        body.dark-mode .notif-item.unread { background:#1a2744; }
        body.dark-mode .notif-title { color:#f1f5f9; }
        body.dark-mode .notif-message { color:#94a3b8; }
}


@scope (html[data-page$="/departments/department-view.php"]) {
.dept-hero .dept-icon { font-size:3rem; margin-bottom:.5rem; }
        .module-badge { padding:.35rem .75rem; border-radius:50px; font-size:.75rem; font-weight:600; margin:2px; display:inline-block; }
        body.dark-mode .dept-hero { color:white; }
}


@scope (html[data-page$="/surveys/index.php"]) {
.stat-card { background: white; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.3s ease; }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
}


@scope (html[data-page$="/nexresearch/startup/view.php"]) {
.profile-header { background: linear-gradient(135deg, #43afec 0%, #0d1333 100%); color: white; border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; }
        .profile-header .startup-name { font-size: 2rem; font-weight: 700; }
        .detail-label { font-weight: 600; color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .score-bar { height: 8px; border-radius: 4px; background: #e9ecef; overflow: hidden; }
        .score-bar .fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
        body.dark-mode .detail-label { color: #94a3b8; }
        body.dark-mode .score-bar { background: #334155; }
}


@scope (html[data-page$="/nexresearch/startup/metrics.php"]) {
.metric-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: all 0.3s ease;
            text-align: center;
            height: 100%;
        }
        .metric-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .metric-number { font-size: 2rem; font-weight: 700; }
        .metric-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        body.dark-mode .metric-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .metric-label { color: #94a3b8; }
}


@scope (html[data-page$="/nexresearch/startup/index.php"]) {
.stat-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: all 0.3s ease;
            text-align: center;
            height: 100%;
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        
        .startup-card {
            background: white;
            border-radius: 12px;
            padding: 1rem 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            margin-bottom: 0.75rem;
            border-left: 4px solid #43afec;
        }
        .startup-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.08); transform: translateX(4px); }
        .startup-card .startup-name { font-weight: 600; font-size: 1rem; }
        .startup-card .startup-meta { font-size: 0.8rem; color: #6c757d; }
        
        .score-bar { height: 6px; border-radius: 4px; background: #e9ecef; overflow: hidden; }
        .score-bar .fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
        
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .startup-card { background: #1e293b; color: #e2e8f0; border-color: #43afec; }
        body.dark-mode .stat-label { color: #94a3b8; }
        body.dark-mode .startup-card .startup-meta { color: #94a3b8; }
        body.dark-mode .score-bar { background: #334155; }
        
        @media (max-width: 768px) {
            .stat-number { font-size: 1.5rem; }
        }
}


@scope (html[data-page$="/surveys/global-survey-2026/index.php"]) {
* { box-sizing: border-box; }
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #eef1f5 100%);
            min-height: 100vh;
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }
        /* No dark mode - forced light theme */
        
        .survey-container {
            width: 100%;
            max-width: 720px;
            margin: 0 auto;
        }
        
        .survey-card {
            background: #ffffff;
            border-radius: 32px;
            padding: 2.5rem 2.5rem 2rem;
            box-shadow: 0 30px 80px rgba(0,0,0,0.08), 0 10px 30px rgba(0,0,0,0.04);
            min-height: 500px;
            position: relative;
            transition: all 0.3s ease;
            border: 1px solid rgba(255,255,255,0.5);
        }
        
        /* Progress Bar */
        .progress-container {
            margin-bottom: 2rem;
        }
        .progress-steps {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }
        .progress-steps .step-label {
            font-size: 0.75rem;
            font-weight: 600;
            color: #94a3b8;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }
        .progress-steps .step-count {
            font-size: 0.85rem;
            font-weight: 600;
            color: #1a2a4a;
        }
        .progress-bar-custom {
            height: 4px;
            background: #e9edf2;
            border-radius: 4px;
            overflow: hidden;
        }
        .progress-bar-custom .bar {
            height: 100%;
            background: linear-gradient(90deg, #43afec, #0d1333);
            border-radius: 4px;
            transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
            width: 0%;
        }
        
        /* Step Content */
        .step-content {
            animation: fadeSlide 0.4s ease-out;
            min-height: 300px;
        }
        @keyframes fadeSlide {
            0% { opacity: 0; transform: translateY(16px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        
        .step-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: #0a1a3a;
            margin-bottom: 0.5rem;
            line-height: 1.2;
        }
        .step-subtitle {
            color: #5a7a9a;
            font-size: 1rem;
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }
        
        /* Role Cards */
        .role-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 0.75rem;
            margin: 1.5rem 0;
        }
        .role-card {
            background: #f8fafc;
            border: 2px solid #e9edf2;
            border-radius: 20px;
            padding: 1.25rem 0.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.25s ease;
            position: relative;
        }
        .role-card:hover {
            border-color: #43afec;
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(67, 175, 236,0.1);
        }
        .role-card.selected {
            border-color: #43afec;
            background: #eef4ff;
            box-shadow: 0 8px 25px rgba(67, 175, 236,0.12);
        }
        .role-card .role-icon {
            font-size: 2.2rem;
            display: block;
            margin-bottom: 0.3rem;
        }
        .role-card .role-name {
            font-size: 0.85rem;
            font-weight: 600;
            color: #0a1a3a;
        }
        .role-card .check-mark {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #43afec;
            color: white;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            display: none;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            box-shadow: 0 4px 10px rgba(67, 175, 236,0.3);
        }
        .role-card.selected .check-mark { display: flex; }
        
        /* Form Elements - Modern */
        .form-group {
            margin-bottom: 1.25rem;
        }
        .form-label {
            font-weight: 600;
            color: #0a1a3a;
            margin-bottom: 0.4rem;
            font-size: 0.95rem;
        }
        .form-control, .form-select {
            border-radius: 14px;
            border: 2px solid #e9edf2;
            padding: 0.75rem 1rem;
            font-size: 0.95rem;
            transition: all 0.2s;
            background: #fafbfc;
            color: #1a2a4a;
        }
        .form-control:focus, .form-select:focus {
            border-color: #43afec;
            box-shadow: 0 0 0 4px rgba(67, 175, 236,0.08);
            background: #ffffff;
        }
        .form-control::placeholder {
            color: #a0b3c9;
        }
        
        /* Scale Buttons */
        .scale-group {
            display: flex;
            gap: 0.4rem;
            flex-wrap: wrap;
        }
        .scale-btn {
            border-radius: 50px;
            border: 2px solid #e9edf2;
            padding: 0.5rem 1rem;
            background: #ffffff;
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.15s;
            min-width: 44px;
            color: #1a2a4a;
        }
        .scale-btn:hover {
            border-color: #43afec;
            background: #eef4ff;
        }
        .scale-btn.active {
            background: #1a2a4a;
            color: #ffffff;
            border-color: #1a2a4a;
        }
        
        /* Checkbox Group */
        .checkbox-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem 1rem;
        }
        .checkbox-grid .form-check {
            padding-left: 0;
        }
        .checkbox-grid .form-check-input {
            margin-right: 8px;
            width: 18px;
            height: 18px;
            border-radius: 6px;
            border: 2px solid #cbd5e1;
            cursor: pointer;
        }
        .checkbox-grid .form-check-input:checked {
            background-color: #43afec;
            border-color: #43afec;
        }
        .checkbox-grid .form-check-label {
            font-size: 0.9rem;
            color: #1a2a4a;
            cursor: pointer;
        }
        
        /* Navigation Buttons */
        .nav-buttons {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 2rem;
            gap: 1rem;
        }
        .btn-nav {
            border-radius: 50px;
            padding: 0.6rem 2rem;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.2s;
            border: none;
            cursor: pointer;
        }
        .btn-prev {
            background: #f1f4f9;
            color: #1a2a4a;
        }
        .btn-prev:hover {
            background: #e5e9f0;
        }
        .btn-next {
            background: #1a2a4a;
            color: #ffffff;
        }
        .btn-next:hover {
            background: #0f1f3a;
            transform: scale(0.98);
        }
        .btn-next:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            transform: none;
        }
        .btn-submit {
            background: linear-gradient(135deg, #2a9d8f, #78a989);
            color: #ffffff;
        }
        .btn-submit:hover {
            transform: scale(0.98);
            box-shadow: 0 8px 25px rgba(42, 157, 143,0.3);
        }
        
        /* Success Screen */
        .success-screen {
            text-align: center;
            padding: 2rem 1rem;
        }
        .success-icon {
            font-size: 4.5rem;
            color: #2a9d8f;
            background: #e8f5ee;
            width: 110px;
            height: 110px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.5rem;
        }
        
        /* Review Section */
        .review-item {
            padding: 0.75rem 0;
            border-bottom: 1px solid #f0f2f5;
            display: flex;
            justify-content: space-between;
        }
        .review-item .label { font-weight: 500; color: #5a7a9a; }
        .review-item .value { font-weight: 500; color: #0a1a3a; text-align: right; }
        
        /* Responsive */
        @media (max-width: 576px) {
            .survey-card { padding: 1.5rem 1.25rem; border-radius: 24px; }
            .step-title { font-size: 1.3rem; }
            .role-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
            .role-card { padding: 0.8rem 0.2rem; }
            .role-card .role-icon { font-size: 1.6rem; }
            .role-card .role-name { font-size: 0.7rem; }
            .nav-buttons { flex-wrap: wrap; gap: 0.5rem; }
            .btn-nav { width: 100%; text-align: center; }
        }
        @media (max-width: 400px) {
            .role-grid { grid-template-columns: repeat(2, 1fr); }
        }
        
        /* No dark mode - removed all dark mode styles */
}


@scope (html[data-page$="/nexresearch/knowledge/base.php"]) {
.knowledge-header {
            background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
            color: #1a1a2e;
            padding: 40px;
            border-radius: 15px;
            margin-bottom: 30px;
        }
        .knowledge-card {
            transition: transform 0.3s;
            margin-bottom: 20px;
            cursor: pointer;
        }
        .knowledge-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }
        .knowledge-icon {
            font-size: 48px;
            margin-bottom: 10px;
        }
        .tag {
            display: inline-block;
            background: #e9ecef;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 11px;
            margin-right: 5px;
            margin-bottom: 5px;
        }
        .nav-pills-custom .nav-link {
            border-radius: 20px;
            margin: 5px;
        }
        .featured-card {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
        }
}


@scope (html[data-page$="/nexresearch/startup/edit.php"]) {
.form-section { background: #f8f9fa; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
        body.dark-mode .form-section { background: #1e293b; }
}


@scope (html[data-page$="/interns/evaluation.php"]) {
.evaluation-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .rating-scale {
            display: inline-block;
            width: 100%;
        }
        .rating-option {
            display: inline-block;
            width: 60px;
            text-align: center;
            margin: 0 5px;
        }
        .rating-option input {
            margin-top: 5px;
        }
        .rating-label {
            font-weight: bold;
            margin-top: 10px;
        }
        .progress {
            height: 8px;
        }
        .evaluation-score {
            font-size: 48px;
            font-weight: bold;
        }
}


@scope (html[data-page$="/nexresearch/index.php"]) {
:root {
            --primary: #0d1333;
            --primary-light: #1d2a52;
            --accent: #43afec;
            --accent-glow: #92d5f3;
            --success: #2a9d8f;
            --warning: #e9b44c;
            --danger: #d96b5b;
            --dark: #090f29;
            --card-bg: #FFFFFF;
            --text-primary: #1F2937;
            --text-secondary: #6B7280;
            --border: #E5E7EB;
        }
        
        * {
            font-family: 'Inter', sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #f3f4f6 100%);
        }
        
        .research-card {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            border-radius: 20px;
            padding: 24px;
            margin-bottom: 24px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.1);
        }
        
        .research-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
            transition: left 0.5s;
        }
        
        .research-card:hover::before {
            left: 100%;
        }
        
        .research-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
        }
        
        .stat-number {
            font-size: 42px;
            font-weight: 800;
            letter-spacing: -1px;
            line-height: 1;
            margin: 12px 0 8px;
        }
        
        .stat-label {
            font-size: 13px;
            opacity: 0.8;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 500;
        }
        
        .stat-icon {
            position: absolute;
            right: 20px;
            top: 20px;
            font-size: 48px;
            opacity: 0.15;
        }
        
        .card {
            border: none;
            border-radius: 20px;
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
            transition: all 0.3s;
            margin-bottom: 24px;
        }
        
        .card:hover {
            box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
        }
        
        .card-header {
            background: white;
            border-bottom: 2px solid var(--border);
            padding: 20px 24px;
            font-weight: 600;
            font-size: 18px;
            border-radius: 20px 20px 0 0 !important;
        }
        
        .quick-action {
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 16px;
            cursor: pointer;
            transition: all 0.3s;
            border: 1px solid var(--border);
            position: relative;
            overflow: hidden;
        }
        
        .quick-action:hover {
            transform: translateX(8px);
            border-left: 4px solid var(--accent);
            box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
        }
        
        .progress-bar-custom {
            height: 6px;
            border-radius: 3px;
            background: linear-gradient(90deg, var(--accent), var(--accent-glow));
        }
        
        .badge-custom {
            padding: 6px 12px;
            border-radius: 30px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }
        
        .badge-pending { background: #FEF3C7; color: #D97706; }
        .badge-active { background: #D1FAE5; color: #059669; }
        .badge-completed { background: #DBEAFE; color: #2563EB; }
        
        .trend-up { color: var(--success); }
        .trend-down { color: var(--danger); }
        
        .dashboard-header {
            background: white;
            border-radius: 20px;
            padding: 20px 24px;
            margin-bottom: 24px;
            border: 1px solid var(--border);
        }
        
        .activity-timeline {
            position: relative;
            padding-left: 30px;
        }
        
        .activity-timeline::before {
            content: '';
            position: absolute;
            left: 10px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--border);
        }
        
        .activity-item {
            position: relative;
            margin-bottom: 20px;
        }
        
        .activity-dot {
            position: absolute;
            left: -30px;
            top: 0;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--accent);
            border: 2px solid white;
            box-shadow: 0 0 0 2px var(--accent);
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.2); opacity: 0.7; }
        }
        
        .live-badge {
            animation: pulse 2s infinite;
            background: var(--danger);
            color: white;
            padding: 4px 8px;
            border-radius: 30px;
            font-size: 10px;
            font-weight: 600;
            margin-left: 10px;
        }
        
        @media (max-width: 768px) {
            .stat-number { font-size: 28px; }
            .research-card { padding: 16px; }
            .card-header { padding: 16px; }
        }
}


@scope (html[data-page$="/interns/edit.php"]) {
.form-section {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .section-title {
            border-left: 4px solid #43afec;
            padding-left: 15px;
            margin-bottom: 20px;
            color: #333;
        }
        .required:after {
            content: " *";
            color: red;
        }
        .image-preview {
            max-width: 150px;
            max-height: 150px;
            margin-top: 10px;
            border-radius: 10px;
        }
        .current-image {
            max-width: 100px;
            max-height: 100px;
            border-radius: 10px;
            margin-bottom: 10px;
        }
}


@scope (html[data-page$="/index.php"]) {
:root {
            --primary: #43afec;
            --primary-dark: #090e33;
            --secondary: #090e33;
            --success: #2a9d8f;
            --danger: #d96b5b;
            --warning: #e9b44c;
            --dark: #1a1a2e;
            --light: #f8f9fa;
            --gray: #6c757d;
        }

        body {
            font-family: 'Segoe UI', 'Poppins', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            transition: all 0.3s ease;
        }

        /* Dark Mode */
        body.dark-mode {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            color: #fff;
        }

        body.dark-mode .stat-card,
        body.dark-mode .chart-container,
        body.dark-mode .activity-item,
        body.dark-mode .recent-card {
            background: #1e293b;
            color: #fff;
            box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }

        body.dark-mode .text-muted {
            color: #adb5bd !important;
        }

        body.dark-mode .table {
            color: #fff;
        }

        body.dark-mode .table-hover tbody tr:hover {
            background-color: rgba(255,255,255,0.1);
        }

        body.dark-mode .activity-item {
            background: #0f172a;
        }

        /* Modern Stat Cards */
        .stat-card {
            background: white;
            border-radius: 20px;
            padding: 25px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            overflow: hidden;
            border: none;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
        }

        .stat-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 60px rgba(0,0,0,0.15);
        }

        .stat-icon {
            font-size: 52px;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            opacity: 0.8;
        }

        .stat-number {
            font-size: 36px;
            font-weight: 800;
            margin: 10px 0;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .stat-label {
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
            color: var(--gray);
        }

        .stat-trend {
            font-size: 12px;
            padding: 4px 8px;
            border-radius: 20px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .trend-up {
            background: rgba(67, 175, 236, 0.2);
            color: #43afec;
        }

        .trend-down {
            background: rgba(247, 37, 133, 0.2);
            color: #f72585;
        }

        /* Chart Containers */
        .chart-container {
            background: white;
            border-radius: 20px;
            padding: 25px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            margin-bottom: 25px;
            transition: all 0.3s ease;
            border: none;
        }

        .chart-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chart-title i {
            font-size: 24px;
            color: var(--primary);
        }

        /* Recent Activities */
        .recent-card {
            background: white;
            border-radius: 20px;
            padding: 25px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            margin-bottom: 25px;
        }

        .activity-timeline {
            position: relative;
            padding-left: 30px;
        }

        .activity-timeline::before {
            content: '';
            position: absolute;
            left: 10px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: linear-gradient(180deg, var(--primary), var(--secondary));
        }

        .activity-item {
            position: relative;
            margin-bottom: 25px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 12px;
            transition: all 0.3s ease;
        }

        .activity-item:hover {
            transform: translateX(5px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .activity-icon {
            position: absolute;
            left: -30px;
            top: 15px;
            width: 30px;
            height: 30px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid var(--primary);
        }

        /* Quick Actions */
        .quick-action-btn {
            padding: 12px;
            border-radius: 12px;
            transition: all 0.3s ease;
            text-align: center;
            background: rgba(67, 175, 236, 0.1);
            border: none;
        }

        .quick-action-btn:hover {
            background: var(--primary);
            color: white;
            transform: translateY(-5px);
        }

        /* Floating Action Button */
        .fab {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
            transition: all 0.3s ease;
            z-index: 1000;
            border: none;
        }

        .fab:hover {
            transform: scale(1.1) rotate(90deg);
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        }

        /* Welcome Banner */
        .welcome-banner {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            border-radius: 20px;
            padding: 30px;
            color: white;
            margin-bottom: 30px;
            position: relative;
            overflow: hidden;
        }

        .welcome-banner::before {
            content: '✨';
            position: absolute;
            right: 20px;
            top: 20px;
            font-size: 80px;
            opacity: 0.2;
        }

        /* Dark Mode Toggle */
        .theme-toggle {
            position: fixed;
            bottom: 100px;
            right: 30px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--dark);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 1000;
            border: none;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }

        /* Notification Badge */
        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #f72585;
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Notification Dropdown */
        .notification-dropdown {
            max-height: 400px;
            overflow-y: auto;
            width: 350px;
        }

        .notification-item {
            padding: 10px 15px;
            border-bottom: 1px solid #eee;
            transition: background 0.2s;
        }

        .notification-item:hover {
            background: rgba(67, 175, 236, 0.1);
        }

        .notification-unread {
            background: rgba(67, 175, 236, 0.05);
            border-left: 3px solid var(--primary);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .stat-number {
                font-size: 24px;
            }
            .stat-icon {
                font-size: 36px;
            }
            .welcome-banner h2 {
                font-size: 20px;
            }
        }

        /* Loading Spinner */
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(0,0,0,0.1);
            border-radius: 50%;
            border-top-color: var(--primary);
            animation: spin 0.6s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Real-time indicator */
        .live-indicator {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #43afec;
            animation: pulse 2s infinite;
            margin-right: 8px;
        }

        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(67, 175, 236, 0.7); }
            70% { box-shadow: 0 0 0 10px rgba(67, 175, 236, 0); }
            100% { box-shadow: 0 0 0 0 rgba(76, 201, 240, 0); }
        }

        /* Module Grid */
        .module-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 25px;
        }
        .module-card {
            background: white;
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .module-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        }
        .module-icon {
            font-size: 40px;
            margin-bottom: 10px;
        }
        .module-count {
            font-size: 28px;
            font-weight: bold;
            color: var(--primary);
        }
        body.dark-mode .module-card {
            background: #1e293b;
        }

        /* Task List */
        .task-item {
            padding: 10px;
            border-left: 3px solid var(--primary);
            margin-bottom: 10px;
            background: rgba(67, 175, 236, 0.05);
            border-radius: 8px;
        }

        .task-priority-high { border-left-color: #f72585; }
        .task-priority-medium { border-left-color: #f8961e; }
        .task-priority-low { border-left-color: #43afec; }

        /* Quick Stats Modal */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-top: 20px;
        }

        :root {
            --primary: #43afec;
            --primary-dark: #0d1333;
            --secondary: #0d1333;
            --success: #2a9d8f;
            --danger: #d96b5b;
            --warning: #e9b44c;
            --dark: #172033;
            --light: #f5f7fb;
            --gray: #667085;
            --dashboard-ink: #172033;
            --dashboard-muted: #697586;
            --dashboard-line: #e1e5ea;
            --dashboard-surface: #fff;
            --dashboard-canvas: #f5f6f8;
        }

        body {
            color: var(--dashboard-ink);
            background: var(--dashboard-canvas);
            font-family: Inter, 'Segoe UI', sans-serif;
        }

        .app-main > .container-fluid {
            max-width: 1680px;
            padding: 26px 28px 40px;
        }

        .welcome-banner {
            padding: 28px 32px;
            margin-bottom: 24px;
            border: 1px solid #244b70;
            border-radius: 12px;
            background: #244b70;
            box-shadow: none;
        }

        .welcome-banner::before {
            display: none;
        }

        .welcome-banner h2 { font-size: clamp(1.45rem, 2vw, 2rem); letter-spacing: -.035em; }
        .welcome-banner p { font-size: .95rem; }
        .welcome-banner .badge {
            padding: 8px 11px;
            border: 1px solid rgba(255,255,255,.32);
            border-radius: 9px;
            background: rgba(255,255,255,.13) !important;
            color: #fff !important;
            font-size: .76rem;
            font-weight: 600;
            opacity: 1 !important;
        }
        .welcome-banner .btn {
            padding: 8px 12px;
            border-radius: 9px;
            font-weight: 600;
        }
        .welcome-banner .btn-light { color: #174783; }
        .welcome-banner .live-indicator { width: 8px; height: 8px; }

        .dashboard-section-heading {
            display: flex;
            align-items: end;
            justify-content: space-between;
            gap: 12px;
            margin: 28px 2px 14px;
        }
        .dashboard-section-heading h2 {
            margin: 0;
            color: #26354a;
            font-size: 1.05rem;
            font-weight: 750;
            letter-spacing: -.015em;
        }
        .dashboard-section-heading p { margin: 4px 0 0; color: var(--dashboard-muted); font-size: .8rem; }

        .dashboard-notifications {
            margin-bottom: 25px;
            overflow: hidden;
            border: 1px solid var(--dashboard-line);
            border-radius: 10px;
            background: var(--dashboard-surface);
            box-shadow: 0 1px 3px rgba(21,38,64,.04);
        }
        .dashboard-notifications .card-header {
            min-height: 54px;
            padding: 12px 18px;
            border-bottom: 1px solid var(--dashboard-line);
            background: #fff;
            color: #26354a;
            font-size: .9rem;
            font-weight: 700;
        }
        .dashboard-notifications .card-header i { margin-right: 7px; color: var(--primary); }
        .dashboard-notifications .card-body { max-height: 245px; overflow-y: auto; padding: 8px 18px; }
        .dashboard-notifications .card-body > .border-bottom {
            align-items: flex-start;
            padding: 12px 2px !important;
            border-color: #edf1f6 !important;
        }
        .dashboard-notifications .card-body > .border-bottom:last-child { border-bottom: 0 !important; }
        .dashboard-notifications .card-body > .border-bottom > .bi { margin-top: 3px; }
        .dashboard-notifications .card-body > .border-bottom .small { line-height: 1.45; }
        .dashboard-notifications .card-body > .border-bottom .text-muted { color: #788599 !important; }

        .stat-card {
            min-height: 140px;
            padding: 19px 20px;
            border: 1px solid var(--dashboard-line);
            border-radius: 10px;
            background: var(--dashboard-surface);
            box-shadow: 0 1px 3px rgba(21,38,64,.035);
        }
        .stat-card::before {
            right: auto;
            width: 4px;
            height: auto;
            background: var(--card-accent, #2563eb);
        }
        .stat-card:hover {
            transform: none;
            border-color: #bcc8d5;
            box-shadow: 0 1px 3px rgba(21,38,64,.06);
        }
        .stat-label { color: #697586; font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
        .stat-number {
            margin: 9px 0 10px;
            color: var(--dashboard-ink);
            background: none;
            -webkit-text-fill-color: currentColor;
            font-size: clamp(1.3rem, 2.4vw, 2rem);
            line-height: 1.15;
            letter-spacing: -.025em;
            font-variant-numeric: tabular-nums;
            overflow-wrap: anywhere;
        }
        .stat-trend, .trend-up, .trend-down { padding: 0; background: transparent; color: #647184; font-size: .73rem; }
        .stat-icon {
            display: block;
            padding: 2px;
            background: none;
            -webkit-background-clip: border-box;
            background-clip: border-box;
            -webkit-text-fill-color: currentColor;
            color: #758397;
            opacity: 1;
            font-size: 1.15rem;
        }
        .stat-icon i { color: inherit; }
        .row > [class*="col-"] .stat-card { --card-accent: #315f85; }

        .chart-container, .recent-card {
            padding: 22px;
            margin-bottom: 20px;
            border: 1px solid var(--dashboard-line);
            border-radius: 10px;
            background: var(--dashboard-surface);
            box-shadow: 0 1px 3px rgba(21,38,64,.035);
        }
        .chart-title { margin-bottom: 10px; color: #26354a; font-size: .95rem; letter-spacing: -.01em; }
        .chart-title i { color: #3978d4; font-size: 1.1rem; }
        .chart-container > div[id$="Chart"] { min-height: 280px; }
        .chart-container .form-select { border-color: #dce4ef; border-radius: 8px; color: #516074; font-size: .75rem; }
        .chart-container .btn-outline-primary,
        .recent-card .btn-outline-primary { border-color: #dbe5f1; border-radius: 8px; color: #315f9d; }

        .activity-timeline { max-height: 550px; overflow-y: auto; padding-right: 4px; }
        .activity-timeline::before { background: #d7e4f6; }
        .activity-item {
            margin-bottom: 12px;
            padding: 13px 15px;
            border: 1px solid #edf1f6;
            background: #fbfcfe;
        }
        .activity-item:hover { transform: none; box-shadow: none; }
        .activity-icon { border-color: #cfe0f8; color: #2563eb; }
        .quick-action-btn {
            min-height: 96px;
            border: 1px solid #e7edf5;
            background: #f8faff;
            color: #315f9d;
        }
        .quick-action-btn:hover { border-color: #cbd5df; background: #f0f3f6; color: #244b70; transform: none; }
        .recent-card .table { --bs-table-hover-bg: #f7f9fc; color: #344054; font-size: .8rem; }
        .recent-card .table thead th { padding-top: 9px; padding-bottom: 9px; color: #768397; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
        .recent-card .list-group-item { border-color: #edf1f6; color: #344054; }
        .module-card { border: 1px solid var(--dashboard-line); border-radius: 10px; box-shadow: 0 1px 3px rgba(21,38,64,.035); }
        .module-card:hover { transform: none; box-shadow: 0 1px 3px rgba(21,38,64,.06); }
        .module-count { color: #344054; }
        .fab { background: #244b70; box-shadow: 0 2px 6px rgba(21,38,64,.18); }
        .fab:hover { transform: none; box-shadow: 0 3px 8px rgba(21,38,64,.2); }
        .theme-toggle { background: #172033; }
        .live-indicator { animation: none; box-shadow: none; }

        body.dark-mode {
            --dashboard-ink: #e6edf7;
            --dashboard-muted: #9aa8bc;
            --dashboard-line: #29374a;
            --dashboard-surface: #172235;
            --dashboard-canvas: #0e1726;
            color: var(--dashboard-ink);
            background: var(--dashboard-canvas);
        }
        body.dark-mode .dashboard-notifications .card-header { border-color: var(--dashboard-line); background: var(--dashboard-surface); color: var(--dashboard-ink); }
        body.dark-mode .dashboard-section-heading h2 { color: var(--dashboard-ink); }
        body.dark-mode .dashboard-notifications .card-body > .border-bottom { border-color: var(--dashboard-line) !important; }
        body.dark-mode .stat-card, body.dark-mode .chart-container, body.dark-mode .recent-card, body.dark-mode .module-card {
            border-color: var(--dashboard-line);
            background: var(--dashboard-surface);
            color: var(--dashboard-ink);
        }
        body.dark-mode .stat-label, body.dark-mode .chart-title { color: #cbd5e1; }
        body.dark-mode .stat-number, body.dark-mode .module-count { color: #e6edf7; }
        body.dark-mode .stat-trend { background: #243248; color: #cbd5e1; }
        body.dark-mode .trend-up { background: #12392f; color: #8be0c1; }
        body.dark-mode .trend-down { background: #452630; color: #ffb1bd; }
        body.dark-mode .activity-item, body.dark-mode .quick-action-btn { border-color: var(--dashboard-line); background: #1c2a3e; color: #d5deeb; }
        body.dark-mode .recent-card .table { --bs-table-color: #d5deeb; --bs-table-bg: transparent; --bs-table-hover-bg: #233249; }
        body.dark-mode .dashboard-notifications .card-header { background: var(--dashboard-surface); }
        body.dark-mode .dashboard-section-heading p,
        body.dark-mode .dashboard-notifications .card-body .text-muted { color: var(--dashboard-muted) !important; }
        body.dark-mode .recent-card .list-group-item { background: var(--dashboard-surface); color: #d5deeb; }

        @media (max-width: 991.98px) {
            .app-main > .container-fluid { padding: 20px 18px 32px; }
            .welcome-banner { padding: 26px; }
        }
        @media (max-width: 575.98px) {
            .app-main > .container-fluid { padding: 15px 12px 28px; }
            .welcome-banner { padding: 22px 18px; border-radius: 16px; }
            .welcome-banner .row > div { min-width: 0; }
            .welcome-banner .badge { font-size: .68rem; }
            .stat-card { min-height: 132px; padding: 17px 15px; }
            .stat-number { font-size: clamp(1.3rem, 6vw, 1.7rem); }
            .stat-icon { width: 36px; height: 36px; font-size: 1.1rem; }
            .chart-container, .recent-card { padding: 17px 14px; }
            .chart-title { font-size: .86rem; }
            .chart-container > div[id$="Chart"] { min-height: 250px; }
        }
}


@scope (html[data-page$="/surveys/analytics.php"]) {
.analytics-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 10px rgba(0,0,0,0.06);
            margin-bottom: 1.25rem;
        }
        .analytics-card h6 { color: #6c757d; font-weight: 600; }
        .stat-number { font-size: 2.2rem; font-weight: 700; }
        body.dark-mode .analytics-card { background: #1e293b; color: #e2e8f0; }
}


@scope (html[data-page$="/nexresearch/startup/create.php"]) {
.form-section { background: #f8f9fa; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
        body.dark-mode .form-section { background: #1e293b; }
}


@scope (html[data-page$="/interns/create.php"]) {
.form-section {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .section-title {
            border-left: 4px solid #43afec;
            padding-left: 15px;
            margin-bottom: 20px;
            color: #333;
        }
        .required:after {
            content: " *";
            color: red;
        }
        .image-preview {
            max-width: 150px;
            max-height: 150px;
            margin-top: 10px;
            border-radius: 10px;
        }
        .alert {
            margin-bottom: 20px;
        }
}


@scope (html[data-page$="/interns/attendance.php"]) {
.attendance-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .stat-box {
            text-align: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
        }
        .stat-number {
            font-size: 28px;
            font-weight: bold;
        }
        .present-badge { background: #d4edda; color: #155724; }
        .absent-badge { background: #f8d7da; color: #721c24; }
        .late-badge { background: #fff3cd; color: #856404; }
        .excused-badge { background: #d1ecf1; color: #0c5460; }
}


@scope (html[data-page$="/nexresearch/reports/view.php"]) {
@media print {
            .no-print { display: none; }
            body { background: white; }
            .container-fluid { margin: 0; padding: 0; }
        }
        .report-header {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 30px;
        }
        .stat-box {
            background: white;
            border-radius: 10px;
            padding: 15px;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .finding-card {
            background: #f8f9fa;
            border-left: 4px solid #43afec;
            padding: 15px;
            margin-bottom: 15px;
        }
}


@scope (html[data-app-module="nexresearch"]) {
* { font-family: 'Inter', sans-serif; }

        body {
            background: #f0f2f5;
        }

        /* ── Cards ───────────────────────────────────────────── */
        .research-card {
            background: linear-gradient(135deg, #050143 0%, #0d0d3b 100%);
            color: white;
            border-radius: 16px;
            padding: 22px;
            transition: transform 0.2s, box-shadow 0.2s;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.07);
            cursor: pointer;
        }

        .research-card::after {
            content: '';
            position: absolute;
            top: -40%;
            right: -20%;
            width: 160px;
            height: 160px;
            border-radius: 50%;
            background: rgba(255,255,255,0.04);
        }

        .research-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 32px rgba(0,0,0,0.18);
        }

        .research-card .stat-icon {
            position: absolute;
            right: 18px;
            top: 18px;
            font-size: 36px;
            opacity: 0.12;
        }

        .research-card .stat-number {
            font-size: 36px;
            font-weight: 800;
            letter-spacing: -1px;
            line-height: 1;
            margin: 10px 0 6px;
        }

        .research-card .stat-label {
            font-size: 11px;
            opacity: 0.75;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
        }

        /* ── Panel cards ─────────────────────────────────────── */
        .panel {
            background: white;
            border-radius: 14px;
            border: none;
            box-shadow: 0 2px 10px rgba(0,0,0,0.06);
            margin-bottom: 24px;
            overflow: hidden;
        }

        .panel-header {
            padding: 16px 20px;
            border-bottom: 1px solid #f1f5f9;
            font-weight: 600;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        /* ── Module tiles ────────────────────────────────────── */
        .module-tile {
            background: white;
            border-radius: 12px;
            padding: 18px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            border: 2px solid transparent;
        }

        .module-tile:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.1);
            border-color: #43afec;
        }

        .module-tile .tile-icon { font-size: 32px; margin-bottom: 8px; }
        .module-tile .tile-count { font-size: 24px; font-weight: 700; color: #1e293b; }
        .module-tile .tile-label { font-size: 0.75rem; color: #64748b; margin-top: 2px; }

        /* ── Quick action ────────────────────────────────────── */
        .quick-action {
            background: #f8fafc;
            border-radius: 12px;
            padding: 16px;
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid #e2e8f0;
        }

        .quick-action:hover {
            background: white;
            border-left: 3px solid #43afec;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }

        /* ── Badges ──────────────────────────────────────────── */
        .badge-pending  { background: #fef3c7; color: #d97706; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
        .badge-active   { background: #d1fae5; color: #059669; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
        .badge-completed{ background: #dbeafe; color: #2563eb; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
        .badge-reviewing{ background: #ede9fe; color: #7c6fa8; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }

        /* ── Activity timeline ───────────────────────────────── */
        .activity-timeline { position: relative; padding-left: 26px; }
        .activity-timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: #e2e8f0; }
        .activity-item { position: relative; margin-bottom: 18px; }
        .activity-dot { position: absolute; left: -26px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: #43afec; border: 2px solid white; box-shadow: 0 0 0 2px #43afec; }
}


@scope (html[data-page$="/nexresearch/reports/generate.php"]) {
.report-form {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .preview-card {
            background: #f8f9fa;
            border-left: 4px solid #43afec;
            margin-bottom: 15px;
        }
}


@scope (html[data-page$="/nexresearch/analytics/dashboard.php"]) {
.analytics-card {
            background: white;
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            transition: transform 0.3s;
        }
        .analytics-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.15);
        }
        .stat-badge {
            font-size: 24px;
            font-weight: bold;
            color: #43afec;
        }
        .filter-bar {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
        }
        .insight-box {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 15px;
        }
}


@scope (html[data-page$="/recruitment/index.php"]) {
.stat-card { background: white; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); height: 100%; position: relative; overflow: hidden; transition: all .25s; text-decoration: none; color: inherit; display: block; }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,.1); color: inherit; }
        .stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
        .stat-card.blue::before { background: #43afec; }
        .stat-card.green::before { background: #2a9d8f; }
        .stat-card.orange::before { background: #e76f51; }
        .stat-card.yellow::before { background: #e9b44c; }
        .stat-num { font-size: 2.2rem; font-weight: 700; line-height: 1; }
        .stat-lbl { font-size: .75rem; color: #6c757d; text-transform: uppercase; letter-spacing: .5px; margin-top: .4rem; }
        .stat-icon { font-size: 2rem; opacity: .15; position: absolute; right: 1rem; bottom: 1rem; }
        .app-row { display: flex; justify-content: space-between; align-items: center; padding: .75rem 0; border-bottom: 1px solid #f0f2f5; text-decoration: none; color: inherit; }
        .app-row:hover { background: #f8f9fa; }
        .app-name { font-weight: 600; color: #1a2a4a; }
        .app-meta { font-size: .8rem; color: #6c757d; }
        body.dark-mode .stat-card, body.dark-mode .app-row { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .stat-lbl { color: #94a3b8; }
        body.dark-mode .app-name { color: #f1f5f9; }
        body.dark-mode .app-row { border-color: #334155; }
}


@scope (html[data-page$="/nexresearch/education/view.php"]) {
.detail-card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        .detail-header {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            padding: 20px;
            border-radius: 10px 10px 0 0;
        }
        .detail-section {
            padding: 20px;
            border-bottom: 1px solid #eee;
        }
        .detail-label {
            font-weight: 600;
            color: #666;
            margin-bottom: 5px;
        }
        .detail-value {
            font-size: 16px;
            color: #333;
        }
}


@scope (html[data-page$="/nexresearch/records/view.php"]) {
.profile-header{background:linear-gradient(135deg,#43afec,#0d1333);color:white;border-radius:15px;padding:30px;margin-bottom:20px;}.info-card{background:white;border-radius:15px;padding:20px;box-shadow:0 2px 10px rgba(0,0,0,0.1);margin-bottom:20px;}.info-label{font-size:12px;text-transform:uppercase;color:#666;}
}


@scope (html[data-page$="/nexresearch/records/index.php"]) {
.stat-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: all 0.3s ease;
            text-align: center;
            height: 100%;
            position: relative;
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .stat-icon { font-size: 2rem; opacity: 0.15; position: absolute; right: 1rem; bottom: 1rem; }
        
        .status-badge {
            padding: 0.25rem 0.75rem;
            border-radius: 50px;
            font-size: 0.7rem;
            font-weight: 600;
        }
        .status-pending { background: #fff3cd; color: #856404; }
        .status-reviewing { background: #cce5ff; color: #004085; }
        .status-analyzed { background: #d4edda; color: #155724; }
        .status-published { background: #d1ecf1; color: #0c5460; }
        .status-archived { background: #e2e3e5; color: #383d41; }
        
        .record-card {
            background: white;
            border-radius: 12px;
            padding: 1rem 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            margin-bottom: 0.75rem;
            border-left: 4px solid #43afec;
        }
        .record-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.08); transform: translateX(4px); }
        .record-card .record-title { font-weight: 600; font-size: 1rem; }
        .record-card .record-meta { font-size: 0.8rem; color: #6c757d; }
        .record-card .record-meta i { margin-right: 4px; }
        
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .record-card { background: #1e293b; color: #e2e8f0; border-color: #43afec; }
        body.dark-mode .stat-label { color: #94a3b8; }
        body.dark-mode .record-card .record-meta { color: #94a3b8; }
        
        .filter-bar {
            background: white;
            border-radius: 12px;
            padding: 1rem 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            margin-bottom: 1.5rem;
        }
        body.dark-mode .filter-bar { background: #1e293b; }
        
        @media (max-width: 768px) {
            .stat-number { font-size: 1.5rem; }
        }
}


@scope (html[data-page$="/nexresearch/ai_center/run_experiment.php"]) {
.experiment-card {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .score-badge {
            font-size: 48px;
            font-weight: bold;
        }
        .output-area {
            background: #1e1e1e;
            color: #d4d4d4;
            padding: 20px;
            border-radius: 10px;
            font-family: 'Courier New', monospace;
            max-height: 500px;
            overflow-y: auto;
        }
        .param-slider {
            width: 100%;
        }
        .nav-tabs .nav-link {
            color: #43afec;
        }
        .nav-tabs .nav-link.active {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            border: none;
        }
}


@scope (html[data-page$="/nexresearch/ai_center/experiments.php"]) {
.ai-card {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .experiment-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            transition: transform 0.3s;
        }
        .experiment-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.15);
        }
        .score-high {
            color: #2a9d8f;
            font-weight: bold;
        }
        .score-medium {
            color: #e9b44c;
            font-weight: bold;
        }
        .score-low {
            color: #d96b5b;
            font-weight: bold;
        }
        .prompt-preview {
            background: #f8f9fa;
            padding: 10px;
            border-radius: 5px;
            font-size: 14px;
            max-height: 100px;
            overflow-y: auto;
        }
        .btn-run {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            border: none;
            color: white;
        }
        .btn-run:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
}


@scope (html[data-page$="/recruitment/application-view.php"]) {
.app-header { background: linear-gradient(135deg, #43afec, #0d1333); color: white; border-radius: 14px; padding: 2rem; margin-bottom: 1.5rem; }
        .info-label { font-weight: 600; color: #6c757d; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; }
        .info-value { font-size: 1rem; margin-bottom: 1rem; }
        body.dark-mode .info-label { color: #94a3b8; }
}


@scope (html[data-page$="/nexresearch/records/bulk_import.php"]) {
.format-selector {
            cursor: pointer;
            transition: all 0.3s;
        }
        .format-selector:hover {
            transform: translateY(-3px);
        }
        .format-card {
            border: 2px solid #dee2e6;
            border-radius: 10px;
            padding: 15px;
            text-align: center;
        }
        .format-card.active {
            border-color: #43afec;
            background: #f8f9ff;
        }
        pre {
            background: #f8f9fa;
            padding: 10px;
            border-radius: 5px;
            font-size: 12px;
        }
}


@scope (html[data-page$="/datalab/notebooks/view.php"]) {
.results-table { font-size: .85rem; }
        .results-table th { position: sticky; top: 0; background: #f8f9fa; }
        body.dark-mode .results-table th { background: #1e293b; }
        pre.code-block { background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: 8px; font-size: .85rem; max-height: 300px; overflow-y: auto; }
}


@scope (html[data-page$="/nexresearch/education/create.php"]) {
.required:after {
            content: " *";
            color: red;
        }
}


@scope (html[data-page$="/nexresearch/africa/view.php"]) {
.detail-card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        .detail-header {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            padding: 20px;
            border-radius: 10px 10px 0 0;
        }
        .detail-section {
            padding: 20px;
            border-bottom: 1px solid #eee;
        }
        .detail-label {
            font-weight: 600;
            color: #666;
            margin-bottom: 5px;
            font-size: 12px;
            text-transform: uppercase;
        }
        .detail-value {
            font-size: 16px;
            color: #333;
            line-height: 1.6;
        }
        .growth-badge {
            padding: 10px 15px;
            border-radius: 8px;
            font-weight: bold;
        }
        .growth-Low { background: #e9b44c; color: #333; }
        .growth-Medium { background: #43afec; color: white; }
        .growth-High { background: #2a9d8f; color: white; }
        .growth-Very\ High { background: #d96b5b; color: white; }
}


@scope (html[data-page$="/nexresearch/africa/research.php"]) {
.stat-card {
            background: #030b4e;
            color: white;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            transition: transform 0.3s;
        }
        .stat-card:hover {
            transform: translateY(-5px);
        }
        .stat-number {
            font-size: 32px;
            font-weight: bold;
        }
        .country-badge {
            background: #e9ecef;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
        }
}


@scope (html[data-page$="/email/queue.php"]) {
.stat-card { background: white; border-radius: 10px; padding: 1rem; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
        .stat-number { font-size: 1.75rem; font-weight: 700; }
        .stat-label { font-size: 0.75rem; color: #6c757d; text-transform: uppercase; }
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
}


@scope (html[data-page$="/nexresearch/africa/edit.php"]) {
.form-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .required:after {
            content: " *";
            color: red;
        }
}


@scope (html[data-page$="/email/index.php"]) {
.stat-card { background: white; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center; height: 100%; }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
}


@scope (html[data-page$="/nexresearch/africa/create.php"]) {
.form-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .required:after {
            content: " *";
            color: red;
        }
}


@scope (html[data-page$="/nexresearch/quantum/research.php"]) {
.quantum-header {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            padding: 30px;
            border-radius: 10px;
            margin-bottom: 30px;
        }
        .quantum-card {
            transition: transform 0.3s;
            border-left: 4px solid #43afec;
        }
        .quantum-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }
}


@scope (html[data-page$="/prospects/view.php"]) {
.profile-header {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            border-radius: 12px;
            padding: 2rem;
            margin-bottom: 1.5rem;
        }
        .profile-header .company-name { font-size: 2rem; font-weight: 700; }
        .detail-label { font-weight: 600; color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .detail-value { font-size: 1rem; margin-bottom: 0.75rem; }
        .score-bar { height: 8px; border-radius: 4px; background: #e9ecef; overflow: hidden; }
        .score-bar .fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
        .activity-item { padding: 0.5rem 0; border-bottom: 1px solid #f0f2f5; }
        body.dark-mode .activity-item { border-color: #334155; }
        body.dark-mode .detail-label { color: #94a3b8; }
        .followup-item { background: #f8f9fa; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 0.5rem; border-left: 3px solid #43afec; }
        body.dark-mode .followup-item { background: #1e293b; }
}


@scope (html[data-page$="/nexresearch/cybersecurity/view.php"]) {
.detail-card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        .detail-header {
            padding: 20px;
            border-radius: 10px 10px 0 0;
            color: white;
        }
        .detail-header.critical { background: linear-gradient(135deg, #d96b5b 0%, #c82333 100%); }
        .detail-header.high { background: linear-gradient(135deg, #e76f51 0%, #d96b5b 100%); }
        .detail-header.medium { background: linear-gradient(135deg, #e9b44c 0%, #e0a800 100%); color: #333; }
        .detail-header.low { background: linear-gradient(135deg, #2a9d8f 0%, #78a989 100%); }
        .detail-section {
            padding: 20px;
            border-bottom: 1px solid #eee;
        }
        .detail-label {
            font-weight: 600;
            color: #666;
            margin-bottom: 5px;
            font-size: 12px;
            text-transform: uppercase;
        }
        .detail-value {
            font-size: 16px;
            color: #333;
            line-height: 1.6;
        }
        .severity-badge {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: bold;
        }
        .score-high { background: #d96b5b; color: white; }
        .score-medium { background: #e9b44c; color: #333; }
        .score-low { background: #2a9d8f; color: white; }
}


@scope (html[data-page$="/nexresearch/cybersecurity/index.php"]) {
.stat-card {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            transition: transform 0.3s;
        }
        .stat-card.critical { background: linear-gradient(135deg, #d96b5b 0%, #c82333 100%); }
        .stat-card.high { background: linear-gradient(135deg, #e76f51 0%, #d96b5b 100%); }
        .stat-card.medium { background: linear-gradient(135deg, #e9b44c 0%, #e0a800 100%); }
        .stat-card.low { background: linear-gradient(135deg, #2a9d8f 0%, #78a989 100%); }
        .stat-number { font-size: 32px; font-weight: bold; }
        .severity-critical { background: #d96b5b; color: white; }
        .severity-high { background: #e76f51; color: white; }
        .severity-medium { background: #e9b44c; color: #333; }
        .severity-low { background: #2a9d8f; color: white; }
}


@scope (html[data-page$="/marketing/subscriber-view.php"]) {
.subscriber-header { background: linear-gradient(135deg, #43afec 0%, #0d1333 100%); color: white; border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; }
        .detail-label { font-weight: 600; color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .detail-value { font-size: 1rem; margin-bottom: 0.75rem; }
        .metric-box { background: #f8f9fa; border-radius: 8px; padding: 1rem; text-align: center; }
        .metric-value { font-size: 1.75rem; font-weight: 700; }
        .metric-label { color: #6c757d; font-size: 0.75rem; text-transform: uppercase; }
        body.dark-mode .metric-box { background: #1e293b; }
        body.dark-mode .detail-label { color: #94a3b8; }
}


@scope (html[data-page$="/prospects/index.php"]) {
.stat-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: all 0.3s ease;
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .stat-icon { font-size: 2rem; opacity: 0.2; }
        
        .status-badge {
            padding: 0.25rem 0.75rem;
            border-radius: 50px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .followup-item {
            border-left: 3px solid #43afec;
            padding: 0.75rem 1rem;
            margin-bottom: 0.5rem;
            background: #f8f9fa;
            border-radius: 4px;
        }
        .followup-item:hover { background: #e9ecef; }
        
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .followup-item { background: #1e293b; border-color: #43afec; }
        body.dark-mode .followup-item:hover { background: #2d3748; }
}


@scope (html[data-page$="/nexresearch/publications/list.php"]) {
.stat-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: all 0.3s ease;
            text-align: center;
            height: 100%;
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        
        .publication-card {
            background: white;
            border-radius: 12px;
            padding: 1rem 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            margin-bottom: 0.75rem;
            border-left: 4px solid #43afec;
        }
        .publication-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.08); transform: translateX(4px); }
        .publication-card .pub-title { font-weight: 600; font-size: 1rem; }
        .publication-card .pub-meta { font-size: 0.8rem; color: #6c757d; }
        .publication-card .pub-meta i { margin-right: 4px; }
        
        .status-badge {
            padding: 0.25rem 0.75rem;
            border-radius: 50px;
            font-size: 0.7rem;
            font-weight: 600;
        }
        .status-published { background: #d4edda; color: #155724; }
        .status-draft { background: #fff3cd; color: #856404; }
        .status-scheduled { background: #cce5ff; color: #004085; }
        
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .publication-card { background: #1e293b; color: #e2e8f0; border-color: #43afec; }
        body.dark-mode .stat-label { color: #94a3b8; }
        body.dark-mode .publication-card .pub-meta { color: #94a3b8; }
        
        .filter-bar {
            background: white;
            border-radius: 12px;
            padding: 1rem 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            margin-bottom: 1.5rem;
        }
        body.dark-mode .filter-bar { background: #1e293b; }
        
        .type-badge {
            padding: 0.2rem 0.6rem;
            border-radius: 12px;
            font-size: 0.7rem;
            background: #e9ecef;
            color: #495057;
        }
        body.dark-mode .type-badge { background: #334155; color: #e2e8f0; }
        
        @media (max-width: 768px) {
            .stat-number { font-size: 1.5rem; }
        }
}


@scope (html[data-page$="/email/inbox.php"]) {
.inbox-layout {
            display: grid;
            grid-template-columns: 220px 1fr;
            gap: 1rem;
            min-height: calc(100vh - 180px);
        }
        @media (max-width: 768px) {
            .inbox-layout { grid-template-columns: 1fr; }
        }
        
        /* Sidebar */
        .inbox-sidebar {
            background: white;
            border-radius: 12px;
            padding: 1rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            height: fit-content;
            position: sticky;
            top: 80px;
        }
        .inbox-sidebar .folder-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.6rem 0.75rem;
            border-radius: 8px;
            color: #495057;
            text-decoration: none;
            font-size: 0.9rem;
            transition: all 0.2s;
            margin-bottom: 2px;
        }
        .inbox-sidebar .folder-link:hover {
            background: #f1f3f5;
            color: #43afec;
        }
        .inbox-sidebar .folder-link.active {
            background: #43afec;
            color: white;
        }
        .inbox-sidebar .folder-link i { margin-right: 8px; }
        .inbox-sidebar .folder-count {
            font-size: 0.75rem;
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
            background: rgba(0,0,0,0.08);
        }
        .inbox-sidebar .folder-link.active .folder-count {
            background: rgba(255,255,255,0.25);
        }
        
        /* Email List */
        .inbox-list {
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            overflow: hidden;
        }
        .inbox-toolbar {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #e9ecef;
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            align-items: center;
        }
        .email-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.85rem 1rem;
            border-bottom: 1px solid #f1f3f5;
            cursor: pointer;
            transition: all 0.15s;
            text-decoration: none;
            color: inherit;
        }
        .email-row:hover {
            background: #f8f9fa;
            color: inherit;
        }
        .email-row.unread {
            background: #f0f7ff;
            font-weight: 600;
        }
        .email-row.unread .email-subject {
            color: #0a1a3a;
            font-weight: 700;
        }
        .email-row .email-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #43afec, #0d1333);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.85rem;
            flex-shrink: 0;
        }
        .email-row .email-content {
            flex: 1;
            min-width: 0;
        }
        .email-row .email-sender {
            font-size: 0.85rem;
            color: #6c757d;
            margin-bottom: 2px;
        }
        .email-row .email-subject {
            font-size: 0.95rem;
            color: #1a2a4a;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .email-row .email-preview {
            font-size: 0.8rem;
            color: #94a3b8;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .email-row .email-meta {
            text-align: right;
            font-size: 0.75rem;
            color: #94a3b8;
            flex-shrink: 0;
        }
        .email-row .email-badges {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            margin-top: 4px;
        }
        .email-row .email-badges .badge {
            font-size: 0.65rem;
            padding: 0.15rem 0.5rem;
        }
        .email-row .email-checkbox {
            flex-shrink: 0;
        }
        
        /* Empty state */
        .empty-state {
            text-align: center;
            padding: 4rem 2rem;
            color: #94a3b8;
        }
        .empty-state i {
            font-size: 4rem;
            margin-bottom: 1rem;
            opacity: 0.4;
        }
        
        /* Tabs */
        .inbox-tabs {
            display: flex;
            gap: 0.25rem;
            flex-wrap: wrap;
            border-bottom: 1px solid #e9ecef;
            padding: 0 1rem;
            background: white;
        }
        .inbox-tab {
            padding: 0.75rem 1rem;
            border-bottom: 2px solid transparent;
            color: #6c757d;
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .inbox-tab:hover {
            color: #43afec;
            border-bottom-color: #d0d7de;
        }
        .inbox-tab.active {
            color: #43afec;
            border-bottom-color: #43afec;
        }
        .inbox-tab .tab-count {
            font-size: 0.7rem;
            padding: 0.1rem 0.4rem;
            border-radius: 10px;
            background: #e9ecef;
            color: #495057;
        }
        .inbox-tab.active .tab-count {
            background: #43afec;
            color: white;
        }
        
        /* Dark mode */
        body.dark-mode .inbox-sidebar,
        body.dark-mode .inbox-list,
        body.dark-mode .inbox-tabs {
            background: #1e293b;
            color: #e2e8f0;
        }
        body.dark-mode .inbox-sidebar .folder-link {
            color: #cbd5e1;
        }
        body.dark-mode .inbox-sidebar .folder-link:hover {
            background: #334155;
            color: #8ab4f8;
        }
        body.dark-mode .inbox-toolbar {
            border-color: #334155;
        }
        body.dark-mode .inbox-toolbar .form-control,
        body.dark-mode .inbox-toolbar .form-select {
            background: #0f172a;
            border-color: #334155;
            color: #e2e8f0;
        }
        body.dark-mode .email-row {
            border-color: #334155;
            color: #cbd5e1;
        }
        body.dark-mode .email-row:hover {
            background: #0f172a;
        }
        body.dark-mode .email-row.unread {
            background: #1a2744;
        }
        body.dark-mode .email-row .email-subject {
            color: #f1f5f9;
        }
        body.dark-mode .inbox-tab {
            color: #94a3b8;
        }
        body.dark-mode .inbox-tab.active {
            color: #8ab4f8;
            border-bottom-color: #8ab4f8;
        }
        body.dark-mode .inbox-tabs {
            border-color: #334155;
        }
        
        /* Pagination */
        .inbox-pagination {
            padding: 1rem;
            border-top: 1px solid #e9ecef;
            display: flex;
            justify-content: center;
        }
        body.dark-mode .inbox-pagination {
            border-color: #334155;
        }
        
        /* Bulk toolbar */
        .bulk-toolbar {
            display: none;
            padding: 0.75rem 1rem;
            background: #eef4ff;
            border-bottom: 1px solid #d0e0ff;
            align-items: center;
            gap: 0.5rem;
        }
        .bulk-toolbar.visible {
            display: flex;
        }
        body.dark-mode .bulk-toolbar {
            background: #1a2744;
            border-color: #334155;
        }
}


@scope (html[data-page$="/nexresearch/cybersecurity/findings.php"]) {
.severity-critical { background: #d96b5b; color: white; padding: 3px 8px; border-radius: 5px; font-size: 12px; }
        .severity-high { background: #e76f51; color: white; padding: 3px 8px; border-radius: 5px; font-size: 12px; }
        .severity-medium { background: #e9b44c; color: #333; padding: 3px 8px; border-radius: 5px; font-size: 12px; }
        .severity-low { background: #2a9d8f; color: white; padding: 3px 8px; border-radius: 5px; font-size: 12px; }
        .table-critical { background-color: #fff5f5; }
        .table-high { background-color: #fff8f0; }
}


@scope (html[data-page$="/nexresearch/cybersecurity/create.php"]) {
.form-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .required:after {
            content: " *";
            color: red;
        }
}


@scope (html[data-page$="/datalab/models/view.php"]) {
.model-hero { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; border-radius: 14px; padding: 2rem; margin-bottom: 1.5rem; }
        .metric-box { background: #f8f9fa; border-radius: 10px; padding: 1rem; text-align: center; }
        .metric-value { font-size: 1.75rem; font-weight: 700; color: #22c55e; }
        body.dark-mode .metric-box { background: #1e293b; }
}


@scope (html[data-page$="/nexresearch/projects/list.php"]) {
.project-card {
            transition: transform 0.2s;
            margin-bottom: 20px;
            border-left: 4px solid #43afec;
        }
        .project-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }
        .status-badge {
            font-size: 11px;
            padding: 3px 8px;
        }
}


@scope (html[data-page$="/prospects/edit.php"]) {
.form-section { background: #f8f9fa; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
        body.dark-mode .form-section { background: #1e293b; }
}


@scope (html[data-page$="/nexresearch/projects/edit.php"]) {
.form-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .required:after {
            content: " *";
            color: red;
        }
}


@scope (html[data-page$="/marketing/social-media.php"]) {
.platform-badge{padding:.4rem .8rem;border-radius:50px;color:white;font-weight:600;}
}


@scope (html[data-page$="/nexresearch/datasets/view.php"]) {
.stats-card {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
        }
        .stats-number { font-size: 1.8rem; font-weight: bold; }
        .filter-bar { background: #f8f9fa; border-radius: 12px; padding: 1rem; margin-bottom: 1.5rem; }
        body.dark-mode .filter-bar { background: #1e293b; }
        .table-responsive { border-radius: 12px; overflow: hidden; }
        .btn-group-sm > .btn { padding: 0.25rem 0.5rem; }
}


@scope (html[data-page$="/nexresearch/projects/create.php"]) {
.form-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .required:after {
            content: " *";
            color: red;
        }
}


@scope (html[data-page$="/marketing/seo.php"]) {
.stat-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            text-align: center;
            height: 100%;
        }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .seo-score {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            font-weight: 700;
            font-size: 1rem;
            color: white;
        }
        .score-a { background: #2a9d8f; }
        .score-b { background: #43afec; }
        .score-c { background: #e9b44c; color: #000; }
        .score-d { background: #d96b5b; }
        .page-row:hover { background: #f8f9fa; }
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .stat-label { color: #94a3b8; }
        body.dark-mode .page-row:hover { background: #1e293b; }
        .seo-issue { font-size: 0.85rem; padding: 0.25rem 0; }
        .preview-box {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 1rem;
            border-left: 3px solid #43afec;
        }
        body.dark-mode .preview-box { background: #1e293b; }
        .preview-title { color: #1a0dab; font-size: 1.1rem; font-weight: 500; }
        .preview-url { color: #006621; font-size: 0.85rem; }
        .preview-desc { color: #545454; font-size: 0.9rem; line-height: 1.5; }
        body.dark-mode .preview-title { color: #8ab4f8; }
        body.dark-mode .preview-url { color: #81c995; }
        body.dark-mode .preview-desc { color: #bdc1c6; }
}


@scope (html[data-page$="/marketing/index.php"]) {
.stat-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: all 0.3s ease;
            height: 100%;
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .stat-icon { font-size: 2rem; opacity: 0.15; position: absolute; right: 1rem; bottom: 1rem; }
        
        .campaign-card {
            background: white;
            border-radius: 12px;
            padding: 1rem 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            margin-bottom: 0.75rem;
            border-left: 4px solid #43afec;
        }
        .campaign-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.08); transform: translateX(4px); }
        
        .metric-card {
            background: white;
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        .metric-value { font-size: 1.5rem; font-weight: 700; }
        .metric-label { color: #6c757d; font-size: 0.7rem; text-transform: uppercase; }
        
        body.dark-mode .stat-card,
        body.dark-mode .campaign-card,
        body.dark-mode .metric-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .stat-label,
        body.dark-mode .metric-label { color: #94a3b8; }
        
        @media (max-width: 768px) {
            .stat-number { font-size: 1.5rem; }
        }
}


@scope (html[data-page$="/prospects/add.php"]) {
.form-section { background: #f8f9fa; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
        body.dark-mode .form-section { background: #1e293b; }
}


@scope (html[data-page$="/marketing/campaign-add.php"]) {
.form-section { background: #f8f9fa; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
        body.dark-mode .form-section { background: #1e293b; }
}


@scope (html[data-page$="/marketing/calendar.php"]) {
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
        .calendar-day { background: white; border: 1px solid #e9ecef; border-radius: 6px; padding: 6px; min-height: 90px; font-size: 0.8rem; }
        .calendar-day.empty { background: #f8f9fa; }
        .calendar-day .day-num { font-weight: 700; color: #43afec; }
        .calendar-event { background: #e0ecff; border-radius: 4px; padding: 2px 4px; margin-top: 3px; font-size: 0.7rem; cursor: pointer; }
        .calendar-weekday { font-weight: 700; text-align: center; padding: 6px; color: #6c757d; font-size: 0.8rem; }
        body.dark-mode .calendar-day { background: #1e293b; border-color: #334155; }
        body.dark-mode .calendar-day.empty { background: #0f172a; }
        body.dark-mode .calendar-event { background: #334155; }
}


@scope (html[data-page$="/datalab/index.php"]) {
.stat-card { background: white; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: all .25s; height: 100%; cursor: pointer; text-decoration: none; color: inherit; display: block; }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,.1); color: inherit; }
        .stat-icon { font-size: 2rem; opacity: .25; position: absolute; right: 1rem; bottom: 1rem; }
        .stat-num { font-size: 2.2rem; font-weight: 700; line-height: 1; }
        .stat-lbl { font-size: .75rem; color: #6c757d; text-transform: uppercase; letter-spacing: .5px; margin-top: .35rem; }
        .notebook-card { background: white; border-radius: 10px; padding: 1rem; margin-bottom: .75rem; border-left: 4px solid #43afec; transition: all .2s; }
        .notebook-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
        .model-card { background: white; border-radius: 10px; padding: 1rem; margin-bottom: .5rem; border-left: 4px solid #22c55e; }
        body.dark-mode .stat-card, body.dark-mode .notebook-card, body.dark-mode .model-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .stat-lbl { color: #94a3b8; }
}


@scope (html[data-page$="/marketing/campaign-view.php"]) {
.campaign-header{background:linear-gradient(135deg,#43afec,#0d1333);color:white;border-radius:12px;padding:2rem;margin-bottom:1.5rem;}
        .detail-label{font-weight:600;color:#6c757d;font-size:.8rem;text-transform:uppercase;letter-spacing:.5px;}
        .metric-box{background:#f8f9fa;border-radius:8px;padding:1rem;text-align:center;}
        .metric-value{font-size:1.75rem;font-weight:700;}
        body.dark-mode .metric-box{background:#1e293b;}
        body.dark-mode .detail-label{color:#94a3b8;}
}


@scope (html[data-page$="/nexresearch/datasets/list.php"]) {
.dataset-card {
            background: white;
            border-radius: 15px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            overflow: hidden;
            margin-bottom: 20px;
        }
        .dataset-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        }
        .dataset-header {
            background: linear-gradient(135deg, #43afec 0%, #0d1333 100%);
            color: white;
            padding: 20px;
            position: relative;
        }
        .dataset-icon {
            font-size: 48px;
            margin-bottom: 10px;
        }
        .dataset-name {
            font-size: 18px;
            font-weight: bold;
            margin: 10px 0;
        }
        .dataset-stats {
            padding: 15px;
            border-bottom: 1px solid #eee;
        }
        .dataset-actions {
            padding: 15px;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        .stat-badge {
            background: #f8f9fa;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
        }
        .progress {
            height: 4px;
            border-radius: 2px;
        }
        body.dark-mode .dataset-card {
            background: #1e293b;
        }
        body.dark-mode .stat-badge {
            background: #0f172a;
            color: #fff;
        }
        .upload-area {
            border: 2px dashed #43afec;
            border-radius: 15px;
            padding: 40px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: rgba(102, 126, 234, 0.05);
        }
        .upload-area:hover {
            background: rgba(102, 126, 234, 0.1);
            border-color: #0d1333;
        }
        .upload-area.dragover {
            background: rgba(102, 126, 234, 0.2);
            border-color: #0d1333;
        }
}


@scope (html[data-page$="/marketing/campaign-edit.php"]) {
.form-section{background:#f8f9fa;border-radius:12px;padding:1.25rem;margin-bottom:1.25rem;} body.dark-mode .form-section{background:#1e293b;}
}


@scope (html[data-page$="/nexresearch/datasets/index.php"]) {
:root {
            --primary: #43afec;
            --primary-dark: #2da8e8;
            --success: #2a9d8f;
            --warning: #e9b44c;
            --danger: #d96b5b;
            --dark: #1a1a2e;
            --gray: #6c757d;
            --light: #f8f9fa;
        }
        
        body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f0f2f5; }
        
        .stat-card {
            background: white;
            border-radius: 20px;
            padding: 1.5rem;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            border: 1px solid rgba(0,0,0,0.05);
            position: relative;
            overflow: hidden;
        }
        .stat-card::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--primary-dark));
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2.2rem; font-weight: 700; margin: 0.5rem 0; }
        .stat-label { color: var(--gray); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
        
        .dataset-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            height: 100%;
            border: 1px solid rgba(0,0,0,0.05);
        }
        .dataset-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
        .dataset-header {
            padding: 1.25rem;
            color: white;
            position: relative;
        }
        .dataset-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
        .dataset-name { font-size: 1.1rem; font-weight: 600; margin: 0; line-height: 1.3; }
        .dataset-meta { font-size: 0.75rem; opacity: 0.9; margin-top: 0.5rem; }
        .dataset-stats { padding: 1rem; border-bottom: 1px solid #eee; background: #fafafa; }
        .dataset-actions { padding: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
        .stat-badge {
            background: #f0f0f0;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 500;
        }
        
        .upload-zone {
            border: 2px dashed #cbd5e1;
            border-radius: 16px;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: #fafbfc;
        }
        .upload-zone:hover, .upload-zone.drag-over {
            border-color: var(--primary);
            background: rgba(67, 175, 236, 0.05);
        }
        
        .filter-bar {
            background: white;
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        
        .pagination {
            gap: 0.25rem;
        }
        .page-link {
            border-radius: 8px;
            border: none;
            padding: 0.5rem 1rem;
            color: var(--dark);
        }
        .page-item.active .page-link {
            background: var(--primary);
            color: white;
        }
        
        @media (max-width: 768px) {
            .stat-number { font-size: 1.5rem; }
            .dataset-actions { flex-direction: column; }
            .dataset-actions .btn { width: 100%; }
        }
        
        body.dark-mode {
            background: #0f172a;
        }
        body.dark-mode .stat-card,
        body.dark-mode .dataset-card,
        body.dark-mode .filter-bar {
            background: #1e293b;
            border-color: #334155;
            color: #e2e8f0;
        }
        body.dark-mode .dataset-stats {
            background: #0f172a;
            border-color: #334155;
        }
        body.dark-mode .stat-badge {
            background: #334155;
            color: #e2e8f0;
        }
}


@scope (html[data-page$="/partners/view.php"]) {
.partner-header {
            background: linear-gradient(135deg, #1385f0 0%, #02082b 100%);
            color: white;
            padding: 30px;
            border-radius: 10px;
            margin-bottom: 20px;
        }
        .info-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .stat-box {
            text-align: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
            margin-bottom: 15px;
        }
        .stat-number {
            font-size: 28px;
            font-weight: bold;
            color: #43afec;
        }
}


@scope (html[data-page$="/partners/create.php"]) {
.form-section {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .section-title {
            border-left: 4px solid #43afec;
            padding-left: 15px;
            margin-bottom: 20px;
            color: #333;
        }
        .required:after {
            content: " *";
            color: red;
        }
        .logo-preview {
            max-width: 150px;
            max-height: 150px;
            margin-top: 10px;
            border-radius: 10px;
            border: 1px solid #ddd;
            padding: 5px;
        }
}


@scope (html[data-page$="/leads-customers/view.php"]) {
.profile-header {
            background: linear-gradient(135deg, #13b1f0 0%, #020331 100%);
            color: white;
            padding: 30px;
            border-radius: 10px;
            margin-bottom: 20px;
        }
        .info-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .detail-label {
            font-weight: 600;
            color: #666;
            font-size: 12px;
            text-transform: uppercase;
            margin-bottom: 5px;
        }
        .detail-value {
            font-size: 16px;
            color: #333;
            margin-bottom: 15px;
        }
}


@scope (html[data-page$="/cybersecurity/index.php"]) {
.soc-stat { background: white; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); height: 100%; position: relative; overflow: hidden; transition: all .25s; text-decoration: none; color: inherit; display: block; }
        .soc-stat:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,.1); color: inherit; }
        .soc-stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
        .soc-stat.danger::before { background: #d96b5b; }
        .soc-stat.warning::before { background: #e9b44c; }
        .soc-stat.info::before { background: #43afec; }
        .soc-stat.success::before { background: #2a9d8f; }
        .soc-num { font-size: 2rem; font-weight: 700; line-height: 1; }
        .soc-lbl { font-size: .75rem; color: #6c757d; text-transform: uppercase; letter-spacing: .5px; margin-top: .4rem; }
        .soc-icon { font-size: 2rem; opacity: .15; position: absolute; right: 1rem; bottom: 1rem; }
        .incident-row { border-left: 4px solid; padding: .5rem 0 .5rem .75rem; margin-bottom: .5rem; }
        body.dark-mode .soc-stat { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .soc-lbl { color: #94a3b8; }
}


@scope (html[data-page$="/leads-customers/pipeline.php"]) {
.pipeline-column {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 15px;
            min-height: 500px;
        }
        .pipeline-card {
            background: white;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 12px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            cursor: move;
            transition: transform 0.2s;
        }
        .pipeline-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        }
        .column-header {
            background: white;
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 15px;
            text-align: center;
            font-weight: bold;
        }
        .drag-over {
            background: #e9ecef;
        }
}


@scope (html[data-page$="/organigram/index.php"]) {
body { background: #f0f2f5; }
        .org-hero { background: linear-gradient(135deg, #43afec, #0d1333); color: white; border-radius: 16px; padding: 3rem 2rem; margin-bottom: 2rem; }
        .org-hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: .5rem; }
        
        /* Executive card */
        .exec-card {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            text-align: center;
            box-shadow: 0 4px 15px rgba(0,0,0,.08);
            border-top: 4px solid #d96b5b;
            max-width: 400px;
            margin: 0 auto 2rem;
        }
        .exec-card .exec-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, #43afec, #0d1333);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            margin: 0 auto 1rem;
        }
        .exec-card .exec-title { font-size: 1.25rem; font-weight: 700; color: #1a2a4a; }
        .exec-card .exec-name { color: #6c757d; margin-top: .25rem; }
        
        /* Connector lines */
        .connector { height: 40px; width: 2px; background: #cbd5e1; margin: 0 auto; }
        
        /* Dept cards */
        .dept-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,.06);
            transition: all .25s;
            height: 100%;
            text-decoration: none;
            color: inherit;
            display: block;
            border-top: 4px solid;
            position: relative;
            overflow: hidden;
        }
        .dept-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 30px rgba(0,0,0,.12);
            color: inherit;
        }
        .dept-code {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 2.5rem;
            font-weight: 800;
            opacity: .1;
        }
        .dept-name { font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; }
        .dept-purpose { font-size: .85rem; color: #6c757d; margin-bottom: .75rem; line-height: 1.4; }
        .dept-stats { display: flex; gap: 1rem; flex-wrap: wrap; padding-top: .75rem; border-top: 1px solid #f0f2f5; }
        .dept-stat { font-size: .75rem; color: #6c757d; }
        .dept-stat strong { display: block; font-size: 1.1rem; color: #1a2a4a; margin-bottom: .1rem; }
        
        /* Division pills */
        .division-pill {
            display: inline-block;
            padding: .4rem 1rem;
            border-radius: 20px;
            background: white;
            box-shadow: 0 2px 8px rgba(0,0,0,.06);
            font-size: .85rem;
            font-weight: 600;
            color: #1a2a4a;
            text-decoration: none;
            margin: .25rem;
            transition: all .2s;
        }
        .division-pill:hover { background: #43afec; color: white; }
        .division-pill .code { font-size: .65rem; color: #6c757d; margin-left: .3rem; }
        .division-pill:hover .code { color: white; }
        
        body.dark-mode { background: #0f172a; }
        body.dark-mode .org-hero { background: linear-gradient(135deg, #1e40af, #4c1d95); }
        body.dark-mode .exec-card, body.dark-mode .dept-card, body.dark-mode .division-pill { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .exec-card .exec-title, body.dark-mode .dept-name, body.dark-mode .dept-stat strong { color: #f1f5f9; }
        body.dark-mode .dept-purpose, body.dark-mode .dept-stat, body.dark-mode .exec-card .exec-name { color: #94a3b8; }
        body.dark-mode .dept-stats { border-color: #334155; }
        body.dark-mode .connector { background: #334155; }
}


@scope (html[data-page$="/leads-customers/index.php"]) {
.stat-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            transition: transform 0.3s;
            cursor: pointer;
        }
        .stat-card:hover {
            transform: translateY(-5px);
        }
        .stat-icon {
            font-size: 48px;
            color: #43afec;
        }
        .stat-number {
            font-size: 32px;
            font-weight: bold;
        }
        .activity-timeline {
            position: relative;
            padding-left: 30px;
        }
        .activity-item {
            position: relative;
            padding-bottom: 20px;
            border-left: 2px solid #e9ecef;
            padding-left: 20px;
        }
        .activity-item:before {
            content: '';
            position: absolute;
            left: -8px;
            top: 0;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #43afec;
        }
}


@scope (html[data-page$="/organigram/structure.php"]) {
.org-node {
            background: white;
            border-radius: 10px;
            padding: 1rem;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0,0,0,.08);
            margin-bottom: 1rem;
            border-top: 3px solid #43afec;
        }
        .org-node.l1 { background: linear-gradient(135deg,#d96b5b,#c82333); color: white; border: none; }
        .org-node.l2 { background: #43afec; color: white; border: none; }
        .org-node.l3 { background: #f8f9fa; border-top-color: #6c757d; }
        .arrow-down { text-align: center; color: #cbd5e1; font-size: 1.5rem; margin: .25rem 0; }
        body.dark-mode .org-node.l3 { background: #1e293b; color: #e2e8f0; }
}


@scope (html[data-page$="/leads-customers/edit.php"]) {
.form-section {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .section-title {
            border-left: 4px solid #43afec;
            padding-left: 15px;
            margin-bottom: 20px;
            color: #333;
        }
        .required:after {
            content: " *";
            color: red;
        }
}


@scope (html[data-page$="/datalab/experiments/compare.php"]) {
.better { color: #2a9d8f; font-weight: 700; }
        .worse { color: #d96b5b; }
}


@scope (html[data-page$="/leads-customers/create.php"]) {
.form-section {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .section-title {
            border-left: 4px solid #43afec;
            padding-left: 15px;
            margin-bottom: 20px;
            color: #333;
        }
        .required:after {
            content: " *";
            color: red;
        }
        .nav-tabs .nav-link {
            color: #333;
            font-weight: 500;
        }
        .nav-tabs .nav-link.active {
            color: #43afec;
            border-bottom: 2px solid #43afec;
        }
}


@scope (html[data-page$="/leads-customers/analytics.php"]) {
.stat-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: all 0.3s ease;
            text-align: center;
            height: 100%;
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .stat-label { color: #94a3b8; }
        
        .status-dot {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 6px;
        }
        
        @media (max-width: 768px) {
            .stat-number { font-size: 1.5rem; }
        }
}


@scope (html[data-page$="/analytics/widgets.php"]) {
body { background: transparent; margin: 0; padding: 0.75rem; }
        .widget { border: 1px solid #dfe4e2; border-radius: 8px; padding: 1rem; background: white; box-shadow: none; color: #28343d; }
        body.dark-mode .widget { background: #1e293b; }
        .metric-big { font-size: 2rem; font-weight: 600; line-height: 1; }
}


@scope (html[data-page$="/analytics/reports.php"]) {
.report-section { background: white; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
        body.dark-mode .report-section { background: #1e293b; color: #e2e8f0; }
}


@scope (html[data-page$="/operations/index.php"]) {
.stat-card { background: white; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); height: 100%; transition: all 0.2s; }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .activity-item { padding: 0.75rem 0; border-bottom: 1px solid #f0f2f5; }
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .activity-item { border-color: #334155; }
}


@scope (html[data-page$="/automation/index.php"]) {
.stat-card{background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 2px 8px rgba(0,0,0,.06);height:100%;}
        .stat-number{font-size:2rem;font-weight:700;}
        .stat-label{color:#6c757d;font-size:.8rem;text-transform:uppercase;}
        body.dark-mode .stat-card{background:#1e293b;color:#e2e8f0;}
}


@scope (html[data-page$="/analytics/custom-query.php"]) {
.query-editor { font-family: 'Courier New', monospace; font-size: 0.9rem; }
}


@scope (html[data-page$="/automation/workflow-view.php"]) {
.wf-header{background:linear-gradient(135deg,#43afec,#0d1333);color:#fff;border-radius:12px;padding:2rem;margin-bottom:1.5rem;}
        .detail-label{font-weight:600;color:#6c757d;font-size:.75rem;text-transform:uppercase;}
        .action-card{border-left:3px solid #43afec;padding:.75rem 1rem;background:#f8f9fa;margin-bottom:.5rem;border-radius:6px;}
        body.dark-mode .action-card{background:#1e293b;}
}


@scope (html[data-page$="/operations/calendar.php"]) {
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
        .cal-day { background: white; border: 1px solid #e9ecef; border-radius: 6px; padding: 6px; min-height: 100px; font-size: 0.8rem; }
        .cal-day.empty { background: #f8f9fa; }
        .cal-day .day-num { font-weight: 700; color: #43afec; margin-bottom: 4px; }
        .cal-event { border-radius: 4px; padding: 2px 4px; margin-bottom: 2px; font-size: 0.7rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .cal-event.task { background: #e0ecff; }
        .cal-event.project { background: #fce8e6; }
        .cal-weekday { font-weight: 700; text-align: center; padding: 6px; color: #6c757d; font-size: 0.8rem; }
        body.dark-mode .cal-day { background: #1e293b; border-color: #334155; }
        body.dark-mode .cal-day.empty { background: #0f172a; }
        body.dark-mode .cal-event.task { background: #1e3a5f; color: #e2e8f0; }
        body.dark-mode .cal-event.project { background: #5c1e1e; color: #e2e8f0; }
}


@scope (html[data-page$="/operations/asset-view.php"]) {
.asset-header { background: linear-gradient(135deg, #43afec, #0d1333); color: white; border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; }
        .detail-label { font-weight: 600; color: #6c757d; font-size: 0.75rem; text-transform: uppercase; }
}


@scope (html[data-page$="/operations/project-view.php"]) {
.project-header { background: linear-gradient(135deg, #43afec, #0d1333); color: white; border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; }
        .detail-label { font-weight: 600; color: #6c757d; font-size: 0.75rem; text-transform: uppercase; }
}


@scope (html[data-page$="/operations/reports.php"]) {
.stat-card { background: white; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center; height: 100%; }
        .stat-number { font-size: 2rem; font-weight: 700; }
        .stat-label { color: #6c757d; font-size: 0.8rem; text-transform: uppercase; }
        body.dark-mode .stat-card { background: #1e293b; color: #e2e8f0; }
}


@scope (html[data-page$="/operations/vendor-view.php"]) {
.vendor-header { background: linear-gradient(135deg, #43afec, #0d1333); color: white; border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; }
        .detail-label { font-weight: 600; color: #6c757d; font-size: 0.75rem; text-transform: uppercase; }
}


@scope (html[data-page$="/auth/login.php"]) {
body {
            background: #f1f3f5;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
        }
        .login-card {
            background: white;
            border: 1px solid #e1e5ea;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(24,39,56,.08);
            overflow: hidden;
            width: 100%;
            max-width: 450px;
        }
        .login-header {
            background: #244b70;
            color: white;
            padding: 30px;
            text-align: center;
        }
        .login-header h3 {
            margin: 0;
            font-weight: 600;
        }
        .login-header p {
            margin: 10px 0 0;
            opacity: 0.9;
        }
        .login-body {
            padding: 40px;
        }
        .form-group {
            margin-bottom: 20px;
        }
        .form-group label {
            font-weight: 500;
            margin-bottom: 8px;
            display: block;
            color: #333;
        }
        .input-group-text {
            background: #f8f9fa;
        }
        .btn-login {
            background: #315f85;
            border: none;
            padding: 12px;
            font-weight: 600;
            font-size: 16px;
            width: 100%;
            transition: background-color 0.15s ease;
        }
        .btn-login:hover {
            background: #274c6b;
        }
        .alert {
            border-radius: 10px;
            margin-bottom: 20px;
        }
        .info-text {
            margin-top: 20px;
            font-size: 14px;
            color: #666;
        }
}


@scope (html[data-page$="/auth/view_logs.php"]) {
.stats-card {
            background: linear-gradient(135deg, #43afec 0%, #2da8e8 100%);
            color: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            transition: transform 0.3s;
        }
        .stats-card:hover {
            transform: translateY(-5px);
        }
        .stats-number {
            font-size: 32px;
            font-weight: bold;
        }
        .stats-label {
            font-size: 14px;
            opacity: 0.9;
        }
        .filter-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .log-table-container {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .badge-action {
            font-size: 12px;
            padding: 5px 10px;
        }
        .action-create_entity { background-color: #2a9d8f; }
        .action-update_entity { background-color: #43afec; }
        .action-soft_delete_entity { background-color: #d96b5b; }
        .action-login { background-color: #43afec; }
        .action-logout { background-color: #6c757d; }
        .action-create_user { background-color: #78a989; }
        .action-update_user { background-color: #e76f51; }
        .detail-preview {
            max-width: 300px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
        }
        .detail-preview:hover {
            white-space: normal;
            overflow: visible;
            background: #f8f9fa;
            position: absolute;
            z-index: 1000;
            padding: 10px;
            border-radius: 5px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            max-width: 500px;
        }
        .export-btn {
            background: linear-gradient(135deg, #43afec 0%, #2da8e8 100%);
            border: none;
            color: white;
        }
        .clear-filters {
            background: #6c757d;
            color: white;
        }
        @media print {
            .filter-card, .stats-card, .btn, .pagination, .no-print {
                display: none;
            }
            .log-table-container {
                box-shadow: none;
                padding: 0;
            }
        }
}


@scope (html[data-page$="/auth/set-password.php"]) {
body{font-family:Inter,system-ui,sans-serif;background:#f4f6f8}.setup-card{max-width:440px;border:1px solid #e3e8ed;border-radius:12px;box-shadow:0 8px 28px rgba(26,39,52,.07)}
}


@scope (html[data-page$="/auth/user-profile.php"]) {
.profile-avatar { width: 112px; height: 112px; object-fit: cover; border-radius: 50%; }
        .profile-initials { display: inline-flex; align-items: center; justify-content: center; background: #e8f0fe; color: #174ea6; font-size: 2rem; font-weight: 700; }
        .profile-header { background: linear-gradient(120deg, #f8fbff, #eef4ff); }
}


@scope (html[data-page$="/auth/my-profile.php"]) {
.profile-hero { border: 0; border-radius: 16px; background: linear-gradient(120deg, #f8fbff, #eef4ff); }
        .profile-photo { width: 104px; height: 104px; flex: 0 0 104px; object-fit: cover; border-radius: 50%; }
        .profile-initials { display: grid; place-items: center; background: #dceaff; color: #174ea6; font-size: 2rem; font-weight: 700; }
        .profile-detail dt { color: #64748b; font-size: .82rem; font-weight: 600; }
        .profile-detail dd { margin-bottom: 0; overflow-wrap: anywhere; }
        @media (max-width: 575.98px) { .profile-photo { width: 80px; height: 80px; flex-basis: 80px; } }
}


@scope (html[data-page$="/operations/task-view.php"]) {
.task-header { background: linear-gradient(135deg, #43afec, #0d1333); color: white; border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; }
        .detail-label { font-weight: 600; color: #6c757d; font-size: 0.75rem; text-transform: uppercase; }
}


@scope (html[data-page$="/operations/ticket-view.php"]) {
.ticket-header { background: linear-gradient(135deg, #43afec, #0d1333); color: white; border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; }
        .comment-item { padding: 1rem; border-left: 3px solid #43afec; background: #f8f9fa; border-radius: 8px; margin-bottom: 0.75rem; }
        body.dark-mode .comment-item { background: #1e293b; }
}


@scope (html[data-page$="/cybersecurity/alerts/view.php"]) {
.detail-label { font-weight: 600; color: #6c757d; font-size: .75rem; text-transform: uppercase; }
}


@scope (html[data-page$="/cybersecurity/incidents/view.php"]) {
.detail-label { font-weight: 600; color: #6c757d; font-size: .75rem; text-transform: uppercase; }
        .timeline { position: relative; padding-left: 30px; }
        .timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: #dee2e6; }
        .timeline-item { position: relative; padding-bottom: 1.5rem; }
        .timeline-item::before { content: ''; position: absolute; left: -26px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #43afec; border: 2px solid white; }
}


@scope (html[data-page$="/cybersecurity/incidents/timeline.php"]) {
.timeline { position: relative; padding-left: 40px; }
        .timeline::before { content: ''; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, #d96b5b, #43afec); }
        .timeline-item { position: relative; margin-bottom: 1.75rem; }
        .timeline-marker {
            position: absolute;
            left: -40px;
            top: 0;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: .8rem;
            border: 3px solid white;
            box-shadow: 0 0 0 2px currentColor;
        }
        .timeline-body {
            background: white;
            border-radius: 8px;
            padding: .85rem 1rem;
            box-shadow: 0 2px 8px rgba(0,0,0,.06);
            border-left: 3px solid;
        }
        body.dark-mode .timeline-body { background: #1e293b; color: #e2e8f0; }
        body.dark-mode .timeline-marker { border-color: #1e293b; }
}

/* Platform-wide visual system: neutral surfaces, one brand accent, restrained depth. */
html[data-page] {
    --ui-brand: #43afec;
    --ui-ink: #18232d;
    --ui-muted: #66727e;
    --ui-surface: #ffffff;
    --ui-surface-subtle: #f5f7f9;
    --ui-border: #e1e6eb;
    --ui-shadow: 0 1px 3px rgba(20, 35, 48, .07);
}

html[data-page] :is(.profile-header, .profile-hero, .dept-header, .partner-header, .org-hero,
    .ticket-header, .task-header, .project-header, .vendor-header, .asset-header,
    .campaign-header, .subscriber-header, .model-hero, .detail-header, .alert-hero,
    .incident-header, .notif-hero, .report-header, .dataset-header, .app-header,
    .knowledge-header, .quantum-header, .wf-header, .insight-box, .featured-card,
    .research-card, .ai-card, .stats-card, .stat-card, .module-tile, .dataset-card,
    .info-card, .metric-card, .experiment-card, .filter-card, .welcome-banner) {
    color: var(--ui-ink) !important;
    background: var(--ui-surface) !important;
    background-image: none !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 8px !important;
    box-shadow: var(--ui-shadow) !important;
}

html[data-page] :is(.profile-header, .profile-hero, .dept-header, .partner-header, .org-hero,
    .ticket-header, .task-header, .project-header, .vendor-header, .asset-header,
    .campaign-header, .subscriber-header, .model-hero, .detail-header, .alert-hero,
    .incident-header, .notif-hero, .report-header, .dataset-header, .app-header,
    .knowledge-header, .quantum-header, .wf-header, .insight-box, .featured-card,
    .research-card, .ai-card, .stats-card, .stat-card, .module-tile, .dataset-card,
    .info-card, .metric-card, .experiment-card, .filter-card, .welcome-banner)
    :is(h1, h2, h3, h4, h5, p, span, small, .text-white, .text-white-50) {
    color: inherit !important;
}

html[data-page] :is(.research-card, .ai-card, .stats-card, .stat-card, .module-tile,
    .dataset-card, .info-card, .metric-card, .experiment-card, .filter-card):hover {
    transform: none !important;
    box-shadow: var(--ui-shadow) !important;
    border-color: #c8d3dc !important;
}

html[data-page] [style*="gradient"], html[data-page] .bg-gradient {
    background-color: var(--ui-surface) !important;
    background-image: none !important;
    color: var(--ui-ink) !important;
}

html[data-page] :is(.badge.bg-primary, .badge.bg-info, .badge.bg-gradient) {
    background: #edf6fb !important;
    color: #17658e !important;
}

html[data-page] .badge.bg-success { background: #e6f3ef !important; color: #207565 !important; }
html[data-page] .badge.bg-warning { background: #fbf2dd !important; color: #815d0b !important; }
html[data-page] .badge.bg-danger { background: #f8e9e6 !important; color: #ad493d !important; }
html[data-page] .badge.bg-secondary { background: #edf0f2 !important; color: #53616b !important; }

html[data-page] :is(.modal-header, .card-header, .panel-header) {
    background-image: none !important;
    box-shadow: none !important;
}

html[data-page] :is(.card, .modal-content, .dropdown-menu, .table-responsive) {
    border-radius: 8px;
    box-shadow: var(--ui-shadow);
}

html[data-page] :is(.btn-success, .btn-warning, .btn-info) {
    color: #17638a !important;
    background: #edf6fb !important;
    border-color: #d4e8f3 !important;
}

html[data-page] :is(.btn-success, .btn-warning, .btn-info):hover {
    background: #deeff8 !important;
}

html[data-page] .text-primary,
html[data-page] a:not(.btn):not(.nav-link) { color: #0d1333; }

html[data-page].dark-mode,
html[data-page] body.dark-mode,
body.dark-mode html[data-page] {
    --ui-ink: #e4ebf0;
    --ui-muted: #a3b0bb;
    --ui-surface: #17212a;
    --ui-surface-subtle: #202c36;
    --ui-border: #33434f;
    --ui-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}

/* Final shared polish for every authenticated module and the Research shell. */
:root {
    --bs-body-font-weight: 400;
    --bs-body-color: #26323b;
    --bs-body-bg: #f4f6f8;
    --bs-border-color: #e2e7eb;
    --ui-canvas: #f4f6f8;
    --ui-surface-muted: #f8fafb;
    --ui-ink: #26323b;
    --ui-muted: #68747e;
    --ui-subtle: #87929b;
    --ui-border: #e2e7eb;
    --ui-border-strong: #cbd4db;
    --ui-radius-sm: 4px;
    --ui-radius: 6px;
    --ui-radius-lg: 8px;
    --ui-shadow: 0 1px 3px rgba(27, 39, 49, .055);
}

html[data-page] body {
    background-color: var(--ui-canvas);
    color: var(--ui-ink);
    font-weight: 400;
}

html[data-page] :is(h1, h2, h3, h4, h5, h6, .fw-bold, .fw-semibold) {
    color: var(--ui-brand-navy);
    font-weight: 600;
    letter-spacing: -.012em;
}

html[data-page] :is(.app-topbar, .navbar, .topbar) {
    background-color: var(--ui-surface);
    border-color: var(--ui-border);
    box-shadow: 0 1px 2px rgba(27, 39, 49, .04);
}

html[data-page] .app-topbar {
    padding-inline: clamp(14px, 2vw, 24px);
}

html[data-page] .app-sidebar {
    color: #dce3e9;
    background: #0d1333;
    border-color: #192348;
    scrollbar-color: #52616c transparent;
}

html[data-page] .app-sidebar .nav-link {
    min-height: 41px;
    border-radius: 5px;
    color: #fff !important;
    font-weight: 500;
}

html[data-page] .app-sidebar .nav-link > .bi {
    color: #43afec;
}

html[data-page] .app-sidebar .nav-link:hover,
html[data-page] .app-sidebar .nav-link:focus-visible {
    background: #172044;
    color: #fff !important;
}

html[data-page] .app-sidebar .nav-link.active {
    border-left-color: var(--ui-brand);
    background: #1d2a52;
    color: #fff !important;
}

html[data-page] .app-sidebar .dropdown-menu {
    border: 1px solid #202b54;
    border-left: 2px solid rgba(67, 175, 236, .6);
    border-radius: 0 6px 6px 0;
    background: #090f29;
    box-shadow: none;
}
html[data-page] .app-sidebar .dropdown-item {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 4px;
    color: #c6d0dc;
}
html[data-page] .app-sidebar .dropdown-item:hover,
html[data-page] .app-sidebar .dropdown-item:focus-visible {
    color: #fff;
    background: #172044;
}
html[data-page] .app-sidebar .dropdown-item:focus-visible {
    outline: 2px solid #43afec;
    outline-offset: -2px;
}
html[data-page] .app-sidebar .dropdown-item.active {
    color: #fff;
    background: #1d2a52;
    box-shadow: inset 2px 0 #43afec;
}
html[data-page] .app-sidebar .dropdown-item.active > .bi { color: #43afec; }
html[data-page] .app-sidebar .nav-link.dropdown-toggle[aria-expanded="true"] {
    color: #fff;
    background: #172044;
}
html[data-page] .app-sidebar .nav-link.dropdown-toggle[aria-expanded="true"]::after {
    color: #43afec;
    opacity: 1;
    transform: rotate(180deg);
}
html[data-page] .app-main { max-width: 100%; }

html[data-page] .row > [class*="col"]:nth-child(6n + 1) { --stat-accent: #43afec; }
html[data-page] .row > [class*="col"]:nth-child(6n + 2) { --stat-accent: #0d1333; }
html[data-page] .row > [class*="col"]:nth-child(6n + 3) { --stat-accent: #2a9d8f; }
html[data-page] .row > [class*="col"]:nth-child(6n + 4) { --stat-accent: #e9b44c; }
html[data-page] .row > [class*="col"]:nth-child(6n + 5) { --stat-accent: #e76f51; }
html[data-page] .row > [class*="col"]:nth-child(6n) { --stat-accent: #7c6fa8; }

html[data-page] .row > [class*="col"] :is(.stat-card, .stats-card) {
    border-top: 2px solid var(--stat-accent, var(--ui-brand));
}

html[data-page] .row > [class*="col"] .stat-card { --card-accent: var(--stat-accent, var(--ui-brand)); }
html[data-page] .row > [class*="col"] .stat-card::before {
    background: var(--stat-accent, var(--ui-brand)) !important;
}

html[data-page] .row > [class*="col"] .stat-card :is(.stat-icon, i) {
    color: var(--stat-accent, var(--ui-brand));
}

html[data-page] .row > [class*="col"] .stat-card .stat-number:not([class*="text-"]):not([style*="color"]) {
    color: var(--stat-accent, var(--ui-brand));
}

html[data-page] .stat-card :is(.stat-number, .stat-num, .stat-icon) {
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: currentColor !important;
}

html[data-page] .row > [class*="col"] .stat-card .stat-icon {
    color: var(--stat-accent, var(--ui-brand)) !important;
}

html[data-page] .stat-number.text-success { color: #238779 !important; }
html[data-page] .stat-number.text-warning { color: #a9710b !important; }
html[data-page] .stat-number.text-danger { color: #c65347 !important; }
html[data-page] .stat-number.text-info { color: #347fa7 !important; }

html[data-page] .stat-card.blue::before { background: #43afec !important; }
html[data-page] .stat-card.green::before { background: #2a9d8f !important; }
html[data-page] .stat-card.orange::before { background: #e76f51 !important; }
html[data-page] .stat-card.yellow::before { background: #e9b44c !important; }
html[data-page] .stat-card.critical::before { background: #d96b5b !important; }
html[data-page] .stat-card.high::before { background: #e76f51 !important; }
html[data-page] .stat-card.medium::before { background: #e9b44c !important; }
html[data-page] .stat-card.low::before { background: #2a9d8f !important; }
html[data-page] .row > [class*="col"] .stat-card.blue { --card-accent: #43afec; }
html[data-page] .row > [class*="col"] .stat-card.green { --card-accent: #2a9d8f; }
html[data-page] .row > [class*="col"] .stat-card.orange { --card-accent: #e76f51; }
html[data-page] .row > [class*="col"] .stat-card.yellow { --card-accent: #e9b44c; }
html[data-page] .row > [class*="col"] .stat-card.critical { --card-accent: #d96b5b; }
html[data-page] .row > [class*="col"] .stat-card.high { --card-accent: #e76f51; }
html[data-page] .row > [class*="col"] .stat-card.medium { --card-accent: #e9b44c; }
html[data-page] .row > [class*="col"] .stat-card.low { --card-accent: #2a9d8f; }
html[data-page] .detail-header.critical,
html[data-page] .alert-hero.critical { border-left-color: #d96b5b !important; }
html[data-page] .detail-header.high,
html[data-page] .alert-hero.high { border-left-color: #e76f51 !important; }
html[data-page] .detail-header.medium,
html[data-page] .alert-hero.medium { border-left-color: #e9b44c !important; }
html[data-page] .detail-header.low,
html[data-page] .alert-hero.low { border-left-color: #2a9d8f !important; }

html[data-page] :is(.card, .modal-content, .dropdown-menu, .list-group-item,
    .accordion-item, .offcanvas, .popover, .toast) {
    border-color: var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow);
}

html[data-page] :is(.card-header, .modal-header, .accordion-button) {
    background-color: var(--ui-surface-muted);
    color: var(--ui-ink);
}

html[data-page] :is(.form-control, .form-select, .input-group-text) {
    min-height: 40px;
    border-color: var(--ui-border-strong);
    border-radius: var(--ui-radius);
    font-weight: 400;
}

html[data-page] textarea.form-control { min-height: 100px; }
html[data-page] .form-label { color: #43515c; font-weight: 500; }
html[data-page] .form-control::placeholder { color: #89949d; }

html[data-page] .btn {
    min-height: 38px;
    border-radius: var(--ui-radius);
    font-weight: 500;
    letter-spacing: 0;
    box-shadow: none;
}

html[data-page] .btn-primary {
    color: #123347;
    background: var(--ui-brand);
    border-color: var(--ui-brand);
}

html[data-page] .btn-primary:hover,
html[data-page] .btn-primary:focus-visible {
    color: #fff;
    background: #0d1333;
    border-color: #0d1333;
}

html[data-page] .btn:not(.btn-primary):not(.btn-link):not(.btn-close) { box-shadow: none; }

html[data-page] .table thead th {
    background: #f1f4f6;
    color: #53616b;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .01em;
}

html[data-page] .table tbody tr { transition: background-color .12s ease; }
html[data-page] .table-hover > tbody > tr:hover > * { --bs-table-accent-bg: #f5f9fb; }
html[data-page] :is(.breadcrumb, .breadcrumb-item) { font-size: .84rem; }
html[data-page] .breadcrumb-item a { color: #267da8; }

html[data-page] :is(.pagination .page-link, .nav-tabs .nav-link) {
    border-radius: 5px;
    box-shadow: none;
}

html[data-page] :is(.alert, .toast) { border-width: 1px; box-shadow: none; }
html[data-page] .progress { height: 7px; border-radius: 5px; background: #e8edf0; }
html[data-page] .progress-bar { background-color: var(--ui-brand); }

html[data-page] :is(.card, .analytics-card, .chart-container):has(canvas) {
    overflow: hidden;
    border-color: var(--ui-border);
    background: var(--ui-surface);
}

html[data-page] :is(.card, .analytics-card, .chart-container):has(canvas) > :is(.card-header, h5, h6) {
    color: var(--ui-ink);
}

html[data-page] :is(.card, .analytics-card, .chart-container) canvas {
    display: block;
    max-width: 100%;
}

html[data-page] .survey-chart-wrap {
    position: relative;
    width: 100%;
    height: 225px;
    margin-top: .5rem;
}

html[data-page] .analytics-card:has(canvas) {
    padding: 1rem;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
}

html[data-page] .analytics-card:has(canvas) > :is(h5, h6) {
    margin-bottom: .9rem;
    color: var(--ui-ink);
    font-weight: 600;
}

html[data-page] :is(.app-sidebar, .app-topbar, .app-shell, .app-sidebar-backdrop) {
    transition-duration: .16s;
}

html.ui-ready :is(a, button, input, select, textarea, .card, .nav-link) {
    transition-duration: .14s;
}

@media (max-width: 767.98px) {
    html[data-page] body { font-size: .9rem; }
    html[data-page] .app-main { padding: 16px 12px; }
    html[data-page] :is(.card-body, .modal-body) { padding: .9rem; }
    html[data-page] .table-responsive { margin-bottom: .75rem; }
    html[data-page] :is(.page-header-bar, .d-flex.justify-content-between.align-items-center) { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    html[data-page] *, html[data-page] *::before, html[data-page] *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

html[data-page].dark-mode,
html[data-page] body.dark-mode,
body.dark-mode html[data-page] {
    --bs-body-color: #e1e8ed;
    --bs-body-bg: #111a21;
    --bs-border-color: #34424c;
    --ui-canvas: #111a21;
    --ui-surface: #19242c;
    --ui-surface-muted: #202d36;
    --ui-ink: #e1e8ed;
    --ui-muted: #a3b0ba;
    --ui-subtle: #84939e;
    --ui-border: #34424c;
    --ui-border-strong: #465660;
    --ui-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    --ui-brand-navy: #dce8f2;
}

html[data-page].dark-mode body,
html[data-page] body.dark-mode {
    background-color: var(--ui-canvas);
    color: var(--ui-ink);
}

html[data-page].dark-mode :is(.app-topbar, .navbar, .topbar, .card, .modal-content,
    .list-group-item, .accordion-item, .offcanvas, .popover, .toast, .dropdown-menu),
html[data-page] body.dark-mode :is(.app-topbar, .navbar, .topbar, .card, .modal-content,
    .list-group-item, .accordion-item, .offcanvas, .popover, .toast, .dropdown-menu) {
    color: var(--ui-ink);
    background-color: var(--ui-surface);
    border-color: var(--ui-border);
}

html[data-page].dark-mode :is(.card-header, .modal-header, .accordion-button, .table thead th),
html[data-page] body.dark-mode :is(.card-header, .modal-header, .accordion-button, .table thead th) {
    color: var(--ui-ink);
    background-color: var(--ui-surface-muted);
}

html[data-page].dark-mode :is(.form-control, .form-select, .input-group-text),
html[data-page] body.dark-mode :is(.form-control, .form-select, .input-group-text) {
    color: var(--ui-ink);
    background-color: #172129;
    border-color: var(--ui-border-strong);
}

html[data-page].dark-mode .table,
html[data-page] body.dark-mode .table {
    --bs-table-color: var(--ui-ink);
    --bs-table-bg: var(--ui-surface);
    --bs-table-border-color: var(--ui-border);
    --bs-table-striped-bg: #1d2931;
    --bs-table-hover-bg: #24333d;
}

html[data-page].dark-mode .app-sidebar,
html[data-page] body.dark-mode .app-sidebar { background: #090f29; border-color: #192348; }

html[data-page].dark-mode .app-sidebar .dropdown-menu,
html[data-page] body.dark-mode .app-sidebar .dropdown-menu { background: #070c22; border-color: #202b54; }

html[data-page].dark-mode .app-sidebar .dropdown-item:hover,
html[data-page].dark-mode .app-sidebar .dropdown-item:focus-visible,
html[data-page] body.dark-mode .app-sidebar .dropdown-item:hover,
html[data-page] body.dark-mode .app-sidebar .dropdown-item:focus-visible { background: #172044; }

html[data-page].dark-mode .analytics-card:has(canvas),
html[data-page] body.dark-mode .analytics-card:has(canvas) {
    color: var(--ui-ink);
    border-color: var(--ui-border);
    background: var(--ui-surface);
}

html[data-page].dark-mode :is(.profile-header, .profile-hero, .dept-header, .partner-header,
    .org-hero, .ticket-header, .task-header, .project-header, .vendor-header, .asset-header,
    .campaign-header, .subscriber-header, .model-hero, .detail-header, .alert-hero,
    .incident-header, .notif-hero, .report-header, .dataset-header, .app-header,
    .knowledge-header, .quantum-header, .wf-header, .insight-box, .featured-card,
    .research-card, .ai-card, .stats-card, .stat-card, .module-tile, .dataset-card,
    .info-card, .metric-card, .experiment-card, .filter-card, .welcome-banner),
html[data-page] body.dark-mode :is(.profile-header, .profile-hero, .dept-header, .partner-header,
    .org-hero, .ticket-header, .task-header, .project-header, .vendor-header, .asset-header,
    .campaign-header, .subscriber-header, .model-hero, .detail-header, .alert-hero,
    .incident-header, .notif-hero, .report-header, .dataset-header, .app-header,
    .knowledge-header, .quantum-header, .wf-header, .insight-box, .featured-card,
    .research-card, .ai-card, .stats-card, .stat-card, .module-tile, .dataset-card,
    .info-card, .metric-card, .experiment-card, .filter-card, .welcome-banner) {
    color: var(--ui-ink) !important;
    background: var(--ui-surface) !important;
    border-color: var(--ui-border) !important;
}

/* Final cascade cleanup: align legacy module rules with the shared brand system. */
html[data-page] {
    --ndi-blue: #43afec;
    --ndi-navy: #0d1333;
    color-scheme: light;
}

html[data-page]:has(body.dark-mode) { color-scheme: dark; }

html[data-page] :is(.card, .stat-card, .stats-card, .analytics-card, .module-card,
    .module-tile, .research-card, .ai-card, .dataset-card, .chart-container,
    .recent-card, .info-card, .metric-card, .experiment-card, .quick-action) {
    transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

html[data-page] :is(.card, .stat-card, .stats-card, .analytics-card, .module-card,
    .module-tile, .research-card, .ai-card, .dataset-card, .chart-container,
    .recent-card, .info-card, .metric-card, .experiment-card, .quick-action):hover {
    transform: none !important;
    box-shadow: var(--ui-shadow) !important;
    border-color: var(--ui-border-strong) !important;
}

html[data-page] .btn-primary:hover,
html[data-page] .btn-primary:focus,
html[data-page] .btn-primary:focus-visible,
html[data-page] .btn-primary:active,
html[data-page] .btn-primary.active {
    color: #fff !important;
    background: var(--ndi-navy) !important;
    border-color: var(--ndi-navy) !important;
}

html[data-page] .btn-primary:focus-visible,
html[data-page] .btn-outline-primary:focus-visible {
    outline: 3px solid rgba(67, 175, 236, .35);
    outline-offset: 2px;
    box-shadow: none;
}

html[data-page] .btn-outline-primary {
    color: var(--ndi-navy);
    border-color: var(--ndi-blue);
}

html[data-page] .btn-outline-primary:hover {
    color: var(--ndi-navy);
    background: rgba(67, 175, 236, .12);
    border-color: var(--ndi-blue);
}

html[data-page] :is(.btn-submit, .btn-run, .export-btn) {
    color: var(--ndi-navy) !important;
    background: var(--ndi-blue) !important;
    background-image: none !important;
    border-color: var(--ndi-blue) !important;
}

html[data-page] :is(.btn-submit, .btn-run, .export-btn):is(:hover, :focus-visible) {
    color: #fff !important;
    background: var(--ndi-navy) !important;
    border-color: var(--ndi-navy) !important;
}

html[data-page] :is(.alert-success, .alert-warning, .alert-danger, .alert-info) {
    color: var(--ui-ink);
    border: 1px solid var(--ui-border);
    border-left-width: 3px;
    background: var(--ui-surface);
}

html[data-page] .alert-success { border-left-color: #2a9d8f !important; }
html[data-page] .alert-warning { border-left-color: #e9b44c !important; }
html[data-page] .alert-danger { border-left-color: #d96b5b !important; }
html[data-page] .alert-info { border-left-color: var(--ndi-blue) !important; }

html[data-page] :is(.quick-action, .action-card, .comment-item, .timeline-body) {
    background-image: none !important;
}

html[data-page] .progress-bar-custom {
    background: #e8edf0 !important;
    background-image: none !important;
}

html[data-page] .progress-bar-custom .bar,
html[data-page] .progress-bar-custom .progress-fill {
    background: var(--ndi-blue) !important;
    background-image: none !important;
}

html[data-page] .timeline::before { background: var(--ui-border-strong) !important; }
html[data-page] .org-node.l1 { color: #fff !important; background: var(--ndi-navy) !important; background-image: none !important; }

html[data-page] :is(.form-control, .form-select):focus {
    border-color: var(--ndi-blue);
    box-shadow: 0 0 0 3px rgba(67, 175, 236, .2);
}

html[data-page] .table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(67, 175, 236, .07);
}

html[data-page] a:not(.btn):not(.nav-link):not(.dropdown-item):hover { color: #17658e; }

html[data-page] body.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand) {
    color: #91d4f3;
}

html[data-page] body.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):hover {
    color: #b8e4fa;
}

html[data-page] body.dark-mode :is(.alert-success, .alert-warning, .alert-danger, .alert-info) {
    background: var(--ui-surface-muted);
    color: var(--ui-ink);
}

html[data-page] body.dark-mode .form-label { color: #c5d0d8; }
html[data-page] body.dark-mode .stat-number.text-success { color: #72c7b2 !important; }
html[data-page] body.dark-mode .stat-number.text-warning { color: #f0cf7a !important; }
html[data-page] body.dark-mode .stat-number.text-danger { color: #ee998d !important; }
html[data-page] body.dark-mode .stat-number.text-info { color: #91d4f3 !important; }

html[data-page] body.dark-mode .badge.bg-primary,
html[data-page] body.dark-mode .badge.bg-info,
html[data-page] body.dark-mode .badge.bg-gradient {
    color: #b8e4fa !important;
    background: rgba(67, 175, 236, .17) !important;
}

html[data-page] body.dark-mode .badge.bg-success {
    color: #9bd9ca !important;
    background: rgba(42, 157, 143, .18) !important;
}

html[data-page] body.dark-mode .badge.bg-warning {
    color: #f0d48d !important;
    background: rgba(233, 180, 76, .17) !important;
}

html[data-page] body.dark-mode .badge.bg-danger {
    color: #f0a79d !important;
    background: rgba(217, 107, 91, .17) !important;
}

html[data-page] body.dark-mode .badge.bg-secondary {
    color: #c2ccd3 !important;
    background: #2a3740 !important;
}

html[data-page] body.dark-mode :is(.btn-success, .btn-warning, .btn-info) {
    color: #c5e8f8 !important;
    background: rgba(67, 175, 236, .14) !important;
    border-color: rgba(67, 175, 236, .28) !important;
}

html[data-page] body.dark-mode .btn-success:hover,
html[data-page] body.dark-mode .btn-warning:hover,
html[data-page] body.dark-mode .btn-info:hover {
    background: rgba(67, 175, 236, .22) !important;
}

html[data-page] body.dark-mode .breadcrumb-item a { color: #91d4f3; }

html[data-page] body.dark-mode .app-topbar .page-header-meta,
html[data-page] body.dark-mode .app-topbar .page-header-meta .user-badge,
html[data-page] body.dark-mode .app-topbar .page-header-meta .user-name,
html[data-page] body.dark-mode .app-topbar .app-brand { color: #e1e8ed; }

html[data-page] body.dark-mode .app-topbar .page-header-meta .role-pill,
html[data-page] body.dark-mode .app-brand-copy small { color: #a3b0ba; }

html[data-page] body.dark-mode :is(.app-topbar-toggle, .app-topbar-icon) {
    color: #c3ced6;
    background: var(--ui-surface);
    border-color: var(--ui-border);
}

html[data-page] body.dark-mode :is(.app-topbar-toggle, .app-topbar-icon):hover {
    color: #b8e4fa;
    background: var(--ui-surface-muted);
    border-color: #47738b;
}

html[data-page] body.dark-mode .page-header-meta .user-avatar {
    color: #b8e4fa;
    background: rgba(67, 175, 236, .18);
}

html[data-page] body.dark-mode .btn-outline-primary {
    color: #b8e4fa;
    border-color: var(--ndi-blue);
}

html[data-page] body.dark-mode .btn-outline-primary:hover {
    color: #fff;
    background: rgba(67, 175, 236, .18);
}

html[data-page] body.dark-mode .table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(67, 175, 236, .1);
}

@media (max-width: 575.98px) {
    html[data-page] .page-header-bar { align-items: flex-start; }
    html[data-page] :is(.card-header, .panel-header) { padding: .75rem .85rem; }
}

/* Keep sidebar submenu anchors brighter than the later global link color rule. */
html[data-page] .app-sidebar a.dropdown-item,
html[data-page] .app-sidebar a.dropdown-item:visited {
    color: #dce7f2 !important;
}

html[data-page] .app-sidebar a.dropdown-item:hover,
html[data-page] .app-sidebar a.dropdown-item:focus-visible,
html[data-page] .app-sidebar a.dropdown-item.active {
    color: #fff !important;
}

html[data-page] .app-sidebar a.dropdown-item.active { background: #1d2a52; }
html[data-page] .app-sidebar a.dropdown-item > .bi { color: #43afec; }
