/* Dark component overrides copied from CISGuard_Project. Enabled only for theme-dark-compact. */
/* ==========================================================================
   OrienShield "Aurora" dark theme
   --------------------------------------------------------------------------
   Loaded after app.css, task-operations.css and the scoped bundle so it is the
   single source of truth for html.theme-dark-compact. It layers a deep indigo canvas,
   glass-like surfaces and per-card accent glows over the earlier dark rules.
   Remove the <link> in index.html to fall back to the previous dark theme.
   ========================================================================== */

html.theme-dark-compact {
    color-scheme: dark;

    --au-bg: #070b18;
    --au-bg-2: #0a1022;
    --au-surface: #111933;
    --au-surface-2: #16203f;
    --au-raised: #1c2850;
    --au-input: #0b1228;
    --au-border: rgba(129, 140, 248, .16);
    --au-border-strong: rgba(129, 140, 248, .32);
    --au-text: #eef2ff;
    --au-text-2: #b4bedb;
    --au-muted: #7d89ad;
    --au-cyan: #22d3ee;
    --au-blue: #60a5fa;
    --au-indigo: #818cf8;
    --au-violet: #a78bfa;
    --au-pink: #f472b6;
    --au-green: #34d399;
    --au-amber: #fbbf24;
    --au-red: #fb7185;
    --au-grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 52%, #a855f7 100%);
    --au-grad-soft: linear-gradient(90deg, rgba(34, 211, 238, .9), rgba(99, 102, 241, .9) 50%, rgba(168, 85, 247, .9));
    --au-card: linear-gradient(160deg, rgba(25, 35, 72, .94) 0%, rgba(15, 22, 46, .96) 100%);
    --au-shadow: 0 1px 0 rgba(255, 255, 255, .045) inset, 0 18px 40px -20px rgba(0, 0, 0, .75);

    /* Re-point the shared tokens used by older var()-based rules. */
    --cg-primary: #818cf8;
    --cg-primary-rgb: 129, 140, 248;
    --cg-info: #22d3ee;
    --cg-success: #34d399;
    --cg-danger: #fb7185;
    --cg-warning: #fbbf24;
    --cg-navy: #eef2ff;
    --cg-sidebar: #0a1022;
    --cg-border: #26315a;
    --cg-muted: #8b96b8;
    --cg-surface: #111933;
    --cg-surface-raised: #16203f;
    --cg-background: #070b18;
    --ant-primary-color: #818cf8;
    --ant-primary-1: #1a2150;
    --ant-primary-2: #232c66;
    --ant-text-color: #eef2ff;
    --ant-text-color-secondary: #a3aecb;
    --ant-heading-color: #f5f7ff;
    --ant-border-color-base: #26315a;
    --ant-component-background: #111933;
    --ant-body-background: #070b18;
}

