/* ═══════════════════════════════════════════════════════════════════════════
   THREATWATCH — Design System
   Aesthetic: Sol-Incinerator inspired · Terminal · Dark Green · Monospace
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=VT323&family=Inter:wght@400;500;600&display=swap');

/* ── Tokens ────────────────────────────────────────────────────────────────── */
:root {
  --bg:           #0b0e0b;
  --bg-surface:   #0f140f;
  --bg-card:      #131c13;
  --bg-card-h:    #192219;
  --bg-input:     #0d160d;

  --green:        #00ff41;
  --green-dim:    #00cc33;
  --green-glow:   rgba(0,255,65,.25);
  --green-muted:  rgba(0,255,65,.08);
  --green-border: rgba(0,255,65,.18);

  --red:          #ff3333;
  --red-glow:     rgba(255,51,51,.3);
  --red-muted:    rgba(255,51,51,.08);
  --amber:        #ffaa00;
  --amber-muted:  rgba(255,170,0,.08);
  --blue:         #4488ff;
  --blue-muted:   rgba(68,136,255,.08);
  --purple:       #aa44ff;
  --cyan:         #00eeff;

  --text-1:       #c8dcc8;
  --text-2:       #6a906a;
  --text-3:       #3a5a3a;
  --text-inv:     #0b0e0b;

  --border:       rgba(0,255,65,.1);
  --border-strong:rgba(0,255,65,.22);
  --radius:       3px;
  --radius-lg:    6px;

  --sidebar-w:    220px;
  --topbar-h:     48px;
  --transition:   150ms ease;

  --font:         'JetBrains Mono', 'Courier New', monospace;
  --font-pixel:   'VT323', monospace;
  --font-ui:      'Inter', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scanline overlay ──────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.07) 2px,
    rgba(0,0,0,.07) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar            { width: 6px; height: 6px; }
::-webkit-scrollbar-track      { background: var(--bg-surface); }
::-webkit-scrollbar-thumb      { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover{ background: var(--green-dim); }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow: hidden;
}
.sidebar-logo {
  padding: 1.5rem 1.2rem 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  position: relative;
}
.logo-text {
  font-family: var(--font-pixel);
  font-size: 1.7rem;
  color: var(--green);
  letter-spacing: .05em;
  text-shadow: 0 0 12px var(--green-glow);
  line-height: 1;
}
.logo-sub {
  font-size: .6rem;
  color: var(--text-3);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: .25rem;
  text-align: center;
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
  box-shadow: 0 0 6px var(--green);
}
.sidebar-logo .live-dot {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.8); }
}

.sidebar-nav {
  flex: 1;
  padding: .8rem 0;
  overflow-y: auto;
}
.nav-section-label {
  font-size: .6rem;
  color: var(--text-3);
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .8rem 1.2rem .3rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.2rem;
  color: var(--text-2);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  background: none;
  border-right: none; border-top: none; border-bottom: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}
.nav-item i { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.nav-item:hover {
  color: var(--green);
  background: var(--green-muted);
  border-left-color: var(--green-dim);
}
.nav-item.active {
  color: var(--green);
  background: var(--green-muted);
  border-left-color: var(--green);
}
.nav-item.active i { opacity: 1; }
.nav-badge {
  margin-left: auto;
  font-size: .6rem;
  background: var(--green-muted);
  color: var(--green-dim);
  border: 1px solid var(--green-border);
  padding: .1rem .35rem;
  border-radius: 2px;
  font-weight: 600;
  min-width: 22px;
  text-align: center;
}
.nav-badge.red  { background: var(--red-muted);   color: var(--red);   border-color: rgba(255,51,51,.25); }
.nav-badge.amber{ background: var(--amber-muted);  color: var(--amber); border-color: rgba(255,170,0,.25); }

.sidebar-logo-img-wrap { display: flex; flex-direction: column; align-items: center; }
.sidebar-brand-logo {
  width: 100%;
  max-width: 140px;
  height: auto;
  display: block;
  border-radius: var(--radius);
  filter: invert(1) brightness(0.15) sepia(1) saturate(8) hue-rotate(90deg);
  opacity: 0.75;
  transition: opacity var(--transition), filter var(--transition);
}
.sidebar-brand-logo:hover {
  opacity: 1;
  filter: invert(1) brightness(0.2) sepia(1) saturate(10) hue-rotate(90deg);
}

.sidebar-footer {
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  font-size: .65rem;
  color: var(--text-3);
}
.sidebar-footer .refresh-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--green-dim);
  cursor: pointer;
  font-size: .72rem;
  padding: .4rem .6rem;
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  background: var(--green-muted);
  transition: all var(--transition);
  margin-bottom: .6rem;
  font-family: var(--font);
}
.sidebar-footer .refresh-btn:hover {
  background: rgba(0,255,65,.15);
  color: var(--green);
  border-color: var(--green);
}
.sidebar-footer .refresh-btn.spinning i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.last-fetch-label { opacity: .6; }

