/* ========= Reset & Base ========= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg-0: #07090d;
  --bg-1: #0c1117;
  --bg-2: #131a23;
  --bg-3: #1a2330;
  --line: #243042;
  --line-soft: #1a2433;
  --txt: #d8e1ec;
  --txt-dim: #8a98ac;
  --txt-mute: #5a6478;
  --red: #ff3838;
  --red-dim: #b51d1d;
  --amber: #ffb000;
  --gold: #ffd54a;
  --green: #4ade80;
  --green-dim: #2c8a4d;
  --blue: #5ab0ff;
  --purple: #b58aff;
  --warn: #ff8a3d;
  --hazard-stripe: repeating-linear-gradient(45deg, #1a1a1a 0 12px, #ffb000 12px 24px);
}
html, body { height: 100%; }
body {
  font-family: "JetBrains Mono", "Cascadia Code", "Consolas", "SF Mono", "Microsoft YaHei", monospace;
  background: radial-gradient(ellipse at top, #11161e 0%, var(--bg-0) 65%) fixed;
  color: var(--txt);
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 20% 10%, rgba(255,176,0,0.06), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255,56,56,0.05), transparent 40%);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #34435c; }

/* ========= Layout ========= */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 64px 1fr 32px;
  grid-template-areas: "header header" "sidebar main" "footer footer";
  min-height: 100vh;
  max-width: 1800px;
  margin: 0 auto;
}

/* ========= Header ========= */
.header {
  grid-area: header;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(180deg, #0e141d 0%, #0a0f16 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--red) 20%, var(--amber) 50%, var(--red) 80%, transparent);
  opacity: 0.5;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 40px; height: 40px;
  border: 2px solid var(--amber);
  border-radius: 50%;
  display: grid; place-items: center;
  position: relative;
  background: radial-gradient(circle, #1a0f00 0%, #000 100%);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,176,0,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(255,176,0,0); }
}
.brand-mark::before {
  content: ""; position: absolute; inset: 4px;
  border: 1px dashed var(--amber); border-radius: 50%;
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.brand-mark svg { width: 22px; height: 22px; position: relative; z-index: 1; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-size: 15px; font-weight: 700; letter-spacing: 1px; color: var(--gold); }
.brand-sub { font-size: 10px; color: var(--txt-mute); letter-spacing: 3px; }

.header-status { display: flex; align-items: center; gap: 14px; }
.stat-pill {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--txt-dim);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-2);
}
.stat-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s ease-in-out infinite;
}
.stat-pill.warn .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.stat-pill.danger .dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.header-clock {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  background: #000;
  text-shadow: 0 0 8px rgba(255,213,74,0.6);
}
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 3px;
  color: var(--txt-dim);
  transition: all 0.15s;
}
.icon-btn:hover { color: var(--gold); border-color: var(--amber); background: var(--bg-3); }
.icon-btn svg { width: 16px; height: 16px; }
.badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: white;
  font-size: 9px; padding: 1px 4px;
  border-radius: 8px; min-width: 14px;
  text-align: center; font-weight: bold;
}

/* ========= Sidebar ========= */
.sidebar {
  grid-area: sidebar;
  background: linear-gradient(180deg, #0a1019 0%, #070b11 100%);
  border-right: 1px solid var(--line);
  padding: 18px 0;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.nav-section { margin-bottom: 22px; }
.nav-title {
  padding: 0 20px 8px;
  font-size: 10px; letter-spacing: 2px;
  color: var(--txt-mute);
  text-transform: uppercase;
}
.nav-list { list-style: none; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--txt-dim);
  font-size: 13px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--bg-2); color: var(--txt); }
