::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

body { font-feature-settings: "tnum"; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Header dropdown panels ---------- */
#searchResults a, #notifList a { display: block; }
#searchResults a:hover, #notifList .notif-item:hover { background: rgba(30, 41, 59, 0.6); }
html[data-theme="light"] #searchResults a:hover,
html[data-theme="light"] #notifList .notif-item:hover { background: #f1f5f9; }

/* ---------- Light theme (toggled via Dark/Light button, persisted in localStorage) ---------- */
html[data-theme="light"] body { background-color: #f1f5f9 !important; color: #1e293b !important; }

/* Layout chrome surfaces */
html[data-theme="light"] .bg-\[\#0A0F1E\] { background-color: #f1f5f9 !important; }
html[data-theme="light"] .bg-\[\#0B1220\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#0F1830\] { background-color: #ffffff !important; }

/* Borders */
html[data-theme="light"] .border-slate-800\/80 { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-slate-800 { border-color: #e2e8f0 !important; }

/* Text */
html[data-theme="light"] .text-white { color: #0f172a !important; }
html[data-theme="light"] .text-slate-200 { color: #1e293b !important; }
html[data-theme="light"] .text-slate-300 { color: #334155 !important; }
html[data-theme="light"] .text-slate-400 { color: #64748b !important; }
html[data-theme="light"] .text-slate-500 { color: #64748b !important; }
html[data-theme="light"] .text-slate-600 { color: #64748b !important; }
html[data-theme="light"] .placeholder-slate-600::placeholder { color: #64748b !important; }

/* Sidebar nav */
html[data-theme="light"] aside nav a:not(.bg-cyan-500\/10):hover { background-color: #f1f5f9 !important; }

/* Card shadows in light mode */
html[data-theme="light"] .shadow-black\/50 { --tw-shadow-color: rgb(148 163 184 / 0.25); }

/* Progress track bars on dashboard */
html[data-theme="light"] .bg-slate-800 { background-color: #e2e8f0 !important; }

/* ---------- Collapsible sidebar ---------- */
#sidebar { transition: width 0.2s ease; }
#sidebar.collapsed { width: 64px !important; }
#sidebar.collapsed .nav-label,
#sidebar.collapsed .nav-num,
#sidebar.collapsed .submenu-toggle,
#sidebar.collapsed .nav-sub,
#sidebar.collapsed .brand-text,
#sidebar.collapsed .brand-sub { display: none !important; }
#sidebar.collapsed .nav-link { justify-content: center; padding-left: 0.5rem; padding-right: 0.5rem; }

/* Collapsed sidebar (item 35): header keeps only a centered toggle. */
#sidebar.collapsed .sidebar-header { justify-content: center; padding-left: 0; padding-right: 0; }
#sidebar.collapsed .brand-logo { display: none !important; }
/* Collapsed sidebar (item 35): badge sits on the icon corner, not the edge. */
#sidebar.collapsed .nav-link { position: relative; }
#sidebar.collapsed .nav-badge { position: absolute; top: 1px; right: 6px; margin-left: 0; }
/* Collapsed sidebar (item 35): footer keeps only the centered status dot. */
#sidebar.collapsed .footer-brand,
#sidebar.collapsed .footer-version,
#sidebar.collapsed .footer-status-text { display: none !important; }
#sidebar.collapsed .sidebar-footer { padding: 0.75rem 0.5rem; }
#sidebar.collapsed .footer-status { justify-content: center; margin-top: 0; margin-left: 0; }
/* Item 44: status row sits under the "Build • Innovate • Grow" tagline (44px = 36px logo + 8px gap). */
#sidebar .footer-status { margin-left: 44px; }


/* ==========================================================================
   MOBILE RULES (duplicated from responsive.css for robustness: these must
   apply even if responsive.css fails to load on the server).
   ========================================================================== */
#sidebarOverlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  background: rgba(2, 6, 16, 0.65);
}
body.nav-open { overflow: hidden; }

@media (max-width: 1023.98px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    height: 100%;
    height: 100dvh;
    width: 248px !important;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  }
  #sidebar.open { transform: translateX(0); }
  #sidebar.collapsed { width: 248px !important; }
  #sidebar.collapsed .nav-label,
  #sidebar.collapsed .nav-num,
  #sidebar.collapsed .submenu-toggle,
  #sidebar.collapsed .brand-text,
  #sidebar.collapsed .brand-sub { display: initial !important; }
  /* Submenus keep their own open/closed state on mobile: only neutralize
     the desktop collapsed "display:none", never force them open. */
  #sidebar.collapsed .nav-sub:not(.hidden) { display: block !important; }
  #sidebar.collapsed .nav-link { justify-content: flex-start; }
  /* Item 35: neutralize the desktop collapsed rules in the mobile drawer. */
  #sidebar.collapsed .brand-logo,
  #sidebar.collapsed .footer-brand { display: flex !important; }
  #sidebar.collapsed .footer-version { display: block !important; }
  #sidebar.collapsed .footer-status-text { display: inline !important; }
  #sidebar.collapsed .sidebar-header { justify-content: flex-start; padding-left: 1rem; padding-right: 1rem; }
  #sidebar.collapsed .sidebar-footer { padding: 1rem; }
  #sidebar.collapsed .footer-status { justify-content: flex-start; margin-top: 0.5rem; }
  #sidebar.collapsed .nav-badge { position: static; margin-left: auto; }
  #sidebarCollapse { display: none; }
  #sidebar .nav-link { min-height: 44px; }
  #sidebar .nav-sub a { padding-top: 0.6rem; padding-bottom: 0.6rem; }
}

@media (min-width: 1024px) {
  #mobileMenuBtn { display: none !important; }
  #sidebarOverlay { display: none !important; }
}

@media (max-width: 767.98px) {
  main .grid-cols-2:not([class*="sm:"]):not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]),
  main .grid-cols-3:not([class*="sm:"]):not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]),
  main .grid-cols-4:not([class*="sm:"]):not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]),
  main .grid-cols-5:not([class*="sm:"]):not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]),
  main .grid-cols-6:not([class*="sm:"]):not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]),
  main .grid-cols-12:not([class*="sm:"]):not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]) {
    grid-template-columns: 1fr !important;
  }
  main [class*="col-span-"]:not([class*="sm:"]):not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]) {
    grid-column: 1 / -1 !important;
  }
  main table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  main table thead,
  main table tbody {
    display: table;
    width: 100%;
    min-width: 560px;
  }
  main table th,
  main table td { white-space: nowrap; }
  main { padding: 0.75rem !important; }
  main .p-6 { padding: 1rem !important; }
  main .p-5 { padding: 1rem !important; }
  main .gap-5 { gap: 0.75rem !important; }
  main pre { max-width: 100%; overflow-x: auto; }
  main .flex.justify-between { flex-wrap: wrap; row-gap: 0.5rem; }
  main input, main select, main textarea { font-size: 16px !important; }
  main button, main .btn { min-height: 40px; }
}

