/*
 * ClusterPilot — Production Light Theme
 * ---------------------------------------------------------------
 * This file is intentionally light-scoped. No selector can affect
 * the existing dark theme.
 */

html[data-theme="light"] {
  color-scheme: light;
  --lt-canvas: #f4f7fb;
  --lt-canvas-deep: #edf2f8;
  --lt-surface: rgba(255, 255, 255, .94);
  --lt-surface-solid: #ffffff;
  --lt-raised: #f8fafc;
  --lt-soft: #f1f5f9;
  --lt-border: #d8e1ec;
  --lt-border-soft: rgba(148, 163, 184, .24);
  --lt-border-blue: rgba(37, 99, 235, .25);
  --lt-text: #0f172a;
  --lt-text-2: #334155;
  --lt-text-3: #64748b;
  --lt-blue: #2563eb;
  --lt-blue-soft: #eaf1ff;
  --lt-violet: #7c3aed;
  --lt-cyan: #0891b2;
  --lt-green: #059669;
  --lt-amber: #d97706;
  --lt-red: #dc2626;
  --lt-shadow: 0 18px 45px rgba(15, 23, 42, .09);
  --lt-shadow-soft: 0 8px 24px rgba(15, 23, 42, .07);
  --lt-mirror:
    linear-gradient(112deg, rgba(255, 255, 255, .99) 0%, rgba(248, 250, 252, .97) 48%, rgba(239, 246, 255, .92) 100%);

  /* Existing shared application tokens */
  --bg: var(--lt-canvas);
  --bg1: var(--lt-surface-solid);
  --bg2: var(--lt-raised);
  --bg3: var(--lt-soft);
  --bg4: #e8eef7;
  --bdr: rgba(15, 23, 42, .10);
  --bdr2: rgba(15, 23, 42, .17);
  --txt: var(--lt-text);
  --txt2: var(--lt-text-2);
  --txt3: var(--lt-text-3);
  --blue: var(--lt-blue);
  --cyan: var(--lt-cyan);
  --teal: #0d9488;
  --green: var(--lt-green);
  --amber: var(--lt-amber);
  --red: var(--lt-red);
  --purple: var(--lt-violet);
  --white: var(--lt-text);
  --muted: var(--lt-text-3);
  --line: var(--lt-border);
  --panel: var(--lt-surface-solid);
  --panel2: var(--lt-raised);

  /* Section-owned token sets */
  --cx-panel: var(--lt-surface-solid);
  --cx-line: var(--lt-border);
  --cx-muted: var(--lt-text-3);
  --cx-blue: var(--lt-blue);
  --cx-green: var(--lt-green);
  --cx-amber: var(--lt-amber);
  --cx-red: var(--lt-red);
  --dm-panel: var(--lt-surface-solid);
  --dm-line: var(--lt-border);
  --dm-muted: var(--lt-text-3);
  --dm-cyan: var(--lt-cyan);
  --dm-green: var(--lt-green);
  --dm-red: var(--lt-red);
  --dr-panel: var(--lt-surface-solid);
  --dr-line: var(--lt-border);
  --dr-muted: var(--lt-text-3);
  --dr-blue: var(--lt-blue);
  --dr-green: var(--lt-green);
  --dr-amber: var(--lt-amber);
  --dr-red: var(--lt-red);
  --rca-panel: var(--lt-surface-solid);
  --rca-line: var(--lt-border);
  --rca-muted: var(--lt-text-3);
  --rca-blue: var(--lt-blue);
  --rca-green: var(--lt-green);
  --rca-amber: var(--lt-amber);
  --rca-red: var(--lt-red);
  --sp-panel: var(--lt-surface-solid);
  --sp-line: var(--lt-border);
  --sp-muted: var(--lt-text-3);
  --trivy-glass: rgba(255, 255, 255, .92);
  --trivy-glass-2: #f8fafc;
  --trivy-line: var(--lt-border);
  --trivy-shadow: var(--lt-shadow);
  --trivy-blue: var(--lt-blue);
  --trivy-cyan: var(--lt-cyan);
  --trivy-purple: var(--lt-violet);
}

/* Canvas and application shell */
html[data-theme="light"],
html[data-theme="light"] body {
  background: var(--lt-canvas) !important;
  color: var(--lt-text) !important;
}

html[data-theme="light"] body {
  background-image:
    radial-gradient(circle at 8% 4%, rgba(37, 99, 235, .075), transparent 27%),
    radial-gradient(circle at 96% 8%, rgba(124, 58, 237, .055), transparent 25%),
    linear-gradient(145deg, #f8fafc 0%, #f2f6fb 52%, #eef3f9 100%) !important;
  animation: none !important;
}

html[data-theme="light"] body::before,
html[data-theme="light"] body::after,
html[data-theme="light"] #dashboard-bg-cv,
html[data-theme="light"] canvas#bg,
html[data-theme="light"] .dash-noise,
html[data-theme="light"] .aurora,
html[data-theme="light"] .noise,
html[data-theme="light"] .scanlines,
html[data-theme="light"] .grid-bg {
  display: none !important;
}

html[data-theme="light"] .shell,
html[data-theme="light"] .shell-right,
html[data-theme="light"] .main,
html[data-theme="light"] .section {
  background: transparent !important;
  color: var(--lt-text) !important;
}

/* Mirror-like surface: bright top edge, cool glass depth, restrained shadow */
html[data-theme="light"] .sidebar,
html[data-theme="light"] .topbar,
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .modal-panel,
html[data-theme="light"] .export-dialog-box,
html[data-theme="light"] .profile-panel,
html[data-theme="light"] #profile-panel,
html[data-theme="light"] #gs-dropdown,
html[data-theme="light"] .ns-dropdown,
html[data-theme="light"] .user-menu-dd {
  background: var(--lt-mirror) !important;
  border-color: var(--lt-border) !important;
  color: var(--lt-text) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    var(--lt-shadow) !important;
}

html[data-theme="light"] .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .985), rgba(246, 249, 253, .975)) !important;
  border-right: 1px solid var(--lt-border) !important;
  box-shadow: 10px 0 34px rgba(15, 23, 42, .065) !important;
  backdrop-filter: blur(28px) saturate(1.2) !important;
}

html[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, .88) !important;
  border-bottom: 1px solid var(--lt-border) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 12px 30px rgba(15, 23, 42, .065) !important;
  backdrop-filter: blur(24px) saturate(1.25) !important;
}

/* Sidebar, accordions and theme switch */
html[data-theme="light"] .nav-item,
html[data-theme="light"] .nav-sub,
html[data-theme="light"] .inv-acc-head,
html[data-theme="light"] .inv-acc-item,
html[data-theme="light"] .sb-cluster,
html[data-theme="light"] .cluster-pill {
  color: var(--lt-text-2) !important;
  border-color: transparent !important;
}

html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .nav-sub:hover,
html[data-theme="light"] .inv-acc-head:hover,
html[data-theme="light"] .inv-acc-item:hover {
  color: var(--lt-text) !important;
  background: rgba(37, 99, 235, .065) !important;
  border-color: rgba(37, 99, 235, .12) !important;
}

html[data-theme="light"] .nav-item.active,
html[data-theme="light"] .nav-sub.active,
html[data-theme="light"] .inv-acc-item.active,
html[data-theme="light"] [aria-current="page"] {
  color: #1d4ed8 !important;
  background: linear-gradient(110deg, rgba(37, 99, 235, .13), rgba(8, 145, 178, .075)) !important;
  border-color: rgba(37, 99, 235, .20) !important;
  box-shadow:
    inset 3px 0 0 var(--lt-blue),
    0 7px 18px rgba(37, 99, 235, .09) !important;
}

html[data-theme="light"] .inv-theme-dock {
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 244, 251, .98)) !important;
  border-color: var(--lt-border) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 10px 24px rgba(15, 23, 42, .09) !important;
}

html[data-theme="light"] .inv-theme-switch {
  background: #e9eef6 !important;
  border-color: rgba(100, 116, 139, .22) !important;
}

html[data-theme="light"] .inv-theme-choice {
  color: var(--lt-text-2) !important;
}

html[data-theme="light"] .inv-theme-current-label {
  color: #334155 !important;
}

html[data-theme="light"] .inv-theme-choice.active {
  color: #fff !important;
  background: linear-gradient(135deg, #6d5dfc, #2563eb 58%, #06b6d4) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 8px 18px rgba(37, 99, 235, .24) !important;
}

/* Text and icons */
html[data-theme="light"] :where(.sidebar, .topbar, .main, .modal-panel, .export-dialog-box) * {
  text-shadow: none !important;
}

html[data-theme="light"] :where(h1, h2, h3, h4, h5, h6, .title, .card-title, .panel-title, .ph-title) {
  color: var(--lt-text) !important;
}

html[data-theme="light"] :where(.muted, .subtle, .subtitle, .desc, .description, .help, .hint, .txt2) {
  color: var(--lt-text-3) !important;
}

html[data-theme="light"] .main [style*="color:#fff"],
html[data-theme="light"] .main [style*="color: #fff"],
html[data-theme="light"] .main [style*="color:white"],
html[data-theme="light"] .main [style*="color: white"],
html[data-theme="light"] .main [style*="color:#e8f0ff"],
html[data-theme="light"] .main [style*="color:rgba(200,220,255"],
html[data-theme="light"] .main [style*="color:rgba(160,190,230"] {
  color: var(--lt-text-2) !important;
}

/* Inputs and every interactive control */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .tb-search-wrap,
html[data-theme="light"] .search-box,
html[data-theme="light"] .search-wrap,
html[data-theme="light"] .swrap,
html[data-theme="light"] .ls-bar,
html[data-theme="light"] .log-search,
html[data-theme="light"] [contenteditable="true"] {
  background: rgba(255, 255, 255, .96) !important;
  color: var(--lt-text) !important;
  border-color: var(--lt-border) !important;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, .025),
    0 5px 16px rgba(15, 23, 42, .045) !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] [contenteditable="true"]:focus {
  border-color: rgba(37, 99, 235, .48) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .11), 0 8px 18px rgba(15, 23, 42, .06) !important;
  outline: none !important;
}

html[data-theme="light"] option {
  background: #fff !important;
  color: var(--lt-text) !important;
}

html[data-theme="light"] :where(button, .btn, [role="button"]) {
  text-shadow: none !important;
}

