:root {
  --bg: #050816;
  --bg-soft: #07101d;
  --panel: rgba(8, 15, 28, 0.78);
  --panel-strong: rgba(10, 18, 34, 0.95);
  --panel-border: rgba(126, 231, 255, 0.12);
  --panel-border-strong: rgba(126, 231, 255, 0.2);
  --text: #edf2ff;
  --muted: rgba(197, 214, 239, 0.72);
  --muted-soft: rgba(197, 214, 239, 0.54);
  --accent: #7ee7ff;
  --accent-strong: #4dd6ff;
  --accent-alt: #c4b5fd;
  --good: #33d49c;
  --warn: #fbbf24;
  --bad: #fb7185;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.22);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --border: 1px solid var(--panel-border);
  --border-strong: 1px solid var(--panel-border-strong);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at top left, rgba(126, 231, 255, 0.12), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(196, 181, 253, 0.14), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(51, 212, 156, 0.08), transparent 22%),
    linear-gradient(180deg, #040713 0%, #040713 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(126, 231, 255, 0.08), transparent 25%),
    radial-gradient(circle at 88% 0%, rgba(196, 181, 253, 0.12), transparent 20%),
    linear-gradient(180deg, #040713 0%, #050816 28%, #050816 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
}

body.compact-ui .main-shell { padding: 16px 16px 24px; }
body.compact-ui .side-nav { padding: 14px 12px 12px; }
body.compact-ui .topbar { margin-bottom: 10px; }
body.compact-ui .section,
body.compact-ui .hero,
body.compact-ui .card { padding: 14px; }
body.compact-ui .card { border-radius: 18px; }
body.compact-ui .controls,
body.compact-ui .chips,
body.compact-ui .pill-list { gap: 8px; }
body.compact-ui .metric-card,
body.compact-ui .box,
body.compact-ui .pill,
body.compact-ui .chip { padding-top: 8px; padding-bottom: 8px; }
body.compact-ui .top-actions-wrap .controls input,
body.compact-ui .top-actions-wrap .controls button { min-height: 36px; }
body.compact-ui table th,
body.compact-ui table td { padding: 8px 10px; }
body.compact-ui .page-ledger { gap: 8px; }
body.compact-ui .page-ledger .pill { padding-top: 8px; padding-bottom: 8px; }

.topbar-quick {
  display: block;
  min-width: 0;
}

.topbar-quick > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(126, 231, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 30, 49, 0.88), rgba(9, 17, 31, 0.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow-soft);
}

.topbar-quick > summary::-webkit-details-marker { display: none; }
.topbar-quick:not([open]) > .controls { display: none; }

.incident-overview-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .incident-overview-grid { grid-template-columns: 1fr; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), rgba(0,0,0,0.25) 40%, transparent 85%);
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

button,
input,
select,
textarea {
  font: inherit;
}

button,
.menu-btn,
.secondary,
.auth-btn,
.chip,
.pill,
.threat-card,
.tile {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

button {
  appearance: none;
  border: 1px solid rgba(126, 231, 255, 0.18);
  background: linear-gradient(180deg, rgba(15, 30, 49, 0.94), rgba(9, 17, 31, 0.96));
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow-soft);
}

button:hover,
.menu-btn:hover,
.secondary:hover,
.auth-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 231, 255, 0.32);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

button:active,
.menu-btn:active,
.secondary:active,
.auth-btn:active {
  transform: translateY(0);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.menu-btn:focus-visible,
.secondary:focus-visible,
.auth-btn:focus-visible {
  outline: 2px solid rgba(126, 231, 255, 0.8);
  outline-offset: 2px;
}

input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid rgba(126, 231, 255, 0.14);
  background: linear-gradient(180deg, rgba(10, 17, 31, 0.92), rgba(7, 13, 24, 0.98));
  color: var(--text);
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

input::placeholder,
textarea::placeholder { color: rgba(197, 214, 239, 0.42); }

textarea { resize: vertical; }

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(8px);
  background: rgba(8, 15, 28, 0.94);
  color: rgba(237, 242, 255, 0.88);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  border-bottom: 1px solid rgba(126, 231, 255, 0.1);
}

