/* ========== OpenClaw Dashboard — Editorial Cyber ========== */
:root {
  --bg-0: #07080c;
  --bg-1: #0b0d14;
  --bg-2: #0f121b;
  --bg-3: #141826;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --ink-0: #f4f5f8;
  --ink-1: #c9cdd8;
  --ink-2: #8b90a0;
  --ink-3: #5a6072;
  --ink-4: #3a3f4f;

  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.16);
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.14);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --mono: 'Geist Mono', ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--sans);
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(139, 92, 246, 0.08), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(34, 211, 238, 0.05), transparent 60%);
  background-attachment: fixed;
}

/* ===== Typography ===== */
.mono { font-family: var(--mono); font-feature-settings: 'zero', 'ss02'; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { text-transform: uppercase; letter-spacing: 0.12em; }
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 500;
}
.title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-0);
  letter-spacing: -0.01em;
}
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }

/* ===== Layout shell ===== */
.shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 32px 64px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.88) 0%, rgba(7, 8, 12, 0.72) 100%);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 55%),
    linear-gradient(135deg, #22d3ee 0%, #3b82f6 45%, #8b5cf6 100%);
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 8px 24px -8px rgba(139, 92, 246, 0.6);
}
.brand-mark::after {
  content: '';
  position: absolute; inset: 6px;
  border-radius: 5px;
  background: var(--bg-0);
  mask: radial-gradient(circle at 50% 50%, black 2px, transparent 3px),
        linear-gradient(black, black);
  mask-composite: exclude;
}
.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.brand-name em {
  font-style: normal;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 2px;
}