html[data-theme="light"] :where(.btn, .icon-btn, .tb-btn, .refresh-btn, .filter-btn, .tab-btn):not(.primary):not(.danger) {
  background: linear-gradient(180deg, #fff, #f4f7fb) !important;
  color: var(--lt-text-2) !important;
  border-color: var(--lt-border) !important;
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(15, 23, 42, .055) !important;
}

html[data-theme="light"] :where(.btn, .icon-btn, .tb-btn, .refresh-btn, .filter-btn, .tab-btn):not(.primary):not(.danger):hover {
  background: #fff !important;
  color: var(--lt-blue) !important;
  border-color: rgba(37, 99, 235, .28) !important;
  transform: translateY(-1px);
}

/* Generic surface coverage for every current and future dashboard tab */
html[data-theme="light"] .main :where(
  [class$="-card"],
  [class*="-card "],
  [class$="-panel"],
  [class*="-panel "],
  [class$="-box"],
  [class*="-box "],
  [class$="-tile"],
  [class*="-tile "],
  [class$="-widget"],
  [class*="-widget "],
  [class$="-table-wrap"],
  [class$="-chart-wrap"]
) {
  background-color: var(--lt-surface-solid) !important;
  border-color: var(--lt-border) !important;
  color: var(--lt-text) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    var(--lt-shadow-soft) !important;
}

html[data-theme="light"] .main :where(
  [class$="-head"],
  [class*="-head "],
  [class$="-header"],
  [class*="-header "],
  [class$="-toolbar"],
  [class*="-toolbar "],
  [class$="-footer"],
  [class*="-footer "]
) {
  background-color: var(--lt-raised) !important;
  border-color: var(--lt-border-soft) !important;
  color: var(--lt-text-2) !important;
}

html[data-theme="light"] .main :where(
  [class$="-card"],
  [class*="-card "],
  [class$="-panel"],
  [class*="-panel "],
  [class$="-box"],
  [class*="-box "]
):hover {
  border-color: rgba(37, 99, 235, .20) !important;
}

/* Protect semantic overlays from generic card/panel rules */
html[data-theme="light"] :where(
  .modal,
  .modal-bg,
  .modal-overlay,
  .overlay,
  [class$="-overlay"],
  [class*="-overlay "],
  .del-modal,
  .success-ov,
  .confirm-overlay
) {
  background: rgba(15, 23, 42, .42) !important;
  backdrop-filter: blur(10px) !important;
}

/* Tables, rows, dropdowns */
html[data-theme="light"] table,
html[data-theme="light"] .gt,
html[data-theme="light"] .data-table {
  background: #fff !important;
  color: var(--lt-text) !important;
  border-color: var(--lt-border) !important;
}

html[data-theme="light"] thead,
html[data-theme="light"] th {
  background: #eef3f9 !important;
  color: var(--lt-text-2) !important;
  border-color: var(--lt-border) !important;
}

html[data-theme="light"] td {
  color: var(--lt-text-2) !important;
  border-color: #e6ebf2 !important;
}

html[data-theme="light"] tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, .74) !important;
}

html[data-theme="light"] tbody tr:hover td {
  background: #edf5ff !important;
}

html[data-theme="light"] :where(
  .dropdown,
  .dropdown-menu,
  .menu,
  .popover,
  .tooltip-box,
  .context-menu,
  .ns-dropdown,
  .user-menu-dd,
  #gs-dropdown
) {
  background: rgba(255, 255, 255, .985) !important;
  color: var(--lt-text) !important;
  border-color: var(--lt-border) !important;
  box-shadow: 0 22px 54px rgba(15, 23, 42, .15), inset 0 1px 0 #fff !important;
}

/* Tabs and segmented controls */
html[data-theme="light"] :where(.tabs, .tab-bar, .segmented, .view-switch, .toggle-group) {
  background: #eaf0f7 !important;
  border-color: var(--lt-border) !important;
}

html[data-theme="light"] :where(.tab, .tab-btn, [role="tab"]) {
  color: var(--lt-text-3) !important;
  border-color: transparent !important;
}

html[data-theme="light"] :where(.tab.active, .tab-btn.active, [role="tab"][aria-selected="true"]) {
  color: var(--lt-blue) !important;
  background: #fff !important;
  border-color: rgba(37, 99, 235, .20) !important;
  box-shadow: 0 5px 15px rgba(15, 23, 42, .08) !important;
}

/* Badges and status chips keep meaning but lose neon glare */
html[data-theme="light"] :where(.badge, .chip, .pill, [class*="-badge"], [class*="-chip"], [class*="-pill"]) {
  box-shadow: none !important;
  text-shadow: none !important;
}

html[data-theme="light"] :where(.success, .ok, .running, .healthy) {
  color: #047857 !important;
}

html[data-theme="light"] :where(.warning, .warn, .pending, .degraded) {
  color: #b45309 !important;
}

html[data-theme="light"] :where(.danger, .error, .failed, .critical, .crit) {
  color: #b91c1c !important;
}

/* Overview, graph studio, capacity and heatmap */
html[data-theme="light"] #sec-overview {
  --ov-bg: var(--lt-canvas);
  --ov-panel: var(--lt-surface-solid);
  --ov-card: var(--lt-surface-solid);
  --ov-line: var(--lt-border);
  --ov-text: var(--lt-text);
  --ov-muted: var(--lt-text-3);
}

html[data-theme="light"] #sec-overview :where(
  [class^="ov2-"],
  [class^="gs2-"],
  [class^="tpa-"],
  [class^="hm-"],
  [class^="pgc-"],
  [class^="ngc-"],
  [class^="r3-"],
  [class^="sc1-"],
  [class^="r5-"],
  [class^="r6-"],
  [class^="lt-"]
) {
  text-shadow: none !important;
}

html[data-theme="light"] #sec-overview :where(
  [class$="-card"],
  [class*="-card "],
  [class$="-panel"],
  [class*="-panel "],
  [class$="-shell"],
  [class*="-shell "],
  [class$="-chart"],
  [class*="-chart "],
  [class$="-grid"],
  [class*="-grid "],
  [class$="-body"],
  [class*="-body "]
) {
  background-color: var(--lt-surface-solid) !important;
  border-color: var(--lt-border) !important;
}

html[data-theme="light"] #sec-overview :where(
  [class$="-head"],
  [class*="-head "],
  [class$="-toolbar"],
  [class*="-toolbar "],
  [class$="-ctrl"],
  [class*="-ctrl "],
  [class$="-legend"],
  [class*="-legend "]
) {
  background-color: var(--lt-raised) !important;
  border-color: var(--lt-border-soft) !important;
}

html[data-theme="light"] #sec-overview :where(.ov2-summary-card, .pgc-card, .ngc-card, .r3-card, .r5-card, .r6-card) {
  background: var(--lt-mirror) !important;
  box-shadow: inset 0 1px 0 #fff, var(--lt-shadow-soft) !important;
}

html[data-theme="light"] #sec-overview :where(.hm-cell, [class*="heat-cell"]) {
  border-color: rgba(15, 23, 42, .08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22) !important;
}

/* SVG charts generated with dark inline presentation attributes */
html[data-theme="light"] svg [stroke^="rgba(255,255,255"],
html[data-theme="light"] svg [stroke^="rgba(255, 255, 255"] {
  stroke: rgba(15, 23, 42, .09) !important;
}

html[data-theme="light"] svg [fill^="rgba(160,190,230"],
html[data-theme="light"] svg [fill^="rgba(200,220,255"],
html[data-theme="light"] svg [fill^="rgba(160, 190, 230"],
html[data-theme="light"] svg [fill^="rgba(200, 220, 255"] {
  fill: #64748b !important;
}

html[data-theme="light"] svg text:not([fill]) {
  fill: #64748b;
}

/* All feature tabs with independent dark micro-design systems */
html[data-theme="light"] :where(
  #sec-trivy,
  #sec-semgrep,
  #sec-gitleaks,
  #sec-syft,
  #sec-security-posture,
  #sec-rbac,
  #sec-errors,
  #sec-redis,
  #sec-kafka,
  #sec-postgres,
  #sec-grafana,
  #sec-alerts,
  #sec-cluster-health-report,
  #sec-app-monitoring,
  #sec-livemap,
  #sec-topology,
  #sec-cost-intelligence,
  #sec-deployment-risk,
  #sec-dependency-map,
  #sec-yamlgen,
  #sec-ai,
  #sec-ai-rca,
  #sec-mcp,
  #sec-terminal
) {
  --bg: var(--lt-canvas);
  --bg1: var(--lt-surface-solid);
  --bg2: var(--lt-raised);
  --bg3: var(--lt-soft);
  --surface: var(--lt-surface-solid);
  --panel: var(--lt-surface-solid);
  --panel2: var(--lt-raised);
  --line: var(--lt-border);
  --text: var(--lt-text);
  --txt: var(--lt-text);
  --muted: var(--lt-text-3);
  background: transparent !important;
  color: var(--lt-text) !important;
}

html[data-theme="light"] :where(
  #sec-trivy,
  #sec-semgrep,
  #sec-gitleaks,
  #sec-syft,
  #sec-security-posture,
  #sec-rbac,
  #sec-errors,
  #sec-redis,
  #sec-kafka,
  #sec-postgres,
  #sec-grafana,
  #sec-alerts,
  #sec-cluster-health-report,
  #sec-app-monitoring,
  #sec-livemap,
  #sec-topology,
  #sec-cost-intelligence,
  #sec-deployment-risk,
  #sec-dependency-map,
  #sec-yamlgen,
  #sec-ai,
  #sec-ai-rca,
  #sec-mcp,
  #sec-terminal
) :where(
  [class$="-card"],
  [class*="-card "],
  [class$="-panel"],
  [class*="-panel "],
  [class$="-box"],
  [class*="-box "],
  [class$="-wrap"],
  [class*="-wrap "],
  [class$="-body"],
  [class*="-body "],
  [class$="-stage"],
  [class*="-stage "],
  [class$="-canvas"],
  [class*="-canvas "]
) {
  background-color: var(--lt-surface-solid) !important;
  border-color: var(--lt-border) !important;
  color: var(--lt-text) !important;
}

/* Prefix-specific coverage for feature UI whose class names do not end in surface words */
html[data-theme="light"] :where(
  [class^="kf-"],
  [class^="rx-"],
  [class^="trm-"],
  [class^="ys-"],
  [class^="rbac-"],
  [class^="pm-"],
  [class^="lm-"],
  [class^="drisk-"],
  [class^="spost-"],
  [class^="dmap-"],
  [class^="chr-"],
  [class^="costx-"],
  [class^="rca-"]
) {
  text-shadow: none !important;
  border-color: var(--lt-border) !important;
}

html[data-theme="light"] :where(
  [class^="kf-"][class*="card"],
  [class^="kf-"][class*="panel"],
  [class^="rx-"][class*="card"],
  [class^="rx-"][class*="panel"],
  [class^="trm-"][class*="panel"],
  [class^="ys-"][class*="panel"],
  [class^="rbac-"][class*="card"],
  [class^="rbac-"][class*="panel"],
  [class^="pm-"][class*="card"],
  [class^="pm-"][class*="panel"],
  [class^="lm-"][class*="card"],
  [class^="lm-"][class*="panel"],
  [class^="drisk-"][class*="card"],
  [class^="drisk-"][class*="panel"],
  [class^="spost-"][class*="card"],
  [class^="spost-"][class*="panel"],
  [class^="dmap-"][class*="card"],
  [class^="dmap-"][class*="panel"],
  [class^="chr-"][class*="card"],
  [class^="chr-"][class*="panel"],
  [class^="costx-"][class*="card"],
  [class^="costx-"][class*="panel"],
  [class^="rca-"][class*="card"],
  [class^="rca-"][class*="panel"]
) {
  background: var(--lt-mirror) !important;
  box-shadow: inset 0 1px 0 #fff, var(--lt-shadow-soft) !important;
}