html.theme-dark-compact ::selection {
    background: rgba(129, 140, 248, .38);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Canvas: one aurora background, wrappers stay transparent so it never repeats
   -------------------------------------------------------------------------- */
html.theme-dark-compact body {
    background:
        radial-gradient(ellipse 900px 600px at 100% -10%, rgba(34, 211, 238, .13), transparent 60%),
        radial-gradient(ellipse 800px 600px at -10% 110%, rgba(168, 85, 247, .14), transparent 60%),
        radial-gradient(ellipse 700px 500px at 55% 45%, rgba(99, 102, 241, .07), transparent 65%),
        linear-gradient(160deg, #070b18 0%, #0a1022 55%, #080c1c 100%) fixed !important;
    color: var(--au-text) !important;
}

html.theme-dark-compact :is(
    #app,
    .app-shell,
    .app-main,
    .app-content,
    .dashboard-page,
    .task-operations-page,
    .assets-inventory-page,
    .tickets-page,
    .exports-page,
    .reports-page,
    .incident-page,
    .user-management-page,
    .control-catalog-page,
    .policy-catalog-page,
    .quick-audit-page,
    .risk-register-page,
    .vendor-risk-page,
    .evidence-page
) {
    background: transparent !important;
    color: var(--au-text) !important;
}

/* Task Operations hero: keep the surface and typography in the same dark palette. */
html.theme-dark-compact .operations-header {
    border-color: rgba(96, 165, 250, .24) !important;
    background:
        radial-gradient(circle at 78% -35%, rgba(34, 211, 238, .14), transparent 38%),
        radial-gradient(circle at 8% 120%, rgba(139, 92, 246, .13), transparent 38%),
        linear-gradient(145deg, #172342 0%, #121c36 55%, #0f1930 100%) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .055) inset,
        0 18px 38px -22px rgba(0, 0, 0, .82) !important;
}

html.theme-dark-compact .operations-header::after {
    border-color: rgba(96, 165, 250, .075) !important;
}

html.theme-dark-compact .operations-header h1 {
    color: #f4f7ff !important;
    text-shadow: none !important;
}

html.theme-dark-compact .operations-header p {
    color: #aebbd2 !important;
}

html.theme-dark-compact .operations-header .page-eyebrow {
    color: #70b7ff !important;
}

html.theme-dark-compact .operations-header .header-company-badge {
    border-color: rgba(96, 165, 250, .3) !important;
    background: rgba(96, 165, 250, .1) !important;
    color: #bfdbfe !important;
}

/* Task Operations secondary KPI strip. */
html.theme-dark-compact .kpi-secondary-strip .strip-item {
    --strip-accent: #60a5fa;
    border-color: color-mix(in srgb, var(--strip-accent) 28%, #26365a) !important;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--strip-accent) 15%, transparent), transparent 44%),
        linear-gradient(145deg, #182440, #121c34) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .045) inset,
        0 12px 26px -20px color-mix(in srgb, var(--strip-accent) 65%, #000) !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

html.theme-dark-compact .kpi-secondary-strip .strip-item:nth-child(2) { --strip-accent: #fbbf24; }
html.theme-dark-compact .kpi-secondary-strip .strip-item:nth-child(3) { --strip-accent: #34d399; }
html.theme-dark-compact .kpi-secondary-strip .strip-item:nth-child(4) { --strip-accent: #fb7185; }
html.theme-dark-compact .kpi-secondary-strip .strip-item:nth-child(5) { --strip-accent: #a78bfa; }
html.theme-dark-compact .kpi-secondary-strip .strip-item:nth-child(6) { --strip-accent: #fb923c; }

html.theme-dark-compact .kpi-secondary-strip .strip-item:hover {
    border-color: color-mix(in srgb, var(--strip-accent) 56%, #33456d) !important;
    box-shadow: 0 16px 30px -20px var(--strip-accent) !important;
    transform: translateY(-2px);
}

html.theme-dark-compact .kpi-secondary-strip .strip-icon-wrap {
    border: 1px solid color-mix(in srgb, var(--strip-accent) 30%, transparent);
    background: color-mix(in srgb, var(--strip-accent) 14%, #111a31) !important;
    color: var(--strip-accent) !important;
}

html.theme-dark-compact .kpi-secondary-strip .strip-label {
    color: #aebbd2 !important;
}

html.theme-dark-compact .kpi-secondary-strip .strip-value {
    color: #f4f7ff !important;
}

html.theme-dark-compact .kpi-secondary-strip .strip-value.text-amber { color: #fbbf24 !important; }
html.theme-dark-compact .kpi-secondary-strip .strip-value.text-green { color: #4ade80 !important; }
html.theme-dark-compact .kpi-secondary-strip .strip-value.text-red { color: #fb7185 !important; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
html.theme-dark-compact :is(h1, h2, h3, h4, h5, h6, strong, label, .ant-card-head-title, .ant-statistic-content, .ant-typography h1, .ant-typography h2, .ant-typography h3) {
    color: #f3f5ff !important;
}

html.theme-dark-compact :is(p, small, .cell-subtitle, .ant-typography-secondary, .ant-statistic-title, .ant-form-item-extra, .ant-descriptions-item-label) {
    color: var(--au-text-2) !important;
}

html.theme-dark-compact :is(a:not(.nav-entry), .ant-btn-link, .ant-btn-text) {
    color: #7dd3fc !important;
}

html.theme-dark-compact :is(a:not(.nav-entry), .ant-btn-link):hover {
    color: #bae6fd !important;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
html.theme-dark-compact .app-sidebar {
    border-inline-end: 1px solid rgba(129, 140, 248, .14) !important;
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 211, 238, .16), transparent 32%),
        radial-gradient(circle at 100% 85%, rgba(168, 85, 247, .16), transparent 38%),
        linear-gradient(180deg, #0a1024 0%, #080d1e 60%, #070b19 100%) !important;
    box-shadow: 18px 0 44px -18px rgba(0, 0, 0, .7) !important;
}

html.theme-dark-compact .brand {
    border-bottom-color: rgba(129, 140, 248, .14) !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(34, 211, 238, .04)) !important;
}

html.theme-dark-compact .brand-logo-shell {
    border-color: rgba(129, 140, 248, .38) !important;
    background: linear-gradient(145deg, rgba(99, 102, 241, .28), rgba(34, 211, 238, .12)) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .08), 0 10px 26px -6px rgba(99, 102, 241, .55) !important;
}

html.theme-dark-compact .brand-name {
    background: linear-gradient(90deg, #e0f2fe, #c7d2fe 45%, #f0abfc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.theme-dark-compact :is(.brand-edition, .brand-subtitle) {
    color: var(--au-muted) !important;
}

html.theme-dark-compact :is(.nav-section, .nav-section.nav-tone-violet, .nav-section.nav-tone-rose, .nav-section.nav-tone-amber, .nav-section.nav-tone-indigo, .nav-section.nav-tone-emerald) {
    --nav-accent: #818cf8;
    --nav-accent-rgb: 129, 140, 248;
}

html.theme-dark-compact .nav-section-title {
    color: #6f7ca3 !important;
    letter-spacing: .08em;
}

html.theme-dark-compact .nav-section-title::after {
    background: linear-gradient(90deg, rgba(34, 211, 238, .45), rgba(168, 85, 247, .15), transparent) !important;
}

html.theme-dark-compact .nav-entry {
    border-color: transparent !important;
    color: #a3aecb !important;
}

html.theme-dark-compact .nav-entry .nav-icon {
    border-color: rgba(129, 140, 248, .16) !important;
    background: rgba(30, 41, 82, .55) !important;
    color: #a5b4fc !important;
}

html.theme-dark-compact .nav-entry:hover {
    border-color: rgba(129, 140, 248, .22) !important;
    background: rgba(99, 102, 241, .1) !important;
    color: #f3f5ff !important;
    box-shadow: none !important;
}

html.theme-dark-compact .nav-entry:hover .nav-icon {
    border-color: rgba(34, 211, 238, .45) !important;
    background: rgba(34, 211, 238, .14) !important;
    color: #67e8f9 !important;
}

html.theme-dark-compact .nav-entry.active {
    border-color: rgba(129, 140, 248, .42) !important;
    background: linear-gradient(95deg, rgba(99, 102, 241, .34), rgba(168, 85, 247, .14) 70%, rgba(168, 85, 247, .04)) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 #22d3ee, 0 12px 26px -12px rgba(99, 102, 241, .75) !important;
}

html.theme-dark-compact .nav-entry.active .nav-icon {
    border-color: transparent !important;
    background: var(--au-grad) !important;
    color: #fff !important;
    box-shadow: 0 6px 18px -4px rgba(99, 102, 241, .8) !important;
}

html.theme-dark-compact .nav-entry.active .nav-badge .ant-badge-count {
    border-color: rgba(34, 211, 238, .45) !important;
    background: rgba(34, 211, 238, .16) !important;
    color: #a5f3fc !important;
}

html.theme-dark-compact .app-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(34, 211, 238, .35), rgba(168, 85, 247, .35)) !important;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
html.theme-dark-compact .app-header {
    border-bottom: 1px solid rgba(129, 140, 248, .14) !important;
    background: rgba(8, 12, 28, .74) !important;
    box-shadow: 0 1px 0 rgba(34, 211, 238, .08), 0 14px 34px -16px rgba(0, 0, 0, .8) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

html.theme-dark-compact :is(.sidebar-toggle, .header-action-icon, .header-sign-out, .agent-heartbeat-trigger) {
    border-color: rgba(129, 140, 248, .2) !important;
    background: rgba(30, 41, 82, .5) !important;
    color: #c7d2fe !important;
}

html.theme-dark-compact :is(.sidebar-toggle, .header-action-icon, .header-sign-out, .agent-heartbeat-trigger):hover {
    border-color: rgba(129, 140, 248, .6) !important;
    background: rgba(99, 102, 241, .2) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .14), 0 8px 20px -8px rgba(99, 102, 241, .8) !important;
}

html.theme-dark-compact :is(.theme-switcher-menu, .header-panel, .agent-heartbeat-panel) {
    border: 1px solid var(--au-border-strong) !important;
    background: linear-gradient(160deg, #151e40, #0f1631) !important;
    color: var(--au-text) !important;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset !important;
}

html.theme-dark-compact .theme-switcher-option {
    color: var(--au-text-2) !important;
}

html.theme-dark-compact .theme-switcher-option:is(:hover, :focus-visible, .is-active) {
    background: rgba(99, 102, 241, .18) !important;
    color: #fff !important;
}

html.theme-dark-compact .theme-option-swatch.theme-dark,
.theme-option-swatch.theme-dark {
    background: linear-gradient(135deg, #22d3ee, #6366f1 55%, #a855f7) !important;
}

/* --------------------------------------------------------------------------
   Cards and generic surfaces
   -------------------------------------------------------------------------- */
html.theme-dark-compact :is(
    .ant-card,
    .panel,
    .role-panel,
    .metric-card,
    .ops-card,
    [class$="-panel"]:not([class*="ant-"]):not(.header-panel):not(.agent-heartbeat-panel),
    [class$="-workspace"]:not([class*="ant-"]),
    [class$="-workspace-card"],
    [class$="-table-shell"],
    [class$="-loading"]:not([class*="ant-"])
) {
    border: 1px solid var(--au-border) !important;
    border-radius: 16px !important;
    background: var(--au-card) !important;
    color: var(--au-text) !important;
    box-shadow: var(--au-shadow) !important;
}

html.theme-dark-compact .ant-card > .ant-card-head,
html.theme-dark-compact .ops-card > header,
html.theme-dark-compact :is(
    .assets-panel-header,
    .tickets-panel-header,
    .export-panel-header,
    .history-header,
    .report-section-header,
    .user-invite-header,
    .user-list-header,
    .role-access-header,
    .admin-panel-header,
    .section-header
) {
    border-bottom: 1px solid var(--au-border) !important;
    background:
        linear-gradient(90deg, #22d3ee, #6366f1 50%, #a855f7) top / 100% 2px no-repeat,
        linear-gradient(90deg, rgba(99, 102, 241, .16), rgba(99, 102, 241, .03) 65%, transparent) !important;
    color: #f3f5ff !important;
    box-shadow: none !important;
}

html.theme-dark-compact .ant-card > .ant-card-head :is(.ant-card-head-title, .ant-card-extra, .anticon) {
    color: #f3f5ff !important;
}

html.theme-dark-compact .ant-card > .ant-card-head .ant-card-head-title {
    font-weight: 700;
    letter-spacing: .01em;
}

html.theme-dark-compact .ant-card > .ant-card-body {
    background: transparent !important;
}

/* Export builder form: remove the light body left by the page stylesheet. */
html.theme-dark-compact .export-builder-grid {
    border-top: 1px solid rgba(129, 140, 248, .1);
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .07), transparent 34%),
        linear-gradient(145deg, #111a32, #0d152a) !important;
}

html.theme-dark-compact .export-form-field > label {
    color: #c4cee3 !important;
}

html.theme-dark-compact .export-form-field > label .anticon {
    color: #7dd3fc !important;
}

html.theme-dark-compact .export-form-field :is(
    .ant-select:not(.ant-select-customize-input) .ant-select-selector,
    .ant-input-affix-wrapper,
    input.ant-input
) {
    border-color: #35466c !important;
    background: linear-gradient(145deg, #0c142a, #0a1226) !important;
    color: #edf2ff !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 5px 14px rgba(0, 0, 0, .12) !important;
}

html.theme-dark-compact .export-form-field .ant-input-affix-wrapper > input.ant-input {
    background: transparent !important;
    box-shadow: none !important;
}

html.theme-dark-compact .export-form-field :is(.ant-select-selection-item, input.ant-input) {
    color: #edf2ff !important;
}

html.theme-dark-compact .export-form-field :is(.ant-select-selection-placeholder, input.ant-input::placeholder) {
    color: #7f8cab !important;
}

html.theme-dark-compact .export-form-field :is(
    .ant-select-focused .ant-select-selector,
    .ant-input-affix-wrapper-focused,
    input.ant-input:focus
) {
    border-color: #67b8ff !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .16), 0 0 20px -8px rgba(34, 211, 238, .65) !important;
}

html.theme-dark-compact .export-history-panel .export-record-count {
    border-color: rgba(129, 140, 248, .42) !important;
    background: linear-gradient(145deg, rgba(99, 102, 241, .24), rgba(34, 211, 238, .1)) !important;
    color: #e0e7ff !important;
    box-shadow: 0 8px 20px -13px rgba(99, 102, 241, .9), 0 1px 0 rgba(255, 255, 255, .06) inset !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html.theme-dark-compact .export-history-panel .export-record-count .anticon {
    color: #67e8f9 !important;
}

html.theme-dark-compact .exports-hero .exports-hero-summary {
    border-color: rgba(96, 165, 250, .4) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .13), transparent 54%),
        linear-gradient(145deg, rgba(24, 38, 76, .96), rgba(14, 24, 51, .98)) !important;
    box-shadow: 0 14px 30px -18px rgba(34, 211, 238, .55), 0 1px 0 rgba(255, 255, 255, .06) inset !important;
    opacity: 1 !important;
}

html.theme-dark-compact .exports-hero .exports-hero-summary span {
    color: #b9c7e3 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html.theme-dark-compact .exports-hero .exports-hero-summary span .anticon {
    color: #67e8f9 !important;
}

html.theme-dark-compact .exports-hero .exports-hero-summary strong {
    color: #f8faff !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

/* Invite Users native Blazor fields. */
html.theme-dark-compact .user-invite-panel .user-form-field > label > span {
    color: #dbe5f8 !important;
}

html.theme-dark-compact .user-invite-panel .user-form-field > label small {
    color: #9eacc6 !important;
}

html.theme-dark-compact .user-invite-panel .user-input-wrap :is(input, select) {
    border-color: #35466c !important;
    background: linear-gradient(145deg, #0b142a, #091126) !important;
    color: #edf2ff !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .035) inset !important;
    color-scheme: dark;
}

html.theme-dark-compact .user-invite-panel .user-input-wrap input::placeholder {
    color: #7f8cab !important;
    opacity: 1 !important;
}

html.theme-dark-compact .user-invite-panel .user-input-wrap > .anticon {
    color: #8fa1c2 !important;
}

html.theme-dark-compact .user-invite-panel .user-input-wrap:focus-within > .anticon {
    color: #67e8f9 !important;
}

html.theme-dark-compact .user-invite-panel .user-input-wrap :is(input, select):hover {
    border-color: #526f9f !important;
}

html.theme-dark-compact .user-invite-panel .user-input-wrap :is(input, select):focus {
    border-color: #67b8ff !important;
    background: linear-gradient(145deg, #0d1831, #0a1329) !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .16), 0 0 20px -9px rgba(34, 211, 238, .7) !important;
}

html.theme-dark-compact .user-invite-panel .user-input-wrap select option {
    background: #111a33;
    color: #edf2ff;
}

/* Reports category navigation and record count. */
html.theme-dark-compact .report-data-workspace .report-tabs {
    border-bottom-color: rgba(129, 140, 248, .22) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .055), transparent 34%),
        linear-gradient(145deg, #121c35, #0e172d) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .035) inset !important;
}

html.theme-dark-compact .report-data-workspace .report-tabs button {
    color: #aebbd2 !important;
    background: transparent !important;
    text-shadow: none !important;
}

html.theme-dark-compact .report-data-workspace .report-tabs button .anticon {
    color: #8fa1c2 !important;
}

html.theme-dark-compact .report-data-workspace .report-tabs button:hover {
    background: rgba(96, 165, 250, .1) !important;
    color: #e8f3ff !important;
}

html.theme-dark-compact .report-data-workspace .report-tabs button:hover .anticon {
    color: #67e8f9 !important;
}

html.theme-dark-compact .report-data-workspace .report-tabs button.active {
    border: 1px solid rgba(125, 211, 252, .3) !important;
    background: linear-gradient(135deg, #258bdc, #4f62e8 55%, #8554ea) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px -12px rgba(99, 102, 241, .95), 0 1px 0 rgba(255, 255, 255, .18) inset !important;
}

html.theme-dark-compact .report-data-workspace .report-tabs button.active .anticon {
    color: #fff !important;
}

html.theme-dark-compact .report-data-workspace .report-record-count {
    border-color: rgba(96, 165, 250, .4) !important;
    background: linear-gradient(145deg, rgba(59, 130, 246, .2), rgba(99, 102, 241, .13)) !important;
    color: #dbeafe !important;
    box-shadow: 0 8px 20px -14px rgba(59, 130, 246, .9) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html.theme-dark-compact .report-data-workspace .incident-message-card {
    border-color: rgba(96, 165, 250, .25) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .07), transparent 42%),
        linear-gradient(145deg, #131e39, #0d162d) !important;
    color: #dce5f7 !important;
    box-shadow: 0 9px 22px -18px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .04) inset !important;
}

html.theme-dark-compact .report-data-workspace .incident-message-heading,
html.theme-dark-compact .report-data-workspace .incident-message-heading strong {
    color: #edf3ff !important;
}

html.theme-dark-compact .report-data-workspace .incident-message-heading .anticon {
    color: #fbbf24 !important;
}

html.theme-dark-compact .report-data-workspace .incident-message-fields span {
    background: rgba(96, 165, 250, .08) !important;
    color: #c6d2e8 !important;
}

html.theme-dark-compact .report-data-workspace .incident-message-fields b {
    color: #8dccff !important;
}

html.theme-dark-compact .report-data-workspace .incident-detail-button {
    border-top-color: rgba(96, 165, 250, .18) !important;
    color: #67c7ff !important;
}

html.theme-dark-compact .report-data-workspace .incident-detail-button:hover {
    color: #a5e5ff !important;
}

/* User Directory hero statistics and section navigation. */
html.theme-dark-compact .user-management-stats {
    border-color: rgba(129, 140, 248, .26) !important;
    background: linear-gradient(145deg, rgba(20, 31, 65, .94), rgba(12, 20, 43, .96)) !important;
    box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .05) inset !important;
}

html.theme-dark-compact .user-management-stats > div {
    --user-stat-accent: #60a5fa;
    border-color: rgba(129, 140, 248, .18) !important;
    background: linear-gradient(145deg, color-mix(in srgb, var(--user-stat-accent) 8%, transparent), transparent 70%);
}

html.theme-dark-compact .user-management-stats > div:nth-child(2) { --user-stat-accent: #34d399; }
html.theme-dark-compact .user-management-stats > div:nth-child(3) { --user-stat-accent: #a78bfa; }

html.theme-dark-compact .user-management-stats span {
    color: #aebbd2 !important;
}

html.theme-dark-compact .user-management-stats span .anticon {
    color: var(--user-stat-accent) !important;
}

html.theme-dark-compact .user-management-stats strong {
    color: #f5f7ff !important;
}

html.theme-dark-compact .user-management-tabs {
    border-color: rgba(129, 140, 248, .2) !important;
    background: linear-gradient(145deg, #111a32, #0d152a) !important;
    box-shadow: 0 14px 30px -22px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .04) inset !important;
}

html.theme-dark-compact .user-management-tabs button {
    color: #aebbd2 !important;
}

html.theme-dark-compact .user-management-tabs button:hover {
    border-color: rgba(96, 165, 250, .3) !important;
    background: rgba(96, 165, 250, .08) !important;
}

html.theme-dark-compact .user-management-tabs button.is-active {
    border-color: rgba(129, 140, 248, .4) !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(34, 211, 238, .08)) !important;
    box-shadow: 0 8px 20px -14px rgba(99, 102, 241, .9), 0 1px 0 rgba(255, 255, 255, .04) inset !important;
}

html.theme-dark-compact .user-management-tabs button > span {
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(148, 163, 184, .08) !important;
    color: #94a3b8 !important;
}

html.theme-dark-compact .user-management-tabs button.is-active > span {
    border-color: rgba(129, 140, 248, .35);
    background: rgba(99, 102, 241, .18) !important;
    color: #a5b4fc !important;
}

html.theme-dark-compact .user-management-tabs strong {
    color: #e9edff !important;
}

html.theme-dark-compact .user-management-tabs small {
    color: #93a1bd !important;
}

html.theme-dark-compact .user-management-tabs em {
    border-color: rgba(129, 140, 248, .35) !important;
    background: rgba(99, 102, 241, .14) !important;
    color: #c7d2fe !important;
}

html.theme-dark-compact .user-management-tabs button > .anticon:last-child {
    color: #8190ad !important;
}

html.theme-dark-compact .user-list-title > span {
    border-color: rgba(96, 165, 250, .38) !important;
    background: linear-gradient(145deg, rgba(59, 130, 246, .22), rgba(34, 211, 238, .1)) !important;
    color: #8dccff !important;
    box-shadow: 0 8px 20px -12px rgba(59, 130, 246, .9) !important;
}

html.theme-dark-compact .user-list-title > span .anticon {
    color: #8dccff !important;
}

html.theme-dark-compact .user-count-pill {
    border-color: rgba(96, 165, 250, .38) !important;
    background: rgba(59, 130, 246, .14) !important;
    color: #d7eaff !important;
    box-shadow: 0 6px 16px -12px rgba(59, 130, 246, .9) !important;
}

html.theme-dark-compact .user-count-pill .anticon {
    color: #60a5fa !important;
}

/* Configuration workspace and provider cards. */
html.theme-dark-compact .configuration-page {
    color: var(--au-text) !important;
}

html.theme-dark-compact .configuration-section {
    border-color: var(--au-border) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .055), transparent 34%),
        var(--au-card) !important;
    box-shadow: var(--au-shadow) !important;
}

html.theme-dark-compact .configuration-section-icon {
    border-color: rgba(96, 165, 250, .32) !important;
    background: rgba(59, 130, 246, .14) !important;
    color: #7cc4ff !important;
}

html.theme-dark-compact .configuration-local-section .configuration-section-icon {
    border-color: rgba(167, 139, 250, .34) !important;
    background: rgba(139, 92, 246, .15) !important;
    color: #c4b5fd !important;
}

html.theme-dark-compact .configuration-section-title h2 {
    color: #f3f6ff !important;
}

html.theme-dark-compact .configuration-section-title p {
    color: #a6b2ca !important;
}

html.theme-dark-compact .configuration-provider-count {
    border-color: rgba(96, 165, 250, .3) !important;
    background: rgba(59, 130, 246, .13) !important;
    color: #bfdbfe !important;
}

html.theme-dark-compact .configuration-local-section .configuration-provider-count {
    border-color: rgba(167, 139, 250, .34) !important;
    background: rgba(139, 92, 246, .14) !important;
    color: #d8ccff !important;
}

html.theme-dark-compact .ai-provider-card {
    border-color: color-mix(in srgb, var(--provider-accent) 25%, #26365a) !important;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--provider-accent) 13%, transparent), transparent 40%),
        linear-gradient(155deg, #192441, #111a31) !important;
    box-shadow: 0 14px 32px -24px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .04) inset !important;
}

html.theme-dark-compact .ai-provider-card.ant-card-hoverable:hover {
    border-color: color-mix(in srgb, var(--provider-accent) 58%, #33456d) !important;
    box-shadow: 0 20px 38px -22px color-mix(in srgb, var(--provider-accent) 65%, #000) !important;
}

html.theme-dark-compact .ai-provider-logo {
    border-color: color-mix(in srgb, var(--provider-accent) 36%, #2d3a62) !important;
    background: color-mix(in srgb, var(--provider-accent) 14%, #111a31) !important;
    color: color-mix(in srgb, var(--provider-accent) 70%, #fff) !important;
    box-shadow: 0 8px 20px -13px var(--provider-accent), 0 1px 0 rgba(255, 255, 255, .04) inset !important;
}

html.theme-dark-compact .ai-provider-identity > span,
html.theme-dark-compact .ai-provider-description,
html.theme-dark-compact .ai-provider-detail span {
    color: #9eabc3 !important;
}

html.theme-dark-compact .ai-provider-tags .ant-tag {
    border-color: color-mix(in srgb, var(--provider-accent) 30%, transparent) !important;
    background: color-mix(in srgb, var(--provider-accent) 13%, #111a31) !important;
    color: color-mix(in srgb, var(--provider-accent) 58%, #fff) !important;
}

html.theme-dark-compact .ai-provider-info-grid {
    border-color: color-mix(in srgb, var(--provider-accent) 28%, rgba(129, 140, 248, .12)) !important;
    background: transparent !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .025) inset !important;
}

html.theme-dark-compact .ai-provider-detail + .ai-provider-detail {
    border-color: color-mix(in srgb, var(--provider-accent) 20%, rgba(129, 140, 248, .1)) !important;
}

html.theme-dark-compact .ai-provider-detail strong {
    color: #e8edfa !important;
}

html.theme-dark-compact .ai-provider-availability.is-active,
html.theme-dark-compact .ai-provider-config-state.is-configured {
    border-color: rgba(52, 211, 153, .3) !important;
    background: rgba(52, 211, 153, .11) !important;
    color: #6ee7b7 !important;
}

html.theme-dark-compact .ai-provider-availability.is-disabled {
    border-color: rgba(251, 113, 133, .3) !important;
    background: rgba(251, 113, 133, .1) !important;
    color: #fda4af !important;
}

html.theme-dark-compact .ai-provider-config-state.is-unconfigured {
    border-color: rgba(148, 163, 184, .22) !important;
    background: rgba(148, 163, 184, .09) !important;
    color: #aebbd2 !important;
}

html.theme-dark-compact .ai-provider-config-state.is-local {
    border-color: rgba(167, 139, 250, .32) !important;
    background: rgba(139, 92, 246, .13) !important;
    color: #c4b5fd !important;
}

html.theme-dark-compact .ai-provider-action {
    background: color-mix(in srgb, var(--provider-accent) 13%, transparent) !important;
    color: color-mix(in srgb, var(--provider-accent) 58%, #fff) !important;
}

html.theme-dark-compact .configuration-modal .feature-form-field > label,
html.theme-dark-compact .configuration-switch-row strong {
    color: #e8edfa !important;
}

html.theme-dark-compact .configuration-switch-row {
    border-color: rgba(129, 140, 248, .2) !important;
    background: rgba(99, 102, 241, .08) !important;
}

html.theme-dark-compact .configuration-switch-row span,
html.theme-dark-compact .configuration-secret-hint {
    color: #96a4bf !important;
}

html.theme-dark-compact .configuration-secret-input button {
    border-left-color: rgba(129, 140, 248, .2) !important;
    background: #111a31 !important;
    color: #93a4c3 !important;
}

html.theme-dark-compact .configuration-secret-input button:hover {
    background: rgba(96, 165, 250, .14) !important;
    color: #7dd3fc !important;
}

/* Policy Catalog search and filter controls. */
html.theme-dark-compact .policy-catalog-page :is(.policy-filter-row, .policy-sub-filter, .coverage-filters) {
    border-color: rgba(129, 140, 248, .18) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .06), transparent 36%),
        linear-gradient(145deg, #121c35, #0e172d) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 10px 24px -22px rgba(0, 0, 0, .85) !important;
}

html.theme-dark-compact .policy-catalog-page .policy-workspace-card :is(
    .ant-input-affix-wrapper,
    .ant-select:not(.ant-select-customize-input) .ant-select-selector
) {
    border-color: #35466c !important;
    background: linear-gradient(145deg, #0b142a, #091126) !important;
    color: #edf2ff !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset !important;
}

html.theme-dark-compact .policy-catalog-page .policy-workspace-card .ant-input-affix-wrapper > .ant-input {
    background: transparent !important;
    color: #edf2ff !important;
}

html.theme-dark-compact .policy-catalog-page .policy-workspace-card :is(
    .ant-input::placeholder,
    .ant-select-selection-placeholder
) {
    color: #7f8cab !important;
}

html.theme-dark-compact .policy-catalog-page .policy-workspace-card .ant-select-selection-item {
    color: #e8edfa !important;
}

html.theme-dark-compact .policy-catalog-page .policy-workspace-card :is(
    .ant-input-affix-wrapper:hover,
    .ant-select-selector:hover
) {
    border-color: #526f9f !important;
}

html.theme-dark-compact .policy-catalog-page .policy-workspace-card :is(
    .ant-input-affix-wrapper-focused,
    .ant-select-focused .ant-select-selector
) {
    border-color: #67b8ff !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .16), 0 0 20px -9px rgba(34, 211, 238, .7) !important;
}

html.theme-dark-compact .policy-catalog-page .policy-workspace-card :is(.ant-select-arrow, .ant-input-clear-icon) {
    color: #8fa1c2 !important;
}

/* Control Catalog search and filter controls. */
html.theme-dark-compact .control-catalog-page .control-filter-row {
    border-color: rgba(129, 140, 248, .18) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .06), transparent 36%),
        linear-gradient(145deg, #121c35, #0e172d) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 10px 24px -22px rgba(0, 0, 0, .85) !important;
}

html.theme-dark-compact .control-catalog-page .control-filter-row :is(
    .ant-input-affix-wrapper,
    .ant-select:not(.ant-select-customize-input) .ant-select-selector
) {
    border-color: #35466c !important;
    background: linear-gradient(145deg, #0b142a, #091126) !important;
    color: #edf2ff !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset !important;
}

html.theme-dark-compact .control-catalog-page .control-filter-row .ant-input-affix-wrapper > .ant-input {
    background: transparent !important;
    color: #edf2ff !important;
}

html.theme-dark-compact .control-catalog-page .control-filter-row :is(
    .ant-input::placeholder,
    .ant-select-selection-placeholder
) {
    color: #7f8cab !important;
}

html.theme-dark-compact .control-catalog-page .control-filter-row .ant-select-selection-item {
    color: #e8edfa !important;
}

html.theme-dark-compact .control-catalog-page .control-filter-row :is(
    .ant-input-affix-wrapper:hover,
    .ant-select-selector:hover
) {
    border-color: #526f9f !important;
}

html.theme-dark-compact .control-catalog-page .control-filter-row :is(
    .ant-input-affix-wrapper-focused,
    .ant-select-focused .ant-select-selector
) {
    border-color: #67b8ff !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .16), 0 0 20px -9px rgba(34, 211, 238, .7) !important;
}

html.theme-dark-compact .control-catalog-page .control-filter-row :is(.ant-select-arrow, .ant-input-clear-icon) {
    color: #8fa1c2 !important;
}

/* Risk Register search and filter controls. */
html.theme-dark-compact .risk-register-page .risk-filter-row {
    border-color: rgba(129, 140, 248, .18) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .06), transparent 36%),
        linear-gradient(145deg, #121c35, #0e172d) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 10px 24px -22px rgba(0, 0, 0, .85) !important;
}

html.theme-dark-compact .risk-register-page .risk-filter-row :is(
    .ant-input-affix-wrapper,
    .ant-select:not(.ant-select-customize-input) .ant-select-selector
) {
    border-color: #35466c !important;
    background: linear-gradient(145deg, #0b142a, #091126) !important;
    color: #edf2ff !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset !important;
}

html.theme-dark-compact .risk-register-page .risk-filter-row .ant-input-affix-wrapper > .ant-input {
    background: transparent !important;
    color: #edf2ff !important;
}

html.theme-dark-compact .risk-register-page .risk-filter-row :is(
    .ant-input::placeholder,
    .ant-select-selection-placeholder
) {
    color: #7f8cab !important;
}

html.theme-dark-compact .risk-register-page .risk-filter-row .ant-select-selection-item {
    color: #e8edfa !important;
}

html.theme-dark-compact .risk-register-page .risk-filter-row :is(
    .ant-input-affix-wrapper:hover,
    .ant-select-selector:hover
) {
    border-color: #526f9f !important;
}

html.theme-dark-compact .risk-register-page .risk-filter-row :is(
    .ant-input-affix-wrapper-focused,
    .ant-select-focused .ant-select-selector
) {
    border-color: #67b8ff !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .16), 0 0 20px -9px rgba(34, 211, 238, .7) !important;
}

html.theme-dark-compact .risk-register-page .risk-filter-row :is(.ant-select-arrow, .ant-input-clear-icon) {
    color: #8fa1c2 !important;
}

/* Vendor Risk search and filter controls. */
html.theme-dark-compact .vendor-risk-page .vendor-filter-row {
    border-color: rgba(129, 140, 248, .18) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .06), transparent 36%),
        linear-gradient(145deg, #121c35, #0e172d) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 10px 24px -22px rgba(0, 0, 0, .85) !important;
}

html.theme-dark-compact .vendor-risk-page .vendor-filter-row :is(
    .ant-input-affix-wrapper,
    .ant-select:not(.ant-select-customize-input) .ant-select-selector
) {
    border-color: #35466c !important;
    background: linear-gradient(145deg, #0b142a, #091126) !important;
    color: #edf2ff !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset !important;
}

html.theme-dark-compact .vendor-risk-page .vendor-filter-row .ant-input-affix-wrapper > .ant-input {
    background: transparent !important;
    color: #edf2ff !important;
}

html.theme-dark-compact .vendor-risk-page .vendor-filter-row :is(
    .ant-input::placeholder,
    .ant-select-selection-placeholder
) {
    color: #7f8cab !important;
}

html.theme-dark-compact .vendor-risk-page .vendor-filter-row .ant-select-selection-item {
    color: #e8edfa !important;
}

html.theme-dark-compact .vendor-risk-page .vendor-filter-row :is(
    .ant-input-affix-wrapper:hover,
    .ant-select-selector:hover
) {
    border-color: #526f9f !important;
}

html.theme-dark-compact .vendor-risk-page .vendor-filter-row :is(
    .ant-input-affix-wrapper-focused,
    .ant-select-focused .ant-select-selector
) {
    border-color: #67b8ff !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .16), 0 0 20px -9px rgba(34, 211, 238, .7) !important;
}

html.theme-dark-compact .vendor-risk-page .vendor-filter-row :is(.ant-select-arrow, .ant-input-clear-icon) {
    color: #8fa1c2 !important;
}

/* Page hero banners get a stronger, more colourful treatment. */
html.theme-dark-compact [class$="-hero"]:not([class*="ant-"]) {
    border: 1px solid rgba(129, 140, 248, .28) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(ellipse 60% 120% at 100% 0%, rgba(34, 211, 238, .2), transparent 60%),
        radial-gradient(ellipse 50% 120% at 0% 100%, rgba(168, 85, 247, .2), transparent 60%),
        linear-gradient(135deg, #172150, #0f1633) !important;
    color: var(--au-text) !important;
    box-shadow: 0 22px 50px -24px rgba(99, 102, 241, .6), 0 1px 0 rgba(255, 255, 255, .06) inset !important;
}

/* Toolbars, filter bars and small inset surfaces. */
html.theme-dark-compact :is(
    .assets-filter-bar,
    .tickets-filter-bar,
    .report-filter-bar,
    .incident-operational-filters,
    .incident-signal-filters,
    .workspace-toolbar,
    .role-access-toolbar,
    .user-invite-actions,
    .user-invite-form,
    .status-legend,
    .panel-note,
    .risk-dashboard footer,
    .table-head,
    .trend-insights > div,
    .coverage-legend-item,
    .verification-legend > div,
    .status-blocks > div,
    .health-item,
    .question-section,
    .editor-section,
    .rules-section,
    .section-questions,
    .question-card,
    .empty-questionnaire,
    .rule-content
) {
    border-color: var(--au-border) !important;
    background: rgba(22, 32, 63, .6) !important;
    color: var(--au-text-2) !important;
}

html.theme-dark-compact :is(.section-heading, .scoring-header) {
    border-color: var(--au-border) !important;
    background: rgba(99, 102, 241, .12) !important;
    color: var(--au-text) !important;
}

html.theme-dark-compact .trend-insights .positive {
    border-color: rgba(52, 211, 153, .35) !important;
    background: rgba(52, 211, 153, .1) !important;
}

html.theme-dark-compact .trend-insights .negative {
    border-color: rgba(251, 113, 133, .35) !important;
    background: rgba(251, 113, 133, .1) !important;
}

html.theme-dark-compact .treatment-donut::before,
html.theme-dark-compact .access-ring::before {
    background: #111933 !important;
}

/* --------------------------------------------------------------------------
   KPI / metric cards: each card glows in its own accent colour
   -------------------------------------------------------------------------- */
html.theme-dark-compact :is(
    .kpi-accent-card,
    .ant-card:has(.ant-statistic),
    .security-strip > .ant-card,
    .task-kpi-card,
    .asset-metric-card,
    .incident-metric-card,
    .report-metric-card,
    .risk-metric-card,
    .vendor-metric-card,
    .policy-metric-card,
    .control-metric-card,
    .quick-audit-metric-card,
    .evidence-metric-card,
    .role-metric,
    .admin-kpi,
    .audit-kpi,
    .compliance-kpi,
    .lifecycle-kpi,
    .vendor-kpi
) {
    --aurora-accent: var(--security-accent, var(--asset-accent, var(--metric-accent, var(--vendor-accent, var(--risk-accent, var(--policy-accent, var(--control-accent, var(--incident-accent, var(--report-accent, var(--kpi-accent, #818cf8))))))))));
    --aurora-accent-text: color-mix(in srgb, var(--aurora-accent) 68%, #ffffff);
    position: relative;
    border: 1px solid color-mix(in srgb, var(--aurora-accent) 34%, rgba(129, 140, 248, .12)) !important;
    border-radius: 16px !important;
    background:
        linear-gradient(90deg, var(--aurora-accent), color-mix(in srgb, var(--aurora-accent) 25%, transparent) 75%, transparent) top / 100% 3px no-repeat,
        radial-gradient(120% 95% at 100% 0%, color-mix(in srgb, var(--aurora-accent) 24%, transparent), transparent 58%),
        radial-gradient(80% 60% at 0% 100%, color-mix(in srgb, var(--aurora-accent) 8%, transparent), transparent 70%),
        linear-gradient(160deg, #19234a 0%, #0f1631 100%) !important;
    color: var(--au-text) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .05) inset,
        0 20px 42px -24px color-mix(in srgb, var(--aurora-accent) 70%, transparent),
        0 10px 24px -16px rgba(0, 0, 0, .7) !important;
}

/* Named tones used by the role dashboards (Kpi, AuditKpi, ComplianceKpi...). */
html.theme-dark-compact :is(.admin-kpi, .audit-kpi, .compliance-kpi, .lifecycle-kpi, .vendor-kpi, .task-kpi-card):is(.blue, .tone-blue) { --aurora-accent: #60a5fa; }
html.theme-dark-compact :is(.admin-kpi, .audit-kpi, .compliance-kpi, .lifecycle-kpi, .vendor-kpi, .task-kpi-card):is(.cyan, .tone-teal, .tone-remediation) { --aurora-accent: #22d3ee; }
html.theme-dark-compact :is(.admin-kpi, .audit-kpi, .compliance-kpi, .lifecycle-kpi, .vendor-kpi, .task-kpi-card):is(.green, .online, .tone-green, .tone-emerald) { --aurora-accent: #34d399; }
html.theme-dark-compact :is(.admin-kpi, .audit-kpi, .compliance-kpi, .lifecycle-kpi, .vendor-kpi, .task-kpi-card):is(.orange, .amber, .delayed, .tone-amber) { --aurora-accent: #fbbf24; }
html.theme-dark-compact :is(.admin-kpi, .audit-kpi, .compliance-kpi, .lifecycle-kpi, .vendor-kpi, .task-kpi-card):is(.red, .offline, .tone-red) { --aurora-accent: #fb7185; }
html.theme-dark-compact :is(.admin-kpi, .audit-kpi, .compliance-kpi, .lifecycle-kpi, .vendor-kpi, .task-kpi-card):is(.purple, .tone-purple) { --aurora-accent: #c084fc; }

/* Role metrics carry their colour on the icon only; cycle accents so the row stays lively. */
html.theme-dark-compact .role-metrics > .role-metric:nth-child(6n + 1) { --aurora-accent: #60a5fa; }
html.theme-dark-compact .role-metrics > .role-metric:nth-child(6n + 2) { --aurora-accent: #34d399; }
html.theme-dark-compact .role-metrics > .role-metric:nth-child(6n + 3) { --aurora-accent: #fbbf24; }
html.theme-dark-compact .role-metrics > .role-metric:nth-child(6n + 4) { --aurora-accent: #fb7185; }
html.theme-dark-compact .role-metrics > .role-metric:nth-child(6n + 5) { --aurora-accent: #c084fc; }
html.theme-dark-compact .role-metrics > .role-metric:nth-child(6n + 6) { --aurora-accent: #22d3ee; }

/* Headline values glow in the card accent. */
html.theme-dark-compact :is(
    .kpi-accent-card,
    .ant-card:has(.ant-statistic),
    .security-strip > .ant-card,
    .task-kpi-card
) :is(.ant-statistic-content, .ant-statistic-content-value, .task-kpi-value),
html.theme-dark-compact :is(
    .role-metric-content > strong,
    .admin-kpi > div > strong,
    .audit-kpi > div > strong,
    .audit-kpi > strong,
    .compliance-kpi > div > strong,
    .lifecycle-kpi > div > strong,
    .vendor-kpi > div > strong,
    .asset-metric-card strong,
    .incident-metric-card strong,
    .evidence-metric-card strong,
    .quick-audit-metric-card strong
) {
    color: var(--aurora-accent-text) !important;
    text-shadow: 0 0 22px color-mix(in srgb, var(--aurora-accent) 45%, transparent);
}

/* Labels and supporting text stay calm so the value reads first. */
html.theme-dark-compact :is(
    .ant-statistic-title,
    .task-kpi-title,
    .task-kpi-support,
    .task-kpi-footer,
    .role-metric-content > span,
    .role-metric-content > small,
    .admin-kpi > div > span,
    .admin-kpi > div > small,
    .audit-kpi > div > span,
    .audit-kpi > div > small,
    .compliance-kpi > div > span,
    .compliance-kpi > div > small,
    .lifecycle-kpi > div > span,
    .vendor-kpi > div > span,
    .vendor-kpi > div > small
) {
    color: var(--au-text-2) !important;
}

/* Icon chips inside KPI cards. */
html.theme-dark-compact :is(
    .admin-kpi-icon,
    .compliance-kpi > .icon,
    .vendor-kpi > .icon,
    .lifecycle-kpi > .kpi-icon,
    .audit-kpi > .icon,
    .audit-kpi > .kpi-icon,
    .task-kpi-icon,
    .asset-metric-card [class*="icon"]:not(.anticon),
    .incident-metric-card [class*="icon"]:not(.anticon),
    .evidence-metric-card [class*="icon"]:not(.anticon),
    .quick-audit-metric-card [class*="icon"]:not(.anticon)
) {
    border: 1px solid color-mix(in srgb, var(--aurora-accent) 40%, transparent) !important;
    background: linear-gradient(145deg, color-mix(in srgb, var(--aurora-accent) 30%, transparent), color-mix(in srgb, var(--aurora-accent) 10%, transparent)) !important;
    color: var(--aurora-accent-text) !important;
    box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--aurora-accent) 80%, transparent) !important;
}

html.theme-dark-compact .role-metric-icon {
    border: 1px solid color-mix(in srgb, currentColor 40%, transparent) !important;
    background: color-mix(in srgb, currentColor 18%, transparent) !important;
    box-shadow: 0 8px 22px -8px currentColor !important;
    filter: brightness(1.25) saturate(1.1);
}

html.theme-dark-compact .task-kpi-progress {
    background: rgba(148, 163, 184, .16) !important;
}

@media (prefers-reduced-motion: no-preference) {
    html.theme-dark-compact :is(.ant-card, .role-metric, .admin-kpi, .audit-kpi, .compliance-kpi, .lifecycle-kpi, .vendor-kpi, .asset-metric-card, .incident-metric-card, .task-kpi-card, .ops-card) {
        transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease !important;
    }

    html.theme-dark-compact .ant-card:hover,
    html.theme-dark-compact .ops-card:hover {
        border-color: var(--au-border-strong) !important;
        box-shadow: var(--au-shadow), 0 22px 46px -22px rgba(99, 102, 241, .55) !important;
    }

    html.theme-dark-compact :is(
        .kpi-accent-card,
        .ant-card:has(.ant-statistic),
        .security-strip > .ant-card,
        .task-kpi-card,
        .asset-metric-card,
        .incident-metric-card,
        .report-metric-card,
        .risk-metric-card,
        .vendor-metric-card,
        .policy-metric-card,
        .control-metric-card,
        .quick-audit-metric-card,
        .evidence-metric-card,
        .role-metric,
        .admin-kpi,
        .audit-kpi,
        .compliance-kpi,
        .lifecycle-kpi,
        .vendor-kpi
    ):hover {
        transform: translateY(-3px);
        border-color: color-mix(in srgb, var(--aurora-accent) 65%, transparent) !important;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, .06) inset,
            0 0 0 1px color-mix(in srgb, var(--aurora-accent) 25%, transparent),
            0 26px 50px -22px color-mix(in srgb, var(--aurora-accent) 85%, transparent) !important;
    }
}

/* Header / section icons. */
html.theme-dark-compact :is(
    .dashboard-panel-icon,
    .evidence-chart-icon,
    .repository-title-icon,
    .assets-panel-icon,
    .tickets-panel-icon,
    .export-panel-icon,
    .report-section-icon,
    .operations-title-icon,
    .ops-heading-icon,
    .insight-icon,
    .section-icon
) {
    border: 1px solid rgba(129, 140, 248, .4) !important;
    background: linear-gradient(145deg, rgba(99, 102, 241, .32), rgba(34, 211, 238, .12)) !important;
    color: #c7d2fe !important;
    box-shadow: 0 8px 22px -8px rgba(99, 102, 241, .75) !important;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
html.theme-dark-compact .ant-btn-primary:not([disabled]) {
    border-color: transparent !important;
    background: var(--au-grad) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .9), 0 1px 0 rgba(255, 255, 255, .18) inset !important;
}

html.theme-dark-compact .ant-btn-primary:not([disabled]):is(:hover, :focus-visible) {
    border-color: transparent !important;
    background: var(--au-grad) !important;
    color: #fff !important;
    filter: brightness(1.12);
    box-shadow: 0 14px 30px -10px rgba(139, 92, 246, .95), 0 1px 0 rgba(255, 255, 255, .22) inset !important;
}

html.theme-dark-compact .ant-btn-primary.ant-btn-dangerous:not([disabled]) {
    background: linear-gradient(135deg, #fb7185, #e11d48) !important;
    box-shadow: 0 10px 24px -10px rgba(225, 29, 72, .9) !important;
}

html.theme-dark-compact :is(.ant-btn-default, .ant-btn-dashed):not(.ant-btn-dangerous):not([disabled]) {
    border-color: var(--au-border-strong) !important;
    background: rgba(30, 41, 82, .55) !important;
    color: #dbe3ff !important;
}

html.theme-dark-compact :is(.ant-btn-default, .ant-btn-dashed):not(.ant-btn-dangerous):not([disabled]):hover {
    border-color: #818cf8 !important;
    background: rgba(99, 102, 241, .2) !important;
    color: #fff !important;
}

html.theme-dark-compact .ant-btn-dangerous:not(.ant-btn-primary) {
    border-color: rgba(251, 113, 133, .5) !important;
    background: rgba(251, 113, 133, .08) !important;
    color: #fda4af !important;
}

html.theme-dark-compact .ant-btn[disabled] {
    border-color: rgba(148, 163, 184, .16) !important;
    background: rgba(148, 163, 184, .08) !important;
    color: #5f6a8a !important;
    box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */
html.theme-dark-compact :is(.ant-input, .ant-input-affix-wrapper, .ant-input-number, .ant-picker, .ant-select:not(.ant-select-customize-input) .ant-select-selector, textarea, select) {
    border-color: rgba(129, 140, 248, .22) !important;
    background: var(--au-input) !important;
    color: var(--au-text) !important;
    box-shadow: none !important;
}

html.theme-dark-compact .ant-input-affix-wrapper > .ant-input {
    background: transparent !important;
}

html.theme-dark-compact :is(.ant-input, .ant-input-affix-wrapper, .ant-input-number, .ant-picker, .ant-select-selector, textarea, select):hover {
    border-color: rgba(129, 140, 248, .45) !important;
}

html.theme-dark-compact :is(.ant-input, .ant-input-number, textarea, select):focus,
html.theme-dark-compact :is(.ant-input-affix-wrapper, .ant-picker, .ant-select-selector, .ant-input-number):focus-within,
html.theme-dark-compact :is(.ant-input-affix-wrapper-focused, .ant-picker-focused, .ant-select-focused .ant-select-selector) {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, .22), 0 0 18px -4px rgba(34, 211, 238, .35) !important;
}

html.theme-dark-compact :is(.ant-input::placeholder, textarea::placeholder, .ant-select-selection-placeholder) {
    color: #66729a !important;
}

html.theme-dark-compact :is(.ant-select-arrow, .ant-picker-suffix, .ant-input-prefix, .ant-input-suffix, .ant-select-clear, .ant-picker-clear) {
    background: transparent !important;
    color: #8b96b8 !important;
}

html.theme-dark-compact .ant-select-multiple .ant-select-selection-item {
    border-color: rgba(129, 140, 248, .35) !important;
    background: rgba(99, 102, 241, .18) !important;
    color: #e0e7ff !important;
}

html.theme-dark-compact :is(.ant-checkbox-inner, .ant-radio-inner) {
    border-color: rgba(129, 140, 248, .45) !important;
    background: var(--au-input) !important;
}

html.theme-dark-compact :is(.ant-checkbox-checked .ant-checkbox-inner, .ant-checkbox-indeterminate .ant-checkbox-inner) {
    border-color: #818cf8 !important;
    background: #6366f1 !important;
}

html.theme-dark-compact .ant-radio-checked .ant-radio-inner {
    border-color: #818cf8 !important;
}

html.theme-dark-compact .ant-radio-inner::after {
    background: #a5b4fc !important;
}

html.theme-dark-compact .ant-radio-button-wrapper {
    border-color: var(--au-border-strong) !important;
    background: rgba(22, 32, 63, .7) !important;
    color: var(--au-text-2) !important;
}

html.theme-dark-compact .ant-radio-button-wrapper::before {
    background: var(--au-border-strong) !important;
}

html.theme-dark-compact .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
    border-color: transparent !important;
    background: var(--au-grad) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .9) !important;
}

html.theme-dark-compact .ant-switch {
    background: rgba(148, 163, 184, .28) !important;
}

html.theme-dark-compact .ant-switch-checked {
    background: var(--au-grad) !important;
}

html.theme-dark-compact :is(.ant-form-item-label > label, .ant-form-item-label > label .anticon) {
    color: var(--au-text-2) !important;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
html.theme-dark-compact .ant-table-wrapper .ant-table-container,
html.theme-dark-compact :is(.dashboard-data-table, .asset-table-shell, .ticket-table-shell, .report-table-shell, .export-table-shell, .user-table-shell, .role-access-table-shell, .task-table-shell) {
    overflow: hidden;
    border: 1px solid var(--au-border) !important;
    border-radius: 14px !important;
    background: rgba(12, 18, 40, .7) !important;
    box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .8) !important;
}

html.theme-dark-compact :is(.ant-table, .ant-table-container, .ant-table-content, .ant-table-body, .ant-table-placeholder, .ant-table-placeholder > td) {
    border-color: var(--au-border) !important;
    background: transparent !important;
    color: #dde3f7 !important;
}

html.theme-dark-compact .ant-table-thead > tr > th,
html.theme-dark-compact .feature-table th {
    border-bottom: 1px solid rgba(129, 140, 248, .28) !important;
    background: linear-gradient(180deg, #1b2653, #151e44) !important;
    color: #c7d2fe !important;
    font-weight: 700;
    letter-spacing: .06em;
}

html.theme-dark-compact .ant-table-thead > tr > th::before {
    background-color: rgba(129, 140, 248, .2) !important;
}

html.theme-dark-compact .ant-table-tbody > tr > td,
html.theme-dark-compact .feature-table td {
    border-bottom: 1px solid rgba(129, 140, 248, .09) !important;
    background: rgba(15, 22, 48, .85) !important;
    color: #dde3f7 !important;
}

html.theme-dark-compact .ant-table-tbody > tr:nth-child(even) > td,
html.theme-dark-compact .feature-table tbody tr:nth-child(even) > td {
    background: rgba(20, 29, 62, .85) !important;
}

html.theme-dark-compact .ant-table-tbody > tr:hover > td,
html.theme-dark-compact .feature-table tbody tr:hover > td {
    background: rgba(56, 62, 140, .38) !important;
}

html.theme-dark-compact .ant-table-tbody > tr:hover > td:first-child,
html.theme-dark-compact .feature-table tbody tr:hover > td:first-child {
    box-shadow: inset 3px 0 0 #22d3ee !important;
}

html.theme-dark-compact .ant-table-tbody > tr.ant-table-row-selected > td {
    background: rgba(99, 102, 241, .22) !important;
}

html.theme-dark-compact :is(.ant-table-column-sorter, .ant-table-filter-trigger) {
    color: #7d89ad !important;
}

html.theme-dark-compact :is(.ant-table-column-sorter-up.active, .ant-table-column-sorter-down.active, .ant-table-filter-trigger.active) {
    color: #22d3ee !important;
}

html.theme-dark-compact :is(.table-row, .scoring-row, .mapping-row, .branch-row, .activity-row, .renewal, .clickable, .role-panel-row) {
    border-color: rgba(129, 140, 248, .1) !important;
    background: transparent !important;
    color: #dde3f7 !important;
}

html.theme-dark-compact :is(.table-row, .scoring-row, .mapping-row, .branch-row, .activity-row, .renewal, .clickable, .role-panel-row):hover {
    background: rgba(99, 102, 241, .12) !important;
    box-shadow: inset 3px 0 0 #22d3ee !important;
}

/* --------------------------------------------------------------------------
   Pagination, tabs, collapse
   -------------------------------------------------------------------------- */
html.theme-dark-compact :is(.ant-pagination-item, .ant-pagination-prev .ant-pagination-item-link, .ant-pagination-next .ant-pagination-item-link) {
    border-color: var(--au-border-strong) !important;
    background: rgba(22, 32, 63, .7) !important;
}

html.theme-dark-compact :is(.ant-pagination-item a, .ant-pagination-prev button, .ant-pagination-next button) {
    color: var(--au-text-2) !important;
}

html.theme-dark-compact .ant-pagination-item-active {
    border-color: transparent !important;
    background: var(--au-grad) !important;
    box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .9) !important;
}

html.theme-dark-compact .ant-pagination-item-active a {
    color: #fff !important;
}

html.theme-dark-compact .ant-tabs-tab {
    color: var(--au-text-2) !important;
}

html.theme-dark-compact .ant-tabs-tab:hover {
    color: #e0e7ff !important;
}

html.theme-dark-compact .ant-tabs-tab-active .ant-tabs-tab-btn {
    color: #fff !important;
    text-shadow: 0 0 16px rgba(129, 140, 248, .6);
}

html.theme-dark-compact .ant-tabs-ink-bar {
    height: 3px !important;
    border-radius: 3px;
    background: var(--au-grad-soft) !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, .7);
}

html.theme-dark-compact :is(.ant-tabs-nav::before, .ant-tabs-top > .ant-tabs-nav::before) {
    border-bottom-color: var(--au-border) !important;
}

html.theme-dark-compact .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab {
    border-color: var(--au-border) !important;
    background: rgba(22, 32, 63, .6) !important;
}

html.theme-dark-compact .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active {
    background: rgba(99, 102, 241, .22) !important;
}

html.theme-dark-compact :is(.ant-collapse, .ant-collapse-item) {
    border-color: var(--au-border) !important;
    background: transparent !important;
}

html.theme-dark-compact :is(.ant-collapse-header, .ant-collapse-content, .ant-collapse-content-box) {
    border-color: var(--au-border) !important;
    background: rgba(17, 25, 51, .85) !important;
    color: var(--au-text) !important;
}

html.theme-dark-compact .ant-collapse-header:hover {
    background: rgba(99, 102, 241, .14) !important;
}

html.theme-dark-compact :is(.ant-divider, .panel-title, .ant-list-item, .ant-descriptions-bordered .ant-descriptions-view, .ant-descriptions-bordered .ant-descriptions-row, .ant-descriptions-bordered .ant-descriptions-item-label, .ant-descriptions-bordered .ant-descriptions-item-content) {
    border-color: var(--au-border) !important;
}

html.theme-dark-compact .ant-descriptions-bordered .ant-descriptions-item-label {
    background: rgba(99, 102, 241, .1) !important;
}

html.theme-dark-compact .ant-descriptions-item-content {
    color: var(--au-text) !important;
}

/* --------------------------------------------------------------------------
   Overlays: modals, drawers, dropdowns, popovers, tooltips
   -------------------------------------------------------------------------- */
html.theme-dark-compact .ant-modal-mask,
html.theme-dark-compact .ant-drawer-mask {
    background: rgba(3, 6, 18, .72) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

html.theme-dark-compact :is(.ant-modal-content, .ant-drawer-content, .feature-modal) {
    border: 1px solid var(--au-border-strong) !important;
    background:
        radial-gradient(ellipse 70% 40% at 100% 0%, rgba(99, 102, 241, .16), transparent 70%),
        linear-gradient(160deg, #151e42, #0e1530) !important;
    color: var(--au-text) !important;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .03) inset !important;
}

html.theme-dark-compact :is(.ant-modal-header, .ant-drawer-header) {
    border-bottom: 1px solid var(--au-border) !important;
    background:
        linear-gradient(90deg, #22d3ee, #6366f1 50%, #a855f7) top / 100% 2px no-repeat,
        transparent !important;
}

html.theme-dark-compact :is(.ant-modal-footer, .ant-drawer-footer) {
    border-top: 1px solid var(--au-border) !important;
    background: transparent !important;
}

html.theme-dark-compact :is(.ant-modal-title, .ant-drawer-title) {
    color: #f3f5ff !important;
    font-weight: 700;
}

html.theme-dark-compact :is(.ant-modal-close, .ant-drawer-close) {
    color: #8b96b8 !important;
}

html.theme-dark-compact :is(.ant-modal-close, .ant-drawer-close):hover {
    color: #fff !important;
}

html.theme-dark-compact :is(.ant-dropdown-menu, .ant-select-dropdown, .ant-picker-panel-container, .ant-popover-inner, .ant-cascader-menus) {
    border: 1px solid var(--au-border-strong) !important;
    background: linear-gradient(160deg, #161f44, #10173a) !important;
    color: var(--au-text) !important;
    box-shadow: 0 22px 50px -14px rgba(0, 0, 0, .85) !important;
}

html.theme-dark-compact .ant-popover-arrow-content,
html.theme-dark-compact .ant-popover-arrow-content::before {
    background: #161f44 !important;
}

html.theme-dark-compact :is(.ant-dropdown-menu-item, .ant-select-item, .ant-picker-cell, .ant-popover-title, .ant-popover-inner-content) {
    color: var(--au-text) !important;
}

html.theme-dark-compact .ant-popover-title {
    border-bottom-color: var(--au-border) !important;
}

html.theme-dark-compact :is(.ant-dropdown-menu-item:hover, .ant-select-item-option-active) {
    background: rgba(99, 102, 241, .18) !important;
    color: #fff !important;
}

html.theme-dark-compact .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    background: rgba(34, 211, 238, .14) !important;
    color: #a5f3fc !important;
    font-weight: 600;
}

html.theme-dark-compact :is(.ant-picker-header, .ant-picker-footer, .ant-picker-panel) {
    border-color: var(--au-border) !important;
}

html.theme-dark-compact :is(.ant-picker-header button, .ant-picker-content th) {
    color: var(--au-text-2) !important;
}

html.theme-dark-compact .ant-picker-cell:not(.ant-picker-cell-in-view) {
    color: #4f5a7c !important;
}

html.theme-dark-compact .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner {
    background: var(--au-grad) !important;
    color: #fff !important;
}

html.theme-dark-compact .ant-picker-cell-in-view.ant-picker-cell-today .ant-picker-cell-inner::before {
    border-color: #22d3ee !important;
}

html.theme-dark-compact .ant-picker-cell:hover:not(.ant-picker-cell-selected) .ant-picker-cell-inner {
    background: rgba(99, 102, 241, .22) !important;
}

html.theme-dark-compact .ant-tooltip-inner {
    border: 1px solid var(--au-border-strong);
    background: #1c2656 !important;
    color: #f3f5ff !important;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .8) !important;
}

html.theme-dark-compact .ant-tooltip-arrow-content,
html.theme-dark-compact .ant-tooltip-arrow-content::before {
    background: #1c2656 !important;
}

/* --------------------------------------------------------------------------
   Tags, badges, alerts, progress: replace AntD's pastel light fills
   -------------------------------------------------------------------------- */
html.theme-dark-compact .ant-tag {
    --tag: #94a3b8;
    border: 1px solid color-mix(in srgb, var(--tag) 42%, transparent) !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--tag) 15%, transparent) !important;
    color: color-mix(in srgb, var(--tag) 78%, #ffffff) !important;
    font-weight: 600;
}

html.theme-dark-compact .ant-tag:is(.ant-tag-red, .ant-tag-error, .ant-tag-volcano) { --tag: #fb7185; }
html.theme-dark-compact .ant-tag:is(.ant-tag-orange, .ant-tag-warning, .ant-tag-gold, .ant-tag-yellow) { --tag: #fbbf24; }
html.theme-dark-compact .ant-tag:is(.ant-tag-green, .ant-tag-success, .ant-tag-lime) { --tag: #34d399; }
html.theme-dark-compact .ant-tag:is(.ant-tag-blue, .ant-tag-processing, .ant-tag-geekblue) { --tag: #60a5fa; }
html.theme-dark-compact .ant-tag.ant-tag-cyan { --tag: #22d3ee; }
html.theme-dark-compact .ant-tag.ant-tag-purple { --tag: #c084fc; }
html.theme-dark-compact .ant-tag.ant-tag-magenta { --tag: #f472b6; }

html.theme-dark-compact .ant-tag.ant-tag-has-color {
    border-color: transparent !important;
    color: #fff !important;
}

html.theme-dark-compact .ant-tag .anticon {
    color: inherit !important;
}

html.theme-dark-compact .ant-badge-count {
    box-shadow: 0 0 0 1px #0a1022, 0 4px 12px -2px rgba(251, 113, 133, .6) !important;
}

html.theme-dark-compact .ant-badge-status-text {
    color: var(--au-text-2) !important;
}

html.theme-dark-compact .ant-alert {
    --alert: #60a5fa;
    border: 1px solid color-mix(in srgb, var(--alert) 40%, transparent) !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--alert) 12%, rgba(15, 22, 48, .9)) !important;
    color: var(--au-text) !important;
}

html.theme-dark-compact .ant-alert-success { --alert: #34d399; }
html.theme-dark-compact .ant-alert-warning { --alert: #fbbf24; }
html.theme-dark-compact .ant-alert-error { --alert: #fb7185; }

html.theme-dark-compact :is(.ant-alert-message, .ant-alert-description) {
    color: var(--au-text) !important;
}

html.theme-dark-compact .ant-alert-icon {
    color: var(--alert) !important;
}

html.theme-dark-compact .ant-progress-inner {
    background: rgba(148, 163, 184, .14) !important;
}

html.theme-dark-compact .ant-progress-status-normal .ant-progress-bg,
html.theme-dark-compact .ant-progress-status-active .ant-progress-bg {
    background: var(--au-grad-soft);
    box-shadow: 0 0 10px rgba(99, 102, 241, .5);
}

html.theme-dark-compact .ant-progress-circle-trail {
    stroke: rgba(148, 163, 184, .16) !important;
}

html.theme-dark-compact :is(.ant-progress-text, .ant-empty-description, .ant-breadcrumb, .ant-breadcrumb a, .ant-breadcrumb-separator) {
    color: var(--au-text-2) !important;
}

html.theme-dark-compact .ant-empty-img-default,
html.theme-dark-compact .ant-empty-img-simple {
    opacity: .55;
}

html.theme-dark-compact :is(.ant-steps-item-title, .ant-timeline-item-content) {
    color: var(--au-text) !important;
}

html.theme-dark-compact .ant-steps-item-description {
    color: var(--au-text-2) !important;
}

html.theme-dark-compact .ant-skeleton-content :is(.ant-skeleton-title, .ant-skeleton-paragraph > li),
html.theme-dark-compact .ant-skeleton-element .ant-skeleton-button,
html.theme-dark-compact .ant-skeleton-avatar {
    background: linear-gradient(90deg, rgba(129, 140, 248, .08) 25%, rgba(129, 140, 248, .18) 37%, rgba(129, 140, 248, .08) 63%) !important;
    background-size: 400% 100% !important;
}

/* --------------------------------------------------------------------------
   Charts
   -------------------------------------------------------------------------- */
html.theme-dark-compact :is(.apexcharts-text, .apexcharts-legend-text, .apexcharts-title-text) {
    fill: #b4bedb !important;
    color: #b4bedb !important;
}

html.theme-dark-compact :is(.apexcharts-gridline, .apexcharts-grid-borders line) {
    stroke: rgba(129, 140, 248, .12) !important;
}

html.theme-dark-compact :is(.apexcharts-tooltip, .apexcharts-xaxistooltip, .g2-tooltip) {
    border: 1px solid var(--au-border-strong) !important;
    background: #161f44 !important;
    color: #f3f5ff !important;
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, .85) !important;
}

html.theme-dark-compact .apexcharts-tooltip-title {
    border-bottom-color: var(--au-border) !important;
    background: rgba(99, 102, 241, .16) !important;
}

/* --------------------------------------------------------------------------
   Scrollbars
   -------------------------------------------------------------------------- */
html.theme-dark-compact * {
    scrollbar-color: rgba(129, 140, 248, .38) transparent;
}

html.theme-dark-compact ::-webkit-scrollbar-track {
    background: transparent;
}

html.theme-dark-compact ::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(34, 211, 238, .45), rgba(168, 85, 247, .45)) padding-box !important;
}

/* Configuration header matched to the CISGuard_Project dark presentation. */
html.theme-dark-compact .configuration-hero { border-color:#3b4e87; background:radial-gradient(circle at 92% 105%,rgba(15,62,108,.34),transparent 31%),linear-gradient(135deg,#1b2657 0%,#111a3b 58%,#0d1633 100%); box-shadow:0 16px 38px rgba(0,0,0,.3); }
html.theme-dark-compact .configuration-hero::after { border-color:rgba(30,64,175,.11); }
html.theme-dark-compact .configuration-hero h1 { color:#f4f6ff; }
html.theme-dark-compact .configuration-hero p { color:#b8c1df; }
html.theme-dark-compact .configuration-hero-icon { border-color:#7796ff; background:linear-gradient(145deg,#3b82f6,#4338ca); box-shadow:0 12px 28px rgba(37,99,235,.34); }
html.theme-dark-compact .configuration-refresh { border-color:#3b4f87; background:rgba(17,26,59,.72); color:#e1e7ff; box-shadow:none; }
html.theme-dark-compact .configuration-refresh:hover { border-color:#6f8be5; background:#192654; color:#fff; }
/* Dark compact parity for pages whose isolated feature styles define light surfaces. */
html.theme-dark-compact .ciso-report-page {
    --ciso-ink: #eef2ff;
    --ciso-muted: #aeb9d8;
    --ciso-border: #303c68;
    color: #eef2ff !important;
}
html.theme-dark-compact :is(.ciso-report-picker,.ciso-report-filters,.ciso-report-content,.ciso-report-section,.ciso-report-table-panel,.ciso-report-chart-panel,.ciso-table-card,.ciso-chart-card) {
    border-color: #303c68 !important;
    background: linear-gradient(160deg, rgba(25,35,72,.96), rgba(15,22,46,.98)) !important;
    color: #eef2ff !important;
}
html.theme-dark-compact :is(.ciso-report-picker.collapsed,.ciso-report-filters.collapsed,.ciso-report-toolbar,.ciso-report-section-toggle,.ciso-report-section-toggle:hover,.ciso-report-section.is-open .ciso-report-section-toggle,.ciso-kpi-card,.ciso-section-tab,.ciso-report-tab) {
    border-color: #303c68 !important;
    background: #111933 !important;
    color: #eef2ff !important;
}
html.theme-dark-compact :is(.ciso-picker-select label,.ciso-filter-grid label,.ciso-pagination-controls label,.ciso-section-title,.ciso-table-heading h3,.ciso-report-chart-panel h3,.ciso-kpi-card strong,.ciso-kpi-label,.ciso-section-tab.active) { color:#eef2ff !important; }
html.theme-dark-compact :is(.ciso-picker-select p,.ciso-report-description,.ciso-table-heading span,.ciso-report-pagination,.ciso-report-toolbar > span,.ciso-report-footnote,.ciso-report-tab span) { color:#aeb9d8 !important; }
html.theme-dark-compact :is(.ciso-filter-grid input,.ciso-filter-grid select,.ciso-pagination-controls select) { border-color:#35416e !important; background-color:#0b1228 !important; color:#eef2ff !important; }
html.theme-dark-compact .ciso-report-table th { background:#202b54 !important; color:#dbe4ff !important; }
html.theme-dark-compact .ciso-report-table td { border-color:#303c68 !important; background:#111933 !important; color:#e1e7ff !important; }
html.theme-dark-compact .ciso-report-table tbody tr:nth-child(even) td { background:#151f40 !important; }
html.theme-dark-compact .um-page { background:transparent !important; color:#eef2ff !important; }
html.theme-dark-compact .um-page :is(.um-panel,.um-role-summary-bar,.um-permission-toolbar,.um-profile-upload,.um-permission-table-scroll,.um-role-item,.um-filter-tag,.um-access-segment,.um-permission-counts > span) {
    border-color:#303c68 !important;
    background:#111933 !important;
    color:#e1e7ff !important;
}
html.theme-dark-compact .um-page :is(h2,h3,strong,.um-user-cell strong,.um-section-heading h2,.um-admin-section-title h3,.um-group-heading,.um-role-stat strong,.um-permission-action-name,.um-permission-counts strong,.um-drawer-identity h3) { color:#eef2ff !important; }
html.theme-dark-compact .um-page :is(p,.um-section-heading p,.um-admin-section-title p,.um-classification-note,.um-role-stat span,.um-cell-note,.um-user-cell span,.um-toolbar-field label,.um-role-picker label,.um-profile-upload small) { color:#aeb9d8 !important; }
html.theme-dark-compact .um-page :is(.um-table-scroll .ant-table,.um-page-access-table .ant-table,.um-unmapped-actions .ant-table,.um-admin-permission-group .ant-table) { background:#111933 !important; color:#e1e7ff !important; }
html.theme-dark-compact .um-page :is(.um-table-scroll .ant-table-thead > tr > th,.um-page-access-table .ant-table-thead th,.um-unmapped-actions .ant-table-thead th,.um-admin-permission-group .ant-table-thead th) { border-color:#303c68 !important; background:#202b54 !important; color:#cbd5f5 !important; }
html.theme-dark-compact .um-page :is(.um-table-scroll .ant-table-tbody > tr > td,.um-page-access-table .ant-table-tbody td,.um-unmapped-actions .ant-table-tbody td,.um-admin-permission-group .ant-table-tbody td) { border-color:#28345d !important; background:#111933 !important; color:#e1e7ff !important; }
html.theme-dark-compact .um-page :is(input,.ant-input,.ant-select-selector,textarea) { border-color:#35416e !important; background:#0b1228 !important; color:#eef2ff !important; }
html.theme-dark-compact .um-page .ant-tabs-tab-btn { color:#b4bedb !important; }
html.theme-dark-compact .um-page .ant-tabs-tab-active .ant-tabs-tab-btn { color:#eef2ff !important; }