/* ── Main content ───────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar (mobile) ────────────────────────────────────────────────────────── */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 1rem;
  gap: .8rem;
  z-index: 200;
}
.topbar-title {
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
  flex: 1;
}
.burger-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 32px; height: 32px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 99;
}
.sidebar-overlay.visible { display: block; }

/* ── Section ────────────────────────────────────────────────────────────────── */
.section { display: none; flex-direction: column; flex: 1; }
.section.active { display: flex; }

.section-header {
  padding: 1.8rem 2rem 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-title-group { flex: 1; }
.section-eyebrow {
  font-size: .62rem;
  color: var(--text-3);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}
.section-title {
  font-family: var(--font-pixel);
  font-size: 2rem;
  color: var(--green);
  text-shadow: 0 0 15px var(--green-glow);
  line-height: 1;
  margin-bottom: .3rem;
}
.section-subtitle {
  font-size: .75rem;
  color: var(--text-2);
}
.section-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.section-body { padding: 1.5rem 2rem; flex: 1; }

/* ── Search & filter bar ────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.2rem;
}
.search-input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-family: var(--font);
  font-size: .78rem;
  padding: .5rem .8rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { border-color: var(--green-dim); }

.filter-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter-tab {
  font-family: var(--font);
  font-size: .68rem;
  font-weight: 600;
  padding: .35rem .7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.filter-tab:hover, .filter-tab.active {
  background: var(--green-muted);
  color: var(--green);
  border-color: var(--green-border);
}
.filter-tab.red.active   { background: var(--red-muted);   color: var(--red);   border-color: rgba(255,51,51,.25); }
.filter-tab.amber.active { background: var(--amber-muted);  color: var(--amber); border-color: rgba(255,170,0,.25); }

/* ── Dashboard ──────────────────────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.metric-tile {
  background: var(--bg-card);
  padding: 1.1rem 1.3rem;
  transition: background var(--transition);
}
.metric-tile:hover { background: var(--bg-card-h); }
.metric-label {
  font-size: .62rem;
  color: var(--text-3);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.metric-value {
  font-family: var(--font-pixel);
  font-size: 2rem;
  line-height: 1;
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}
.metric-value.red    { color: var(--red);   text-shadow: 0 0 10px var(--red-glow); }
.metric-value.amber  { color: var(--amber); text-shadow: none; }
.metric-value.blue   { color: var(--blue);  text-shadow: none; }

/* ── Ticker ─────────────────────────────────────────────────────────────────── */
.ticker-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .55rem 1rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.ticker-label {
  font-size: .62rem;
  color: var(--green);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 700;
  flex-shrink: 0;
}
.ticker-divider { color: var(--text-3); flex-shrink: 0; }
.ticker-track-wrap { flex: 1; overflow: hidden; }
.ticker-track {
  display: flex;
  gap: 3rem;
  animation: ticker-scroll 140s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  font-size: .75rem;
  color: var(--text-2);
  white-space: nowrap;
  cursor: default;
}
.ticker-item a {
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition);
}
.ticker-item a:hover { color: var(--green); }
.ticker-sep { color: var(--text-3); margin: 0 .5rem; }

