/* ── NIRVANA LAN — CSS ── */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Syne:wght@400;600;800&display=swap');

/* ─── VARIABLES ─── */
:root {
  --bg: #080b12;
  --bg2: #0d1117;
  --bg3: #111827;
  --bg4: #1a2233;
  --border: #1e2d40;
  --border2: #243347;
  --text: #c8d8ea;
  --text2: #7a8fa3;
  --text3: #4a5f73;
  --accent: #00c8ff;
  --accent2: #7c3aed;
  --green: #10b981;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --blue: #3b82f6;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 10px;
  --font-mono: 'JetBrains Mono', monospace;
  --font-ui: 'Syne', sans-serif;
  --glow: 0 0 20px rgba(0, 200, 255, 0.15);
  --glow-red: 0 0 20px rgba(239, 68, 68, 0.2);
}

[data-theme="light"] {
  --bg: #f0f4f8;
  --bg2: #ffffff;
  --bg3: #f8fafc;
  --bg4: #edf2f7;
  --border: #d1dce8;
  --border2: #c4d0dd;
  --text: #1a2233;
  --text2: #4a6080;
  --text3: #8a9ab0;
  --accent: #0077cc;
  --accent2: #6d28d9;
  --glow: 0 0 20px rgba(0, 119, 204, 0.12);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-size: 14px;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}

.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0,200,255,0.4));
}

.logo-text { display: flex; flex-direction: column; }
.logo-title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--accent);
  line-height: 1;
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text3);
  line-height: 1.4;
}

.nav-section-label {
  padding: 14px 16px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text3);
  font-family: var(--font-mono);
}

.nav-links { list-style: none; padding: 0 8px; }
.nav-links li { margin: 2px 0; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
  position: relative;
}
.nav-link:hover { background: var(--bg4); color: var(--text); }
.nav-link.active {
  background: linear-gradient(135deg, rgba(0,200,255,0.12), rgba(124,58,237,0.08));
  color: var(--accent);
  border: 1px solid rgba(0,200,255,0.2);
}
.nav-icon { font-size: 16px; min-width: 18px; text-align: center; }
.phase-tag {
  margin-left: auto;
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text3);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  overflow: hidden;
}
.status-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

/* ─── MAIN ─── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ─── TOPBAR ─── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
}
.menu-toggle {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: none;
}
.breadcrumb {
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.5px;
  flex: 1;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
}

/* ─── VIEWS ─── */
.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.view-header { margin-bottom: 24px; }
.view-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.view-sub {
  color: var(--text3);
  font-size: 13px;
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* ─── CARDS ─── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border2); }
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
}
.card-header h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
}
.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }

/* ─── STAT GRID ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--accent); box-shadow: var(--glow); }
.stat-card.stat-critical { border-color: rgba(239,68,68,0.3); }
.stat-card.stat-critical:hover { box-shadow: var(--glow-red); }
.stat-card.stat-high { border-color: rgba(249,115,22,0.3); }
.stat-card.stat-medium { border-color: rgba(234,179,8,0.3); }

.stat-icon { font-size: 24px; color: var(--text3); }
.stat-card.stat-critical .stat-icon { color: var(--red); }
.stat-card.stat-high .stat-icon { color: var(--orange); }
.stat-card.stat-medium .stat-icon { color: var(--yellow); }

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
}
.stat-card.stat-critical .stat-num { color: var(--red); }
.stat-card.stat-high .stat-num { color: var(--orange); }
.stat-card.stat-medium .stat-num { color: var(--yellow); }

.stat-label {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── GRID LAYOUTS ─── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mt-16 { margin-top: 16px; }
.mt-8 { margin-top: 8px; }
.ml-8 { margin-left: 8px; }

/* ─── BUTTONS ─── */
.btn-primary, .btn-secondary, .btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: var(--font-ui);
  letter-spacing: 0.3px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0095cc);
  color: #000;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,200,255,0.4); }
.btn-primary:active { transform: none; }
.btn-secondary {
  background: var(--bg4);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}
.input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,200,255,0.1); }
.input-hint { font-size: 11px; color: var(--accent); margin-top: 5px; font-family: var(--font-mono); }
.checkbox-label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--text2) !important;
  font-family: var(--font-ui) !important;
  font-size: 13px !important;
}
.checkbox-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }

/* ─── SCAN PROGRESS ─── */
.scan-progress-area {
  min-height: 80px;
  font-family: var(--font-mono);
}
.scan-idle { color: var(--text3); font-size: 13px; }