tbody tr {
  background: rgba(10, 18, 34, 0.48);
}

tbody tr:nth-child(2n) { background: rgba(8, 15, 28, 0.56); }

tbody tr:hover {
  background: rgba(16, 28, 48, 0.95);
}

.cases-table tbody tr.is-selected {
  background: linear-gradient(90deg, rgba(126, 231, 255, 0.16), rgba(16, 28, 48, 0.96));
  box-shadow: inset 3px 0 0 rgba(126, 231, 255, 0.92);
}

.cases-table tbody tr.is-selected td {
  color: var(--text);
}

.cases-table tbody tr.is-selected .ip-link {
  color: var(--accent-strong);
}

.case-detail.selected {
  border: 1px solid rgba(126, 231, 255, 0.24);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(9, 17, 31, 0.96), rgba(6, 11, 20, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), var(--shadow-soft);
}

.copilot-transcript {
  display: grid;
  gap: 10px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.copilot-bubble {
  border: 1px solid rgba(126, 231, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(9, 17, 31, 0.96), rgba(6, 11, 20, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), var(--shadow-soft);
}

.copilot-bubble.user {
  border-color: rgba(196, 181, 253, 0.2);
}

.copilot-bubble.assistant {
  border-color: rgba(126, 231, 255, 0.18);
}

.copilot-bubble .copilot-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.copilot-bubble pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.scan-table {
  min-width: 760px;
}

.scan-events {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.scan-event {
  border: 1px solid rgba(126, 231, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(9, 17, 31, 0.96), rgba(6, 11, 20, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), var(--shadow-soft);
}

.scan-event-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

#scan-catalog .pill {
  display: grid;
  gap: 4px;
  text-align: left;
  min-width: 180px;
  white-space: normal;
}

#scan-catalog .pill strong {
  font-size: 0.92rem;
}

#scan-catalog .pill .mini {
  line-height: 1.3;
}

#scans-list tr {
  cursor: pointer;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: top;
}

::selection {
  background: rgba(126, 231, 255, 0.2);
  color: var(--text);
}

.wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.side-nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  padding: 20px 16px 18px;
  background:
    linear-gradient(180deg, rgba(5, 10, 20, 0.98), rgba(6, 10, 18, 0.96)),
    radial-gradient(circle at top, rgba(126, 231, 255, 0.06), transparent 40%);
  border-right: var(--border);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.02);
}

.main-shell {
  padding: 22px 22px 36px;
  min-width: 0;
}

.side-brand,
.logo-shell,
.topbar,
.hero-grid,
.grid-two,
.controls,
.pill-list,
.chips,
.side-actions,
.side-section,
.stack {
  gap: 12px;
}

.side-brand,
.logo-shell,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-brand {
  align-items: flex-start;
  padding: 10px 8px 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  padding: 5px;
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.08), rgba(196, 181, 253, 0.1)),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(126, 231, 255, 0.14);
  box-shadow: var(--shadow-soft);
  flex: 0 0 auto;
}

.side-brand-title,
.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.side-brand-sub,
.brand-sub,
.side-note,
.footer,
.mini,
.muted,
.side-label,
.topbar .status,
.auth-help {
  color: var(--muted);
}

.side-brand-sub,
.brand-sub { line-height: 1.35; }

.side-section {
  margin-top: 18px;
  display: grid;
}

.side-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(237, 242, 255, 0.55);
}

.menu-btn {
  width: 100%;
  text-align: left;
  margin-top: 8px;
  padding: 11px 14px;
  background: rgba(10, 18, 34, 0.76);
  border: 1px solid rgba(126, 231, 255, 0.12);
  color: var(--text);
  border-radius: 12px;
}