.header-center {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.seg {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.seg button {
  all: unset;
  cursor: pointer;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  border-radius: 999px;
  transition: all 180ms;
}
.seg button:hover { color: var(--ink-0); }
.seg button[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  color: var(--ink-0);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gateway-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
}
.gateway-badge .pulse {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.clock {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.clock .tz { font-size: 10px; color: var(--ink-3); letter-spacing: 0.1em; }

.icon-btn {
  all: unset;
  cursor: pointer;
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: all 160ms;
}
.icon-btn:hover { color: var(--ink-0); border-color: var(--line-strong); }

/* ===== Section title ===== */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 36px 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-0);
}
.section-head h2 .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-left: 12px;
  letter-spacing: 0;
}

/* ===== Card base ===== */
.card {
  background: linear-gradient(180deg, var(--bg-1) 0%, rgba(11, 13, 20, 0.6) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: border-color 200ms;
}
.card:hover { border-color: var(--line-strong); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-1);
}
.card-head .tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.card-body { padding: 20px; }

/* ===== Hero integrity ===== */
.hero {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}

.integrity {
  padding: 28px 32px;
  background:
    radial-gradient(800px 400px at 80% 100%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(600px 300px at 10% 0%, rgba(34, 211, 238, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.integrity::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black, transparent);
  opacity: 0.35;
  pointer-events: none;
}
.integrity-meta {
  position: relative;
}
.integrity-score {
  font-size: 88px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
  font-family: var(--sans);
  margin: 12px 0 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.integrity-score .unit {
  font-size: 22px;
  color: var(--ink-3);
  font-family: var(--mono);
}
.integrity-desc {
  font-size: 15px;
  color: var(--ink-1);
  max-width: 380px;
  margin-top: 14px;
  line-height: 1.55;
}
.integrity-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
}
.integrity-stats > div .k {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.integrity-stats > div .v {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  color: var(--ink-0);
  margin-top: 2px;
}
.integrity-stats > div .v.up-arrow { color: var(--green); }
.integrity-stats > div .v.down { color: var(--red); }

/* Radar */
.radar {
  width: 260px;
  height: 260px;
  justify-self: center;
  position: relative;
}

/* Hero-side live feed */
.live-feed {
  padding: 24px;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.live-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.live-feed-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.feed-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.feed-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--line);
  font-size: 12.5px;
  animation: fadeSlide 400ms ease-out;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.feed-row .t { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.feed-row .msg { color: var(--ink-1); }
.feed-row .msg b { color: var(--ink-0); font-weight: 500; }
.feed-row.crit { border-color: rgba(248,113,113,0.22); background: rgba(248,113,113,0.04); }
.feed-row.crit .msg b { color: var(--red); }
.feed-row.warn { border-color: rgba(251,191,36,0.22); }
.feed-row.warn .msg b { color: var(--amber); }
.feed-row.ok .msg b { color: var(--green); }

/* ===== Status strip ===== */
.status-strip {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 200ms;
  cursor: pointer;
}
.stat:last-child { border-right: none; }
.stat:hover { background: var(--bg-2); }
.stat .k {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat .k .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.stat .k .dot.g { background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,0.6); }
.stat .k .dot.a { background: var(--amber); box-shadow: 0 0 8px rgba(251,191,36,0.6); }
.stat .k .dot.r { background: var(--red); box-shadow: 0 0 8px rgba(248,113,113,0.6); }
.stat .v {
  margin-top: 10px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 400;
  color: var(--ink-0);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.stat .sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.stat .spark {
  margin-top: 10px;
  height: 28px;
}

/* ===== Grid 2 cols ===== */
.grid-2 {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-2 > .span-2 { grid-column: span 2; }

/* Alerts panel */
.alert-list { display: flex; flex-direction: column; }
.alert-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 150ms;
  cursor: pointer;
}
.alert-item:last-child { border-bottom: none; }
.alert-item:hover { background: rgba(255,255,255,0.02); }
.alert-sev {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--ink-4);
}
.alert-sev.high { background: linear-gradient(180deg, #f87171, #dc2626); box-shadow: 0 0 12px rgba(248,113,113,0.4); }
.alert-sev.med { background: var(--amber); }
.alert-sev.low { background: var(--cyan); }
.alert-body .t {
  font-size: 13.5px;
  color: var(--ink-0);
  font-weight: 500;
}
.alert-body .d {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 3px;
}
.alert-body .d .code {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 6px;
  background: var(--bg-3);
  border-radius: 4px;
  color: var(--ink-1);
  margin-right: 6px;
}
.alert-when {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}

/* Agent panel */
.agent-head {
  padding: 22px 22px 0;
  display: flex;
  gap: 18px;
  align-items: center;
}
.agent-avatar {
  width: 52px; height: 52px;
  border-radius: 12px;
  background:
    conic-gradient(from 180deg at 50% 50%, #22d3ee, #8b5cf6, #3b82f6, #22d3ee);
  position: relative;
  box-shadow: 0 0 24px -4px rgba(139,92,246,0.4);
}
.agent-avatar::after {
  content: '';
  position: absolute; inset: 2px;
  border-radius: 10px;
  background: var(--bg-1);
}
.agent-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px; height: 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, #22d3ee, #8b5cf6);
  z-index: 1;
}
.agent-head .who { font-size: 15px; font-weight: 500; }
.agent-head .role { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.agent-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.agent-stats > div {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}
.agent-stats > div:last-child { border-right: none; }
.agent-stats .k { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); }
.agent-stats .v { font-family: var(--mono); font-size: 20px; color: var(--ink-0); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Cron */
.cron-list { padding: 6px 0; }
.cron-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.cron-row:last-child { border-bottom: none; }
.cron-name { color: var(--ink-0); }
.cron-name .sched { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-left: 8px; }
.cron-next { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.cron-status {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
}
.cron-status.ok { background: rgba(52,211,153,0.1); color: var(--green); }
.cron-status.idle { background: rgba(34,211,238,0.1); color: var(--cyan); }
.cron-status.err { background: rgba(248,113,113,0.1); color: var(--red); }

/* Channels */
.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px;
}
.channel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.01);
}
.channel .row1 {
  display: flex; justify-content: space-between; align-items: center;
}
.channel .n { font-size: 13px; font-weight: 500; }
.channel .badge {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.2);
}
.channel .badge.off { color: var(--ink-3); background: rgba(255,255,255,0.03); border-color: var(--line); }
.channel .m {
  margin-top: 10px;
  display: flex; gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
}
.channel .m b { color: var(--ink-0); font-weight: 500; }

/* Sessions */
.session-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.session-row:last-child { border-bottom: none; }
.session-av {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-0);
  display: flex; align-items: center; justify-content: center;
  font-weight: 500;
}
.session-who { font-size: 13px; }
.session-who .meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.session-dur { font-family: var(--mono); font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.session-status {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(52,211,153,0.5);
}
.session-status.idle { background: var(--amber); box-shadow: 0 0 8px rgba(251,191,36,0.4); }

/* Media */
.media-list { padding: 6px 0; }
.media-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
}
.media-row:last-child { border-bottom: none; }
.media-ico {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.media-info .name { font-size: 13px; color: var(--ink-0); }
.media-info .meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.media-size { font-family: var(--mono); font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ===== Intrusion ===== */
.intrusion { margin-top: 20px; }
.intrusion-body {
  display: grid;
  grid-template-columns: 320px 1fr 1fr;
  gap: 0;
}
.intrusion-stats {
  padding: 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.i-stat .k {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.i-stat .v {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  color: var(--ink-0);
  margin-top: 4px;
  line-height: 1.1;
  display: flex; align-items: baseline; gap: 10px;
}
.i-stat .v .delta {
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--red);
  background: rgba(248,113,113,0.1);
}
.i-stat .v .delta.good { color: var(--green); background: rgba(52,211,153,0.1); }

/* World map */
.worldmap {
  padding: 20px;
  border-right: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.worldmap svg { width: 100%; height: auto; display: block; }
.worldmap-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.worldmap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.worldmap-legend .d {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(34,211,238,0.5);
}
.worldmap-legend .d.h { background: var(--red); box-shadow: 0 0 8px rgba(248,113,113,0.5); }

/* Blocked IPs table */
.ip-table { }
.ip-table .thead {
  display: grid;
  grid-template-columns: 120px 1fr 70px 70px;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.ip-row {
  display: grid;
  grid-template-columns: 120px 1fr 70px 70px;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 120ms;
  align-items: center;
}
.ip-row:last-child { border-bottom: none; }
.ip-row:hover { background: rgba(255,255,255,0.02); }
.ip-row .ip { font-family: var(--mono); color: var(--ink-0); font-variant-numeric: tabular-nums; }
.ip-row .loc { color: var(--ink-1); display: flex; gap: 8px; align-items: center; }
.ip-row .loc .flag { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.ip-row .at { font-family: var(--mono); font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.ip-row .tr { font-family: var(--mono); color: var(--red); font-variant-numeric: tabular-nums; text-align: right; }

/* ===== Logs ===== */
.logs {
  margin-top: 20px;
  background: linear-gradient(180deg, #070810, #0a0c15);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.logs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
}
.logs-head .title-row {
  display: flex; align-items: center; gap: 12px;
}
.logs-head .title-row h3 { margin: 0; font-size: 13px; font-weight: 500; }
.logs-head .dots { display: flex; gap: 6px; }
.logs-head .dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-4);
}
.logs-filter {
  display: flex;
  gap: 6px;
}
.logs-filter button {
  all: unset;
  cursor: pointer;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  border-radius: 4px;
}
.logs-filter button:hover { color: var(--ink-1); }
.logs-filter button[aria-pressed="true"] {
  color: var(--ink-0);
  background: var(--bg-3);
}
.logs-body {
  padding: 16px 20px;
  max-height: 420px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
}
.logs-body::-webkit-scrollbar { width: 8px; }
.logs-body::-webkit-scrollbar-track { background: transparent; }
.logs-body::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 4px; }

.log-line {
  display: grid;
  grid-template-columns: 150px 60px 1fr;
  gap: 14px;
  color: var(--ink-1);
}
.log-line .tm { color: var(--ink-3); }
.log-line .lv { font-weight: 500; }
.log-line .lv.info { color: var(--cyan); }
.log-line .lv.warn { color: var(--amber); }
.log-line .lv.err  { color: var(--red); }
.log-line .lv.ok   { color: var(--green); }
.log-line .lv.dbg  { color: var(--ink-3); }
.log-line .msg b { color: var(--ink-0); font-weight: 500; }

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.footer .b { color: var(--ink-1); }

/* ===== Drawer ===== */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms;
  z-index: 100;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 92vw;
  background: linear-gradient(180deg, #0b0d14, #070810);
  border-left: 1px solid var(--line-strong);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 101;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px -20px rgba(0,0,0,0.6);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { margin: 0; font-size: 14px; font-weight: 500; }
.drawer-head .ip-big {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink-0);
  margin-top: 4px;
}
.drawer-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.drawer-section + .drawer-section { margin-top: 24px; }
.drawer-kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.drawer-kv .k { color: var(--ink-3); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.drawer-kv .v { color: var(--ink-0); font-family: var(--mono); }

.drawer-actions {
  display: flex; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
.btn {
  all: unset;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  flex: 1;
  transition: all 150ms;
  border: 1px solid var(--line-strong);
  color: var(--ink-0);
  background: var(--bg-2);
}
.btn:hover { background: var(--bg-3); }
.btn.danger {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.3);
  color: var(--red);
}
.btn.danger:hover { background: rgba(248,113,113,0.16); }
.btn.primary {
  background: linear-gradient(180deg, #3b82f6, #6366f1);
  border-color: rgba(139,92,246,0.5);
  color: white;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
}
.tabs button {
  all: unset;
  cursor: pointer;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  border-radius: 6px;
  transition: all 140ms;
}
.tabs button:hover { color: var(--ink-1); }
.tabs button[aria-pressed="true"] {
  color: var(--ink-0);
  background: var(--bg-3);
}

/* utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.between { justify-content: space-between; align-items: center; }

/* Responsive */
@media (max-width: 1200px) {
  .hero { grid-template-columns: 1fr; }
  .integrity { grid-template-columns: 1fr; }
  .radar { margin: 0 auto; }
  .status-strip { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3n) { border-right: none; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .intrusion-body { grid-template-columns: 1fr; }
  .intrusion-stats, .worldmap { border-right: none; border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 > .span-2 { grid-column: span 1; }
  .status-strip { grid-template-columns: repeat(2, 1fr); }
  .header-center { display: none; }
  .shell { padding: 0 20px 48px; }
}