/* Logs, code, YAML and terminals use a light editor surface */
html[data-theme="light"] :where(
  pre,
  code,
  .log-box,
  .logs-body,
  .log-output,
  #live-log-box,
  .terminal,
  .terminal-panel,
  .exec-output,
  .code-editor,
  .yaml-editor,
  .cm-editor
) {
  background: #f7f9fc !important;
  color: #172033 !important;
  border-color: var(--lt-border) !important;
  text-shadow: none !important;
}

html[data-theme="light"] :where(.log-ts, .line-number, .gutter) {
  color: #64748b !important;
}

html[data-theme="light"] :where(.log-msg, .code-line) {
  color: #1e293b !important;
}

/* Dynamic inline dark backgrounds used by charts, drawers and late-rendered cards */
html[data-theme="light"] .main [style*="background:#000"],
html[data-theme="light"] .main [style*="background: #000"],
html[data-theme="light"] .main [style*="background:#050505"],
html[data-theme="light"] .main [style*="background:#080808"],
html[data-theme="light"] .main [style*="background:#0f0f0f"],
html[data-theme="light"] .main [style*="background:#111827"],
html[data-theme="light"] .main [style*="background:#0f172a"],
html[data-theme="light"] .main [style*="background:#172033"],
html[data-theme="light"] .main [style*="background:rgba(0,0,0"],
html[data-theme="light"] .main [style*="background: rgba(0,0,0"] {
  background: var(--lt-surface-solid) !important;
  color: var(--lt-text) !important;
  border-color: var(--lt-border) !important;
}

/* Re-assert overlays after inline-dark correction */
html[data-theme="light"] .main :where(
  .modal,
  .modal-bg,
  .modal-overlay,
  .overlay,
  [class$="-overlay"],
  [class*="-overlay "]
) {
  background: rgba(15, 23, 42, .42) !important;
}

/* Pod Inspector */
html[data-theme="light"] :where(.pd-topbar, .pd-health-bar, .pd-tabs-wrap) {
  background: rgba(255, 255, 255, .91) !important;
  color: var(--lt-text) !important;
  border-color: var(--lt-border) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07) !important;
  backdrop-filter: blur(24px) saturate(1.2) !important;
}

html[data-theme="light"] .pd-content {
  background: var(--lt-canvas) !important;
}

html[data-theme="light"] :where(.pd-card, .pd-stat, .pd-table-wrap, .pd-code, .pd-terminal, .pd-modal-box) {
  background: var(--lt-mirror) !important;
  color: var(--lt-text) !important;
  border-color: var(--lt-border) !important;
  box-shadow: inset 0 1px 0 #fff, var(--lt-shadow-soft) !important;
}

html[data-theme="light"] :where(.pd-card-head, .pd-table th) {
  background: var(--lt-raised) !important;
  border-color: var(--lt-border) !important;
}

html[data-theme="light"] .pd-tab {
  color: var(--lt-text-3) !important;
}

html[data-theme="light"] .pd-tab.active {
  color: var(--lt-blue) !important;
  border-bottom-color: var(--lt-blue) !important;
}

/* Login */
html[data-theme="light"] body:has(.login-side) {
  background-image:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, .12), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(8, 145, 178, .09), transparent 35%),
    linear-gradient(135deg, #f8fafc, #edf3fa) !important;
}

html[data-theme="light"] .brand-title,
html[data-theme="light"] .login-title {
  color: var(--lt-text) !important;
  text-shadow: none !important;
}

html[data-theme="light"] .brand-sub,
html[data-theme="light"] .extras {
  color: var(--lt-text-2) !important;
}

html[data-theme="light"] .login-box {
  padding: clamp(24px, 3vw, 38px) !important;
  border: 1px solid rgba(255, 255, 255, .86) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, .78) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 28px 70px rgba(15, 23, 42, .12) !important;
  backdrop-filter: blur(26px) saturate(1.15) !important;
}

html[data-theme="light"] :where(.fin, .otp-cell) {
  background: #fff !important;
  color: var(--lt-text) !important;
  border-color: var(--lt-border) !important;
}

html[data-theme="light"] :where(.finp-icon, .fin-toggle, .mfa-note, .setup-steps) {
  color: var(--lt-text-3) !important;
}

html[data-theme="light"] .inv-explore-bottom-link {
  color: var(--lt-text-2) !important;
}

/* Cloud selection, cluster management and Explore pages */
html[data-theme="light"] :where(.cluster-card, .stat-card, .hero, .feature-card, .doc-card, .architecture-card, .del-box) {
  background: var(--lt-mirror) !important;
  color: var(--lt-text) !important;
  border-color: var(--lt-border) !important;
  box-shadow: inset 0 1px 0 #fff, var(--lt-shadow) !important;
}

html[data-theme="light"] :where(.cluster-card, .stat-card, .feature-card, .doc-card):hover {
  border-color: rgba(37, 99, 235, .25) !important;
  box-shadow: inset 0 1px 0 #fff, 0 20px 44px rgba(15, 23, 42, .11) !important;
}

html[data-theme="light"] :where(.top, .hero, .page, .wrap) {
  color: var(--lt-text);
}

html[data-theme="light"] :where(.hsub, .sub, .stat-desc, .cluster-meta, .feature-copy, .doc-copy, .del-sub) {
  color: var(--lt-text-3) !important;
}

html[data-theme="light"] :where(.user-pill, .logout-btn, .back, .swrap) {
  background-color: rgba(255, 255, 255, .92) !important;
  color: var(--lt-text-2) !important;
  border-color: var(--lt-border) !important;
}

html[data-theme="light"] .rbar {
  background: linear-gradient(90deg, #2563eb, #06b6d4, #10b981, #7c3aed) !important;
  animation: none !important;
}

/* Scrollbars */
html[data-theme="light"] * {
  scrollbar-color: #c1cbd8 transparent;
}

html[data-theme="light"] *::-webkit-scrollbar-thumb {
  background: #c1cbd8 !important;
  border-color: transparent !important;
}

html[data-theme="light"] *::-webkit-scrollbar-thumb:hover {
  background: #a9b6c7 !important;
}

/* Motion is subtle in the professional light theme */
html[data-theme="light"] :where(.panel, .card, [class$="-card"], [class*="-card "]) {
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] *,
  html[data-theme="light"] *::before,
  html[data-theme="light"] *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 820px) {
  html[data-theme="light"] .login-box {
    padding: 22px !important;
    border-radius: 19px !important;
  }

  html[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, .95) !important;
  }
}

/* ===============================================================
   Light theme precision pass
   Fixes high-specificity dark rules and improves muted text contrast.
   =============================================================== */
html[data-theme="light"] {
  --lt-text-2: #111827;
  --lt-text-3: #27364a;
  --txt2: #111827;
  --txt3: #27364a;
  --theme-muted: #1f2937;
  --theme-subtle: #334155;
}

/* Sidebar cluster badge had a dark !important rule in the base theme. */
html[data-theme="light"] .sidebar.inv-sidebar-v2 .sb-cluster-badge.inv-cluster-v2 {
  background: linear-gradient(120deg, rgba(255,255,255,.99), rgba(239,246,255,.97)) !important;
  border: 1px solid #cbd8e8 !important;
  color: #111827 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 20px rgba(15,23,42,.08) !important;
}

html[data-theme="light"] .sidebar.inv-sidebar-v2 .sb-cluster-badge.inv-cluster-v2 :where(
  .sb-cluster-name,
  .sb-cluster-ver,
  .inv-ext
) {
  color: #111827 !important;
  opacity: 1 !important;
}

/* Standalone Cloud Select and Cluster Management pages */
html[data-theme="light"] body.cloud-select-page,
html[data-theme="light"] body.clusters-page {
  --bg: #f4f7fb;
  --bg2: #ffffff;
  --bg3: #f8fafc;
  --bg4: #eef2f7;
  --txt: #111827;
  --txt2: #111827;
  --txt3: #111827;
  --bdr: #d7e0ec;
  --bdr2: #b8c7da;
  background: linear-gradient(135deg, #f8fafc 0%, #eef5ff 54%, #f5f3ff 100%) !important;
  color: #111827 !important;
  color-scheme: light !important;
  filter: none !important;
}

html[data-theme="light"] body.cloud-select-page::after {
  background: linear-gradient(90deg, rgba(255,255,255,.22), transparent 24%, transparent 76%, rgba(255,255,255,.18)) !important;
}

html[data-theme="light"] body.cloud-select-page :where(.topbar),
html[data-theme="light"] body.clusters-page :where(.topbar) {
  background: rgba(255, 255, 255, .88) !important;
  border-color: #d7e0ec !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08) !important;
}

html[data-theme="light"] body.cloud-select-page :where(
  .hero, .search-wrap, .recent-chip, .pcard, .opcard, .card-inner,
  .cstat, .cloud-logo, .user-pill, .logout-btn, .sec-badge,
  .pcard-tooltip, .empty-icon
),
html[data-theme="light"] body.clusters-page :where(
  .hero, .swrap, .stat-card, .cluster-card, .card-footer,
  .sort-btn, .refresh-btn, .logout-btn, .tstatus, .file-wrap,
  .upload-area, .add-section, .del-box, .empty-provider, .empty-provider-icon
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .09) !important;
}

