/* ARGUS CPT interface. Loaded after page styles, together with one palette file
   (palette-light.css). Flat, square, one accent. Every colour here is a role
   token from the palette, so the same rules draw every colour scheme. */
html[data-theme] body{background:var(--ui-bg);color:var(--ui-fg);font-family:var(--font);font-size:13px;line-height:1.4;letter-spacing:0;overflow-x:hidden}
html[data-theme] *{border-radius:0!important}
html[data-theme] .lt-round{border-radius:50%!important}
html[data-theme] h1,html[data-theme] h2,html[data-theme] h3,html[data-theme] h4{letter-spacing:0;font-weight:500;color:var(--ui-fg)}
html[data-theme] ::selection{background:var(--ui-selection)}
html[data-theme] :focus-visible{outline:2px solid var(--ui-accent);outline-offset:1px;box-shadow:none}
html[data-theme] .content code,html[data-theme] .content pre,html[data-theme] .content kbd,
html[data-theme] .content [style*="monospace"],html[data-theme] .content [style*="var(--mono)"]{font-family:var(--mono)!important}

/* ── Rail + top bar ── */
.lt-rail{position:fixed;inset:0 auto 0 0;width:66px;background:var(--ui-rail-bg);z-index:600;display:flex;flex-direction:column;align-items:center;padding:12px 0 16px;gap:6px}
.lt-rail-logo{width:42px;height:42px;color:var(--ui-rail-fg);display:flex;align-items:center;justify-content:center;margin-bottom:12px}
.lt-rail a{width:42px;height:42px;display:flex;align-items:center;justify-content:center;color:var(--ui-rail-fg);text-decoration:none;transition:background-color .12s linear}
.lt-rail a:hover{background:var(--ui-rail-hover);text-decoration:none!important}
.lt-rail a.active{background:var(--ui-accent);color:var(--ui-accent-fg)}
.lt-rail svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.lt-rail a:focus-visible{outline:2px solid var(--ui-rail-fg);outline-offset:1px}
.lt-ico-btn{width:42px;height:42px;display:flex;align-items:center;justify-content:center;color:var(--ui-rail-fg);background:none;border:0;cursor:pointer;font:inherit;transition:background-color .12s linear}
.lt-ico-btn:hover{background:var(--ui-rail-hover)}
.lt-ico-btn:focus-visible{outline:2px solid var(--ui-rail-fg);outline-offset:1px}
.lt-lang-btn{font-size:11px;font-weight:700;letter-spacing:.02em}

.lt-bar{position:fixed;top:0;left:66px;right:0;height:58px;background:var(--ui-surface);border-bottom:1px solid var(--ui-line);z-index:550;display:flex;align-items:center;gap:14px;padding:0 24px}
.lt-crumbs{flex:1;min-width:0;font-size:13px;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lt-crumbs a{color:var(--ui-muted)}
.lt-crumbs b{display:inline-block;color:var(--ui-accent);font-weight:600;font-size:16px;line-height:1.25;padding:8px 14px;border-radius:8px;box-shadow:inset 0 -2px 0 var(--ui-accent)}
.lt-tabs{flex:0 1 auto;min-width:0;display:flex;align-items:center;gap:4px;overflow-x:auto;scrollbar-width:none}
.lt-tabs::-webkit-scrollbar{display:none}
.lt-tabs a{flex:0 0 auto;padding:8px 14px;border-radius:8px;font-size:16px;line-height:1.25;white-space:nowrap;color:var(--ui-muted);text-decoration:none}
.lt-tabs a:hover{background:var(--ui-line);color:var(--ui-fg)}
.lt-tab-count{background:var(--ui-line);color:var(--ui-muted);font-size:12px;font-weight:500;padding:2px 8px;border-radius:999px;margin-left:6px}
.lt-tabs a.cur{color:var(--ui-accent);font-weight:600;box-shadow:inset 0 -2px 0 var(--ui-accent)}
/* many tabs (settings): tighter padding so the row fits a 1280px screen */
.lt-tabs.dense a{padding:8px 9px}
/* 11+ sections (settings): tighter tabs, and below 1400px the search shrinks to its icon until focused */
.lt-tabs.denser{gap:2px}
.lt-tabs.denser a{font-size:14px}
.lt-tabs.denser a{padding:8px 7px}
@media (max-width:1400px){
  .lt-bar:has(.lt-tabs.denser) .lt-search{flex:0 0 38px;min-width:38px;transition:flex-basis var(--dur-2,.2s) ease}
  .lt-bar:has(.lt-tabs.denser) .lt-search:focus-within{flex-basis:240px}
  .lt-bar:has(.lt-tabs.denser) .lt-search input[type="search"]{cursor:pointer;padding-right:0}
  .lt-bar:has(.lt-tabs.denser) .lt-search:not(:focus-within) input::placeholder{color:transparent}
}
.lt-search{position:relative;flex:1 1 0;min-width:180px;max-width:312px;margin-left:auto}
.lt-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:15px;height:15px;stroke:var(--ui-fg-2);stroke-width:1.8;fill:none}
html[data-theme] .lt-search input[type="search"]{height:36px;min-height:36px;padding:0 12px 0 36px;font-size:13px;border:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-fg)}
.lt-avatar{width:34px;height:34px;background:var(--ui-inv-bg);color:var(--ui-inv-fg)!important;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;letter-spacing:.04em;text-decoration:none!important;flex-shrink:0}
.lt-logout{background:none;border:0;padding:0;color:var(--ui-muted);font-size:12px;cursor:pointer;font-family:var(--font)}
.lt-logout:hover{color:var(--ui-fg);text-decoration:underline}