/* ── Dashboard two-col ──────────────────────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.dash-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dash-widget-header {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-widget-title {
  font-size: .68rem;
  font-weight: 700;
  color: var(--green-dim);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.dash-widget-more {
  font-size: .65rem;
  color: var(--text-3);
  cursor: pointer;
  transition: color var(--transition);
  background: none;
  border: none;
  font-family: var(--font);
}
.dash-widget-more:hover { color: var(--green); }

/* ── KEV mini list ───────────────────────────────────────────────────────────── */
.kev-mini-item {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.kev-mini-item:last-child { border-bottom: none; }
.kev-mini-item:hover { background: var(--bg-card-h); }
.kev-mini-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .2rem;
}
.kev-mini-id {
  font-size: .72rem;
  font-weight: 700;
  color: var(--red);
  font-family: var(--font);
}
.kev-mini-name {
  font-size: .72rem;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.kev-mini-meta {
  font-size: .62rem;
  color: var(--text-3);
}

/* ── Article mini list ───────────────────────────────────────────────────────── */
.article-mini-item {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.article-mini-item:last-child { border-bottom: none; }
.article-mini-item:hover { background: var(--bg-card-h); }
.article-mini-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .2rem;
}
.article-mini-source {
  font-size: .6rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.article-mini-title {
  font-size: .72rem;
  color: var(--text-1);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-mini-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
.article-mini-title a:hover { color: var(--green); }
.article-mini-meta {
  font-size: .62rem;
  color: var(--text-3);
  margin-top: .15rem;
}

/* ── KEV Table / CVE Table ───────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .76rem;
}
.data-table th {
  text-align: left;
  padding: .55rem .8rem;
  background: var(--bg-surface);
  color: var(--text-3);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; transition: color var(--transition); }
.data-table th.sortable:hover { color: var(--green); }
.data-table td {
  padding: .55rem .8rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: top;
}
.data-table tr:hover td { background: var(--bg-card-h); }
.data-table tr:last-child td { border-bottom: none; }
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

/* ── Article Cards ───────────────────────────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  transition: border-color var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.article-card:hover {
  border-color: var(--green-border);
  background: var(--bg-card-h);
}
.article-card-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.article-source {
  font-size: .62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.article-time {
  font-size: .62rem;
  color: var(--text-3);
  margin-left: auto;
}
.article-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.45;
}
.article-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
.article-title a:hover { color: var(--green); }
.article-summary {
  font-size: .72rem;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .4rem;
  border-top: 1px solid var(--border);
}
.read-more {
  font-size: .65rem;
  color: var(--green-dim);
  text-decoration: none;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.read-more:hover { color: var(--green); }

/* ── Severity Badges ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 2px;
  white-space: nowrap;
}
.badge-critical {
  background: var(--red-muted);
  color: var(--red);
  border: 1px solid rgba(255,51,51,.3);
  box-shadow: 0 0 6px var(--red-glow);
}
.badge-high    { background: var(--amber-muted); color: var(--amber); border: 1px solid rgba(255,170,0,.25); }
.badge-medium  { background: var(--blue-muted);  color: var(--blue);  border: 1px solid rgba(68,136,255,.25); }
.badge-low     { background: var(--green-muted); color: var(--green-dim); border: 1px solid var(--green-border); }
.badge-info    { background: rgba(100,100,100,.08); color: var(--text-3); border: 1px solid rgba(100,100,100,.15); }
.badge-unknown { background: rgba(100,100,100,.08); color: var(--text-3); border: 1px solid rgba(100,100,100,.15); }

/* Category badges */
.badge-breach      { background: rgba(255,51,51,.08);   color: var(--red);    border: 1px solid rgba(255,51,51,.2); }
.badge-ransomware  { background: rgba(255,100,0,.08);   color: #ff6600;       border: 1px solid rgba(255,100,0,.2); }
.badge-vuln        { background: var(--amber-muted);    color: var(--amber);  border: 1px solid rgba(255,170,0,.25); }
.badge-advisory    { background: var(--blue-muted);     color: var(--blue);   border: 1px solid rgba(68,136,255,.25); }
.badge-research    { background: rgba(170,68,255,.08);  color: var(--purple); border: 1px solid rgba(170,68,255,.2); }
.badge-general     { background: var(--green-muted);    color: var(--green-dim); border: 1px solid var(--green-border); }

/* ── Pulse Cards (OTX) ────────────────────────────────────────────────────────── */
.pulse-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  margin-bottom: .8rem;
  transition: border-color var(--transition);
}
.pulse-card:hover { border-color: var(--purple); }
.pulse-top {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}
.pulse-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-1);
  flex: 1;
}
.pulse-meta { font-size: .65rem; color: var(--text-3); margin-bottom: .5rem; }
.pulse-desc { font-size: .72rem; color: var(--text-2); line-height: 1.5; margin-bottom: .6rem; }
.tag-list { display: flex; gap: .3rem; flex-wrap: wrap; }
.tag {
  font-size: .6rem;
  padding: .1rem .4rem;
  background: rgba(170,68,255,.08);
  color: var(--purple);
  border: 1px solid rgba(170,68,255,.2);
  border-radius: 2px;
  font-weight: 600;
}
.tag.malware { background: var(--red-muted); color: var(--red); border-color: rgba(255,51,51,.2); }
.tag.mitre   { background: var(--amber-muted); color: var(--amber); border-color: rgba(255,170,0,.2); }

/* ── Scanner rows (GreyNoise) ─────────────────────────────────────────────────── */
.scanner-ip {
  font-family: var(--font);
  font-size: .76rem;
  font-weight: 700;
  color: var(--cyan);
}
.intention-malicious { color: var(--red); font-weight: 700; }
.intention-benign    { color: var(--green-dim); }
.intention-unknown   { color: var(--text-3); }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}
.page-btn {
  font-family: var(--font);
  font-size: .7rem;
  padding: .35rem .7rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--green-muted);
  color: var(--green);
  border-color: var(--green-border);
}
.page-btn:disabled {
  opacity: .3;
  cursor: default;
}
.page-info {
  font-size: .68rem;
  color: var(--text-3);
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 600;
  padding: .45rem .9rem;
  border-radius: var(--radius);
  border: 1px solid;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
}
.btn-ghost {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--green-muted);
  border-color: var(--green-border);
  color: var(--green);
}
.btn i { width: 13px; height: 13px; }