html[data-theme="light"] body.cloud-select-page :where(.pcard.state-connected, .cloud-card-connected .card-inner) {
  background: linear-gradient(145deg, #ffffff, #f0fdfa) !important;
  border-color: #99f6e4 !important;
}

html[data-theme="light"] body.cloud-select-page :where(.pcard, .opcard, .cloud-card-connected),
html[data-theme="light"] body.clusters-page :where(.cluster-card, .stat-card) {
  box-shadow: 0 16px 38px rgba(15, 23, 42, .10) !important;
}

html[data-theme="light"] body.cloud-select-page :where(.pcard:hover, .opcard:hover, .cloud-card-connected:hover),
html[data-theme="light"] body.clusters-page .cluster-card:hover {
  border-color: #7dd3fc !important;
  box-shadow: 0 22px 50px rgba(14, 116, 144, .14) !important;
}

html[data-theme="light"] body.cloud-select-page :where(.cstat),
html[data-theme="light"] body.clusters-page :where(.card-metrics, .card-stat, .node-group) {
  background: #f8fafc !important;
  background-image: none !important;
  border-color: #d7e0ec !important;
  color: #111827 !important;
}

html[data-theme="light"] body.clusters-page :where(.add-section, .upload-area) {
  background: linear-gradient(120deg, #ffffff, #eef6ff) !important;
  border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] body.clusters-page :where(.file-wrap, .file-label) {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] body.cloud-select-page :where(
  .hsub, .sec-title, .group-label, .cloud-service, .cstat-label,
  .action-hint, .pcard-name, .pcard-service, .opcard-type,
  .opcard-name, .opcard-desc, .recent-chip-name, .recent-chip-time,
  .tt-name, .tt-service, .tt-desc, .search-inp, .tbr-dim,
  .tbr-sep, .tbr-cur, .user-pill, .logout-btn
),
html[data-theme="light"] body.clusters-page :where(
  .hsub, .stat-label, .stat-desc, .card-name, .card-server,
  .card-title, .cs-label, .cs-sub, .cs-val, .node-name-row,
  .metric-label, .metric-val, .status-txt, .last-updated,
  .sec-label, .add-sub, .file-label, .tbr-dim, .tbr-sep,
  .tbr-cur, .logout-btn, .sort-btn, .refresh-btn
) {
  color: #111827 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="light"] body.cloud-select-page :where(.htitle, .tb-name),
html[data-theme="light"] body.clusters-page :where(.htitle, .tb-name) {
  background: linear-gradient(90deg, #4f46e5, #0284c7 50%, #0f766e) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: none !important;
}

html[data-theme="light"] body.cloud-select-page .search-inp::placeholder,
html[data-theme="light"] body.clusters-page #search-inp::placeholder {
  color: #475569 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.cloud-select-page .recent-remove {
  color: #334155 !important;
}

html[data-theme="light"] body.cloud-select-page .group-label::after,
html[data-theme="light"] body.cloud-select-page .sec-line,
html[data-theme="light"] body.clusters-page .sec-line {
  background: linear-gradient(90deg, #94a3b8, transparent) !important;
}

html[data-theme="light"] body.cloud-select-page :where(.aurora, .noise, .scanlines),
html[data-theme="light"] body.clusters-page :where(.aurora, .noise, .scanlines, canvas#bg) {
  opacity: .08 !important;
  filter: none !important;
}

html[data-theme="light"] body.clusters-page .del-modal {
  background: rgba(15, 23, 42, .38) !important;
}

/* ==========================================================================
   Final high-contrast pass
   Light mode uses near-black copy across feature consoles. Semantic meaning
   remains in icons, borders and fills instead of low-contrast text colors.
   ========================================================================== */

html[data-theme="light"] :where(
  #sec-trivy, #sec-semgrep, #sec-gitleaks, #sec-syft, #sec-rbac,
  #sec-errors, #sec-grafana, #sec-cluster-health-report,
  #sec-terminal, #sec-redis, #sec-kafka, #sec-postgres
) :where(
  h1, h2, h3, h4, h5, h6, p, div, span, small, label, b, strong,
  em, pre, code, td, th, li, input, select, textarea, option
) {
  color: #111827 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="light"] :where(
  #sec-trivy, #sec-semgrep, #sec-gitleaks, #sec-syft, #sec-rbac,
  #sec-errors, #sec-cluster-health-report, #sec-terminal,
  #sec-redis, #sec-kafka, #sec-postgres
) :where(input, select, textarea)::placeholder {
  color: #475569 !important;
  opacity: 1 !important;
}

/* Pale semantic chips become readable while keeping their status tint. */
html[data-theme="light"] :where(
  #sec-trivy, #sec-semgrep, #sec-gitleaks, #sec-syft,
  #sec-rbac, #sec-errors, #sec-cluster-health-report
) :where(
  [class*="badge"], [class*="chip"], [class*="pill"], [class*="status"],
  [class*="risk"], [class*="grade"], [class*="severity"]
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-trivy :where(
  .panel, .trivy-premium-hero, .trivy-title-row, .trivy-toolbar,
  .trivy-search-wrap, .btn-group, #trivy-summary, #trivy-results
) {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-trivy :where(
  #trivy-image-search, #trivy-cluster-badge, #trivy-last-scan,
  .btn-group, .trivy-kicker
) {
  background: #f8fafc !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] :where(
  #sec-semgrep .sg-tab, #sec-gitleaks .gl-tab, #sec-syft .sy-tab,
  #sec-rbac .rbac-scope, #sec-cluster-health-report .chr-btn.soft
) {
  background: #e2e8f0 !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] :where(
  #sec-semgrep .sg-tab.active, #sec-gitleaks .gl-tab.active,
  #sec-syft .sy-tab.active
) {
  background: #dbeafe !important;
  color: #111827 !important;
  border-color: #7dd3fc !important;
}

/* Syft gray health rows/cards */
html[data-theme="light"] #sec-syft :where(
  .sy-health > *, .sy-mini, .sy-card > *, .sy-card [class*="stat"],
  .sy-card [class*="bar"]
) {
  background: #f8fafc !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

/* Error observatory */
html[data-theme="light"] #sec-errors :where(
  .panel, .card, [class*="metric"], [class*="stat"], [class*="pod"],
  [class*="signal"], [class*="hero"], [class*="toolbar"]
) {
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-errors :where(
  [class*="metric"], [class*="stat"], [class*="pod"] [class*="cell"],
  [class*="signal"]
) {
  background: #f8fafc !important;
}

/* Pod Describe, Logs and YAML overlays opened from overview. */
html[data-theme="light"] :where(
  #pqt-describe-modal > div, #pqt-logs-box, #pqt-yaml-modal > div
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .25) !important;
}

html[data-theme="light"] :where(
  #pqt-describe-modal, #pqt-logs-modal, #pqt-yaml-modal
) {
  background: rgba(15, 23, 42, .42) !important;
}

html[data-theme="light"] :where(
  #pqt-desc-body, #pqt-logs-body, #pqt-yaml-body
) {
  background: #ffffff !important;
  color: #111827 !important;
}

html[data-theme="light"] :where(
  #pqt-describe-modal, #pqt-logs-modal, #pqt-yaml-modal
) :where(div, span, pre, code, label, input, select, option) {
  color: #111827 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-theme="light"] #pqt-logs-body :where(*) {
  color: #111827 !important;
}

html[data-theme="light"] #pqt-logs-body :where(
  [style*="background:#"], [style*="background: #"],
  [style*="background:rgba"], [style*="background: rgba"]
) {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

/* Loki/Grafana advanced panels and chart */
html[data-theme="light"] #sec-grafana :where(
  #loki-chart-wrap, #loki-advanced-panel > div, #loki-chart-tooltip,
  #loki-table-wrap, #loki-empty,
  [style*="background:#0d0d0d"], [style*="background: #0d0d0d"],
  [style*="background:#060d1a"], [style*="background: #060d1a"]
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-grafana :where(
  #loki-chart-wrap, #loki-advanced-panel, #loki-table-wrap, #loki-stat-cards
) :where(*) {
  color: #111827 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Terminal */
html[data-theme="light"] #sec-terminal :where(
  .trm-output-wrap, .trm-log-output, .trm-ai-chat,
  .trm-ai-ctx, .trm-disc-screen, .trm-stats-bar
) {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

/* Redis Explorer */
html[data-theme="light"] #sec-redis :where(
  .rx-topbar, .rx-conn-tabs, .rx-left, .rx-right, .rx-tabs,
  .rx-content, .rx-key-list, .rx-key-list-hdr, .rx-filter-row,
  .rx-search-bar, .rx-stats-grid, .rx-stat-card, .rx-kv-item,
  .rx-section-hdr, .rx-connect-box, .rx-modal-box
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-redis :where(
  .rx-key-item, .rx-kv-item, .rx-type-chip, .rx-tab,
  .rx-conn-tab, .rx-conn-tab-add
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-redis .rx-key-item:hover,
html[data-theme="light"] #sec-redis .rx-key-item.active {
  background: #e0f2fe !important;
}

/* Redis modal interaction lock for light mode.
   The modal is portaled under body, so keep it above every dashboard layer
   and prevent generic light overlay rules from swallowing button clicks. */
html[data-theme="light"] body > .rx-modal-backdrop {
  z-index: 100000 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  background: rgba(15, 23, 42, .58) !important;
}
html[data-theme="light"] #sec-redis .rx-modal-backdrop:not(.rx-modal-open),
html[data-theme="light"] body > .rx-modal-backdrop:not(.rx-modal-open) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html[data-theme="light"] #sec-redis .rx-modal-backdrop.rx-modal-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
html[data-theme="light"] body > .rx-modal-backdrop.rx-modal-open {
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
html[data-theme="light"] body > .rx-modal-backdrop .rx-modal-box {
  position: relative !important;
  z-index: 100001 !important;
  pointer-events: auto !important;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .32) !important;
}
html[data-theme="light"] body > .rx-modal-backdrop .rx-modal-title,
html[data-theme="light"] body > .rx-modal-backdrop .rx-modal-sub {
  color: #0f172a !important;
  opacity: 1 !important;
}
html[data-theme="light"] body > .rx-modal-backdrop .rx-modal-actions,
html[data-theme="light"] body > .rx-modal-backdrop .rx-modal-actions .rx-btn {
  position: relative !important;
  z-index: 100002 !important;
  pointer-events: auto !important;
}
html[data-theme="light"] body > .rx-modal-backdrop .rx-btn-ghost {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  opacity: 1 !important;
}
html[data-theme="light"] body > .rx-modal-backdrop #rx-disconnect-confirm {
  background: #fff1f2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}
html[data-theme="light"] body > .rx-modal-backdrop .rx-btn:hover {
  filter: brightness(.96) !important;
  transform: translateY(-1px);
}

/* Trivy light console: colorful security accents with production contrast. */
html[data-theme="light"] #sec-trivy .panel {
  background:
    radial-gradient(circle at 8% 0%, rgba(59,130,246,.16), transparent 28%),
    radial-gradient(circle at 92% 2%, rgba(34,211,238,.15), transparent 28%),
    linear-gradient(135deg,#ffffff 0%,#f5f7ff 54%,#ecfeff 100%) !important;
  border-color:#b9c8dd!important;
}
html[data-theme="light"] #sec-trivy .trivy-premium-hero {
  background:
    radial-gradient(circle at 12% 0%,rgba(99,102,241,.17),transparent 31%),
    radial-gradient(circle at 88% 0%,rgba(6,182,212,.16),transparent 32%),
    linear-gradient(120deg,#ffffff,#eef2ff 58%,#ecfeff)!important;
  border-bottom-color:#bfdbfe!important;
}
html[data-theme="light"] #sec-trivy .trivy-title-row {
  background:transparent!important;
  border-color:transparent!important;
}
html[data-theme="light"] #sec-trivy h2,
html[data-theme="light"] #sec-trivy .trivy-main-title,
html[data-theme="light"] #sec-trivy .trivy-subtitle {
  color:#0f172a!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-trivy .trivy-kicker {
  color:#1e3a8a!important;
  background:linear-gradient(135deg,#dbeafe,#ede9fe)!important;
  border-color:#93c5fd!important;
}
html[data-theme="light"] #sec-trivy .trivy-kicker .trivy-export-btn {
  color:#1e3a8a!important;
  background:linear-gradient(135deg,#eff6ff,#ede9fe)!important;
  border-color:#a5b4fc!important;
  box-shadow:0 5px 14px rgba(79,70,229,.12)!important;
}
html[data-theme="light"] #sec-trivy #trivy-cluster-badge {
  color:#0f172a!important;background:#e0f2fe!important;border-color:#7dd3fc!important;
}
html[data-theme="light"] #sec-trivy #trivy-last-scan {
  color:#1f2937!important;background:#f1f5f9!important;border-color:#94a3b8!important;
}
html[data-theme="light"] #sec-trivy .btn-group {
  background:rgba(255,255,255,.84)!important;border-color:#c7d2fe!important;
  box-shadow:0 8px 22px rgba(79,70,229,.08)!important;
}
html[data-theme="light"] #sec-trivy .btn-group .btn {
  color:#1f2937!important;background:#f8fafc!important;border-color:#dbe3ee!important;
}
html[data-theme="light"] #sec-trivy .btn-group .btn:nth-child(2) {
  color:#b91c1c!important;background:#fff1f2!important;border-color:#fda4af!important;
}
html[data-theme="light"] #sec-trivy .btn-group .btn:nth-child(3) {
  color:#c2410c!important;background:#fff7ed!important;border-color:#fdba74!important;
}
html[data-theme="light"] #sec-trivy .btn-group .btn:nth-child(4) {
  color:#047857!important;background:#ecfdf5!important;border-color:#6ee7b7!important;
}
html[data-theme="light"] #sec-trivy .btn-group .btn:nth-child(5) {
  color:#5b21b6!important;background:#f5f3ff!important;border-color:#c4b5fd!important;
}
html[data-theme="light"] #sec-trivy .btn-group .btn:hover,
html[data-theme="light"] #sec-trivy .btn-group .btn.active {
  color:#fff!important;
  background:linear-gradient(135deg,#2563eb,#7c3aed)!important;
  border-color:#4338ca!important;
}
html[data-theme="light"] #sec-trivy .trivy-toolbar {
  background:#fff!important;border-color:transparent!important;
}
html[data-theme="light"] #sec-trivy .trivy-search-wrap,
html[data-theme="light"] #sec-trivy #trivy-image-search {
  background:#fff!important;color:#0f172a!important;border-color:#94a3b8!important;
}
html[data-theme="light"] #sec-trivy #trivy-image-search::placeholder {
  color:#475569!important;
}
html[data-theme="light"] #sec-trivy .trivy-refresh-btn {
  color:#0c4a6e!important;
  background:linear-gradient(135deg,#dbeafe,#cffafe)!important;
  border-color:#38bdf8!important;
}
html[data-theme="light"] #sec-trivy #trivy-summary > div[data-filter] {
  color:#0f172a!important;border-color:#cbd5e1!important;
  box-shadow:0 12px 28px rgba(15,23,42,.08)!important;
}
html[data-theme="light"] #sec-trivy #trivy-card-all {
  background:linear-gradient(145deg,#eff6ff,#ffffff)!important;border-top:3px solid #3b82f6!important;
}
html[data-theme="light"] #sec-trivy #trivy-card-clean {
  background:linear-gradient(145deg,#ecfdf5,#ffffff)!important;border-top:3px solid #10b981!important;
}
html[data-theme="light"] #sec-trivy #trivy-card-critical {
  background:linear-gradient(145deg,#fff1f2,#ffffff)!important;border-top:3px solid #ef4444!important;
}
html[data-theme="light"] #sec-trivy #trivy-card-high {
  background:linear-gradient(145deg,#fff7ed,#ffffff)!important;border-top:3px solid #f97316!important;
}
html[data-theme="light"] #sec-trivy #trivy-card-medium {
  background:linear-gradient(145deg,#fffbeb,#ffffff)!important;border-top:3px solid #eab308!important;
}
html[data-theme="light"] #sec-trivy #trivy-card-pending {
  background:linear-gradient(145deg,#f5f3ff,#ffffff)!important;border-top:3px solid #8b5cf6!important;
}
html[data-theme="light"] #sec-trivy #trivy-summary :where(
  div,span,small,[style*="color:var(--txt"],[style*="color: var(--txt"]
) {
  color:#0f172a!important;opacity:1!important;
}
html[data-theme="light"] #sec-trivy #trivy-sum-scanned{color:#2563eb!important}
html[data-theme="light"] #sec-trivy #trivy-sum-passed{color:#059669!important}
html[data-theme="light"] #sec-trivy #trivy-sum-critical,
html[data-theme="light"] #sec-trivy #trivy-cve-critical{color:#dc2626!important}
html[data-theme="light"] #sec-trivy #trivy-sum-high,
html[data-theme="light"] #sec-trivy #trivy-cve-high{color:#ea580c!important}
html[data-theme="light"] #sec-trivy #trivy-sum-medium{color:#ca8a04!important}
html[data-theme="light"] #sec-trivy #trivy-sum-pending{color:#7c3aed!important}
html[data-theme="light"] #sec-trivy .tb {
  background:#fff!important;border-color:#94a3b8!important;
  box-shadow:0 12px 30px rgba(15,23,42,.08)!important;
}
html[data-theme="light"] #sec-trivy #trivy-body thead tr {
  background:linear-gradient(90deg,#eaf2ff,#f5f3ff,#ecfeff)!important;
}
html[data-theme="light"] #sec-trivy #trivy-body :where(th,td) {
  color:#0f172a!important;opacity:1!important;
}