.nav-item.active {
  border-left-color: var(--amber);
  background: linear-gradient(90deg, rgba(255,176,0,0.1) 0%, transparent 100%);
  color: var(--gold);
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item .count {
  margin-left: auto;
  font-size: 10px;
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 8px;
  color: var(--txt-mute);
}
.nav-item.active .count { background: var(--amber); color: #000; }

.sidebar-footer { padding: 14px 20px; margin-top: auto; }
.threat-meter {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 10px;
  border-radius: 3px;
}
.threat-meter h4 {
  font-size: 10px; color: var(--txt-mute);
  letter-spacing: 1.5px; margin-bottom: 8px;
  text-transform: uppercase;
}
.threat-level {
  font-size: 18px; font-weight: bold;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255,176,0,0.5);
  margin-bottom: 6px;
}
.threat-bar {
  height: 6px; background: var(--bg-3); border-radius: 3px;
  overflow: hidden; margin-bottom: 6px;
}
.threat-bar-fill {
  height: 100%; width: 65%;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  box-shadow: 0 0 8px var(--amber);
}
.threat-meter small { font-size: 10px; color: var(--txt-mute); }

/* ========= Main ========= */
.main {
  grid-area: main;
  padding: 20px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
}

/* ========= Hero ========= */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(20,12,0,0.85), rgba(7,9,13,0.95)),
    var(--hazard-stripe);
  border: 1px solid var(--amber);
  border-radius: 4px;
  padding: 24px;
  overflow: hidden;
}
.hero::before {
  content: "ВНИМАНИЕ";
  position: absolute; top: 8px; right: 16px;
  font-size: 10px; letter-spacing: 4px;
  color: var(--amber); opacity: 0.7;
}
.hero-grid {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 30px;
}
.hero-shield { width: 96px; height: 96px; display: grid; place-items: center; }
.hero-shield svg { width: 100%; height: 100%; }
.hero-info h1 {
  font-size: 22px; letter-spacing: 4px;
  color: var(--gold); margin-bottom: 4px;
  text-shadow: 0 0 14px rgba(255,213,74,0.4);
}
.hero-info .subtitle {
  font-size: 12px; color: var(--txt-dim);
  letter-spacing: 2px; margin-bottom: 12px;
}
.hero-stats { display: flex; gap: 18px; font-size: 11px; flex-wrap: wrap; }
.hero-stat strong {
  display: block; color: var(--gold); font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.hero-stat span { color: var(--txt-mute); letter-spacing: 1px; }

.launch-cluster { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.launch-btn {
  position: relative;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6363 0%, #c41a1a 45%, #5a0c0c 100%);
  border: 4px solid #2a0808;
  box-shadow:
    0 0 0 6px #1a0303,
    0 0 30px rgba(255,56,56,0.4),
    inset 0 -10px 20px rgba(0,0,0,0.5),
    inset 0 8px 16px rgba(255,255,255,0.15);
  color: white;
  font-size: 13px; font-weight: bold;
  letter-spacing: 3px;
  transition: all 0.1s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.launch-btn:hover {
  transform: scale(1.04);
  box-shadow:
    0 0 0 6px #1a0303,
    0 0 50px rgba(255,56,56,0.7),
    inset 0 -10px 20px rgba(0,0,0,0.5),
    inset 0 8px 16px rgba(255,255,255,0.2);
}
.launch-btn:active { transform: scale(0.96); }
.launch-btn .lock {
  position: absolute; top: -8px; right: -8px;
  background: #000; color: var(--amber);
  font-size: 9px; padding: 2px 6px;
  border-radius: 2px; border: 1px solid var(--amber);
  letter-spacing: 1px;
}

/* ========= Card ========= */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 2fr 1fr; }

.card {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s;
}
.card:hover { border-color: #34435c; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(0,0,0,0.2);
}
.card-title {
  font-size: 11px; letter-spacing: 2px;
  color: var(--txt-dim);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: ""; display: inline-block;
  width: 8px; height: 8px;
  background: var(--amber);
  transform: rotate(45deg);
  box-shadow: 0 0 6px var(--amber);
}
.card-actions { display: flex; gap: 6px; }
.card-btn {
  font-size: 10px; padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--txt-dim);
  border-radius: 2px;
  letter-spacing: 1px;
}
.card-btn:hover, .card-btn.active { color: var(--gold); border-color: var(--amber); }
.card-body { padding: 14px; }

/* ========= Stat Cards ========= */
.stat-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.stat-card .stat-label {
  font-size: 10px; letter-spacing: 2px;
  color: var(--txt-mute); text-transform: uppercase;
}
.stat-card .stat-value {
  font-size: 28px; font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255,213,74,0.3);
}
.stat-card .stat-trend { font-size: 11px; display: flex; align-items: center; gap: 6px; }
.stat-card .stat-trend.up { color: var(--green); }
.stat-card .stat-trend.down { color: var(--red); }
.stat-card .stat-trend svg { width: 12px; height: 12px; }
.stat-spark {
  height: 36px; margin-top: 4px;
  background: linear-gradient(180deg, transparent, rgba(255,176,0,0.06));
}
.stat-card.danger .stat-value { color: var(--red); text-shadow: 0 0 10px rgba(255,56,56,0.3); }
.stat-card.green .stat-value { color: var(--green); text-shadow: 0 0 10px rgba(74,222,128,0.3); }
.stat-card.blue .stat-value { color: var(--blue); text-shadow: 0 0 10px rgba(90,176,255,0.3); }

/* ========= Script Table ========= */
.table-wrap { width: 100%; overflow-x: auto; max-height: 420px; overflow-y: auto; }
table.scripts { width: 100%; border-collapse: collapse; font-size: 12px; }
table.scripts th {
  text-align: left;
  padding: 10px 12px;
  color: var(--txt-mute);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.4);
  position: sticky; top: 0;
}
table.scripts td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.scripts tr:hover td { background: rgba(255,176,0,0.04); }
.script-name { display: flex; align-items: center; gap: 10px; color: var(--txt); }
.script-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--bg-3);
  border-radius: 3px;
  border: 1px solid var(--line);
}
.script-icon svg { width: 14px; height: 14px; color: var(--amber); }
.script-meta { font-size: 10px; color: var(--txt-mute); }