/* ── Loading / Empty states ──────────────────────────────────────────────────── */
.state-loading, .state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-3);
  gap: .8rem;
  text-align: center;
}
.state-loading .spinner {
  font-size: 1.5rem;
  animation: spin 1s linear infinite;
  color: var(--green-dim);
}
.state-empty i { width: 2rem; height: 2rem; opacity: .4; }
.state-empty p { font-size: .8rem; }

/* ── API key placeholder ─────────────────────────────────────────────────────── */
.api-placeholder {
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
}
.api-placeholder i { width: 2.5rem; height: 2.5rem; color: var(--text-3); }
.api-placeholder h3 {
  font-size: .9rem;
  color: var(--text-2);
  font-weight: 600;
}
.api-placeholder p { font-size: .75rem; color: var(--text-3); max-width: 380px; line-height: 1.6; }
.api-placeholder code {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: .15rem .45rem;
  font-size: .72rem;
  color: var(--green-dim);
}

/* ── CVE description truncate ────────────────────────────────────────────────── */
.cve-desc {
  max-width: 480px;
  font-size: .72rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Status dot ──────────────────────────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: .3rem;
}
.status-dot.ok    { background: var(--green); }
.status-dot.error { background: var(--red); }

/* ── Sort arrows ─────────────────────────────────────────────────────────────── */
.sort-asc::after  { content: ' ▲'; font-size: .55rem; }
.sort-desc::after { content: ' ▼'; font-size: .55rem; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .topbar { display: flex; }
  .main-content { margin-left: 0; padding-top: var(--topbar-h); }
  .section-header { padding: 1.2rem 1rem; }
  .section-body { padding: 1rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .data-table th, .data-table td { padding: .45rem .6rem; font-size: .7rem; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-input { min-width: auto; }
}