/* Syft SBOM light console: explicit surface-aware contrast. */
html[data-theme="light"] #sec-syft {
  --txt:#0f172a!important;
  --muted:#334155!important;
}
html[data-theme="light"] #sec-syft .sy-title :where(h2,p),
html[data-theme="light"] #sec-syft :where(.sy-mini,.sy-sub,.sy-bar,.sy-foot) {
  color:#0f172a!important;opacity:1!important;
}
html[data-theme="light"] #sec-syft .sy-kicker {
  color:#0369a1!important;
}
html[data-theme="light"] #sec-syft .sy-health {
  background:linear-gradient(135deg,#ffffff,#eff6ff 55%,#ecfeff)!important;
  border-color:#94a3b8!important;
}
html[data-theme="light"] #sec-syft .sy-ring {
  background:conic-gradient(#22d3ee calc(var(--score,0)*1%),#334155 0)!important;
  box-shadow:0 12px 34px rgba(15,23,42,.18)!important;
}
html[data-theme="light"] #sec-syft .sy-ring:after {
  background:#07111f!important;border-color:#334155!important;
}
html[data-theme="light"] #sec-syft .sy-ring-inner b,
html[data-theme="light"] #sec-syft .sy-ring-inner span {
  color:#ffffff!important;opacity:1!important;font-weight:900!important;
  text-shadow:0 1px 2px rgba(0,0,0,.55)!important;
}
html[data-theme="light"] #sec-syft .sy-health-item {
  background:#d1d5db!important;border-color:#94a3b8!important;
}
html[data-theme="light"] #sec-syft .sy-health-item :where(b,span) {
  color:#050b18!important;opacity:1!important;font-weight:800!important;
}
html[data-theme="light"] #sec-syft .sy-health-item > span:last-child {
  color:#ffffff!important;background:#4b5563!important;
  border:1px solid #374151!important;border-radius:999px!important;
  padding:5px 10px!important;
}
html[data-theme="light"] #sec-syft .sy-metric {
  background:#ffffff!important;border-color:#b8c5d6!important;
}
html[data-theme="light"] #sec-syft .sy-metric :where(.k,.v,.s) {
  color:#0f172a!important;opacity:1!important;
}
html[data-theme="light"] #sec-syft .sy-metric.hero {
  background:linear-gradient(145deg,#eff6ff,#ffffff)!important;
  border-top:3px solid #3b82f6!important;
}
html[data-theme="light"] #sec-syft .sy-metric.hero .v {
  color:#1d4ed8!important;
}
html[data-theme="light"] #sec-syft .sy-search {
  background:#ffffff!important;color:#0f172a!important;border-color:#94a3b8!important;
}
html[data-theme="light"] #sec-syft .sy-search::placeholder {
  color:#475569!important;opacity:1!important;
}
html[data-theme="light"] #sec-syft .sy-btn.ghost,
html[data-theme="light"] #sec-syft .sy-btn:not(.primary) {
  background:#1f2937!important;color:#ffffff!important;
  border-color:#111827!important;opacity:1!important;
}
html[data-theme="light"] #sec-syft .sy-btn.primary {
  color:#ffffff!important;background:linear-gradient(135deg,#2563eb,#06b6d4)!important;
}
html[data-theme="light"] #sec-syft .sy-tab {
  background:#e2e8f0!important;color:#0f172a!important;
  border-color:#b8c5d6!important;opacity:1!important;
}
html[data-theme="light"] #sec-syft .sy-tab.active {
  background:linear-gradient(135deg,#dbeafe,#cffafe)!important;
  color:#0f172a!important;border-color:#38bdf8!important;
}
html[data-theme="light"] #sec-syft .sy-card {
  background:#ffffff!important;color:#0f172a!important;border-color:#b8c5d6!important;
}
html[data-theme="light"] #sec-syft .sy-card :where(.sy-img,.sy-sub,.sy-bar,b,span) {
  color:#0f172a!important;opacity:1!important;
}
html[data-theme="light"] #sec-syft .sy-chip {
  background:#9ca3af!important;border-color:#6b7280!important;
}
html[data-theme="light"] #sec-syft .sy-chip :where(b,span) {
  color:#050b18!important;opacity:1!important;font-weight:800!important;
}
html[data-theme="light"] #sec-syft .sy-badge.ok {
  background:#d1fae5!important;color:#065f46!important;border-color:#6ee7b7!important;
}
html[data-theme="light"] #sec-syft .sy-panel,
html[data-theme="light"] #sec-syft .sy-detail-card {
  background:#ffffff!important;color:#0f172a!important;border-color:#b8c5d6!important;
}
html[data-theme="light"] #sec-syft :where(.sy-table th,.sy-table td,.sy-topitem,.sy-pill) {
  color:#0f172a!important;opacity:1!important;
}

/* Kafka Explorer */
html[data-theme="light"] #sec-kafka :where(
  [class^="kf-"], [class*=" kf-"]
) {
  --kf-text: #111827;
  --kf-muted: #111827;
  color: #111827 !important;
  text-shadow: none !important;
}

html[data-theme="light"] #sec-kafka :where(
  [class*="topic"], [class*="health"], [class*="broker"],
  [class*="consumer"], [class*="storage"], [class*="card"],
  [class*="row"], [class*="panel"], [class*="pane"]
) {
  border-color: #cbd5e1 !important;
}

/* PostgreSQL connection modal and dashboard */
html[data-theme="light"] #sec-postgres :where(
  [class^="pg-"], [class*=" pg-"]
) {
  --pg-text: #111827;
  --pg-muted: #111827;
  color: #111827 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-postgres :where(
  input, select, textarea, option, .pg-tab, [class*="recent"],
  [class*="connection"], [class*="modal"]
) {
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

/* ==========================================================================
   Production light-theme audit v3
   Feature pages below ship their own dark gradients and inline surfaces.
   This final layer intentionally uses the background shorthand so those
   gradients cannot leak into light mode. Dark mode is not affected.
   ========================================================================== */

html[data-theme="light"] {
  --lt-text-2: #111827;
  --lt-text-3: #111827;
  --muted: #111827;
  --txt2: #111827;
  --txt3: #111827;
  --cx-muted: #111827;
  --sp-muted: #111827;
  --dm-muted: #111827;
  --rca-muted: #111827;
  --dr-muted: #111827;
}

html[data-theme="light"] :where(
  #sec-trivy, #sec-semgrep, #sec-gitleaks, #sec-syft,
  #sec-security-posture, #sec-rbac, #sec-errors, #sec-redis,
  #sec-kafka, #sec-postgres, #sec-grafana, #sec-cluster-health-report,
  #sec-app-monitoring, #sec-livemap, #sec-topology, #sec-cost-intelligence,
  #sec-dependency-map, #sec-yamlgen, #sec-ai-rca, #sec-mcp, #sec-terminal
) :where(p, small, label, li, td, th, .muted, [class$="-sub"], [class$="-meta"],
  [class$="-label"], [class$="-desc"], [class$="-hint"]) {
  color: #111827 !important;
  opacity: 1 !important;
}

/* Overview hover details */
html[data-theme="light"] :where(
  #gs2-tooltip, #gs2-es-modal-tooltip, #r3-modal-tooltip, #hm-adv-tooltip,
  #r3-tooltip, #tpa-mlc-tooltip, #ov2-tooltip, #sc1-node-tip
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18) !important;
}
html[data-theme="light"] :where(
  #gs2-tooltip, #gs2-es-modal-tooltip, #r3-modal-tooltip, #hm-adv-tooltip,
  #r3-tooltip, #tpa-mlc-tooltip, #ov2-tooltip, #sc1-node-tip
) * {
  color: #111827 !important;
  opacity: 1 !important;
}