.status-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; padding: 3px 8px;
  border-radius: 2px; letter-spacing: 1px;
  text-transform: uppercase;
}
.status-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status-running { background: rgba(74,222,128,0.1); color: var(--green); border: 1px solid rgba(74,222,128,0.3); }
.status-running::before { background: var(--green); box-shadow: 0 0 6px var(--green); animation: blink 1.5s infinite; }
.status-armed { background: rgba(255,176,0,0.1); color: var(--amber); border: 1px solid rgba(255,176,0,0.3); }
.status-armed::before { background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: blink 1s infinite; }
.status-idle { background: rgba(138,152,172,0.1); color: var(--txt-dim); border: 1px solid var(--line); }
.status-idle::before { background: var(--txt-mute); }
.status-error { background: rgba(255,56,56,0.1); color: var(--red); border: 1px solid rgba(255,56,56,0.3); }
.status-error::before { background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 0.6s infinite; }

.row-actions { display: flex; gap: 4px; }
.row-actions button {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--txt-dim);
  transition: all 0.15s;
}
.row-actions button:hover { color: var(--gold); border-color: var(--amber); }
.row-actions button.danger:hover { color: var(--red); border-color: var(--red); }
.row-actions svg { width: 12px; height: 12px; }

.progress-bar {
  width: 80px; height: 5px;
  background: var(--bg-3); border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--gold));
  transition: width 0.5s;
}

/* ========= Terminal ========= */
.terminal {
  background: #000;
  color: var(--green);
  font-size: 12px;
  height: 320px;
  overflow-y: auto;
  padding: 12px 14px;
  line-height: 1.6;
  border-top: 1px solid var(--line-soft);
}
.terminal .prompt { color: var(--amber); }
.terminal .info { color: var(--blue); }
.terminal .ok { color: var(--green); }
.terminal .warn { color: var(--warn); }
.terminal .err { color: var(--red); }
.terminal .timestamp { color: var(--txt-mute); margin-right: 6px; }
.terminal-line { white-space: pre-wrap; word-break: break-all; }

/* ========= Radar ========= */
.radar-wrap {
  height: 320px;
  background: radial-gradient(circle at center, #0a1a14 0%, #000 100%);
  position: relative;
  overflow: hidden;
}
.radar-svg { width: 100%; height: 100%; }
.radar-info {
  position: absolute; bottom: 10px; left: 12px;
  font-size: 10px; color: var(--green);
  letter-spacing: 1.5px;
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border: 1px solid rgba(74,222,128,0.3);
}
.radar-info span { color: var(--gold); }

/* ========= Charts ========= */
.chart-wrap { padding: 14px; height: 240px; position: relative; }
.chart-canvas { width: 100%; height: 100%; }

/* ========= Gauges ========= */
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 14px; }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 130px; }
.gauge-label {
  font-size: 10px; letter-spacing: 1.5px;
  color: var(--txt-mute); margin-top: 6px;
  text-transform: uppercase;
}
.gauge-value { fill: var(--gold); font-size: 18px; font-weight: bold; font-family: inherit; }
.gauge-unit { fill: var(--txt-mute); font-size: 8px; font-family: inherit; }