html[data-theme] .main-wrap{margin-left:66px;padding-top:58px;background:var(--ui-bg);min-height:100vh}
html[data-theme] .content{padding:20px 24px 48px;max-width:none}

/* The dashboard pins its stage to the window edges. */
html[data-theme] .dash-stage{left:66px;top:58px}
html[data-theme] .dash-bg{background:var(--ui-bg)}

/* ── Headings ── */
html[data-theme] .page-header,html[data-theme] .argus-toolbar{margin-bottom:16px}
html[data-theme] .page-title,html[data-theme] .argus-title,html[data-theme] .ops-title,html[data-theme] .scan-title,html[data-theme] .detail-title,html[data-theme] .asset-title,html[data-theme] .system-title,html[data-theme] .coverage-title{font-size:26px;line-height:1.15;font-weight:500;letter-spacing:0;color:var(--ui-fg)}
html[data-theme] .page-sub,html[data-theme] .argus-sub,html[data-theme] .ops-sub,html[data-theme] .scan-run,html[data-theme] .report-run,html[data-theme] .coverage-sub{font-size:13px;line-height:1.4;color:var(--ui-muted);font-family:var(--font)}

/* ── Surfaces ── */
html[data-theme] .card,html[data-theme] .stat-card,html[data-theme] .argus-hero,html[data-theme] .ops-hero,html[data-theme] .scan-hero,html[data-theme] .detail-hero,html[data-theme] .asset-hero,html[data-theme] .system-hero,html[data-theme] .coverage-hero,html[data-theme] .poc-header,html[data-theme] .summary-card,html[data-theme] .argus-kpi,html[data-theme] .risk-card,html[data-theme] .ops-mini,html[data-theme] .sys-stat,html[data-theme] .asset-card,html[data-theme] .gap-item,html[data-theme] .coverage-run{background:var(--ui-surface)!important;border:1px solid var(--ui-line)!important;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;color:var(--ui-fg)}
html[data-theme] .card-header{padding:14px 16px 8px;border-bottom:0}
html[data-theme] .card-body{padding:8px 16px 16px}
html[data-theme] .card-title{font-size:16px;line-height:1.3;font-weight:500;color:var(--ui-fg)}
html[data-theme] .stat-card{padding:12px 16px 14px}
html[data-theme] .stat-card:hover{transform:none}
html[data-theme] .stat-val,html[data-theme] .argus-kpi .v,html[data-theme] .summary-card-val,html[data-theme] .sys-stat-val{font-size:30px;line-height:1.1;font-weight:500;letter-spacing:0;color:var(--ui-fg)}
html[data-theme] .stat-card.s-critical .stat-val{color:var(--critical)}
html[data-theme] .stat-lbl,html[data-theme] .argus-kpi .k,html[data-theme] .summary-card-label,html[data-theme] .sys-stat-lbl,html[data-theme] .asset-meta-line{font-size:12px;line-height:1.3;color:var(--ui-muted);text-transform:none;letter-spacing:0}
html[data-theme] .stats-grid{gap:0;border:1px solid var(--ui-line);margin-bottom:16px}
html[data-theme] .stats-grid>.stat-card{border:0!important;border-right:1px solid var(--ui-line)!important}
html[data-theme] .stats-grid>.stat-card:last-child{border-right:0!important}