/* Cost Intelligence */
html[data-theme="light"] #sec-cost-intelligence :where(
  .costx-hero, .costx-filters, .costx-card, .costx-panel,
  .costx-heat, .costx-fc, .costx-rec
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-cost-intelligence .costx-filters {
  background: linear-gradient(115deg, #f8fafc, #eef2ff) !important;
}

/* Security posture */
html[data-theme="light"] #sec-security-posture :where(
  .spost-hero, .spost-controls, .spost-kpi, .spost-panel, .spost-score-row
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-security-posture .spost-controls {
  background: linear-gradient(115deg, #f8fafc, #eef2ff) !important;
}

/* AI root-cause analysis */
html[data-theme="light"] #sec-ai-rca :where(
  .rca-hero, .rca-controls, .rca-kpi, .rca-panel, .rca-item,
  .rca-root-card, .rca-confidence-ring, .rca-box, .rca-v2-card,
  .rca-feedback, .rca-premium-card, .rca-approval, .rca-exec-impact
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-ai-rca .rca-controls {
  background: linear-gradient(115deg, #f8fafc, #eef2ff) !important;
}
html[data-theme="light"] #sec-ai-rca :where(
  .rca-refs > *, .rca-timeline > *, .rca-premium-matrix > *,
  .rca-sim-list > *, .rca-before-after > *
) {
  background: #f8fafc !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

/* RBAC */
html[data-theme="light"] #sec-rbac :where(
  .rbac-hero, .rbac-hero-aside, .rbac-storage-path, .rbac-metric-card,
  .rbac-advanced-card, .rbac-shell, .rbac-toolbar, .rbac-audit-log,
  .rbac-approval-box, .rbac-matrix-wrap, .rbac-form-card,
  .rbac-modal-card, .rbac-check, .rbac-role-hint, .rbac-template-desc
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-rbac .rbac-hero {
  background: linear-gradient(120deg, #ffffff, #eef2ff 62%, #ecfeff) !important;
}

/* Trivy, Semgrep, Gitleaks and Syft security consoles */
html[data-theme="light"] #sec-trivy :where(
  .trivy-premium-hero, .trivy-toolbar, .trivy-search-wrap, .panel,
  [class*="trivy-"][class*="card"], [class*="trivy-"][class*="panel"],
  [class*="trivy-"][class*="metric"], [class*="trivy-"][class*="table"]
),
html[data-theme="light"] #sec-semgrep :where(
  .sg-shell, .sg-head, .sg-score-grid, .sg-score, .sg-panel, .sg-toolbar,
  .sg-tabs, .sg-body, .sg-row, .sg-detail-card, .sg-codebox
),
html[data-theme="light"] #sec-gitleaks :where(
  .gl-shell, .gl-hero, .gl-main, .gl-metrics, .gl-metric, .gl-panel,
  .gl-toolbar, .gl-tabs, .gl-workspace, .gl-image-card, .gl-card-stats > *,
  .gl-detail-card
),
html[data-theme="light"] #sec-syft :where(
  .sy-shell, .sy-hero, .sy-health, .sy-metrics, .sy-metric, .sy-body,
  .sy-panel, .sy-card, .sy-card-bars > *, .sy-detail-card
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08) !important;
}
html[data-theme="light"] #sec-trivy :where(
  [class*="trivy-"][class*="hero"], [class*="trivy-"][class*="head"]
),
html[data-theme="light"] #sec-semgrep .sg-head,
html[data-theme="light"] #sec-gitleaks .gl-hero,
html[data-theme="light"] #sec-syft .sy-hero {
  background: linear-gradient(120deg, #ffffff, #eef2ff 60%, #ecfeff) !important;
}

/* Application monitoring */
html[data-theme="light"] #sec-app-monitoring :where(
  .pm-wrap, .pm-hero, .pm-stat, .pm-panel, .pm-panel-head,
  .pm-advanced-item, .pm-card-grid, .pm-slow-panel, .pm-slow-row,
  .pm-slow-kpi, .pm-drawer
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-app-monitoring .pm-hero {
  background: linear-gradient(120deg, #ffffff, #eef2ff 62%, #ecfeff) !important;
}

/* Live map and topology */
html[data-theme="light"] #sec-livemap :where(
  .lm-sidebar, .lm-main, .lm-toolbar, .lm-detail-panel,
  .lm-pod-card, .lm-node-card, .lm-health-card
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-livemap :where(.lm-main, .lm-toolbar) {
  background: #f8fafc !important;
}
html[data-theme="light"] #sec-livemap :where([class*="lm-"]) {
  --lm-text: #111827;
  --lm-muted: #111827;
}
html[data-theme="light"] #sec-topology svg text,
html[data-theme="light"] #sec-topology :where(.topo-label, .topo-node-label, .topo-legend) {
  fill: #111827 !important;
  color: #111827 !important;
  opacity: 1 !important;
}

/* Dependency graph */
html[data-theme="light"] #sec-dependency-map :where(
  .dmap-hero, .dmap-controls, .dmap-kpi, .dmap-panel, .dmap-detail,
  .dmap-legend, .dmap-props, .dmap-graph
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-dependency-map .dmap-controls {
  background: linear-gradient(115deg, #f8fafc, #eef2ff) !important;
}
html[data-theme="light"] #sec-dependency-map .dmap-node-label {
  fill: #111827 !important;
  stroke: #ffffff !important;
}
html[data-theme="light"] #sec-dependency-map .dmap-edge-label {
  fill: #111827 !important;
  stroke: #ffffff !important;
}

/* MCP */
html[data-theme="light"] #sec-mcp :where(
  .card, .panel, [style*="background:rgba(15,23,42"],
  [style*="background: rgba(15,23,42"]
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #mcp-query-result {
  background: #ffffff !important;
  color: #111827 !important;
}

/* Cluster health report */
html[data-theme="light"] #sec-cluster-health-report :where(
  .chr-hero, .chr-card, .chr-statusline, .chr-cluster-card, .chr-node-card,
  .chr-controls, .chr-panel
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-cluster-health-report .chr-hero {
  background: linear-gradient(120deg, #ffffff, #eef2ff 62%, #ecfeff) !important;
}

/* Terminal and YAML studio */
html[data-theme="light"] #sec-terminal :where(
  .trm-wrap, .trm-topbar, .trm-tabs-bar, .trm-quick-bar, .trm-left,
  .trm-body, .trm-panel, .trm-output-wrap, .trm-ai, .trm-ai-hdr,
  .trm-ai-chat, .trm-input-bar
),
html[data-theme="light"] #sec-yamlgen :where(
  .ys-wrap, .ys-topbar, .ys-left, .ys-right, .ys-panel, .ys-ai-hdr,
  .ys-editor-hdr, .ys-editor-wrap, .ys-body, .ys-status-bar, .ys-ai-assist
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-terminal :where(.trm-topbar, .trm-tabs-bar, .trm-quick-bar),
html[data-theme="light"] #sec-yamlgen :where(.ys-topbar, .ys-editor-hdr) {
  background: #f8fafc !important;
}

/* Redis, Kafka and PostgreSQL */
html[data-theme="light"] #sec-redis :where(
  .rx-wrap, .rx-topbar, .rx-conn-tabs, .rx-body, .rx-left, .rx-right,
  .rx-tabs, .rx-content, .rx-search-bar, .rx-key-list, .rx-section-hdr,
  .rx-stats-grid, .rx-stat-card, .rx-cli-wrap, .rx-cli-output
),
html[data-theme="light"] #sec-kafka :where(
  [class^="kf-"][class*="bar"], [class^="kf-"][class*="tab"],
  [class^="kf-"][class*="body"], [class^="kf-"][class*="main"],
  [class^="kf-"][class*="box"], [class^="kf-"][class*="card"],
  [class^="kf-"][class*="pane"], [class^="kf-"][class*="panel"],
  [class^="kf-"][class*="health"], [class^="kf-"][class*="ai"]
),
html[data-theme="light"] #sec-postgres :where(
  [class^="pg-"][class*="card"], [class^="pg-"][class*="panel"],
  [class^="pg-"][class*="bar"], [class^="pg-"][class*="tab"],
  [class^="pg-"][class*="body"], [class^="pg-"][class*="wrap"],
  [class^="pg-"][class*="box"], [class^="pg-"][class*="main"],
  [class^="pg-"][class*="sidebar"], [class^="pg-"][class*="modal"]
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] #sec-redis :where(.rx-topbar, .rx-conn-tabs, .rx-tabs),
html[data-theme="light"] #sec-kafka :where([class^="kf-"][class*="bar"], [class^="kf-"][class*="tab"]),
html[data-theme="light"] #sec-postgres :where([class^="pg-"][class*="bar"], [class^="pg-"][class*="tab"]) {
  background: #f8fafc !important;
}

/* Grafana/Loki embeds use inline hardcoded black surfaces. */
html[data-theme="light"] #sec-grafana :where(
  [style*="background:#0a0a0a"], [style*="background: #0a0a0a"],
  [style*="background:#0f0f0f"], [style*="background: #0f0f0f"],
  [style*="background:#111"], [style*="background: #111"],
  [style*="background:#1a1a1a"], [style*="background: #1a1a1a"],
  [style*="background:rgba(0,0,0"], [style*="background: rgba(0,0,0"]
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

/* Inline pale-text safety net, restricted to audited feature pages. */
html[data-theme="light"] :where(
  #sec-trivy, #sec-semgrep, #sec-gitleaks, #sec-syft, #sec-rbac,
  #sec-errors, #sec-redis, #sec-kafka, #sec-postgres, #sec-grafana,
  #sec-cluster-health-report, #sec-app-monitoring, #sec-livemap,
  #sec-topology, #sec-yamlgen, #sec-ai-rca, #sec-mcp, #sec-terminal
) :where(
  [style*="color:#fff"], [style*="color: #fff"],
  [style*="color:#e2e8f0"], [style*="color: #e2e8f0"],
  [style*="color:#cbd5e1"], [style*="color: #cbd5e1"],
  [style*="color:#94a3b8"], [style*="color: #94a3b8"],
  [style*="color:#64748b"], [style*="color: #64748b"],
  [style*="color:#475569"], [style*="color: #475569"]
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] .sidebar.inv-sidebar-v2 .inv-acc.open {
  background: linear-gradient(135deg, rgba(239,246,255,.94), rgba(245,243,255,.88)) !important;
  border-color: #cbd8e8 !important;
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(15,23,42,.05) !important;
}