@media (max-width: 767.98px) {
  header { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  main .grid-cols-5:not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  main .grid-cols-3:not([class*="md:"]):not([class*="lg:"]):not([class*="xl:"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ---------- KPI cards (Dashboard Executive Overview style, item 22) ---------- */
/* Shared by Alerting + Incident pages. Dashboard keeps its own identical inline
   copy; values are the same so there is no visual change there. */
.kpi-wrap{container-type:inline-size;margin-bottom:20px}
.kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(8px,.9cqw,14px)}
@media(max-width:767px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.kpi-card{--c:59,130,246;position:relative;display:flex;align-items:center;gap:clamp(8px,.9cqw,16px);min-width:0;padding:clamp(10px,1.1cqw,18px) clamp(10px,1.1cqw,18px);border-radius:12px;
  background:linear-gradient(135deg,rgba(var(--c),.24) 0%,rgba(var(--c),.06) 65%),#0B1326;
  border:1px solid rgba(var(--c),.55);
  box-shadow:0 0 16px rgba(var(--c),.18),inset 0 0 18px rgba(var(--c),.07);
  transition:transform .15s ease,box-shadow .15s ease}
.kpi-card:hover{transform:translateY(-2px);box-shadow:0 0 24px rgba(var(--c),.38),inset 0 0 18px rgba(var(--c),.10)}
.kpi-card.is-active{border-color:rgba(var(--c),.85);box-shadow:0 0 24px rgba(var(--c),.38),inset 0 0 18px rgba(var(--c),.10)}
.kpi-ico{width:clamp(34px,3.2cqw,52px);height:clamp(34px,3.2cqw,52px);border-radius:9999px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#fff;
  background:linear-gradient(145deg,rgba(var(--c),1),rgba(var(--c),.62));box-shadow:0 0 12px rgba(var(--c),.55)}
.kpi-ico svg{width:52%;height:52%}
.kpi-body{min-width:0;flex:1}
.kpi-label{font-size:clamp(10px,.95cqw,13px);line-height:1.2;color:#cbd5e1;margin:0 0 3px}
.kpi-value{margin:0;font-size:clamp(17px,1.9cqw,28px);white-space:nowrap;line-height:1.1;font-weight:700;color:#fff;letter-spacing:-.01em}
.kpi-trend{display:flex;align-items:center;gap:3px;margin-top:4px;white-space:nowrap;font-size:clamp(10px,.95cqw,13px);font-weight:600;color:rgb(var(--c))}
.kpi-trend svg{width:1em;height:1em;flex-shrink:0}
.kpi-trend.is-none{color:#64748b;font-weight:500}
html[data-theme="light"] .kpi-card{background:linear-gradient(135deg,rgba(var(--c),.16) 0%,#ffffff 70%);box-shadow:0 1px 8px rgba(var(--c),.18)}
html[data-theme="light"] .kpi-label{color:#475569}
html[data-theme="light"] .kpi-value{color:#0f172a}
/* Large table boxes: same KPI pattern, lighter */
.kpi-panel{--c:59,130,246;position:relative;border-radius:12px;
  background:linear-gradient(135deg,rgba(var(--c),.10) 0%,rgba(var(--c),.03) 65%),#0B1326;
  border:1px solid rgba(var(--c),.45);
  box-shadow:0 0 12px rgba(var(--c),.12),inset 0 0 14px rgba(var(--c),.05)}
html[data-theme="light"] .kpi-panel{background:linear-gradient(135deg,rgba(var(--c),.08) 0%,#ffffff 70%);box-shadow:0 1px 6px rgba(var(--c),.14)}
/* ===== ai/index.php ===== */
html[data-theme="light"] .ai-logo { color:#0284c7 !important; }
html[data-theme="light"] .ai-h1 { color:#0f172a !important; }
html[data-theme="light"] .ai-sub { color:#475569 !important; }
html[data-theme="light"] .ai-badge { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .ai-badge .ic { color:#0284c7 !important; }
html[data-theme="light"] .ai-badge b { color:#1e293b !important; }
html[data-theme="light"] .ai-badge span { color:#64748b !important; }
html[data-theme="light"] .ai-k { background:#ffffff !important; }
html[data-theme="light"] .ai-k .lb { color:#475569 !important; }
html[data-theme="light"] .ai-k .nv { color:#0f172a !important; }
html[data-theme="light"] .ai-panel { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .ai-ph .t { color:#0f172a !important; }
html[data-theme="light"] .ai-ph .t svg { color:#0284c7 !important; }
html[data-theme="light"] .ai-pd { color:#475569 !important; }
html[data-theme="light"] .ai-fld label { color:#475569 !important; }
html[data-theme="light"] .ai-fld select { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .ai-rbtn { color:#475569 !important; }
html[data-theme="light"] .ai-hero { background:#ffffff !important; }
html[data-theme="light"] .ai-hero-title b { color:#0f172a !important; }
html[data-theme="light"] .ai-devline { color:#475569 !important; }
html[data-theme="light"] .ai-devline svg { color:#2563eb !important; }
html[data-theme="light"] .ai-conf .cl { color:#475569 !important; }
html[data-theme="light"] .ai-col h5 { color:#475569 !important; }
html[data-theme="light"] .ai-col h5 svg { color:#dc2626 !important; }
html[data-theme="light"] .ai-col p { color:#475569 !important; }
html[data-theme="light"] .ai-col li { color:#475569 !important; }
html[data-theme="light"] .ai-col li::before { color:#2563eb !important; }
html[data-theme="light"] .ai-ghost { color:#475569 !important; }
html[data-theme="light"] .ai-tbl th { color:#475569 !important; }
html[data-theme="light"] .ai-tbl td { color:#475569 !important; }
html[data-theme="light"] .ai-viewall { color:#2563eb !important; }
html[data-theme="light"] .ai-step .ic { color:#0284c7 !important; }
html[data-theme="light"] .ai-step .n { color:#475569 !important; }
html[data-theme="light"] .ai-step b { color:#0f172a !important; }
html[data-theme="light"] .ai-step p { color:#475569 !important; }
html[data-theme="light"] .ai-act .ic { color:#0f172a !important; }
html[data-theme="light"] .ai-act b { color:#1e293b !important; }
html[data-theme="light"] .ai-act span { color:#64748b !important; }
html[data-theme="light"] .ai-empty { color:#475569 !important; }
html[data-theme="light"] .ai-find { color:#0f172a !important; }
html[data-theme="light"] .ai-find small { color:#64748b !important; }
html[data-theme="light"] .ai-devcell .ic { color:#2563eb !important; }
html[data-theme="light"] .ai-devcell b { color:#1e293b !important; }
html[data-theme="light"] .ai-devcell span { color:#64748b !important; }
html[data-theme="light"] .ai-actbtn { color:#475569 !important; }

/* ===== automation/index.php ===== */
html[data-theme="light"] .ac-h1 { color:#0284c7 !important; }
html[data-theme="light"] .ac-sub { color:#2563eb !important; }
html[data-theme="light"] .ac-badge { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .ac-badge .bi { color:#0284c7 !important; }
html[data-theme="light"] .ac-badge b { color:#1e293b !important; }
html[data-theme="light"] .ac-badge span { color:#475569 !important; }
html[data-theme="light"] .ac-desc { color:#475569 !important; }
html[data-theme="light"] .ac-panel { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .ac-ph .t { color:#0f172a !important; }
html[data-theme="light"] .ac-ph .t svg { color:#2563eb !important; }
html[data-theme="light"] .ac-live:not(.off) { color:#15803d !important; }
html[data-theme="light"] .ac-live.off { color:#b45309 !important; }
html[data-theme="light"] .ac-k { background:#ffffff !important; }
html[data-theme="light"] .ac-k .ic { color:#2563eb !important; }
html[data-theme="light"] .ac-k .lb { color:#475569 !important; }
html[data-theme="light"] .ac-k .nv { color:#0f172a !important; }
html[data-theme="light"] .ac-k.g { background:#ffffff !important; }
html[data-theme="light"] .ac-k.g .ic { color:#15803d !important; }
html[data-theme="light"] .ac-k.r { background:#ffffff !important; }
html[data-theme="light"] .ac-k.r .ic { color:#dc2626 !important; }
html[data-theme="light"] .ac-pend { background:#ffffff !important; }
html[data-theme="light"] .ac-pend h4 { color:#b45309 !important; }
html[data-theme="light"] .ac-pend .nm { color:#0f172a !important; }
html[data-theme="light"] .ac-pend .tm { color:#475569 !important; }
html[data-theme="light"] .ac-tab:not(.on) { color:#475569 !important; }
html[data-theme="light"] .ac-tab:not(.on):hover { color:#0f172a !important; }
html[data-theme="light"] .ac-tab.on { color:#0f172a !important; }
html[data-theme="light"] .ac-search svg { color:#64748b !important; }
html[data-theme="light"] .ac-search input { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .ac-search input::placeholder { color:#64748b !important; }
html[data-theme="light"] .ac-tbl { background:#ffffff !important; }
html[data-theme="light"] table.ac-t thead th { color:#475569 !important; background:#f1f5f9 !important; }
html[data-theme="light"] table.ac-t tbody td { color:#475569 !important; }
html[data-theme="light"] table.ac-t td.nm { color:#0f172a !important; }
html[data-theme="light"] .ac-st.g { color:#15803d !important; }
html[data-theme="light"] .ac-st.r { color:#dc2626 !important; }
html[data-theme="light"] .ac-st.b { color:#2563eb !important; }
html[data-theme="light"] .ac-st.c { color:#0891b2 !important; }
html[data-theme="light"] .ac-st.a { color:#b45309 !important; }
html[data-theme="light"] .ac-st.p { color:#6d28d9 !important; }
html[data-theme="light"] .ac-dots { color:#475569 !important; }
html[data-theme="light"] .ac-dots:hover { color:#0f172a !important; }
html[data-theme="light"] tr.ac-d td { background:#ffffff !important; }
html[data-theme="light"] .ac-kv { color:#475569 !important; }
html[data-theme="light"] .ac-kv b { color:#1e293b !important; }
html[data-theme="light"] .ac-log { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .ac-empty { color:#64748b !important; }

/* ===== backups/index.php ===== */
html[data-theme="light"] .bk-h1 { color:#0284c7 !important; }
html[data-theme="light"] .bk-sub { color:#2563eb !important; }
html[data-theme="light"] .bk-badge { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .bk-badge .bi { color:#0284c7 !important; }
html[data-theme="light"] .bk-badge b { color:#1e293b !important; }
html[data-theme="light"] .bk-badge span { color:#475569 !important; }
html[data-theme="light"] .bk-desc { color:#475569 !important; }
html[data-theme="light"] .bk-flash { color:#0284c7 !important; }
html[data-theme="light"] .bk-panel { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .bk-ph .t { color:#0f172a !important; }
html[data-theme="light"] .bk-ph .t svg { color:#2563eb !important; }
html[data-theme="light"] .bk-k { background:#ffffff !important; }
html[data-theme="light"] .bk-k .ic { color:#2563eb !important; }
html[data-theme="light"] .bk-k .lb { color:#475569 !important; }
html[data-theme="light"] .bk-k .nv { color:#0f172a !important; }
html[data-theme="light"] .bk-k.g { background:#ffffff !important; }
html[data-theme="light"] .bk-k.g .ic { color:#15803d !important; }
html[data-theme="light"] .bk-k.r { background:#ffffff !important; }
html[data-theme="light"] .bk-k.r .ic { color:#dc2626 !important; }
html[data-theme="light"] .bk-tab:not(.on) { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .bk-tab:not(.on):hover { color:#0f172a !important; }
html[data-theme="light"] .bk-search svg { color:#64748b !important; }
html[data-theme="light"] .bk-search input { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .bk-search input::placeholder { color:#64748b !important; }
html[data-theme="light"] .bk-tbl { background:#ffffff !important; }
html[data-theme="light"] table.bk-t thead th { color:#475569 !important; background:#f1f5f9 !important; }
html[data-theme="light"] table.bk-t tbody td { color:#475569 !important; }
html[data-theme="light"] table.bk-t td.nm { color:#0f172a !important; }
html[data-theme="light"] .bk-st.g { color:#15803d !important; }
html[data-theme="light"] .bk-st.r { color:#dc2626 !important; }
html[data-theme="light"] .bk-st.b { color:#2563eb !important; }
html[data-theme="light"] .bk-st.c { color:#0891b2 !important; }
html[data-theme="light"] .bk-st.a { color:#b45309 !important; }
html[data-theme="light"] .bk-st.p { color:#6d28d9 !important; }
html[data-theme="light"] .bk-st.n { color:#64748b !important; }
html[data-theme="light"] .bk-ic { color:#1e293b !important; }
html[data-theme="light"] .bk-ic:hover { color:#0f172a !important; }
html[data-theme="light"] .bk-sm { color:#0f172a !important; background:#ffffff !important; }
html[data-theme="light"] .bk-empty { color:#64748b !important; }
html[data-theme="light"] .bk-note { color:#64748b !important; }
html[data-theme="light"] .bk-sched .n { color:#0f172a !important; }
html[data-theme="light"] .bk-sched .m { color:#64748b !important; }
html[data-theme="light"] .bk-pill.on { color:#15803d !important; }
html[data-theme="light"] .bk-pill.off { color:#64748b !important; }
html[data-theme="light"] .bk-form { color:#475569 !important; }
html[data-theme="light"] .bk-form h4 { color:#0f172a !important; }
html[data-theme="light"] .bk-form input[type=text] { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .bk-form input[type=number] { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .bk-form select { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .bk-fs { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .bk-fs svg { color:#2563eb !important; }
html[data-theme="light"] .bk-fa { color:#475569 !important; }

/* ===== config/index.php ===== */
html[data-theme="light"] .cf-h1 { color:#0f172a !important; }
html[data-theme="light"] .cf-sub { color:#475569 !important; }
html[data-theme="light"] .cf-sub i { color:#64748b !important; }
html[data-theme="light"] .cf-badge { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .cf-badge b { color:#1e293b !important; }
html[data-theme="light"] .cf-badge span { color:#475569 !important; }
html[data-theme="light"] .cf-desc { color:#475569 !important; }
html[data-theme="light"] .cf-flash { color:#0284c7 !important; }
html[data-theme="light"] .cf-panel { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .cf-ph { color:#0f172a !important; }
html[data-theme="light"] .cf-ph svg { color:#2563eb !important; }
html[data-theme="light"] .cf-tab:not(.on) { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .cf-tab:not(.on):hover { color:#0f172a !important; }
html[data-theme="light"] .cf-tab.x { color:#64748b !important; }
html[data-theme="light"] .cf-body { background:#ffffff !important; }
html[data-theme="light"] .cf-card { background:#ffffff !important; }
html[data-theme="light"] .cf-lab { color:#1e293b !important; }
html[data-theme="light"] .cf-sel { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .cf-in { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .cf-btn { background:#ffffff !important; color:#1e293b !important; }
html[data-theme="light"] .cf-btn:hover { background:#ffffff !important; color:#0f172a !important; }
html[data-theme="light"] .cf-code { background:#ffffff !important; }
html[data-theme="light"] .cf-code .ln i { color:#64748b !important; }
html[data-theme="light"] .cf-code .ln span { color:#475569 !important; }
html[data-theme="light"] .cf-code .ln span.c0 { color:#94a3b8 !important; }
html[data-theme="light"] .cf-ctl button { background:#ffffff !important; color:#475569 !important; }
html[data-theme="light"] .cf-ctl button:hover { color:#0f172a !important; }
html[data-theme="light"] .cf-meta { color:#64748b !important; }
html[data-theme="light"] .cf-dh .t { color:#0f172a !important; }
html[data-theme="light"] .cf-ok { color:#15803d !important; }
html[data-theme="light"] .cf-ok.n { color:#64748b !important; }
html[data-theme="light"] .cf-dg .hd { color:#1e293b !important; }
html[data-theme="light"] .cf-dg .hd svg { color:#2563eb !important; }
html[data-theme="light"] .cf-dl.a { color:#15803d !important; }
html[data-theme="light"] .cf-dl.r { color:#dc2626 !important; }
html[data-theme="light"] .cf-empty { color:#64748b !important; }
html[data-theme="light"] .cf-qi { color:#1e293b !important; }
html[data-theme="light"] .cf-qi svg { color:#475569 !important; }
html[data-theme="light"] .cf-qi:hover { color:#0f172a !important; }
html[data-theme="light"] .cf-qi:hover svg { color:#2563eb !important; }
html[data-theme="light"] .cf-h2 { color:#0f172a !important; }
html[data-theme="light"] .cf-h2 small { color:#64748b !important; }
html[data-theme="light"] .cf-pre { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .cf-p { color:#475569 !important; }
html[data-theme="light"] .cf-muted { color:#64748b !important; }
html[data-theme="light"] .cf-tbl { background:#ffffff !important; }
html[data-theme="light"] table.cf-t thead th { color:#475569 !important; background:#f1f5f9 !important; }
html[data-theme="light"] table.cf-t tbody td { color:#475569 !important; }
html[data-theme="light"] .cf-pill.g { color:#15803d !important; }
html[data-theme="light"] .cf-pill.a { color:#b45309 !important; }
html[data-theme="light"] .cf-pill.r { color:#dc2626 !important; }
html[data-theme="light"] .cf-pill.p { color:#6d28d9 !important; }
html[data-theme="light"] .cf-pill.n { color:#64748b !important; }
html[data-theme="light"] .cf-chk { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .cf-pi { background:#ffffff !important; }
html[data-theme="light"] .cf-pi b { color:#15803d !important; }
html[data-theme="light"] .cf-pi span { color:#64748b !important; }
html[data-theme="light"] .cf-link { color:#2563eb !important; }
html[data-theme="light"] .cf-vi { background:#ffffff !important; }
html[data-theme="light"] .cf-vi b { color:#0f172a !important; }
html[data-theme="light"] .cf-vi span { color:#64748b !important; }
html[data-theme="light"] .cf-lab2 { color:#64748b !important; }

/* ===== dashboard/index.php ===== */
html[data-theme="light"] .noc-title i { color:#0891b2 !important; }
html[data-theme="light"] .noc-gauge-lbl { color:#64748b !important; }
html[data-theme="light"] .noc-row-ic { color:#2563eb !important; }
html[data-theme="light"] .noc-ev:hover .noc-ev-lbl { color:#0f172a !important; }
html[data-theme="light"] .rai-viewall { color:#0891b2 !important; }
html[data-theme="light"] .rai-viewall:hover { color:#0891b2 !important; }
html[data-theme="light"] .rai-tab:not(.is-active):hover { color:#0f172a !important; }
html[data-theme="light"] .rai-sev.s-critical { color:#dc2626 !important; }
html[data-theme="light"] .rai-sev.s-major { color:#c2410c !important; }
html[data-theme="light"] .rai-sev.s-warning { color:#b45309 !important; }
html[data-theme="light"] .rai-sev.s-info { color:#2563eb !important; }
html[data-theme="light"] .rai-sev.s-ok { color:#15803d !important; }
html[data-theme="light"] .rai-time { color:#64748b !important; }
html[data-theme="light"] .tp-live { color:#047857 !important; }
html[data-theme="light"] .tp-btn:hover { color:#0f172a !important; }
html[data-theme="light"] .tp-count { color:#0891b2 !important; }
html[data-theme="light"] .tp-pill.is-online { color:#047857 !important; }
html[data-theme="light"] .tp-pill.is-warning { color:#b45309 !important; }
html[data-theme="light"] .tp-pill.is-offline { color:#dc2626 !important; }
html[data-theme="light"] .tp-pill.is-unknown { color:#64748b !important; }
html[data-theme="light"] .tp-arrow { color:#047857 !important; }
html[data-theme="light"] .tp-edge-label { color:#047857 !important; background:#ffffff !important; }
html[data-theme="light"] .tp-branch-line { color:#047857 !important; }
html[data-theme="light"] .tp-branch-head { color:#047857 !important; }
html[data-theme="light"] .dm-title i { border-color:#e2e8f0 !important; color:#1e293b !important; }
html[data-theme="light"] .dm-tab:not(.is-active) { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .dm-tab:not(.is-active):hover { color:#0f172a !important; }
html[data-theme="light"] .dm-stats .k { color:#475569 !important; }
html[data-theme="light"] .dm-stats .k.on { color:#047857 !important; }
html[data-theme="light"] .dm-stats .v.t { color:#0f172a !important; }
html[data-theme="light"] .dm-stats .v.on { color:#047857 !important; }
html[data-theme="light"] .dm-row .v.g { color:#15803d !important; }
html[data-theme="light"] .dm-row .v.a { color:#b45309 !important; }
html[data-theme="light"] .dm-row .v.b { color:#2563eb !important; }
html[data-theme="light"] .dm-bar { background:#e2e8f0 !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .r4-subh { color:#0f172a !important; }
html[data-theme="light"] .r4-subh.dark { color:#1e293b !important; }
html[data-theme="light"] .r4-btn { color:#1e293b !important; }
html[data-theme="light"] .r4-hlink { color:#0284c7 !important; }
html[data-theme="light"] .r4-hlink:hover { color:#0284c7 !important; }
html[data-theme="light"] .r4-tab:not(.on) { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .r5-sub { color:#64748b !important; }
html[data-theme="light"] .r5-tab:not(.on):hover { color:#0f172a !important; }
html[data-theme="light"] .r5-bz small { color:#64748b !important; }
html[data-theme="light"] .r6-ai { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .r6-aiico { border:1.5px solid #e2e8f0 !important; }
html[data-theme="light"] .r6-aitx h2 { color:#0f172a !important; }
html[data-theme="light"] .r6-aitx p { color:#475569 !important; }
html[data-theme="light"] .r6-aibtn { color:#0f172a !important; background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }

/* ===== devices/index.php ===== */
html[data-theme="light"] .lm-card { background:#ffffff !important; border:1px solid #e2e8f0 !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .lm-h { color:#0f172a !important; }
html[data-theme="light"] .lm-tbl th { border-bottom:1px solid #e2e8f0 !important; }
html[data-theme="light"] .lm-tbl td { border-bottom:1px solid #e2e8f0 !important; color:#475569 !important; }

/* ===== gis/index.php ===== */
html[data-theme="light"] .gx .lyr>span:not(.sw):not(.ln) { color:#475569 !important; }
html[data-theme="light"] .opc { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .opt { color:#0f172a !important; }
html[data-theme="light"] .opt span { color:#475569 !important; }
html[data-theme="light"] .opv span { color:#475569 !important; }
html[data-theme="light"] .opv b { color:#0f172a !important; }
html[data-theme="light"] .opch { border:1px solid #e2e8f0 !important; background:#ffffff !important; }
html[data-theme="light"] #gis-map { background:#ffffff !important; }
html[data-theme="light"] #gx-rmenu { background:#ffffff !important; border:1px solid #e2e8f0 !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] #gx-rmenu button { color:#1e293b !important; }
html[data-theme="light"] #gx-rmenu button:hover { background:#ffffff !important; }
html[data-theme="light"] #gx-rmenu button.danger { color:#dc2626 !important; }
html[data-theme="light"] .pn h3 { color:#0f172a !important; }
html[data-theme="light"] .lyr { color:#475569 !important; }
html[data-theme="light"] .lyr .sw { color:#0f172a !important; }
html[data-theme="light"] .lyr .eye { color:#475569 !important; }
html[data-theme="light"] .dn .lg .r .t b { color:#0f172a !important; }
html[data-theme="light"] .dn .lg .r .t span { color:#475569 !important; }
html[data-theme="light"] .dn .lg .r .n { color:#0f172a !important; }
html[data-theme="light"] .kv b { color:#1e293b !important; }
html[data-theme="light"] .cdbox { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .cdtop b { color:#0f172a !important; }
html[data-theme="light"] .cdkv span { color:#475569 !important; }
html[data-theme="light"] .cdkv i { color:#475569 !important; }
html[data-theme="light"] .cdkv b { color:#0f172a !important; }
html[data-theme="light"] .mtr span { color:#475569 !important; }
html[data-theme="light"] .mtr .bb { background:#e2e8f0 !important; }
html[data-theme="light"] .ev td { border-bottom:1px solid #e2e8f0 !important; color:#475569 !important; }
html[data-theme="light"] .ev td .tp i { color:#0f172a !important; }
html[data-theme="light"] .pt th { background:#f1f5f9 !important; color:#475569 !important; }
html[data-theme="light"] .pt td { border-bottom:1px solid #e2e8f0 !important; }
html[data-theme="light"] .ai { background:#ffffff !important; }
html[data-theme="light"] .ai .ia { color:#0f172a !important; }
html[data-theme="light"] .ai b { color:#0f172a !important; }
html[data-theme="light"] .gx-foot { color:#475569 !important; }
html[data-theme="light"] .gx-foot .ft svg { color:#2563eb !important; }

/* ===== monitoring/_tabs.php ===== */
html[data-theme="light"] .lm-tab:not(.on) { color:#475569 !important; }
html[data-theme="light"] .lm-tab:not(.on):hover { color:#1e293b !important; }

/* ===== monitoring/link-device.php ===== */
html[data-theme="light"] .prtg-tab.on { color:#1e293b !important; }
html[data-theme="light"] .prtg-rng:not(.on) { border:1px solid #e2e8f0 !important; color:#64748b !important; background:#ffffff !important; }
html[data-theme="light"] .prtg-rng.on { color:#0891b2 !important; }

/* ===== monitoring/links.php ===== */
html[data-theme="light"] .lm-card { background:#ffffff !important; border:1px solid #e2e8f0 !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .lm-h { color:#0f172a !important; }
html[data-theme="light"] .lm-tab:not(.on) { color:#475569 !important; }
html[data-theme="light"] .lm-kpi .n { color:#fff !important; }
html[data-theme="light"] .lm-tbl th { border-bottom:1px solid #e2e8f0 !important; }
html[data-theme="light"] .lm-tbl td { border-bottom:1px solid #e2e8f0 !important; color:#475569 !important; }

/* ===== olt/index.php ===== */
html[data-theme="light"] .olt-card { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .olt-card.c-green { background:#ffffff !important; }
html[data-theme="light"] .olt-card.c-red { background:#ffffff !important; }
html[data-theme="light"] .olt-card.c-blue { background:#ffffff !important; }
html[data-theme="light"] .olt-card.c-purple { background:#ffffff !important; }
html[data-theme="light"] .olt-sub { background:#ffffff !important; }
html[data-theme="light"] .olt-ttl { color:#0f172a !important; }
html[data-theme="light"] .olt-link { color:#0284c7 !important; }
html[data-theme="light"] .olt-sel { background:#ffffff !important; color:#1e293b !important; }
html[data-theme="light"] table.olt-grid thead th { background:#f1f5f9 !important; color:#475569 !important; }
html[data-theme="light"] table.olt-grid td { color:#475569 !important; }
html[data-theme="light"] .olt-sys-logo { background:#ffffff !important; }
html[data-theme="light"] .olt-sys-logo .nm { color:#1e293b !important; }
html[data-theme="light"] .olt-sys-tbl { background:#ffffff !important; }
html[data-theme="light"] .olt-sys-tbl dt { color:#475569 !important; }
html[data-theme="light"] .olt-sys-tbl dd { color:#475569 !important; }
html[data-theme="light"] .olt-kv dt { color:#64748b !important; }
html[data-theme="light"] .olt-kv dd { color:#1e293b !important; }
html[data-theme="light"] .olt-tabs { background:#ffffff !important; }
html[data-theme="light"] .olt-tab:not(.on) { color:#64748b !important; }
html[data-theme="light"] .olt-tab:not(.on):hover { color:#0f172a !important; }

/* ===== support/categories.php ===== */
html[data-theme="light"] .sc-h1 { color:#0284c7 !important; }
html[data-theme="light"] .sc-sub { color:#475569 !important; }
html[data-theme="light"] .sc-crumb { color:#64748b !important; }
html[data-theme="light"] .sc-crumb b { color:#475569 !important; }
html[data-theme="light"] .sc-panel { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .sc-tbl th { color:#475569 !important; }
html[data-theme="light"] .sc-tbl td { color:#475569 !important; }
html[data-theme="light"] .sc-catic { color:#0f172a !important; }
html[data-theme="light"] .sc-catname { color:#0f172a !important; }
html[data-theme="light"] .tm { color:#475569 !important; }
html[data-theme="light"] .p-low { color:#2563eb !important; }
html[data-theme="light"] .p-med { color:#b45309 !important; }
html[data-theme="light"] .p-high { color:#dc2626 !important; }
html[data-theme="light"] .p-crit { color:#dc2626 !important; }
html[data-theme="light"] .st-on { color:#15803d !important; }
html[data-theme="light"] .st-off { color:#64748b !important; }
html[data-theme="light"] .sc-icbtn { color:#475569 !important; }
html[data-theme="light"] .sc-card h4 { color:#1e293b !important; }
html[data-theme="light"] .sc-statbox .n { color:#0f172a !important; }
html[data-theme="light"] .sc-statbox .l { color:#475569 !important; }
html[data-theme="light"] .sc-modal { background:#ffffff !important; }
html[data-theme="light"] .sc-mbox { background:#ffffff !important; }
html[data-theme="light"] .sc-mbox h3 { color:#0f172a !important; }
html[data-theme="light"] .sc-fld label { color:#475569 !important; }
html[data-theme="light"] .sc-fld input { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .sc-fld select { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .sc-fld textarea { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .sc-ghost { color:#475569 !important; }
html[data-theme="light"] .sc-flash.ok { color:#15803d !important; }
html[data-theme="light"] .sc-flash.err { color:#dc2626 !important; }
html[data-theme="light"] .sc-empty { color:#475569 !important; }

/* ===== support/history.php ===== */
html[data-theme="light"] .sh-h1 { color:#0284c7 !important; }
html[data-theme="light"] .sh-sub { color:#475569 !important; }
html[data-theme="light"] .sh-crumb { color:#64748b !important; }
html[data-theme="light"] .sh-crumb b { color:#475569 !important; }
html[data-theme="light"] .sh-date { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .sh-date input { color:#475569 !important; }
html[data-theme="light"] .sh-ghost { color:#475569 !important; }
html[data-theme="light"] .sh-k { background:#ffffff !important; }
html[data-theme="light"] .sh-k .lb { color:#475569 !important; }
html[data-theme="light"] .sh-k .nv { color:#0f172a !important; }
html[data-theme="light"] .sh-panel { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .sh-panel h4 { color:#1e293b !important; }
html[data-theme="light"] .sh-legend .row { color:#475569 !important; }
html[data-theme="light"] .sh-legend b { color:#0f172a !important; }
html[data-theme="light"] .sh-ptbl th { color:#475569 !important; }
html[data-theme="light"] .sh-ptbl td { color:#475569 !important; }
html[data-theme="light"] .sh-trow .nm { color:#475569 !important; }
html[data-theme="light"] .sh-trow .ct { color:#475569 !important; }
html[data-theme="light"] .sh-tbl th { color:#475569 !important; }
html[data-theme="light"] .sh-tbl td { color:#475569 !important; }
html[data-theme="light"] .sh-tid { color:#2563eb !important; }
html[data-theme="light"] .p-low { color:#2563eb !important; }
html[data-theme="light"] .p-med { color:#b45309 !important; }
html[data-theme="light"] .p-high { color:#dc2626 !important; }
html[data-theme="light"] .p-crit { color:#dc2626 !important; }
html[data-theme="light"] .s-res { color:#15803d !important; }
html[data-theme="light"] .sh-exp a { color:#475569 !important; }
html[data-theme="light"] .sh-exp a svg { color:#2563eb !important; }
html[data-theme="light"] .sh-empty { color:#475569 !important; }

/* ===== support/tickets.php ===== */
html[data-theme="light"] .cs-h1 { color:#0284c7 !important; }
html[data-theme="light"] .cs-sub { color:#475569 !important; }
html[data-theme="light"] .cs-crumb { color:#64748b !important; }
html[data-theme="light"] .cs-crumb b { color:#475569 !important; }
html[data-theme="light"] .cs-k { background:#ffffff !important; }
html[data-theme="light"] .cs-k .lb { color:#475569 !important; }
html[data-theme="light"] .cs-k .nv { color:#0f172a !important; }
html[data-theme="light"] .cs-panel { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .cs-f input { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .cs-f select { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .cs-f .fic { color:#2563eb !important; }
html[data-theme="light"] .cs-tbl th { color:#475569 !important; }
html[data-theme="light"] .cs-tbl td { color:#475569 !important; }
html[data-theme="light"] .cs-tid { color:#2563eb !important; }
html[data-theme="light"] .p-low { color:#2563eb !important; }
html[data-theme="light"] .p-med { color:#b45309 !important; }
html[data-theme="light"] .p-high { color:#dc2626 !important; }
html[data-theme="light"] .p-crit { color:#dc2626 !important; }
html[data-theme="light"] .s-open { color:#c2410c !important; }
html[data-theme="light"] .s-prog { color:#6d28d9 !important; }
html[data-theme="light"] .s-res { color:#15803d !important; }
html[data-theme="light"] .cs-icbtn { color:#475569 !important; }
html[data-theme="light"] .cs-side h4 { color:#1e293b !important; }
html[data-theme="light"] .cs-qa { color:#1e293b !important; }
html[data-theme="light"] .cs-qa span { color:#475569 !important; }
html[data-theme="light"] .cs-rt .n { color:#475569 !important; }
html[data-theme="light"] .cs-rt .t b { color:#1e293b !important; }
html[data-theme="light"] .cs-rt .t span { color:#475569 !important; }
html[data-theme="light"] .cs-rt .tm { color:#64748b !important; }
html[data-theme="light"] .cs-modal { background:#ffffff !important; }
html[data-theme="light"] .cs-mbox { background:#ffffff !important; }
html[data-theme="light"] .cs-mbox h3 { color:#0f172a !important; }
html[data-theme="light"] .cs-fld label { color:#475569 !important; }
html[data-theme="light"] .cs-fld input { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .cs-fld select { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .cs-fld textarea { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .cs-ghost { color:#475569 !important; }
html[data-theme="light"] .cs-flash.ok { color:#15803d !important; }
html[data-theme="light"] .cs-flash.err { color:#dc2626 !important; }
html[data-theme="light"] .cs-empty { color:#475569 !important; }
html[data-theme="light"] .cs-assign select { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .cs-mini { color:#475569 !important; }
html[data-theme="light"] .cs-mini.solve { color:#15803d !important; }
html[data-theme="light"] .cs-tbl td.cs-cn { color:#0f172a !important; }
html[data-theme="light"] .cs-suggest { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .cs-sug-item { color:#1e293b !important; }
html[data-theme="light"] .cs-sug-empty { color:#475569 !important; }
html[data-theme="light"] .cs-solve-info { color:#475569 !important; }
html[data-theme="light"] .cs-solve-info b { color:#0f172a !important; }
html[data-theme="light"] .cs-radio { color:#1e293b !important; }
html[data-theme="light"] .cs-dmsg .who { color:#475569 !important; }
html[data-theme="light"] .cs-dmsg .who span { color:#64748b !important; }
html[data-theme="light"] .cs-dmsg .txt { color:#475569 !important; }
html[data-theme="light"] .cs-disc-empty { color:#475569 !important; }

/* ===== switches/index.php ===== */
html[data-theme="light"] .sw-card { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .sw-page { background: transparent !important; }
html[data-theme="light"] .sw-card.c-blue { background:#ffffff !important; }
html[data-theme="light"] .sw-card.c-green { background:#ffffff !important; }
html[data-theme="light"] .sw-card.c-red { background:#ffffff !important; }
html[data-theme="light"] .sw-card.c-orange { background:#ffffff !important; }
html[data-theme="light"] .sw-h { color:#0f172a !important; }
html[data-theme="light"] .sw-h small { color:#0284c7 !important; }
html[data-theme="light"] .sw-link { color:#0284c7 !important; }
html[data-theme="light"] .sw-pill-green { color:#15803d !important; }
html[data-theme="light"] .sw-pill-red { color:#dc2626 !important; }
html[data-theme="light"] .sw-pill-amber { color:#b45309 !important; }
html[data-theme="light"] .sw-pill-slate { color:#64748b !important; }
html[data-theme="light"] .sw-sel { background-color:#ffffff !important; color:#1e293b !important; }
html[data-theme="light"] .sw-btn:not(.on) { background:#ffffff !important; color:#475569 !important; }
html[data-theme="light"] .sw-btn.g { color:#15803d !important; }
html[data-theme="light"] .sw-btn.r { color:#dc2626 !important; }
html[data-theme="light"] .sw-tbl th { color:#475569 !important; background:#f1f5f9 !important; }
html[data-theme="light"] .sw-tbl td { color:#475569 !important; }
html[data-theme="light"] .sw-tg::after { background:#ffffff !important; }
html[data-theme="light"] .sw-tabs { background:#ffffff !important; }
html[data-theme="light"] .sw-tab:not(.is-on) { color:#64748b !important; }
html[data-theme="light"] .sw-tab:not(.is-on):hover { color:#0f172a !important; }
html[data-theme="light"] .sw-tile { background:#ffffff !important; }
html[data-theme="light"] .sw-tool { background:#ffffff !important; color:#475569 !important; }
html[data-theme="light"] .sw-mini { background:#ffffff !important; color:#475569 !important; }

/* ===== tickets/create.php ===== */
html[data-theme="light"] .btn-ghost { background:#ffffff !important; color:#64748b !important; }
html[data-theme="light"] .ticket-form { background:#ffffff !important; border:1px solid #e2e8f0 !important; }
html[data-theme="light"] .form-group label { color:#475569 !important; }
html[data-theme="light"] .form-group input { background:#ffffff !important; border:1px solid #e2e8f0 !important; color:#1e293b !important; }
html[data-theme="light"] .form-group select { background:#ffffff !important; border:1px solid #e2e8f0 !important; color:#1e293b !important; }
html[data-theme="light"] .form-group textarea { background:#ffffff !important; border:1px solid #e2e8f0 !important; color:#1e293b !important; }

/* ===== tickets/index.php ===== */
html[data-theme="light"] .alert-ok { background:#ffffff !important; color:#047857 !important; }
html[data-theme="light"] .empty-state { background:#ffffff !important; color:#64748b !important; }
html[data-theme="light"] .ticket-row { background:#ffffff !important; border:1px solid #e2e8f0 !important; }
html[data-theme="light"] .ticket-subject { color:#1e293b !important; }
html[data-theme="light"] .badge { background:#ffffff !important; color:#64748b !important; }
html[data-theme="light"] .status-answered { background:#ffffff !important; color:#047857 !important; }
html[data-theme="light"] .status-closed { background:#ffffff !important; }

/* ===== tickets/show.php ===== */
html[data-theme="light"] .btn-ghost { background:#ffffff !important; color:#64748b !important; }
html[data-theme="light"] .ticket-detail { background:#ffffff !important; border:1px solid #e2e8f0 !important; }
html[data-theme="light"] .ticket-detail h1 { color:#1e293b !important; }
html[data-theme="light"] .badge { background:#ffffff !important; color:#64748b !important; }
html[data-theme="light"] .ticket-body { color:#475569 !important; }
html[data-theme="light"] .status-answered { background:#ffffff !important; color:#047857 !important; }
html[data-theme="light"] .status-closed { background:#ffffff !important; }
html[data-theme="light"] .replies h3 { color:#1e293b !important; }
html[data-theme="light"] .reply { background:#ffffff !important; border:1px solid #e2e8f0 !important; }
html[data-theme="light"] .reply-head { color:#64748b !important; }
html[data-theme="light"] .reply-head strong { color:#1e293b !important; }
html[data-theme="light"] .reply-body { color:#475569 !important; }
html[data-theme="light"] .reply-form { background:#ffffff !important; border:1px solid #e2e8f0 !important; }
html[data-theme="light"] .form-group label { color:#475569 !important; }
html[data-theme="light"] .form-group textarea { background:#ffffff !important; border:1px solid #e2e8f0 !important; color:#1e293b !important; }
html[data-theme="light"] .alert { background:#ffffff !important; color:#64748b !important; }

/* ===== workflows/index.php ===== */
html[data-theme="light"] .wf-h1 { color:#0f172a !important; }
html[data-theme="light"] .wf-sub { color:#475569 !important; }
html[data-theme="light"] .wf-sub i { color:#64748b !important; }
html[data-theme="light"] .wf-badge { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .wf-badge b { color:#1e293b !important; }
html[data-theme="light"] .wf-badge span { color:#475569 !important; }
html[data-theme="light"] .wf-desc { color:#475569 !important; }
html[data-theme="light"] .wf-flash { color:#0284c7 !important; }
html[data-theme="light"] .wf-panel { background:#ffffff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .wf-ph .t { color:#0f172a !important; }
html[data-theme="light"] .wf-ph .t svg { color:#2563eb !important; }
html[data-theme="light"] .wf-tab:not(.on) { color:#475569 !important; background:#ffffff !important; }
html[data-theme="light"] .wf-tab:not(.on):hover { color:#0f172a !important; }
html[data-theme="light"] .wf-listbox { background:#ffffff !important; }
html[data-theme="light"] .wf-search svg { color:#64748b !important; }
html[data-theme="light"] .wf-search input { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .wf-search input::placeholder { color:#64748b !important; }
html[data-theme="light"] .wf-item.on { background:#eff6ff !important; box-shadow:0 1px 8px rgba(15,23,42,.08) !important; }
html[data-theme="light"] .wf-item.on .n { color:#2563eb !important; }
html[data-theme="light"] .wf-item .m { color:#475569 !important; }
html[data-theme="light"] .wf-st.g { color:#15803d !important; }
html[data-theme="light"] .wf-st.b { color:#2563eb !important; }
html[data-theme="light"] .wf-st.r { color:#dc2626 !important; }
html[data-theme="light"] .wf-st.n { color:#64748b !important; }
html[data-theme="light"] .wf-empty { color:#64748b !important; }
html[data-theme="light"] .wf-det { background:#ffffff !important; }
html[data-theme="light"] .wf-dh .t { color:#0f172a !important; }
html[data-theme="light"] .wf-dh .by { color:#64748b !important; }
html[data-theme="light"] .wf-open { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .wf-open:hover { background:#ffffff !important; color:#0f172a !important; }
html[data-theme="light"] .wf-step { background:#ffffff !important; }
html[data-theme="light"] .wf-step .tt { color:#0f172a !important; }
html[data-theme="light"] .wf-step .ss { color:#475569 !important; }
html[data-theme="light"] .wf-stats { background:#ffffff !important; }
html[data-theme="light"] .wf-stats h4 { color:#1e293b !important; }
html[data-theme="light"] .wf-sg .l { color:#475569 !important; }
html[data-theme="light"] .wf-sg .v { color:#0f172a !important; }
html[data-theme="light"] .wf-sg .v.g { color:#047857 !important; }
html[data-theme="light"] .wf-sg .v.r { color:#e11d48 !important; }
html[data-theme="light"] .wf-l7 { color:#2563eb !important; }
html[data-theme="light"] .wf-newbox { background:#ffffff !important; }
html[data-theme="light"] .wf-newbox h3 { color:#0f172a !important; }
html[data-theme="light"] .wf-nf label { color:#64748b !important; }
html[data-theme="light"] .wf-nf select { color:#1e293b !important; background:#ffffff !important; }
html[data-theme="light"] .wf-note { color:#64748b !important; }


/* ==========================================================================
   Light theme, part 2 (item 52, 2026-11-12): full white-mode coverage.
   Generated per-view overrides (gen-overrides.css) come first; this block
   covers the shared Tailwind utilities, chrome, inline styles and the
   GIS / Mikrotik / links-KPI special cases. Dark mode is untouched:
   every rule below is scoped under html[data-theme="light"].
   Palette: bg white / #f8fafc / #f1f5f9; text #0f172a / #1e293b / #334155 /
   #475569 / #64748b; borders #e2e8f0; accents darkened for white.
   ========================================================================== */

/* ---- Bright Tailwind text colors -> readable on white ---- */
html[data-theme="light"] .text-red-400 { color: #dc2626 !important; }
html[data-theme="light"] .text-emerald-400 { color: #047857 !important; }
html[data-theme="light"] .text-amber-400 { color: #b45309 !important; }
html[data-theme="light"] .text-cyan-400 { color: #0891b2 !important; }
html[data-theme="light"] .text-cyan-300 { color: #0891b2 !important; }
html[data-theme="light"] .text-amber-300 { color: #b45309 !important; }
html[data-theme="light"] .text-sky-400 { color: #0284c7 !important; }
html[data-theme="light"] .text-green-400 { color: #15803d !important; }
html[data-theme="light"] .text-red-300 { color: #dc2626 !important; }
html[data-theme="light"] .text-emerald-300 { color: #047857 !important; }
html[data-theme="light"] .text-purple-400 { color: #7e22ce !important; }
html[data-theme="light"] .text-sky-300 { color: #0284c7 !important; }
html[data-theme="light"] .text-violet-300 { color: #6d28d9 !important; }
html[data-theme="light"] .text-rose-400 { color: #be123c !important; }
html[data-theme="light"] .text-orange-400 { color: #c2410c !important; }
html[data-theme="light"] .text-green-300 { color: #15803d !important; }
html[data-theme="light"] .text-blue-400 { color: #2563eb !important; }
html[data-theme="light"] .text-violet-400 { color: #6d28d9 !important; }
html[data-theme="light"] .text-cyan-200 { color: #0891b2 !important; }
html[data-theme="light"] .text-blue-300 { color: #2563eb !important; }
html[data-theme="light"] .text-slate-100 { color: #1e293b !important; }
/* NOTE: .text-blue-200 is deliberately NOT mapped: it is the active
   sidebar number on a blue-600 row and must stay light. */

/* ---- Dark arbitrary-hex backgrounds -> white ---- */
html[data-theme="light"] .bg-\[\#0A1225\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#0A1230\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#131f3d\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#081733\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#131C33\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#131c33\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#0D1628\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#101b34\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#0f1830\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#1d2a4d\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#16203a\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#141d38\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#101c3a\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#0f1c3d\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#0d2250\] { background-color: #ffffff !important; }
html[data-theme="light"] .bg-\[\#0c1428\] { background-color: #ffffff !important; }
/* Topbar: translucent dark bg (only /60 was covered before) */
html[data-theme="light"] .bg-\[\#0B1220\]\/70 { background-color: rgba(255, 255, 255, 0.88) !important; }

/* ---- Dark borders -> light ---- */
html[data-theme="light"] .border-slate-700 { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-slate-800\/50 { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-slate-800\/60 { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-slate-600 { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-slate-600\/30 { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-slate-500\/40 { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-\[\#1a2440\] { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-\[\#2a4a8a\] { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-\[\#1c2a4a\] { border-color: #e2e8f0 !important; }
html[data-theme="light"] .border-\[\#2f5cb8\] { border-color: #e2e8f0 !important; }
html[data-theme="light"] .divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color: #e2e8f0 !important; }
html[data-theme="light"] .divide-slate-800\/60 > :not([hidden]) ~ :not([hidden]) { border-color: #e2e8f0 !important; }
html[data-theme="light"] .placeholder-slate-400::placeholder { color: #64748b !important; }

/* ---- Solid dark Tailwind backgrounds -> light ---- */
html[data-theme="light"] .bg-slate-900 { background-color: #ffffff !important; }
html[data-theme="light"] .bg-slate-900\/50 { background-color: #f1f5f9 !important; }
html[data-theme="light"] .bg-slate-900\/60 { background-color: #f1f5f9 !important; }
html[data-theme="light"] .bg-slate-700 { background-color: #e2e8f0 !important; }
html[data-theme="light"] .bg-slate-600 { background-color: #e2e8f0 !important; }
html[data-theme="light"] .bg-slate-500 { background-color: #e2e8f0 !important; }
html[data-theme="light"] .bg-slate-800\/30 { background-color: #f1f5f9 !important; }
html[data-theme="light"] .bg-slate-800\/40 { background-color: #f1f5f9 !important; }
html[data-theme="light"] .bg-slate-800\/50 { background-color: #f1f5f9 !important; }
html[data-theme="light"] .bg-slate-800\/60 { background-color: #e2e8f0 !important; }
html[data-theme="light"] .bg-slate-800\/80 { background-color: #e2e8f0 !important; }

/* ---- Dark hover backgrounds -> light ---- */
html[data-theme="light"] .hover\:bg-slate-800\/60:hover { background-color: #f1f5f9 !important; }
html[data-theme="light"] .hover\:bg-slate-800\/30:hover { background-color: #f1f5f9 !important; }
html[data-theme="light"] .hover\:bg-slate-600:hover { background-color: #e2e8f0 !important; }
html[data-theme="light"] .hover\:bg-slate-800\/40:hover { background-color: #f1f5f9 !important; }
html[data-theme="light"] .hover\:bg-slate-800:hover { background-color: #e2e8f0 !important; }
html[data-theme="light"] .hover\:bg-slate-800\/50:hover { background-color: #f1f5f9 !important; }
html[data-theme="light"] .hover\:bg-slate-700:hover { background-color: #e2e8f0 !important; }

/* ---- White text MUST stay white on colored backgrounds ----
   (the blanket .text-white override above would darken it). */
html[data-theme="light"] .bg-blue-600.text-white,
html[data-theme="light"] .bg-sky-600.text-white,
html[data-theme="light"] .bg-blue-500.text-white,
html[data-theme="light"] .bg-red-500.text-white,
html[data-theme="light"] .bg-emerald-600.text-white,
html[data-theme="light"] .bg-red-600.text-white,
html[data-theme="light"] .bg-violet-600.text-white,
html[data-theme="light"] .bg-green-600.text-white,
html[data-theme="light"] .bg-green-500.text-white,
html[data-theme="light"] .bg-emerald-500.text-white,
html[data-theme="light"] .bg-cyan-600.text-white,
html[data-theme="light"] .bg-cyan-500.text-white,
html[data-theme="light"] .bg-amber-600.text-white { color: #fff !important; }
html[data-theme="light"] .bg-blue-600 .text-white,
html[data-theme="light"] .bg-sky-600 .text-white,
html[data-theme="light"] .bg-blue-500 .text-white,
html[data-theme="light"] .bg-red-500 .text-white,
html[data-theme="light"] .bg-emerald-600 .text-white,
html[data-theme="light"] .bg-red-600 .text-white,
html[data-theme="light"] .bg-violet-600 .text-white,
html[data-theme="light"] .bg-green-600 .text-white,
html[data-theme="light"] .bg-green-500 .text-white,
html[data-theme="light"] .bg-emerald-500 .text-white,
html[data-theme="light"] .bg-cyan-600 .text-white,
html[data-theme="light"] .bg-cyan-500 .text-white,
html[data-theme="light"] .bg-amber-600 .text-white { color: #fff !important; }
/* Gradient avatars / pills with white text (e.g. profile avatar) */
html[data-theme="light"] [class*="bg-gradient-to-"].text-white { color: #fff !important; }
/* Sidebar active row keeps its blue bg on hover (the generic sidebar
   hover rule would otherwise paint it light gray under white text) */
html[data-theme="light"] aside nav a.bg-blue-600:hover { background-color: #2563eb !important; }
/* Links KPI icon chips: inline colored bg, white svg */
html[data-theme="light"] .lm-kpi .ic .text-white { color: #fff !important; }
/* Switch square icons: class text-white + inline colored bg */
html[data-theme="light"] [style*="background:#2563eb"].text-white,
html[data-theme="light"] [style*="background:#1d4ed8"].text-white,
html[data-theme="light"] [style*="background:#16a34a"].text-white,
html[data-theme="light"] [style*="background:#e11d48"].text-white,
html[data-theme="light"] [style*="background:#f59e0b"].text-white,
html[data-theme="light"] [style*="background:#4c2fb0"].text-white { color: #fff !important; }
/* Backups small button, blue variant (its base goes white + dark text) */
html[data-theme="light"] .bk-sm.blue { color: #fff !important; }
/* Login button hover (latent: the login page sets no data-theme yet, so
   this only matters if light mode is ever enabled there) */
html[data-theme="light"] .hover\:bg-\[\#131c33\]:hover { background-color: #e2e8f0 !important; }

/* ---- Inline style="color:..." text -> readable on white ----
   (style attributes the generator cannot see; the color: form is used so
   inline background: hexes on status dots are not touched). */
html[data-theme="light"] [style*="color:#fff"]:not([style*="background:#dc2626"]):not([style*="background: #dc2626"]) { color: #0f172a !important; }
html[data-theme="light"] [style*="color: #fff"]:not([style*="background:#dc2626"]):not([style*="background: #dc2626"]) { color: #0f172a !important; }
html[data-theme="light"] [style*="color:#8da0cc"], html[data-theme="light"] [style*="color: #8da0cc"] { color: #64748b !important; }
html[data-theme="light"] [style*="color:#a9bbdc"], html[data-theme="light"] [style*="color: #a9bbdc"] { color: #475569 !important; }
html[data-theme="light"] [style*="color:#8ba3d4"], html[data-theme="light"] [style*="color: #8ba3d4"] { color: #475569 !important; }
html[data-theme="light"] [style*="color:#7c93c4"], html[data-theme="light"] [style*="color: #7c93c4"] { color: #64748b !important; }
html[data-theme="light"] [style*="color:#8fa4cc"], html[data-theme="light"] [style*="color: #8fa4cc"] { color: #64748b !important; }
html[data-theme="light"] [style*="color:#7f93bb"], html[data-theme="light"] [style*="color: #7f93bb"] { color: #64748b !important; }
html[data-theme="light"] [style*="color:#cbd5e1"], html[data-theme="light"] [style*="color: #cbd5e1"] { color: #475569 !important; }
html[data-theme="light"] [style*="color:#dbe6fb"], html[data-theme="light"] [style*="color: #dbe6fb"] { color: #475569 !important; }
html[data-theme="light"] [style*="color:#cfe0ff"], html[data-theme="light"] [style*="color: #cfe0ff"] { color: #475569 !important; }
html[data-theme="light"] [style*="color:#5b7bc0"], html[data-theme="light"] [style*="color: #5b7bc0"] { color: #2563eb !important; }
html[data-theme="light"] [style*="color:#3b9dff"], html[data-theme="light"] [style*="color: #3b9dff"] { color: #2563eb !important; }
html[data-theme="light"] [style*="color:#2ea8e6"], html[data-theme="light"] [style*="color: #2ea8e6"] { color: #0284c7 !important; }
html[data-theme="light"] [style*="color:#3f9dff"], html[data-theme="light"] [style*="color: #3f9dff"] { color: #2563eb !important; }
html[data-theme="light"] [style*="color:#38bdf8"], html[data-theme="light"] [style*="color: #38bdf8"] { color: #0284c7 !important; }
html[data-theme="light"] [style*="color:#22d3ee"], html[data-theme="light"] [style*="color: #22d3ee"] { color: #0891b2 !important; }
html[data-theme="light"] [style*="color:#7fb4ff"], html[data-theme="light"] [style*="color: #7fb4ff"] { color: #2563eb !important; }
html[data-theme="light"] [style*="color:#2dd4bf"], html[data-theme="light"] [style*="color: #2dd4bf"] { color: #0f766e !important; }
html[data-theme="light"] [style*="color:#a78bfa"], html[data-theme="light"] [style*="color: #a78bfa"] { color: #6d28d9 !important; }
html[data-theme="light"] [style*="color:#f59e0b"], html[data-theme="light"] [style*="color: #f59e0b"] { color: #b45309 !important; }
html[data-theme="light"] [style*="color:#f87171"], html[data-theme="light"] [style*="color: #f87171"] { color: #dc2626 !important; }
html[data-theme="light"] [style*="color:#4ade80"], html[data-theme="light"] [style*="color: #4ade80"] { color: #15803d !important; }
html[data-theme="light"] [style*="color:#fb7185"], html[data-theme="light"] [style*="color: #fb7185"] { color: #be123c !important; }
html[data-theme="light"] [style*="color:#fbbf24"], html[data-theme="light"] [style*="color: #fbbf24"] { color: #b45309 !important; }
html[data-theme="light"] [style*="color:#fb4a6a"], html[data-theme="light"] [style*="color: #fb4a6a"] { color: #e11d48 !important; }
html[data-theme="light"] [style*="color:#60a5fa"], html[data-theme="light"] [style*="color: #60a5fa"] { color: #2563eb !important; }
html[data-theme="light"] [style*="color:#e2e8f0"], html[data-theme="light"] [style*="color: #e2e8f0"] { color: #1e293b !important; }
html[data-theme="light"] [style*="color:#5b6b85"], html[data-theme="light"] [style*="color: #5b6b85"] { color: #64748b !important; }
html[data-theme="light"] [style*="color:#f43f5e"], html[data-theme="light"] [style*="color: #f43f5e"] { color: #e11d48 !important; }
html[data-theme="light"] [style*="color:#ef4444"], html[data-theme="light"] [style*="color: #ef4444"] { color: #dc2626 !important; }
html[data-theme="light"] [style*="color:#fecaca"], html[data-theme="light"] [style*="color: #fecaca"] { color: #dc2626 !important; }
html[data-theme="light"] [style*="color:#fca5a5"], html[data-theme="light"] [style*="color: #fca5a5"] { color: #dc2626 !important; }
html[data-theme="light"] [style*="color:#bfdbfe"], html[data-theme="light"] [style*="color: #bfdbfe"] { color: #475569 !important; }
html[data-theme="light"] [style*="color:#bbf7d0"], html[data-theme="light"] [style*="color: #bbf7d0"] { color: #15803d !important; }
html[data-theme="light"] [style*="color:#34d399"], html[data-theme="light"] [style*="color: #34d399"] { color: #047857 !important; }
/* Links KPI cards stay dark gradients, so their inline light text stays.
   These restores beat the generic rules above (higher specificity). */
html[data-theme="light"] .lm-kpi [style*="color:#bfdbfe"] { color: #bfdbfe !important; }
html[data-theme="light"] .lm-kpi [style*="color:#bbf7d0"] { color: #bbf7d0 !important; }
html[data-theme="light"] .lm-kpi [style*="color:#fecaca"] { color: #fecaca !important; }
html[data-theme="light"] .lm-kpi [style*="color:#4ade80"] { color: #4ade80 !important; }
html[data-theme="light"] .lm-kpi [style*="color:#f87171"] { color: #f87171 !important; }

/* ---- Inline dark backgrounds -> white (background-color keeps the
   select chevron data-uri on .sw-sel intact) ---- */
html[data-theme="light"] [style*="background:#081733"] { background-color: #ffffff !important; }
html[data-theme="light"] [style*="background:#0a1736"] { background-color: #ffffff !important; }
html[data-theme="light"] [style*="background:#0a1226"] { background-color: #ffffff !important; }
html[data-theme="light"] [style*="background:#0a1226"] svg text { fill: #334155 !important; }

/* ---- GIS: one var override fixes every var-based rule; the map
   overlays (.mctl/.mbtn/.glab/...) use no vars, so they stay dark ---- */
html[data-theme="light"] .gx { --bg: #f1f5f9; --panel: #ffffff; --panel2: #f8fafc; --line: #e2e8f0; --txt: #0f172a; --mut: #64748b; --cy: #0891b2; --gr: #15803d; --yl: #b45309; --rd: #dc2626; --or: #c2410c; --pu: #6d28d9; --bl: #2563eb; }
/* GIS KPI cards mirror .kpi-card in light mode */
html[data-theme="light"] .kc { background: linear-gradient(135deg, rgba(var(--c),.16), #ffffff 70%) !important; color: #0f172a !important; box-shadow: 0 1px 8px rgba(var(--c),.18) !important; }
html[data-theme="light"] .kc .t { color: #475569 !important; }
html[data-theme="light"] .kc .v { color: #0f172a !important; }
html[data-theme="light"] .kc .sub { color: #475569 !important; }

/* ---- Mikrotik: hardcoded colors the .mkx var block does not cover ---- */
html[data-theme="light"] .mk-kpi b { color: #0f172a !important; }
html[data-theme="light"] .mk-k-blue { background: linear-gradient(135deg, #dbeafe, #eff6ff) !important; }
html[data-theme="light"] .mk-k-blue p, html[data-theme="light"] .mk-k-blue small { color: #2563eb !important; }
html[data-theme="light"] .mk-k-green { background: linear-gradient(135deg, #dcfce7, #f0fdf4) !important; }
html[data-theme="light"] .mk-k-green p, html[data-theme="light"] .mk-k-green small { color: #15803d !important; }
html[data-theme="light"] .mk-k-red { background: linear-gradient(135deg, #ffe4e6, #fff1f2) !important; }
html[data-theme="light"] .mk-k-red p, html[data-theme="light"] .mk-k-red small { color: #be123c !important; }
html[data-theme="light"] .mk-k-amber { background: linear-gradient(135deg, #ffedd5, #fffbeb) !important; }
html[data-theme="light"] .mk-k-amber p, html[data-theme="light"] .mk-k-amber a { color: #b45309 !important; }
html[data-theme="light"] .mk-pill-on { color: #15803d !important; }
html[data-theme="light"] .mk-pill-off { color: #be123c !important; }
html[data-theme="light"] .mk-pill-warn { color: #b45309 !important; }
html[data-theme="light"] .mk-pill-sys { color: #15803d !important; }
html[data-theme="light"] .mk-hic-red { color: #be123c !important; }
html[data-theme="light"] .mk-conf { color: #15803d !important; }

/* ==========================================================================
   Item 69 + 71 (2026-11-12, demo light-mode audit). Light-only overrides;
   dark mode untouched, no layout/design change. The generic light rules
   above darken text everywhere, which breaks text inside components that
   STAY dark in light mode (.lm-card, .lm-kpi gradients) - the restores
   below keep their light text light. GIS map stays dark by design.
   ========================================================================== */
/* GIS footer (item 59): box turns white via --panel, its text was #cbd5e1 */
html[data-theme="light"] .gx-foot { color: #475569 !important; }
/* GIS layer list: panel turns white, names were #dbe5ff, eye icons #cbd5e1 */
html[data-theme="light"] .lyr { color: #1e293b !important; }
html[data-theme="light"] .lyr .eye { color: #475569 !important; }
html[data-theme="light"] .leaflet-control-scale-line { background: rgba(0,0,0,.6) !important; }
/* Monitoring quick-nav tabs (_tabs.php): tab bar turns white, tab text stayed #8fa3bd */
html[data-theme="light"] .lm-tab { color: #475569 !important; }
html[data-theme="light"] .lm-tab:hover { color: #0f172a !important; }
/* .lm-card turns WHITE in light mode (rules at 481/534), so its text must be dark.
   (This block earlier wrongly assumed the card stays dark navy - the donut number
   and legend were invisible on white. Corrected 2026-11-12, item 69 follow-up.) */
html[data-theme="light"] .lm-card .text-white { color: #0f172a !important; }
html[data-theme="light"] .lm-card .text-slate-200 { color: #334155 !important; }
html[data-theme="light"] .lm-card .text-slate-300 { color: #475569 !important; }
html[data-theme="light"] .lm-card .text-slate-400 { color: #64748b !important; }
html[data-theme="light"] .lm-card .text-slate-500 { color: #64748b !important; }
html[data-theme="light"] .lm-card .text-slate-600 { color: #64748b !important; }
html[data-theme="light"] .lm-card .text-amber-300 { color: #fcd34d !important; }
html[data-theme="light"] .lm-card .text-red-400 { color: #f87171 !important; }
html[data-theme="light"] .lm-card .text-emerald-400 { color: #34d399 !important; }
html[data-theme="light"] .lm-card .text-cyan-400 { color: #22d3ee !important; }
html[data-theme="light"] .lm-card .text-purple-400 { color: #c084fc !important; }
/* Same restores for inline style colors inside .lm-card: Down Count pill
   (#fca5a5 on dark red), priority pills, bar labels, View All links. */
html[data-theme="light"] .lm-card [style*="color:#fca5a5"] { color: #fca5a5 !important; }
html[data-theme="light"] .lm-card [style*="color:#ef4444"] { color: #ef4444 !important; }
html[data-theme="light"] .lm-card [style*="color:#f59e0b"] { color: #f59e0b !important; }
html[data-theme="light"] .lm-card [style*="color:#38bdf8"] { color: #38bdf8 !important; }
html[data-theme="light"] .lm-card [style*="color:#4ade80"] { color: #4ade80 !important; }
html[data-theme="light"] .lm-card [style*="color:#fb7185"] { color: #fb7185 !important; }
html[data-theme="light"] .lm-card [style*="color:#a78bfa"] { color: #a78bfa !important; }
html[data-theme="light"] .lm-card [style*="color:#cbd5e1"] { color: #cbd5e1 !important; }
/* Donut centre numbers + "Problems" label (item 69 follow-up): SVG fills stay white/pale
   on the white card - darken them. Scoped to .lm-donut so the topology panel
   (dark #0a1226 island, white labels) is untouched. */
html[data-theme="light"] .lm-donut svg text[fill="#fff"] { fill: #0f172a !important; }
html[data-theme="light"] .lm-donut svg text[fill="#8fa3bd"] { fill: #475569 !important; }
/* Item 71: ticker red in light mode only (dark mode stays amber). */
html[data-theme="light"] #noticeTicker { color: #dc2626; }