/* ── Buttons ── */
html[data-theme] .btn{min-height:36px;padding:0 14px;font-size:13px;font-weight:500;border:1px solid var(--ui-edge);background:var(--ui-surface);color:var(--ui-fg)}
html[data-theme] .btn:active{transform:none}
html[data-theme] .btn:hover{background:var(--ui-bg-soft)}
html[data-theme] .btn-primary{background:var(--ui-inv-bg);color:var(--ui-inv-fg);border-color:var(--ui-inv-bg)}
html[data-theme] .btn-primary:hover{background:var(--ui-inv-bg-hover);border-color:var(--ui-inv-bg-hover)}
html[data-theme] .btn-secondary{background:var(--ui-surface);color:var(--ui-fg);border-color:var(--ui-edge)}
html[data-theme] .btn-danger{background:var(--ui-surface);color:var(--ui-danger);border-color:var(--ui-danger)}
html[data-theme] .btn-danger:hover{background:var(--ui-danger-pale)}
html[data-theme] .btn-sm{min-height:28px;padding:0 10px;font-size:12px}
html[data-theme] .btn-accent{background:var(--ui-accent);color:var(--ui-accent-fg);border-color:var(--ui-accent)}
html[data-theme] .btn-accent:hover{background:var(--ui-accent-hover);border-color:var(--ui-accent-hover)}

/* ── Filter chips and tabs ── */
html[data-theme] .tabs,html[data-theme] .argus-tabs,html[data-theme] .detail-tab-nav{justify-content:flex-start;gap:8px;margin:0 0 16px;background:transparent;padding:0}
html[data-theme] .tab,html[data-theme] .argus-tab,html[data-theme] .detail-tab-btn{height:30px;padding:0 12px;font-size:13px;font-weight:400;background:var(--ui-surface);border:1px solid var(--ui-line);color:var(--ui-fg);display:inline-flex;align-items:center}
html[data-theme] .tab:hover,html[data-theme] .argus-tab:hover,html[data-theme] .detail-tab-btn:hover{background:var(--ui-bg-soft);color:var(--ui-fg)}
html[data-theme] .tab.active,html[data-theme] .argus-tab.active,html[data-theme] .detail-tab-btn.active{background:var(--ui-inv-bg);border-color:var(--ui-inv-bg);color:var(--ui-inv-fg)}

/* ── Severity and status ── */
html[data-theme] .sev{display:inline-flex;align-items:center;justify-content:center;min-height:22px;padding:0 9px;font-size:12px;font-weight:500;line-height:1;border:1px solid transparent}
html[data-theme] .sev-critical{background:var(--critical-pale)!important;color:var(--critical)}
html[data-theme] .sev-high{background:var(--high-pale)!important;color:var(--high)}
html[data-theme] .sev-medium{background:var(--medium-pale)!important;color:var(--medium)}
html[data-theme] .sev-low{background:var(--low-pale)!important;color:var(--low)}
html[data-theme] .sev-info{background:var(--sev-info-pale)!important;color:var(--sev-info)}
html[data-theme] .status{font-size:13px;font-weight:400;color:var(--ui-muted);gap:7px}
html[data-theme] .status::before{content:''!important;display:inline-block;width:8px;height:8px;background:currentColor;flex-shrink:0}
html[data-theme] .status-running{color:var(--high)}
html[data-theme] .status-completed,html[data-theme] .status-fixed,html[data-theme] .status-verified{color:var(--low)}
html[data-theme] .status-failed,html[data-theme] .status-open,html[data-theme] .status-reopened{color:var(--critical)}
html[data-theme] .status-queued{color:var(--medium)}
html[data-theme] .status-accepted,html[data-theme] .status-cancelled,html[data-theme] .status-untested{color:var(--ui-muted)}
html[data-theme] .badge{min-height:22px;padding:0 8px;font-size:12px;font-weight:500;background:var(--ui-surface);border:1px solid var(--ui-line-strong);color:var(--ui-fg)}
.ip-research-journal{padding:12px;margin:8px 0;border:1px solid var(--ui-line-strong);border-radius:8px;overflow-wrap:anywhere;max-height:320px;overflow:auto}
.ip-research-journal summary{cursor:pointer;font-weight:600}
.ip-research-journal li{margin:6px 0;font-size:12px}
html[data-theme] .argus-chip,html[data-theme] .ops-chip{height:24px;font-size:12px;border-color:var(--ui-line-strong);background:var(--ui-surface);color:var(--ui-fg)}

/* ── Tables ── */
html[data-theme] table{border-collapse:collapse;border-spacing:0;font-size:13px}
html[data-theme] th{padding:8px 8px;font-size:12.5px;font-weight:400;color:var(--ui-muted);background:transparent;border:0;border-bottom:1px solid var(--ui-edge);text-transform:none;letter-spacing:0}
html[data-theme] td{padding:10px 8px;font-size:13px;line-height:1.3;background:transparent;color:var(--ui-fg);border:0;border-bottom:1px solid var(--ui-line)}
html[data-theme] tbody tr:hover td{background:var(--ui-accent-pale)}
html[data-theme] .tbl-wrap thead th{background:var(--ui-surface)}