.menu-btn.active {
  background:
    linear-gradient(135deg, rgba(126, 231, 255, 0.18), rgba(196, 181, 253, 0.12)),
    rgba(10, 18, 34, 0.96);
  border-color: rgba(126, 231, 255, 0.38);
  box-shadow: 0 10px 24px rgba(10, 18, 34, 0.4);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(10, 18, 34, 0.84), rgba(8, 14, 26, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.top-actions {
  min-width: 0;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.top-actions-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.status {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(126, 231, 255, 0.1);
  background: rgba(8, 15, 28, 0.64);
  font-size: 0.86rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status.ok {
  border-color: rgba(51, 212, 156, 0.18);
}

.status.warn {
  border-color: rgba(251, 191, 36, 0.24);
  color: rgba(255, 228, 154, 0.92);
}

.status.bad {
  border-color: rgba(251, 113, 133, 0.28);
  color: rgba(255, 188, 201, 0.95);
}

.card,
.auth-card,
.metric-card,
.box,
.threat-card,
.tile,
.alert-pill,
.pill,
.chip,
.menu-pop,
.stack .box {
  border-radius: var(--radius-lg);
}

.card,
.auth-card,
.metric-card,
.box,
.menu-pop {
  border: var(--border);
  background:
    linear-gradient(180deg, rgba(9, 17, 31, 0.86), rgba(8, 13, 24, 0.94));
  box-shadow: var(--shadow-soft);
}

.card {
  backdrop-filter: blur(12px);
}

.section {
  margin-top: 18px;
  padding: 18px;
  border: var(--border);
  background: rgba(8, 15, 28, 0.72);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

[data-view] {
  display: none;
}

[data-view].active {
  display: block;
}

.section h2,
.card h2,
.brand,
.brand-title,
.auth-topline {
  margin: 0 0 8px;
}

.hero {
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(126, 231, 255, 0.16);
  background:
    radial-gradient(circle at 15% 18%, rgba(126, 231, 255, 0.12), transparent 25%),
    radial-gradient(circle at 92% 6%, rgba(196, 181, 253, 0.13), transparent 20%),
    linear-gradient(180deg, rgba(10, 18, 34, 0.9), rgba(8, 14, 26, 0.96));
  box-shadow: 0 22px 54px rgba(0,0,0,0.42);
}

.overview-ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.page-ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.overview-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(12, 21, 38, 0.9), rgba(8, 15, 28, 0.96));
  border: 1px solid rgba(126, 231, 255, 0.12);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.page-stat {
  padding: 12px 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(12, 21, 38, 0.9), rgba(8, 15, 28, 0.96));
  border: 1px solid rgba(126, 231, 255, 0.1);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.page-stat.clickable {
  cursor: pointer;
}

.page-stat.clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 231, 255, 0.28);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.page-stat .bar {
  display: block;
  height: 3px;
  width: 38px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 231, 255, 0.7), rgba(196, 181, 253, 0.8));
  margin-bottom: 10px;
}

.page-stat .k {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(197, 214, 239, 0.62);
  font-size: 0.66rem;
}

.page-stat .v {
  display: block;
  margin-top: 8px;
  font-size: 1.04rem;
  font-weight: 700;
}

.page-stat .s {
  display: block;
  margin-top: 5px;
  color: var(--muted-soft);
  font-size: 0.8rem;
}

.page-stat.good {
  border-color: rgba(51, 212, 156, 0.2);
}

.page-stat.good .bar {
  background: linear-gradient(90deg, rgba(51, 212, 156, 0.8), rgba(72, 187, 120, 0.9));
}

.page-stat.warn {
  border-color: rgba(251, 191, 36, 0.22);
}

.page-stat.warn .bar {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.82), rgba(245, 158, 11, 0.92));
}

.page-stat.bad {
  border-color: rgba(251, 113, 133, 0.25);
}

.page-stat.bad .bar {
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.9), rgba(244, 63, 94, 0.95));
}

.overview-stat .bar {
  display: block;
  height: 3px;
  width: 42px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 231, 255, 0.7), rgba(196, 181, 253, 0.8));
  margin-bottom: 12px;
}

.overview-stat .k {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(197, 214, 239, 0.62);
  font-size: 0.69rem;
}

.overview-stat .v {
  display: block;
  margin-top: 10px;
  font-size: 1.25rem;
  font-weight: 700;
}

.overview-stat .s {
  display: block;
  margin-top: 6px;
  color: var(--muted-soft);
  font-size: 0.82rem;
}