/* ========= Footer ========= */
.footer {
  grid-area: footer;
  background: linear-gradient(180deg, #0a0f16 0%, #07090d 100%);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  font-size: 10px;
  color: var(--txt-mute);
  letter-spacing: 1px;
}
.footer .classified {
  color: var(--red);
  border: 1px solid var(--red);
  padding: 1px 6px;
  letter-spacing: 2px;
  font-weight: bold;
  animation: blink 2s infinite;
}

/* ========= Modal ========= */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.modal-mask.active { display: flex; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 480px; max-width: calc(100% - 40px);
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--amber);
  box-shadow: 0 0 0 6px rgba(255,176,0,0.08), 0 20px 60px rgba(0,0,0,0.7);
  border-radius: 4px;
  overflow: hidden;
  animation: zoomIn 0.25s;
}
@keyframes zoomIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header {
  padding: 14px 18px;
  background: var(--hazard-stripe);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 {
  font-size: 14px; letter-spacing: 3px;
  background: rgba(0,0,0,0.7);
  color: var(--amber);
  padding: 4px 10px;
}
.modal-close {
  color: rgba(0,0,0,0.7); font-size: 18px; font-weight: bold;
  padding: 0 6px; background: rgba(255,255,255,0.5); border-radius: 3px;
}
.modal-body { padding: 22px; }
.modal-warning {
  border: 1px solid var(--red);
  background: rgba(255,56,56,0.05);
  padding: 14px; margin-bottom: 16px;
  color: var(--red);
  font-size: 13px;
  display: flex; gap: 12px; align-items: flex-start;
}
.modal-warning svg { width: 28px; height: 28px; flex-shrink: 0; color: var(--red); }
.modal-warning strong { display: block; margin-bottom: 4px; letter-spacing: 1px; }
.auth-input {
  width: 100%;
  background: #000; color: var(--green);
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit; font-size: 16px;
  margin-bottom: 12px;
  letter-spacing: 6px; text-align: center;
}
.auth-input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 2px rgba(255,176,0,0.2); }
.auth-hint { font-size: 11px; color: var(--txt-mute); margin-bottom: 16px; text-align: center; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn {
  padding: 8px 18px;
  font-size: 12px; letter-spacing: 2px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg-2);
  color: var(--txt);
  transition: all 0.15s;
}
.btn:hover { background: var(--bg-3); }
.btn-danger {
  background: linear-gradient(180deg, #c41a1a, #7a0e0e);
  border-color: #ff6363;
  color: white; font-weight: bold;
}
.btn-danger:hover {
  background: linear-gradient(180deg, #e62828, #9a1414);
  box-shadow: 0 0 14px rgba(255,56,56,0.4);
}
.btn-danger:disabled {
  opacity: 0.4; cursor: not-allowed;
  background: var(--bg-3); color: var(--txt-mute);
}

/* ========= Toast ========= */
.toast-stack {
  position: fixed; top: 80px; right: 20px;
  z-index: 90;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 320px;
}
.toast {
  background: var(--bg-2);
  border-left: 3px solid var(--amber);
  padding: 10px 14px;
  border-radius: 2px;
  font-size: 12px;
  display: flex; gap: 10px; align-items: flex-start;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  animation: slideIn 0.3s;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.info { border-color: var(--blue); }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
.toast .toast-icon { color: var(--amber); flex-shrink: 0; width: 18px; height: 18px; }
.toast.info .toast-icon { color: var(--blue); }
.toast.success .toast-icon { color: var(--green); }
.toast.error .toast-icon { color: var(--red); }
.toast strong { display: block; margin-bottom: 2px; color: var(--txt); }
.toast small { color: var(--txt-mute); }

/* ========= Ops strip ========= */
.ops-strip {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-1);
}
.ops-cell {
  padding: 12px 14px;
  border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 4px;
}
.ops-cell:last-child { border-right: none; }
.ops-cell .label {
  font-size: 9px; letter-spacing: 2px;
  color: var(--txt-mute); text-transform: uppercase;
}
.ops-cell .value {
  font-size: 16px; color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.ops-cell .value.green { color: var(--green); }
.ops-cell .value.red { color: var(--red); }

/* ========= Notes ========= */
.notes { padding: 14px; max-height: 240px; overflow-y: auto; }
.note-item {
  display: flex; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 12px;
}
.note-item:last-child { border-bottom: none; }
.note-time {
  font-size: 10px; color: var(--txt-mute);
  flex-shrink: 0; min-width: 40px;
}
.note-content { flex: 1; color: var(--txt-dim); }
.note-content strong { color: var(--gold); display: block; margin-bottom: 2px; font-size: 11px; }
.note-tag {
  font-size: 9px; padding: 1px 5px;
  background: var(--bg-3); color: var(--amber);
  border-radius: 2px; margin-right: 4px;
  letter-spacing: 1px;
}

/* ========= Quick Actions ========= */
.quick-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; padding: 14px;
}
.quick-btn {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-1);
  text-align: left;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 10px;
  color: var(--txt-dim);
  font-size: 11px;
}
.quick-btn:hover {
  border-color: var(--amber);
  background: rgba(255,176,0,0.06);
  color: var(--gold);
}
.quick-btn svg { width: 18px; height: 18px; color: var(--amber); flex-shrink: 0; }
.quick-btn small { display: block; color: var(--txt-mute); font-size: 9px; margin-top: 2px; }

/* ========= Node grid ========= */
.node-cell {
  width: 100%; aspect-ratio: 1;
  background: var(--green);
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
}
.node-cell:hover { transform: scale(1.4); z-index: 2; }
.node-cell.warn { background: var(--amber); }
.node-cell.err { background: var(--red); animation: blink 1s infinite; }

/* ========= Responsive ========= */
@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .header-status .stat-pill:nth-child(3) { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "header" "main" "footer"; }
  .sidebar { display: none; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .header-status { display: none; }
  .ops-strip { grid-template-columns: repeat(2, 1fr); }
  .ops-cell { border-right: none; border-bottom: 1px solid var(--line-soft); }
}