/* ── Forms ── */
html[data-theme] .form-input,html[data-theme] .form-select,html[data-theme] .form-textarea,html[data-theme] .form-control,html[data-theme] textarea,html[data-theme] input[type="text"],html[data-theme] input[type="password"],html[data-theme] input[type="email"],html[data-theme] input[type="number"],html[data-theme] input[type="search"],html[data-theme] input[type="url"],html[data-theme] input[type="tel"],html[data-theme] .argus-select-trigger{min-height:34px;padding:6px 10px;font-size:13px;line-height:1.3;border:1px solid var(--ui-line-strong);background:var(--ui-surface);color:var(--ui-fg)}
html[data-theme] .form-input:hover,html[data-theme] .form-select:hover,html[data-theme] .form-textarea:hover,html[data-theme] .form-control:hover,html[data-theme] .argus-select-trigger:hover{border-color:var(--ui-edge)}
html[data-theme] .form-input:focus,html[data-theme] .form-select:focus,html[data-theme] .form-textarea:focus,html[data-theme] .form-control:focus,html[data-theme] .argus-select-trigger:focus{border-color:var(--ui-edge);box-shadow:inset 0 0 0 1px var(--ui-edge)}
html[data-theme] .form-label{font-size:12px;color:var(--ui-muted);font-weight:400}
html[data-theme] input[type="checkbox"],html[data-theme] input[type="radio"]{accent-color:var(--ui-inv-bg)}
html[data-theme] ::placeholder{color:var(--ui-placeholder)}
html[data-theme] .form-select,html[data-theme] select{background-image:var(--ui-select-arrow)}
html[data-theme] select option,html[data-theme] select optgroup{background:var(--ui-surface);color:var(--ui-fg)}
html[data-theme] .argus-select-menu,html[data-theme] .mini-select-menu{background:var(--ui-surface);border:1px solid var(--ui-edge);box-shadow:var(--shadow-md);backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-theme] .argus-select-option:hover,html[data-theme] .mini-select-option:hover{background:var(--ui-bg-soft)}
html[data-theme] .argus-select-option.selected{background:var(--ui-inv-bg);color:var(--ui-inv-fg)}
html[data-theme] .argus-file-picker{border:1px dashed var(--ui-muted)}

/* ── Code stays dark, as in the reference ── */
html[data-theme] .code-block,html[data-theme] .log-pane,html[data-theme] .poc-code,html[data-theme] .poc-output,html[data-theme] .argus-terminal{background:var(--ui-code-bg);border:1px solid var(--ui-code-bg);color:var(--ui-code-fg)}
html[data-theme] .content pre,html[data-theme] .content code{background:var(--ui-bg-soft);color:var(--ui-fg)}
html[data-theme] .code-block pre,html[data-theme] .code-block code,html[data-theme] .log-pane code,html[data-theme] .poc-code code,html[data-theme] .poc-output code,html[data-theme] .argus-terminal code,html[data-theme] .argus-terminal pre{background:transparent;color:inherit}

/* ── Alerts, modal, toast, empty ── */
html[data-theme] .alert{background:var(--ui-bg-soft);color:var(--ui-fg);border:1px solid var(--ui-line)}
html[data-theme] .alert-error{background:var(--ui-danger-pale);color:var(--ui-danger-ink);border-color:var(--ui-danger)}
html[data-theme] .alert-success{background:var(--ui-bg-soft);color:var(--ui-fg);border-color:var(--ui-edge)}
html[data-theme] .alert-info{background:var(--ui-accent-pale);color:var(--ui-fg);border-color:var(--ui-accent)}
html[data-theme] .argus-modal-backdrop{background:var(--ui-scrim);backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-theme] .argus-modal,html[data-theme] .argus-toast{background:var(--ui-surface);border:1px solid var(--ui-edge);backdrop-filter:none;-webkit-backdrop-filter:none;color:var(--ui-fg);box-shadow:var(--shadow-md)}
html[data-theme] .argus-toast.error{border-color:var(--ui-danger);color:var(--ui-danger-ink)}
html[data-theme] .argus-toast.success{border-color:var(--ui-edge);color:var(--ui-fg)}
html[data-theme] .empty-state{background:var(--ui-surface);border:1px dashed var(--ui-line-strong);color:var(--ui-muted);backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-theme] .sev-bar-track{background:var(--ui-line);height:6px}
html[data-theme] .sev-bar-fill{background:currentColor}