.overview-stat.good {
  border-color: rgba(51, 212, 156, 0.2);
}

.overview-stat.good .bar {
  background: linear-gradient(90deg, rgba(51, 212, 156, 0.8), rgba(72, 187, 120, 0.9));
}

.overview-stat.warn {
  border-color: rgba(251, 191, 36, 0.22);
}

.overview-stat.warn .bar {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.82), rgba(245, 158, 11, 0.92));
}

.overview-stat.critical {
  border-color: rgba(251, 113, 133, 0.28);
  box-shadow: 0 16px 32px rgba(251, 113, 133, 0.08);
}

.overview-stat.critical .bar {
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.9), rgba(244, 63, 94, 0.95));
}

.incident-shell {
  gap: 14px;
}

.incident-graph-card,
.incident-summary-card {
  min-height: 420px;
}

.incident-canvas {
  width: 100%;
  height: auto;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 50%, rgba(126, 231, 255, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(4, 8, 18, 0.98), rgba(8, 15, 28, 0.98));
  border: 1px solid rgba(126, 231, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.incident-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incident-tabs .chip.active {
  border-color: rgba(126, 231, 255, 0.42);
  background: linear-gradient(135deg, rgba(126, 231, 255, 0.16), rgba(196, 181, 253, 0.14));
}

.incident-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(11, 19, 34, 0.92), rgba(7, 12, 23, 0.96)),
    radial-gradient(circle at top right, rgba(126, 231, 255, 0.08), transparent 32%);
  border: 1px solid rgba(126, 231, 255, 0.12);
  box-shadow: var(--shadow-soft);
}

.incident-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: rgba(197, 214, 239, 0.58);
}