html[data-theme="light"] .sidebar.inv-sidebar-v2 :where(
  .nav-label,
  .inv-acc-head,
  .inv-acc-body .nav-item,
  .inv-chevron
) {
  color: #111827 !important;
}

html[data-theme="light"] .sidebar.inv-sidebar-v2 .nav-item.active,
html[data-theme="light"] .sidebar.inv-sidebar-v2 .inv-acc-body .nav-item.active {
  color: #1d4ed8 !important;
}

/* Overview graph shells and headers */
html[data-theme="light"] #sec-overview .ov2-graph-card {
  background: #fff !important;
  border-color: #d5dfeb !important;
  box-shadow: inset 0 1px 0 #fff, 0 14px 34px rgba(15,23,42,.08) !important;
}

html[data-theme="light"] #sec-overview .ov2-graph-hdr {
  background: linear-gradient(180deg, #ffffff, #f3f6fa) !important;
  border-bottom-color: #d8e1ec !important;
  color: #111827 !important;
}

html[data-theme="light"] #sec-overview .ov2-graph-title {
  color: #111827 !important;
}

html[data-theme="light"] #sec-overview :where(
  #lt-legend,
  .hm-toolbar,
  .ov2-top5-summary,
  .r3-filter-bar,
  .r3-time-axis
) {
  background: #f8fafc !important;
  border-color: #d8e1ec !important;
}

html[data-theme="light"] #sec-overview :where(
  #lt-view-chart-panel,
  #lt-view-pods-panel,
  #lt-view-slo-panel,
  .hm-adv-body,
  .r3-hm-scroll
) {
  background: #fff !important;
  color: #111827 !important;
}

/* Summary card expand popup, including dynamically inserted content */
html[data-theme="light"] #sc1-popup {
  background: #fff !important;
  color: #111827 !important;
  border: 1px solid #cfd9e6 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 24px 64px rgba(15,23,42,.20) !important;
}

html[data-theme="light"] #sc1-popup .sc1-ph {
  background: linear-gradient(110deg, rgba(var(--p-rgb,59,130,246),.10), #f8fafc) !important;
  border-bottom-color: #d8e1ec !important;
}

html[data-theme="light"] #sc1-popup :where(
  .sc1-ph-title,
  .sc1-pstat-l,
  .sc1-pgraph-lbl,
  .sc1-plist-hdr,
  .sc1-pmsg,
  .sc1-pts,
  .sc1-pempty
) {
  color: #111827 !important;
}

html[data-theme="light"] #sc1-popup :where(
  .sc1-pstats,
  .sc1-pgraph,
  .sc1-pfooter,
  .sc1-pitem
) {
  border-color: #e1e7ef !important;
}

html[data-theme="light"] #sc1-popup .sc1-pitem:hover {
  background: #eef5ff !important;
}

html[data-theme="light"] #sc1-popup .sc1-ph-close {
  background: #f1f5f9 !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

/* Every overview expanded view */
html[data-theme="light"] :where(
  .gs2-modal-box,
  .r3-modal-box,
  .r4-modal-box,
  .r5-modal-box,
  .r6-modal-box,
  .pgc-modal-box,
  #ngc-node-modal > div,
  #pgc-expand-modal > div
) {
  background: #fff !important;
  color: #111827 !important;
  border-color: #cfd9e6 !important;
  box-shadow: inset 0 1px 0 #fff, 0 32px 80px rgba(15,23,42,.22) !important;
}

html[data-theme="light"] :where(
  .gs2-modal-hdr,
  .r3-modal-hdr,
  .r4-modal-hdr,
  .r5-modal-hdr,
  .r6-modal-hdr,
  .pgc-modal-header,
  .pgc-modal-tabs
) {
  background: linear-gradient(180deg, #fff, #f1f5f9) !important;
  color: #111827 !important;
  border-color: #d8e1ec !important;
}

html[data-theme="light"] :where(
  .gs2-modal-title,
  .r3-modal-title,
  .r4-modal-title,
  .r5-modal-title,
  .r6-modal-title,
  .pgc-modal-podname
) {
  color: #111827 !important;
}

html[data-theme="light"] :where(
  .gs2-modal-chart-area,
  .gs2-modal-details,
  .r3-modal-body,
  .r3-modal-left,
  .r3-modal-right,
  .r4-modal-body,
  .r5-modal-body,
  .r6-modal-body,
  .pgc-modal-body,
  .pgc-modal-detail
) {
  background: #fff !important;
  color: #111827 !important;
  border-color: #d8e1ec !important;
}

html[data-theme="light"] :where(
  .gs2-modal-close,
  .r3-modal-close,
  .r4-modal-close,
  .r5-modal-close,
  .r6-modal-close,
  .pgc-modal-close
) {
  background: #f1f5f9 !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] :where(
  .r3-modal-toolbar,
  .r3-custom-time-row,
  .r3-modal-summary,
  .pgc-modal-stats
) {
  background: #f8fafc !important;
  border-color: #d8e1ec !important;
}

/* Strong, near-black text for every muted gray label in light mode. */
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:#64748b"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: #64748b"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:#475569"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: #475569"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:#e2e8f0"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: #e2e8f0"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:#cbd5e1"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: #cbd5e1"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:rgba(226,232,240"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: rgba(226,232,240"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:rgba(100,116,139"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: rgba(100,116,139"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:rgba(148,163,184"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: rgba(148,163,184"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:rgba(160,190,230"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: rgba(160,190,230"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color:rgba(200,220,255"],
html[data-theme="light"] :where(.main, .sidebar, #sc1-popup) [style*="color: rgba(200,220,255"] {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] :where(
  .sc1-label,
  .sc1-sub,
  .ov2-top5-name,
  .ov2-top5-sum-l,
  .lt-legend-item,
  .hm-adv-node-name,
  .hm-row-name,
  .hm-time-lbl,
  .r3-modal-hm-lbl,
  .r3-modal-time-lbl,
  .r3-modal-legend-lbl,
  .r3-modal-summary-l,
  .pgc-modal-chip-label,
  .pgc-modal-table-label
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] .main :where(
  [class$="-label"],
  [class$="-meta"],
  [class$="-desc"],
  [class$="-hint"]
):not(.lt-kpi-lbl):not([class*="status"]):not([class*="severity"]) {
  color: #1f2937 !important;
  opacity: 1 !important;
}

html[data-theme="light"] :where(input, textarea)::placeholder {
  color: #334155 !important;
  opacity: 1 !important;
}

html[data-theme="light"] :where(td, th) {
  color: #111827 !important;
}

/* ===============================================================
   Light theme contrast lockdown
   Component-level overrides for dashboard widgets that hard-code
   dark surfaces or low-contrast text in their local styles.
   =============================================================== */

/* CPU / memory per-node hover card */
html[data-theme="light"] #sc1-node-tip {
  background: rgba(255, 255, 255, .98) !important;
  color: #0b1220 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .20) !important;
}

html[data-theme="light"] #sc1-node-tip [style*="color:#cbd5e1"],
html[data-theme="light"] #sc1-node-tip [style*="color:rgba(100,116,139"] {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sc1-node-tip [style*="background:rgba(255,255,255,.06)"] {
  background: #d8e1ec !important;
}

/* Resource heatmap: toolbar, labels, detail drawer and hover tooltip */
html[data-theme="light"] #sec-overview :where(
  .hm-search,
  .hm-select
) {
  background-color: #fff !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-overview .hm-select option {
  background: #fff !important;
  color: #111827 !important;
}

html[data-theme="light"] #sec-overview :where(
  .hm-row-label,
  .hm-time-lbl,
  .hm-legend-tick,
  .hm-legend-lbl-adv,
  .hm-dp-title,
  .hm-dp-stat-l,
  .hm-dp-pod-name,
  .hm-dp-close
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-overview .hm-detail-panel {
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
  border-color: #cbd8e8 !important;
  color: #111827 !important;
  box-shadow: inset 0 1px 0 #fff, 0 12px 28px rgba(15, 23, 42, .08) !important;
}

html[data-theme="light"] #sec-overview .hm-dp-stat,
html[data-theme="light"] #sec-overview .hm-dp-pod-row {
  background: #fff !important;
  border-color: #d7e0eb !important;
  color: #111827 !important;
}

html[data-theme="light"] #sec-overview .hm-dp-pod-row:hover {
  background: #eef6ff !important;
  border-color: #b9d6fa !important;
}

html[data-theme="light"] #sec-overview .hm-dp-pod-bar,
html[data-theme="light"] #sec-overview .hm-detail-panel [style*="background:rgba(255,255,255,.06)"] {
  background: #d8e1ec !important;
}

html[data-theme="light"] #sec-overview .hm-detail-panel [style*="color:#e2e8f0"],
html[data-theme="light"] #sec-overview .hm-detail-panel [style*="color:#475569"],
html[data-theme="light"] #sec-overview .hm-detail-panel [style*="color:rgba(100,116,139"],
html[data-theme="light"] #sec-overview .hm-detail-panel [style*="color:rgba(160,190,230"] {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-overview #hm-adv-tooltip,
html[data-theme="light"] #sec-overview #r3-tooltip {
  background: rgba(255, 255, 255, .99) !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .20) !important;
}

html[data-theme="light"] #sec-overview :where(#hm-adv-tooltip, #r3-tooltip) :where(
  .hm-tt-header,
  .hm-tt-lbl,
  .hm-tt-val,
  span,
  div
) {
  color: #111827 !important;
  opacity: 1 !important;
}

/* Top Pods Analysis: clean white chart shell and readable labels */
html[data-theme="light"] #sec-overview .tpa-wrap {
  background: #fff !important;
  color: #111827 !important;
  border-color: #cbd8e8 !important;
  box-shadow: inset 0 1px 0 #fff, 0 16px 38px rgba(15, 23, 42, .09) !important;
}

html[data-theme="light"] #sec-overview :where(
  .tpa-hdr,
  .tpa-chart-hdr,
  .tpa-legend
) {
  background: linear-gradient(180deg, #fff, #f4f7fb) !important;
  border-color: #d8e1ec !important;
  color: #111827 !important;
}

html[data-theme="light"] #sec-overview .tpa-canvas-wrap {
  background: #fff !important;
}

html[data-theme="light"] #sec-overview :where(
  .tpa-title,
  .tpa-chart-peak,
  .tpa-stat.total,
  .tpa-leg-name,
  .tpa-empty
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-overview :where(
  .tpa-select,
  .tpa-toggle,
  .tpa-expand-btn
) {
  background-color: #fff !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-overview .tpa-select option {
  background: #fff !important;
  color: #111827 !important;
}

html[data-theme="light"] #sec-overview .tpa-leg-item:hover,
html[data-theme="light"] #sec-overview .tpa-leg-item.active {
  background: #eef5ff !important;
  border-color: #c5d8ef !important;
}

html[data-theme="light"] #sec-overview #tpa-mlc-tooltip {
  background: rgba(255, 255, 255, .99) !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .20) !important;
}

html[data-theme="light"] #sec-overview #tpa-mlc-tooltip :where(
  .tpa-tt-hdr,
  .tpa-tt-name
) {
  color: #111827 !important;
  opacity: 1 !important;
}