/* ── Settings ── */
html[data-theme] .settings-shell{--st-bg:var(--ui-surface);--st-sep:var(--ui-line);--st-field:var(--ui-line-strong);--st-fg:var(--ui-fg);--st-fg2:var(--ui-muted);--st-label:var(--ui-fg-2);--st-accent:var(--ui-accent);--st-sel-bg:var(--ui-accent-pale);--st-placeholder:var(--ui-placeholder)}
html[data-theme] .settings-shell *{border-radius:0!important}
html[data-theme] .settings-shell .card,html[data-theme] .settings-shell .card-header,html[data-theme] .settings-shell .card-body{border-left:0!important;border-right:0!important}
html[data-theme] .settings-shell .card{border-bottom:0!important}
html[data-theme] .settings-shell{font-family:var(--font);grid-template-columns:200px minmax(0,1fr)}
html[data-theme] .settings-nav a{padding:8px 12px}
html[data-theme] .settings-nav a:hover{background:var(--ui-bg-soft)}
html[data-theme] .settings-nav a.active{background:var(--ui-inv-bg);color:var(--ui-inv-fg);box-shadow:none;font-weight:500}
html[data-theme] .settings-shell .form-input,html[data-theme] .settings-shell .form-select,html[data-theme] .settings-shell input[type=text],html[data-theme] .settings-shell input[type=password],html[data-theme] .settings-shell input[type=email],html[data-theme] .settings-shell input[type=number],html[data-theme] .settings-shell input[type=url],html[data-theme] .settings-shell select,html[data-theme] .settings-shell textarea{border-color:var(--ui-line-strong)!important;color:var(--ui-fg)!important}
html[data-theme] .settings-shell .btn-primary,html[data-theme] .settings-shell .set-btn-primary{background:var(--ui-inv-bg)!important;color:var(--ui-inv-fg)!important}
html[data-theme] .settings-shell .btn-secondary{border-color:var(--ui-edge)!important;color:var(--ui-fg)!important}
html[data-theme] .settings-shell .set-toggle .set-slider{background:var(--ui-line-strong);border-color:var(--ui-line-strong)}
html[data-theme] .settings-shell .set-toggle .set-slider::before{background:var(--ui-surface)}
html[data-theme] .settings-shell .set-toggle input:checked + .set-slider{background:var(--ui-accent);border-color:var(--ui-accent)}
html[data-theme] .settings-shell .set-toggle input:checked + .set-slider::before{background:var(--ui-accent-fg)}
/* Segmented choice (language, systems view): the chosen option is filled, the rest outlined */
html[data-theme] .settings-shell .set-seg[aria-pressed="true"]{background:var(--ui-inv-bg)!important;color:var(--ui-inv-fg)!important;border-color:var(--ui-fg)!important;font-weight:600!important}
html[data-theme] .settings-shell .set-seg[aria-pressed="false"]{background:transparent!important;border-color:var(--ui-line)!important;color:var(--ui-muted)!important}
/* Theme switch: a wider track so it reads as an on/off switch, not a colour swatch */
html[data-theme] .settings-shell .set-toggle{width:40px;height:22px}
html[data-theme] .settings-shell .set-toggle .set-slider::before{width:16px;height:16px;left:3px}
html[data-theme] .settings-shell .set-toggle input:checked + .set-slider::before{transform:translate(18px,-50%)}

/* ── Scrollbars ── */
html[data-theme],html[data-theme] *{scrollbar-color:var(--ui-line-strong) transparent}
html[data-theme] ::-webkit-scrollbar-thumb{background:var(--ui-line-strong);background-clip:content-box}

@media(max-width:900px){
  .lt-search{display:none}
  html[data-theme] .content{padding:16px 12px 40px}
}
@media(max-width:600px){
  .lt-rail{width:48px}
  .lt-rail a,.lt-rail-logo{width:36px;height:36px}
  .lt-bar{left:48px;padding:0 12px}
  html[data-theme] .main-wrap{margin-left:48px}
}

/* ── Login and 2FA keep their background rule; only the form changes ── */
html[data-theme] .auth-card,html[data-theme] .login-card,html[data-theme] .twofa-card{background:var(--ui-surface);color:var(--ui-fg);border:1px solid var(--ui-edge);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}

/* ═══ Screens ═══ */
html[data-theme] select,html[data-theme] .form-select{background-repeat:no-repeat!important;background-position:right 10px center!important;background-size:12px!important}

/* Shared blocks of the layouts */
.lt-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.lt-title{font-size:26px;line-height:1.15;font-weight:500;color:var(--ui-fg);margin:0}
.lt-sub{font-size:13px;line-height:1.35;color:var(--ui-muted);margin-top:3px}
.lt-label{font-size:11px;font-weight:500;letter-spacing:.09em;text-transform:uppercase;color:var(--ui-muted)}
.lt-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.lt-chip{height:30px;padding:0 12px;font-size:13px;font-family:var(--font);background:var(--ui-surface);border:1px solid var(--ui-line);color:var(--ui-fg);cursor:pointer}
.lt-chip:hover{background:var(--ui-bg-soft)}
.lt-chip.active{background:var(--ui-inv-bg);border-color:var(--ui-inv-bg);color:var(--ui-inv-fg)}