.incident-ip {
  margin-top: 8px;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.incident-meta-row,
.incident-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.incident-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.incident-action-bar .secondary {
  border-color: rgba(126, 231, 255, 0.14);
  background: rgba(255,255,255,0.02);
}

.incident-hero-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.incident-hero-kpi,
.incident-signal,
.incident-detail-card {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(8, 15, 28, 0.86);
  border: 1px solid rgba(126, 231, 255, 0.1);
}

.incident-hero-kpi .k,
.incident-signal .k {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(197, 214, 239, 0.58);
  font-size: 0.66rem;
}

.incident-hero-kpi .v,
.incident-signal .v {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.incident-hero-kpi {
  min-height: 86px;
}

.incident-signal-strip {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  margin-top: 12px;
}

.incident-signal.good { border-color: rgba(51, 212, 156, 0.18); }
.incident-signal.warn { border-color: rgba(251, 191, 36, 0.22); }
.incident-signal.critical { border-color: rgba(251, 113, 133, 0.25); }

.incident-signal .s {
  display: block;
  margin-top: 8px;
  color: var(--muted-soft);
  font-size: 0.82rem;
}

.incident-detail-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.incident-inline-list {
  display: grid;
  gap: 8px;
}

.incident-detail-card .row {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.incident-detail-card .row:last-child {
  border-bottom: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
}

.hero h1 {
  margin: 10px 0 8px;
  line-height: 1.02;
  font-size: clamp(2rem, 3.3vw, 3.4rem);
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
}

.chips,
.pill-list,
.controls {
  display: flex;
  align-items: center;
}

.chips,
.pill-list {
  flex-wrap: wrap;
}

.chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(126, 231, 255, 0.14);
  background: rgba(8, 15, 28, 0.72);
  color: rgba(237, 242, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.chip {
  border-radius: 999px;
}

.pill {
  border-radius: 12px;
}

.pill.muted,
.chip.muted {
  color: var(--muted-soft);
}

.alert-pill,
.threat-card,
.tile {
  border: 1px solid rgba(126, 231, 255, 0.12);
  background: linear-gradient(180deg, rgba(9,17,31,0.92), rgba(8,13,24,0.96));
}

.alert-pill {
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.alert-pill.ok { border-color: rgba(51, 212, 156, 0.18); }
.alert-pill.warn { border-color: rgba(251, 191, 36, 0.22); }
.alert-pill.bad { border-color: rgba(251, 113, 133, 0.24); }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(126, 231, 255, 0.14);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.tile {
  padding: 14px;
  min-height: 90px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(126, 231, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(10, 18, 34, 0.88), rgba(8, 14, 26, 0.96));
  box-shadow: var(--shadow-soft);
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(126, 231, 255, 0.8), rgba(196, 181, 253, 0.65));
  opacity: 0.9;
}

.tile.ok { border-color: rgba(51, 212, 156, 0.18); }
.tile.ok::before { background: linear-gradient(90deg, rgba(51, 212, 156, 0.9), rgba(126, 231, 255, 0.45)); }
.tile.warn { border-color: rgba(251, 191, 36, 0.22); }
.tile.warn::before { background: linear-gradient(90deg, rgba(251, 191, 36, 0.9), rgba(249, 115, 22, 0.5)); }
.tile.bad { border-color: rgba(251, 113, 133, 0.24); }
.tile.bad::before { background: linear-gradient(90deg, rgba(251, 113, 133, 0.9), rgba(244, 63, 94, 0.5)); }
.tile .label { position: relative; z-index: 1; }
.tile .value { position: relative; z-index: 1; }
}

.tile .label,
.metric-card .mini,
.box span,
.threat-card .k,
.auth-topline {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: rgba(197, 214, 239, 0.66);
}

.tile .value,
.metric-card .footer,
.threat-card .v {
  margin-top: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.metric-card,
.box,
.threat-card {
  padding: 14px;
}

.metric-card .footer {
  font-size: 1.05rem;
}

.stack {
  display: grid;
}

.stack .box {
  display: grid;
  gap: 4px;
  min-height: 92px;
}

.stack .box strong {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.controls {
  flex-wrap: wrap;
  gap: 10px;
}

.defense-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(126, 231, 255, 0.14);
  background:
    radial-gradient(circle at top right, rgba(251, 113, 133, 0.08), transparent 28%),
    radial-gradient(circle at top left, rgba(126, 231, 255, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(11, 19, 34, 0.94), rgba(7, 12, 23, 0.98));
}

.defense-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.defense-hero-side {
  display: grid;
  gap: 10px;
}

.defense-note-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(126, 231, 255, 0.12);
  background: rgba(8, 15, 28, 0.84);
  box-shadow: var(--shadow-soft);
}

.defense-note-card .k,
.defense-note-card .v,
.defense-note-card .s {
  display: block;
}

.defense-note-card .k {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
  color: rgba(197, 214, 239, 0.58);
}

.defense-note-card .v {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.defense-note-card .s {
  margin-top: 8px;
  color: var(--muted-soft);
  font-size: 0.82rem;
}

.defense-empty-state {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(126, 231, 255, 0.14);
  background: rgba(8, 15, 28, 0.5);
}

.defense-empty-state strong,
.defense-empty-state span {
  display: block;
}

.defense-empty-state span {
  margin-top: 6px;
  color: var(--muted);
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-actions button {
  padding: 7px 10px;
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(126, 231, 255, 0.12);
  font-size: 0.74rem;
  white-space: nowrap;
}

.severity-pill.ok {
  border-color: rgba(51, 212, 156, 0.22);
  color: rgba(162, 245, 214, 0.96);
}

.severity-pill.warn {
  border-color: rgba(251, 191, 36, 0.24);
  color: rgba(255, 226, 147, 0.96);
}

.severity-pill.bad {
  border-color: rgba(251, 113, 133, 0.28);
  color: rgba(255, 183, 197, 0.96);
}

.mono-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

@media (max-width: 1180px) {
  .defense-hero,
  .grid-two {
    grid-template-columns: 1fr;
  }
}

.controls > label {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.controls input,
.controls select {
  min-width: 0;
}

.secondary {
  border: 1px solid rgba(126, 231, 255, 0.14);
  background: rgba(8, 15, 28, 0.82);
  color: var(--text);
}

.auth-shell {
  min-height: 82vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
}

.auth-topline {
  text-align: center;
  margin-bottom: 16px;
}

.auth-clearance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(126, 231, 255, 0.08);
  border: 1px solid rgba(126, 231, 255, 0.14);
  color: rgba(237, 242, 255, 0.94);
  font-size: 0.8rem;
}

.auth-fp {
  display: grid;
  place-items: center;
  margin: 18px 0;
}

.auth-field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.auth-field label {
  font-size: 0.84rem;
  color: rgba(237,242,255,0.82);
}

.auth-btn {
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(126, 231, 255, 0.24);
  background: linear-gradient(135deg, rgba(126, 231, 255, 0.18), rgba(196, 181, 253, 0.16));
  color: var(--text);
  box-shadow: 0 18px 30px rgba(8, 15, 28, 0.38);
}

.auth-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.18);
  color: #fecdd3;
}

.auth-help { margin-top: 12px; font-size: 0.86rem; text-align: center; }

.threat-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.threat-card.ok { border-color: rgba(51, 212, 156, 0.18); }
.threat-card.warn { border-color: rgba(251, 191, 36, 0.22); }
.threat-card.bad { border-color: rgba(251, 113, 133, 0.24); }

.footer {
  margin-top: 10px;
  font-size: 0.88rem;
}

.mini {
  font-size: 0.84rem;
}

.muted { color: var(--muted); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.pill-list::-webkit-scrollbar,
.controls::-webkit-scrollbar,
.side-nav::-webkit-scrollbar,
tbody::-webkit-scrollbar,
div::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.pill-list::-webkit-scrollbar-thumb,
.controls::-webkit-scrollbar-thumb,
.side-nav::-webkit-scrollbar-thumb,
tbody::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb {
  background: rgba(126, 231, 255, 0.14);
  border-radius: 999px;
  border: 2px solid rgba(5, 8, 22, 0.85);
}

.pill-list::-webkit-scrollbar-track,
.controls::-webkit-scrollbar-track,
.side-nav::-webkit-scrollbar-track,
tbody::-webkit-scrollbar-track,
div::-webkit-scrollbar-track {
  background: transparent;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 50;
}

.toast {
  min-width: 280px;
  max-width: 440px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(8, 15, 28, 0.96);
  border: 1px solid rgba(126, 231, 255, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.toast .t {
  font-weight: 700;
  margin-bottom: 4px;
}

.toast.ok { border-color: rgba(51, 212, 156, 0.22); }
.toast.warn { border-color: rgba(251, 191, 36, 0.24); }
.toast.bad { border-color: rgba(251, 113, 133, 0.24); }

.intel-dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 20px);
  width: min(1180px, calc(100vw - 28px));
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(126, 231, 255, 0.16);
  background: rgba(7, 12, 22, 0.96);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms ease, opacity 220ms ease;
  z-index: 40;
}

.intel-dock.active {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.ip-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  box-shadow: none;
}

.ip-link:hover { color: #c7f3ff; text-decoration: underline; }

pre.mono,
.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .wrap { grid-template-columns: 1fr; }
  .side-nav {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: var(--border);
  }
  .main-shell { padding: 16px; }
  .hero-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }
  .incident-hero,
  .incident-signal-strip {
    grid-template-columns: 1fr;
  }
  .topbar {
    position: relative;
    top: auto;
    flex-direction: column;
    align-items: stretch;
  }
  .top-actions {
    justify-items: stretch;
  }
  .top-actions-wrap {
    justify-content: stretch;
  }
}

@media (max-width: 760px) {
  .side-nav { padding: 14px 12px; }
  .topbar { padding: 12px; }
  .section,
  .hero {
    padding: 14px;
    border-radius: 20px;
  }
  .top-actions-wrap,
  .controls {
    gap: 8px;
  }
  input,
  select,
  textarea,
  button {
    width: 100%;
  }
  .controls > label,
  .top-actions .status,
  .chips .chip,
  .pill {
    width: auto;
  }
  .incident-hero-side {
    grid-template-columns: 1fr;
  }
  .toast-stack {
    left: 12px;
    right: 12px;
  }
  .toast {
    min-width: 0;
    width: 100%;
  }
}