.progress-bar-wrap {
  background: var(--bg4);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px;
  transition: width 0.3s;
  box-shadow: 0 0 8px rgba(0,200,255,0.5);
}
.progress-msg { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.progress-pct { font-size: 20px; font-weight: 700; color: var(--accent); }

.found-hosts-stream {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 10px;
}
.host-found-entry {
  font-size: 11px;
  color: var(--green);
  padding: 2px 0;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* ─── DATA TABLES ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: var(--bg3);
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
}
.data-table tr:hover td { background: var(--bg3); }
.data-table tr:last-child td { border-bottom: none; }
.empty-row { text-align: center; color: var(--text3); padding: 40px 14px !important; font-family: var(--font-ui) !important; }

/* ─── SEVERITY BADGES ─── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}
.badge-CRITICAL { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.badge-HIGH { background: rgba(249,115,22,0.15); color: var(--orange); border: 1px solid rgba(249,115,22,0.3); }
.badge-MEDIUM { background: rgba(234,179,8,0.15); color: var(--yellow); border: 1px solid rgba(234,179,8,0.3); }
.badge-LOW { background: rgba(59,130,246,0.15); color: var(--blue); border: 1px solid rgba(59,130,246,0.3); }
.badge-INFO { background: rgba(100,116,139,0.15); color: var(--text2); border: 1px solid var(--border); }

.risk-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg4);
  overflow: hidden;
  min-width: 80px;
}
.risk-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s;
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  color: var(--text3);
  padding: 40px 20px;
  font-size: 13px;
}

/* ─── BADGE COUNT ─── */
.badge-count {
  background: var(--accent2);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* ─── LINK ─── */
.link { color: var(--accent); font-size: 12px; text-decoration: none; font-family: var(--font-mono); }
.link:hover { text-decoration: underline; }

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-ui);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover { color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── FILTER BAR ─── */
.filter-bar { display: flex; gap: 4px; }
.filter-btn {
  padding: 4px 10px;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: all 0.15s;
}
.filter-btn.active, .filter-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }

/* ─── HOST CARDS GRID ─── */
.hosts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.host-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.host-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.host-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--glow); }
.host-card:hover::before { transform: scaleX(1); }
.host-card.risk-critical { border-color: rgba(239,68,68,0.4); }
.host-card.risk-critical::before { background: var(--red); transform: scaleX(1); }
.host-card.risk-high { border-color: rgba(249,115,22,0.3); }
.host-card.risk-high::before { background: var(--orange); transform: scaleX(1); }

.host-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.host-ip { font-size: 15px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); }
.host-card-body { font-size: 12px; color: var(--text2); line-height: 1.8; font-family: var(--font-mono); }
.host-ports { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.port-chip {
  background: var(--bg4);
  border: 1px solid var(--border2);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text2);
}
.port-chip.risky { border-color: rgba(239,68,68,0.3); color: var(--red); background: rgba(239,68,68,0.1); }

/* ─── SEARCH BAR ─── */
.search-bar { margin-bottom: 16px; }

/* ─── HOST BUTTONS ─── */
.host-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.host-btn {
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: all 0.15s;
}
.host-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── REPORT CARDS ─── */
.report-card {
  text-align: center;
  padding: 30px 20px;
  cursor: default;
}
.report-icon { font-size: 40px; margin-bottom: 12px; }
.report-card h3 { font-size: 16px; margin-bottom: 8px; }
.report-card p { font-size: 13px; color: var(--text3); margin-bottom: 16px; line-height: 1.5; }

/* ─── CHART BARS ─── */
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-family: var(--font-mono); font-size: 11px; color: var(--text2); min-width: 90px; text-align: right; }
.bar-track { flex: 1; height: 18px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding-left: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: white;
  font-weight: 700;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-width: 28px;
}

/* ─── PIE/DONUT CHART ─── */
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-family: var(--font-mono); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  width: 700px;
  max-width: 95vw;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0,0,0,0.5);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: none; } }
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
}
.modal-header h2 { font-size: 16px; font-weight: 800; }
.modal-close {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  border-radius: 5px;
}
.modal-close:hover { color: var(--text); background: var(--bg4); }
.modal-body { padding: 22px; overflow-y: auto; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.detail-item { background: var(--bg3); border-radius: 7px; padding: 12px; }
.detail-key { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text3); font-family: var(--font-mono); letter-spacing: 1px; }
.detail-val { font-size: 13px; color: var(--text); font-family: var(--font-mono); margin-top: 3px; word-break: break-all; }

/* ─── NOTIFICATION ─── */
.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 13px;
  z-index: 2000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s;
  box-shadow: var(--glow);
  max-width: 320px;
  font-family: var(--font-ui);
}
.notification.show { transform: translateY(0); opacity: 1; }
.notification.error { border-color: var(--red); box-shadow: var(--glow-red); }