/* Systems and assets */
html[data-theme] .ent-page{background:transparent;color:var(--ui-fg)}
html[data-theme] .ent-tabs{gap:24px;border-bottom:1px solid var(--ui-line);margin-bottom:14px}
html[data-theme] .ent-tab{font-size:13px;font-weight:400;color:var(--ui-muted);padding:8px 2px;margin-bottom:-1px}
html[data-theme] .ent-tab:hover{color:var(--ui-fg)}
html[data-theme] .ent-tab.active{color:var(--ui-fg);font-weight:500;border-bottom-color:var(--ui-accent)}
html[data-theme] .ent-add{height:36px;font-size:13px;background:var(--ui-inv-bg);border-color:var(--ui-inv-bg);color:var(--ui-inv-fg)}
html[data-theme] .ent-add:hover{background:var(--ui-inv-bg-hover)}
html[data-theme] .ent-add svg{stroke:var(--ui-inv-fg)}
html[data-theme] .ent-tbl-wrap{border:0;overflow:visible}
@media (max-width:900px){html[data-theme] .ent-tbl-wrap{overflow-x:auto}}
html[data-theme] .ent-tbl{font-size:13px;color:var(--ui-fg)}
html[data-theme] .ent-tbl thead th{font-size:12.5px;font-weight:400;color:var(--ui-muted);padding:8px;border-bottom:1px solid var(--ui-edge)}
html[data-theme] .ent-tbl tbody td{padding:12px 8px;border-top:0;border-bottom:1px solid var(--ui-line)}
html[data-theme] .ent-tbl tbody tr:hover td{background:var(--ui-bg-soft)}
html[data-theme] .ent-tbl tbody tr.lt-selected td{background:var(--ui-bg-soft)}
html[data-theme] .ent-name{color:var(--ui-fg);font-weight:500}
html[data-theme] .ent-crit{display:inline-flex;align-items:center;min-height:24px;padding:0 9px;font-size:12px;font-weight:500;border:1px solid transparent}
html[data-theme] .ent-crit.critical{background:var(--critical-pale);color:var(--critical)}
html[data-theme] .ent-crit.high{background:var(--high-pale);color:var(--high)}
html[data-theme] .ent-crit.medium{background:var(--medium-pale);color:var(--medium)}
html[data-theme] .ent-crit.low{background:var(--low-pale);color:var(--low)}
html[data-theme] .ent-num{font-size:13px;color:var(--ui-fg)}
html[data-theme] .ent-num.critical{color:var(--critical)}html[data-theme] .ent-num.high{color:var(--high)}html[data-theme] .ent-num.medium{color:var(--medium)}html[data-theme] .ent-num.low{color:var(--low)}
html[data-theme] .ent-num.zero,html[data-theme] .ent-muted,html[data-theme] .ent-dim{color:var(--ui-muted)}
html[data-theme] .ent-status{font-size:13px;color:var(--ui-fg)}
html[data-theme] .ent-status.completed,html[data-theme] .ent-status.queued,html[data-theme] .ent-status.cancelled{color:var(--ui-muted)}
html[data-theme] .ent-status.running{color:var(--high)}
html[data-theme] .ent-status.failed{color:var(--critical)}
html[data-theme] .ent-act{height:28px;font-size:12px;border-color:var(--ui-edge);color:var(--ui-fg)}
html[data-theme] .ent-act:hover{background:var(--ui-bg-soft);color:var(--ui-fg);border-color:var(--ui-edge)}

/* Quick view panel */
.lt-peek{position:fixed;top:58px;right:0;bottom:0;width:354px;background:var(--ui-surface);border-left:1px solid var(--ui-line);padding:20px 22px;display:flex;flex-direction:column;gap:16px;z-index:40;overflow:auto}
.lt-peek[hidden]{display:none}
.lt-peek-head{display:flex;justify-content:space-between;gap:12px}
.lt-peek-name{font-size:24px;font-weight:500;line-height:1.2;margin-top:4px;color:var(--ui-fg)}
.lt-peek-close{background:none;border:0;font-size:24px;line-height:1;cursor:pointer;color:var(--ui-fg);padding:0 2px;align-self:flex-start}
.lt-peek-kpis{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--ui-line)}
.lt-peek-kpis>div{padding:8px 10px;border-right:1px solid var(--ui-line);display:flex;flex-direction:column}
.lt-peek-kpis>div:last-child{border-right:0}
.lt-peek-kpis b{font-size:20px;font-weight:500;color:var(--ui-fg)}
.lt-peek-kpis span{font-size:12px;color:var(--ui-muted)}
.lt-peek-rows{margin:0}
.lt-peek-rows>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--ui-line);font-size:13px}
.lt-peek-rows dt{color:var(--ui-fg-2)}
.lt-peek-rows dd{margin:0;font-weight:500;color:var(--ui-fg);text-align:right}
.lt-peek-actions{display:flex;gap:8px;margin-top:auto}
.lt-peek-actions .btn{flex:1}
html[data-theme] .ent-page.lt-with-peek{margin-right:354px}
html[data-theme] .ent-page.lt-with-peek .ent-tbl-wrap{overflow-x:auto}
html[data-theme] .ent-page.lt-with-peek .rg-row td:nth-child(3),html[data-theme] .ent-page.lt-with-peek .rg-row td:nth-child(7),
html[data-theme] .ent-page.lt-with-peek table thead th:nth-child(3),html[data-theme] .ent-page.lt-with-peek table thead th:nth-child(7){display:none}
@media(max-width:1100px){
  .lt-peek{position:static;width:auto;border:1px solid var(--ui-line);margin-top:16px}
  html[data-theme] .ent-page.lt-with-peek{margin-right:0}
}