/* Event timeline: dark text on white, including hover/detail surfaces */
html[data-theme="light"] #sec-overview :where(
  .ov2-tl-xaxis-lbl,
  .ov2-tl-lbl,
  .r5-ph-title,
  .r5-stat-l,
  .r5-msg,
  .r5-meta,
  .r5-ts,
  .r5-empty
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-overview .ov2-tl-line {
  background: #94a3b8 !important;
}

html[data-theme="light"] #sec-overview :where(
  #ov2-tooltip,
  #r5-popup
) {
  background: rgba(255, 255, 255, .99) !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .20) !important;
}

html[data-theme="light"] #sec-overview :where(#ov2-tooltip, #r5-popup) [style*="color:rgba(160,190,230"],
html[data-theme="light"] #sec-overview :where(#ov2-tooltip, #r5-popup) [style*="color:rgba(200,210,240"],
html[data-theme="light"] #sec-overview :where(#ov2-tooltip, #r5-popup) [style*="color:#e2e8f0"] {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-overview :where(
  .r5-ph,
  .r5-stats,
  .r5-item,
  .r5-footer
) {
  background: #fff !important;
  border-color: #d8e1ec !important;
}

html[data-theme="light"] #sec-overview .r5-item:hover {
  background: #f1f6fc !important;
}

/* AI Insights: preserve severity accents, lock message/meta contrast */
html[data-theme="light"] #sec-overview .ov2-ai-feed {
  background: #fff !important;
}

html[data-theme="light"] #sec-overview .ov2-ai-item {
  color: #111827 !important;
}

html[data-theme="light"] #sec-overview .ov2-ai-item.crit {
  background: #fff7f7 !important;
  border-color: #fecaca !important;
}

html[data-theme="light"] #sec-overview .ov2-ai-item.warn {
  background: #fffaf0 !important;
  border-color: #fed7aa !important;
}

html[data-theme="light"] #sec-overview .ov2-ai-item.info {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
}

html[data-theme="light"] #sec-overview :where(
  .ov2-ai-msg,
  .ov2-ai-meta,
  .ov2-ai-empty,
  .ov2-ai-pill.dur
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-overview :where(
  #r6-popup,
  .r6-ph,
  .r6-pstats,
  .r6-psec,
  .r6-footer
) {
  background: #fff !important;
  color: #111827 !important;
  border-color: #d8e1ec !important;
}

html[data-theme="light"] #sec-overview :where(
  .r6-ph-title,
  .r6-pstat-l,
  .r6-psec-title,
  .r6-psec-body
) {
  color: #111827 !important;
  opacity: 1 !important;
}

/* Deployment Risk Analyzer: no charcoal blocks or pale copy in light mode */
html[data-theme="light"] #sec-deployment-risk {
  --dr-panel: #fff;
  --dr-line: #cbd5e1;
  --dr-muted: #1f2937;
  color: #0b1220 !important;
}

html[data-theme="light"] #sec-deployment-risk :where(
  .drisk-hero,
  .drisk-controls,
  .drisk-kpi,
  .drisk-panel,
  .drisk-panel-head,
  .drisk-list,
  .drisk-detail
) {
  background: #fff !important;
  color: #0b1220 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-deployment-risk .drisk-controls {
  background: linear-gradient(180deg, #f8fafc, #eef3f8) !important;
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(15, 23, 42, .07) !important;
}

html[data-theme="light"] #sec-deployment-risk :where(
  .drisk-controls label,
  .drisk-hero p,
  .drisk-kpi span,
  .drisk-kpi small,
  .drisk-panel-head span,
  .drisk-meta,
  .drisk-score-line,
  .drisk-empty,
  .drisk-root span,
  .drisk-root p,
  .drisk-ring small,
  .drisk-detail-grid span,
  .drisk-issues p,
  .drisk-issues small,
  .drisk-events time,
  .drisk-events span
) {
  color: #111827 !important;
  opacity: 1 !important;
}

html[data-theme="light"] #sec-deployment-risk :where(
  .drisk-item,
  .drisk-root,
  .drisk-ring,
  .drisk-detail-grid > div,
  .drisk-issues > div,
  .drisk-fixes > div,
  .drisk-events > div
) {
  background: #fff !important;
  color: #0b1220 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06) !important;
}

html[data-theme="light"] #sec-deployment-risk .drisk-item:hover,
html[data-theme="light"] #sec-deployment-risk .drisk-item.active {
  background: #fffaf0 !important;
  border-color: #f59e0b !important;
}

html[data-theme="light"] #sec-deployment-risk .drisk-reasons em {
  background: #f1f5f9 !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-deployment-risk .drisk-fixes span {
  color: #111827 !important;
}

html[data-theme="light"] #sec-deployment-risk .drisk-fixes b {
  color: #166534 !important;
  background: #dcfce7 !important;
}

html[data-theme="light"] #sec-deployment-risk .drisk-cmds code {
  background: #f8fafc !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] #sec-deployment-risk .drisk-events b {
  color: #92400e !important;
}

/* Final inline-color safety net for the affected light dashboard surfaces. */
html[data-theme="light"] #sec-overview :where(
  .hm-detail-panel,
  #sc1-node-tip,
  #ov2-tooltip,
  #r5-popup,
  #r6-popup
) [style*="color:#fff"],
html[data-theme="light"] #sec-overview :where(
  .hm-detail-panel,
  #sc1-node-tip,
  #ov2-tooltip,
  #r5-popup,
  #r6-popup
) [style*="color: #fff"],
html[data-theme="light"] #sec-overview :where(
  .hm-detail-panel,
  #sc1-node-tip,
  #ov2-tooltip,
  #r5-popup,
  #r6-popup
) [style*="color:rgba(220,230,245"],
html[data-theme="light"] #sec-overview :where(
  .hm-detail-panel,
  #sc1-node-tip,
  #ov2-tooltip,
  #r5-popup,
  #r6-popup
) [style*="color:rgba(200,230,255"] {
  color: #111827 !important;
  opacity: 1 !important;
}

/* RBAC light console: white typography on charcoal scope chips. */
html[data-theme="light"] #sec-rbac .rbac-chip,
html[data-theme="light"] #sec-rbac .rbac-chip.all,
html[data-theme="light"] #sec-rbac .rbac-chip.more,
html[data-theme="light"] #sec-rbac .rbac-chip.muted-chip {
  background:#4b5563!important;
  color:#ffffff!important;
  border-color:#374151!important;
  opacity:1!important;
  font-weight:800!important;
  text-shadow:0 1px 1px rgba(0,0,0,.28)!important;
}
html[data-theme="light"] #sec-rbac .rbac-chip :where(span,b,small,em) {
  color:#ffffff!important;opacity:1!important;font-weight:800!important;
}
html[data-theme="light"] #sec-rbac .rbac-role-pill,
html[data-theme="light"] #sec-rbac .rbac-status,
html[data-theme="light"] #sec-rbac .rbac-risk-pill {
  color:#0f172a!important;
  opacity:1!important;
  font-weight:800!important;
  text-shadow:none!important;
}
html[data-theme="light"] #sec-rbac :where(
  .rbac-metric-card .k,.rbac-metric-card .v,
  .rbac-card-head,.rbac-matrix th,.rbac-matrix td,
  .rbac-user-table th,.rbac-user-table td
) {
  color:#0f172a!important;opacity:1!important;
}

/* Pod Error Observatory: production-grade contrast for every light surface. */
html[data-theme="light"] #sec-app-monitoring .pm-wrap {
  color:#0f172a!important;
}
html[data-theme="light"] #sec-app-monitoring :where(.pm-title,.pm-sub,.pm-panel-title,.pm-muted,.pm-empty) {
  color:#0f172a!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-kicker {
  background:#cffafe!important;
  border-color:#22d3ee!important;
  color:#075985!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring :where(.pm-select,.pm-input) {
  background:#ffffff!important;
  border-color:#94a3b8!important;
  color:#0f172a!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring :where(.pm-select,.pm-input)::placeholder {
  color:#475569!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-btn {
  background:#374151!important;
  border-color:#1f2937!important;
  color:#ffffff!important;
  opacity:1!important;
  text-shadow:0 1px 1px rgba(0,0,0,.24)!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-btn.primary {
  background:linear-gradient(135deg,#2563eb,#0891b2)!important;
  border-color:#1d4ed8!important;
  color:#ffffff!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-btn.download {
  background:linear-gradient(135deg,#7c3aed,#2563eb)!important;
  border-color:#6d28d9!important;
  color:#ffffff!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-btn.live-on {
  background:linear-gradient(135deg,#15803d,#0f766e)!important;
  border-color:#166534!important;
  color:#ffffff!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-pill {
  background:#cffafe!important;
  border-color:#22d3ee!important;
  color:#0c4a6e!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-advanced-item {
  background:#ffffff!important;
  border-color:#94a3b8!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-advanced-item small {
  color:#334155!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-advanced-item b {
  color:#0f172a!important;
  opacity:1!important;
  font-weight:900!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-stat {
  background:#ffffff!important;
  border-color:#cbd5e1!important;
  color:#0f172a!important;
}
html[data-theme="light"] #sec-app-monitoring :where(.pm-stat-label,.pm-stat-foot) {
  color:#334155!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-stat-value {
  color:#0f172a!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-stat.info .pm-stat-value {color:#0e7490!important;}
html[data-theme="light"] #sec-app-monitoring .pm-stat.err .pm-stat-value,
html[data-theme="light"] #sec-app-monitoring .pm-stat.crit .pm-stat-value {color:#dc2626!important;}
html[data-theme="light"] #sec-app-monitoring .pm-stat.time .pm-stat-value {color:#1d4ed8!important;}
html[data-theme="light"] #sec-app-monitoring .pm-panel-head {
  background:#f8fafc!important;
  border-color:#cbd5e1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-toggle {
  background:#4b5563!important;
  border-color:#374151!important;
  color:#ffffff!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-pod-card {
  background:#ffffff!important;
  border-color:#94a3b8!important;
  color:#0f172a!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-pod-card.has-error {
  background:#fff7f7!important;
  border-color:#ef4444!important;
}
html[data-theme="light"] #sec-app-monitoring :where(.pm-pod-name,.pm-mini b,.pm-card-note,.pm-command,.pm-link) {
  color:#0f172a!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-mini {
  background:#e5e7eb!important;
  border-color:#9ca3af!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-mini small {
  color:#1f2937!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-badge {
  background:#374151!important;
  border-color:#1f2937!important;
  color:#ffffff!important;
  opacity:1!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-badge.error,
html[data-theme="light"] #sec-app-monitoring .pm-badge.critical {
  background:#fee2e2!important;
  border-color:#ef4444!important;
  color:#991b1b!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-badge.ok {
  background:#dcfce7!important;
  border-color:#22c55e!important;
  color:#14532d!important;
}
html[data-theme="light"] #sec-app-monitoring .pm-last-error {
  color:#991b1b!important;
}
html[data-theme="light"] #sec-app-monitoring :where(.pm-chip,.pm-chip.red,.pm-chip.green,.pm-chip.cyan) {
  color:#0f172a!important;
  opacity:1!important;
  font-weight:900!important;
}