/* ─── DNS RESULTS ─── */
.dns-record { margin-bottom: 14px; }
.dns-type {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.dns-values { background: var(--bg3); border-radius: 7px; padding: 10px 14px; }
.dns-val { font-family: var(--font-mono); font-size: 12px; color: var(--text2); padding: 2px 0; }

/* ─── SCHEDULED TASKS ─── */
.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-name { font-weight: 700; font-size: 13px; }
.task-meta { font-size: 11px; color: var(--text3); font-family: var(--font-mono); margin-top: 2px; }
.task-del {
  background: none;
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--red);
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
}
.task-del:hover { background: rgba(239,68,68,0.15); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .sidebar { position: fixed; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── SCAN COMPLETE EFFECT ─── */
@keyframes scanLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.scan-complete-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0,200,255,0.03), transparent);
  animation: scanLine 0.8s ease-out;
  z-index: 999;
}

/* ─── NOTE TEXTAREA ─── */
.notes-area {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  resize: vertical;
  min-height: 80px;
  outline: none;
}
.notes-area:focus { border-color: var(--accent); }

/* ─── INTERFACE CHIPS ─── */
.iface-chip {
  display: inline-block;
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 4px 10px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  margin: 2px;
}
.iface-chip:hover { border-color: var(--accent); color: var(--accent); }
.iface-chip.active {
  background: rgba(0,200,255,0.12);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── AÑADIDOS 2.0: marca, idioma, aviso legal, demo y accesibilidad ─── */
a.sidebar-logo { text-decoration: none; color: inherit; }
.sidebar-links { display: flex; flex-direction: column; gap: 4px; padding: 10px 20px; margin-top: auto; font-family: var(--font-mono); font-size: 11px; }
.sidebar-links a { color: var(--text2); text-decoration: none; }
.sidebar-links a:hover { color: var(--accent); text-decoration: underline; }
.sidebar-bottom { margin-top: 0; }
.lang-toggle { font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.legal-note { display: flex; align-items: center; gap: 10px; margin: 16px 28px 0; padding: 9px 14px; border: 1px solid rgba(234,179,8,.35);
  background: rgba(234,179,8,.08); color: var(--text); border-radius: 8px; font-size: 12.5px; }
.legal-note[hidden] { display: none; }
.legal-note span { flex: 1; }
.legal-close { background: none; border: none; color: var(--text2); cursor: pointer; font-size: 14px; }
.demo-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 28px 0; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--accent2); background: rgba(124,58,237,.12); color: var(--text); font-size: 13px; }
.demo-banner b { color: var(--accent2); font-family: var(--font-mono); }
.demo-banner a { margin-left: auto; color: #fff; background: var(--accent2); padding: 5px 12px; border-radius: 6px; text-decoration: none; font-weight: 700; }
.scan-error { color: var(--red); font-family: var(--font-mono); font-size: 13px; }
.row-risky td { background: rgba(239,68,68,0.05); }
.banner-cell { font-size: 11px; color: var(--text2); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
.desc-cell { max-width: 280px; font-size: 11.5px; line-height: 1.45; }
.fix-cell { max-width: 230px; font-size: 11.5px; line-height: 1.45; color: var(--green); }
.muted { color: var(--text3); font-size: 13px; }
.mono { font-family: var(--font-mono); }
.table-wrap { overflow-x: auto; }
td.actions { white-space: nowrap; }
.ip-link { background: none; border: none; padding: 0; color: var(--accent); font: 700 13px var(--font-mono); cursor: pointer; }
.ip-link:hover { text-decoration: underline; }
button.host-card { font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; }
.host-risk { font-size: 13px; font-weight: 700; font-family: var(--font-mono); }
button.iface-chip { font: inherit; font-size: 11px; cursor: pointer; }
.vuln-item { background: var(--bg3); border-radius: 7px; padding: 10px; margin-bottom: 8px; border-left: 3px solid #64748b; }
.vuln-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.vuln-desc { font-size: 11.5px; color: var(--text2); margin-bottom: 4px; }
.vuln-fix { font-size: 11.5px; color: var(--green); }
.modal-section { margin-bottom: 18px; }
.modal-section > .detail-key { margin-bottom: 8px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.task-buttons { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.summary-item { background: var(--bg3); border-radius: 8px; padding: 16px; text-align: center; }
.summary-num { font-size: 28px; font-weight: 800; font-family: var(--font-mono); }
.summary-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.axfr-warn { color: var(--red); font-size: 10px; }
[data-theme="light"] .legal-note { background: #fef9c3; }
@media (max-width: 900px) {
  .legal-note, .demo-banner { margin: 12px 14px 0; }
  .demo-banner a { margin-left: 0; }
}