/* Findings registry */
html[data-theme] .vl-page-title{font-size:26px;letter-spacing:0;color:var(--ui-fg)}
html[data-theme] .vl-sev{min-height:24px;padding:0 9px;font-size:12px;font-weight:500;gap:0}
html[data-theme] .vl-sev-dot{display:none}
html[data-theme] .vl-sev-critical{background:var(--critical-pale);color:var(--critical)}
html[data-theme] .vl-sev-high{background:var(--high-pale);color:var(--high)}
html[data-theme] .vl-sev-medium{background:var(--medium-pale);color:var(--medium)}
html[data-theme] .vl-sev-low{background:var(--low-pale);color:var(--low)}
html[data-theme] .vl-sev-info{background:var(--sev-info-pale);color:var(--sev-info)}
html[data-theme] .vl-status{font-size:13px;font-weight:400;background:transparent!important;color:var(--ui-muted)!important;padding:0;display:inline-flex;align-items:center;gap:7px}
html[data-theme] .vl-status::before{content:'';width:8px;height:8px;background:currentColor;flex:0 0 auto}
html[data-theme] .vl-status-open{color:var(--critical)!important}
html[data-theme] .vl-status-fixed{color:var(--low)!important}
html[data-theme] .vl-status-progress{color:var(--medium)!important}
html[data-theme] .vl-status-accepted,html[data-theme] .vl-status-fp{color:var(--ui-muted)!important}
html[data-theme] .vl-apply{background:var(--ui-inv-bg);color:var(--ui-inv-fg);border:1px solid var(--ui-inv-bg)}
html[data-theme] .vl-apply:hover{background:var(--ui-inv-bg-hover)}

/* Dashboard */
html[data-theme] .dash-stage{background:var(--ui-bg-soft)}
html[data-theme] .dash-bg{background:var(--ui-bg-soft)}
html[data-theme] .dash-card{background:var(--ui-surface);border:1px solid var(--ui-line);box-shadow:none}
html[data-theme] .dash-mini-btn{background:var(--ui-surface);color:var(--ui-fg)}
html[data-theme] .dash-mini-btn.active{background:var(--ui-inv-bg);color:var(--ui-inv-fg)}
html[data-theme] .dash-bar-grid{stroke:var(--ui-line)}
html[data-theme] .dash-bar.sv-crit{fill:var(--critical-fill)}
html[data-theme] .dash-bar.sv-high{fill:var(--high-fill)}
html[data-theme] .dash-bar.sv-med{fill:var(--medium-fill)}
html[data-theme] .dash-bar.sv-low{fill:var(--low-fill)}
html[data-theme] .dash-bar.sv-info{fill:var(--sev-info-fill)}

/* Login and 2FA have no app shell */
html[data-theme] body:not(:has(.main-wrap)) .btn{background:var(--ui-inv-bg);color:var(--ui-inv-fg);border-color:var(--ui-inv-bg)}
html[data-theme] body:not(:has(.main-wrap)) .btn:hover{background:var(--ui-inv-bg-hover)}
/* Dashboard status strip and legends */
html[data-theme] .dash-status-seg.sv-crit,html[data-theme] .dash-legend .sv-crit i,html[data-theme] .dash-trend-legend .sv-crit i{background:var(--critical-fill)}
html[data-theme] .dash-status-seg.sv-high,html[data-theme] .dash-legend .sv-high i,html[data-theme] .dash-trend-legend .sv-high i{background:var(--high-fill)}
html[data-theme] .dash-status-seg.sv-med,html[data-theme] .dash-legend .sv-med i,html[data-theme] .dash-trend-legend .sv-med i{background:var(--medium-fill)}
html[data-theme] .dash-status-seg.sv-low,html[data-theme] .dash-legend .sv-low i,html[data-theme] .dash-trend-legend .sv-low i{background:var(--low-fill)}
html[data-theme] .dash-status-seg.sv-info,html[data-theme] .dash-legend .sv-info i,html[data-theme] .dash-trend-legend .sv-info i{background:var(--sev-info-fill)}

/* Square corners everywhere. :not(#\#) outranks page rules that use !important. */
html[data-theme] body:not(#\#) *,html[data-theme] body:not(#\#) *::before,html[data-theme] body:not(#\#) *::after{border-radius:0!important}
html[data-theme] .system-hero::before,html[data-theme] .system-hero::after,html[data-theme] .asset-hero::before,html[data-theme] .asset-hero::after{content:none!important}

/* Dashboard status strip uses the severity and status colours */
html[data-theme] .dash-status-seg.open,html[data-theme] .dash-legend .open i{background:var(--critical-fill)}
html[data-theme] .dash-status-seg.work,html[data-theme] .dash-legend .work i{background:var(--low-fill)}
html[data-theme] .dash-status-seg.fp,html[data-theme] .dash-legend .fp i{background:var(--info-fill)}
html[data-theme] .dash-status-seg.risk,html[data-theme] .dash-legend .risk i{background:var(--risk)}
html[data-theme] .dash-stat-head,html[data-theme] .dash-card-title{font-weight:500;color:var(--ui-fg)}
html[data-theme] .scan-hero::before,html[data-theme] .scan-hero::after,html[data-theme] .detail-hero::before,html[data-theme] .detail-hero::after,html[data-theme] .argus-hero::before,html[data-theme] .argus-hero::after{content:none!important}

/* Login and 2FA: a plain form, no frames around the card or the logo */
html[data-theme] body:not(:has(.main-wrap)) .card{background:transparent!important;border:0!important;padding:0}
html[data-theme] body:not(:has(.main-wrap)) .mark{border:0}
html[data-theme] body:not(:has(.main-wrap)) .secret{background:var(--ui-bg-soft);border:0}

/* Headings had a grey second word from the old style */
html[data-theme] .page-title .accent{color:var(--ui-fg)}

/* Users: the actions column fits; wide tables scroll inside their own box */
html[data-theme] .settings-main{min-width:0;overflow-x:auto}
html[data-theme] .settings-main td{padding-left:6px;padding-right:6px}
html[data-theme] .settings-main td[style*="min-width"]{min-width:0!important}
html[data-theme] .settings-main td .btn-sm{padding:0 7px;white-space:nowrap}
html[data-theme] .settings-main td .argus-select{min-width:90px}

/* Knowledge graph */
html[data-theme] .neo4j-stat{background:var(--ui-surface)!important;box-shadow:none!important;border:1px solid var(--ui-line)}
html[data-theme] .neo4j-stat .val{color:var(--ui-fg)!important;text-shadow:none;font-family:var(--font);font-weight:500}
html[data-theme] #kg-canvas,html[data-theme] .kg-canvas{background:var(--ui-surface)}
html[data-theme] .kg-panel-outer{background:var(--ui-surface);border-color:var(--ui-line)}
html[data-theme] .kg-toolbar{background:var(--ui-surface);border-color:var(--ui-line)}
html[data-theme] .kg-canvas svg text{fill:var(--ui-fg)}
html[data-theme] svg rect{rx:0;ry:0}
html[data-theme] #kg-canvas{box-shadow:none!important;border:1px solid var(--ui-line)}

.lt-rail{overflow-y:auto;scrollbar-width:thin}
.lt-rail>*{flex-shrink:0}
.lt-rail .lt-mode{position:sticky;bottom:0;z-index:1;margin-top:auto;background:var(--ui-rail-bg)}
.lt-rail .lt-mode:hover:not(:disabled){background:var(--ui-rail-hover)}
.lt-mode:disabled{cursor:default}
.lt-sections{display:none}
@media(max-width:760px){
  .lt-bar .lt-tabs{display:none}
  .lt-sections{display:flex;flex:1;min-width:0;flex-direction:column;font-size:11px;color:var(--ui-muted)}
  .lt-sections select{width:100%;min-width:0;min-height:28px;font:inherit;font-size:14px;color:var(--ui-fg);background:var(--ui-surface);border:1px solid var(--ui-line)}
}

/* ── Rail flyout panels ── */
@media(max-width:600px){
}

/* Kill chain severities */
html[data-theme] .kc-wrap{--kc-cr:var(--gr-8);--kc-hi:var(--ui-accent);--kc-me:var(--gr-5);--kc-lo:var(--gr-4);--kc-in:var(--gr-4)}

/* Approvals: rail counter */
.lt-rail a.lt-appr{position:relative}
.lt-appr em{position:absolute;top:3px;right:2px;min-width:16px;padding:0 4px;background:var(--ui-accent);color:var(--ui-accent-fg);font:700 10px/16px var(--font);font-style:normal;text-align:center}
.lt-appr em[hidden]{display:none}
.lt-appr.active em{display:none}
