* {
  box-sizing: border-box;
}

:root {
  --bg: #07111f;
  --panel: #0d1b2e;
  --panel2: #101f34;
  --text: #e8f1ff;
  --muted: #89a2c0;
  --line: rgba(255,255,255,.09);
  --accent: #65b7ff;
  --good: #62e6a6;
  --warn: #ffd166;
  --bad: #ff6b6b;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(101,183,255,.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(98,230,166,.08), transparent 30%),
    var(--bg);
  color: var(--text);
}

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

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

.side {
  border-right: 1px solid var(--line);
  padding: 24px;
  background: rgba(5,12,24,.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 34px;
}

.sigil {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(101,183,255,.45);
  border-radius: 18px;
  color: var(--accent);
  box-shadow: 0 0 30px rgba(101,183,255,.18);
  font-weight: 800;
  letter-spacing: .08em;
}

.brand h1, .brand p {
  margin: 0;
}

.brand h1 {
  font-size: 21px;
}

.brand p {
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: grid;
  gap: 10px;
}

.nav, button, .ghost {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: .16s ease;
}

.nav {
  text-align: left;
}

.nav:hover, button:hover, .ghost:hover {
  border-color: rgba(101,183,255,.55);
  background: rgba(101,183,255,.09);
}

.nav.active {
  background: linear-gradient(135deg, rgba(101,183,255,.2), rgba(98,230,166,.08));
  border-color: rgba(101,183,255,.55);
}

.status-card {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
}

.status-card p, .status-card strong {
  margin: 0;
}

.status-card p {
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 20px var(--warn);
}

.dot.good {
  background: var(--good);
  box-shadow: 0 0 20px var(--good);
}

.dot.bad {
  background: var(--bad);
  box-shadow: 0 0 20px var(--bad);
}

.main {
  padding: 28px;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.top h2, .top p {
  margin: 0;
}

.top h2 {
  font-size: 32px;
}

.top p {
  color: var(--muted);
  margin-top: 5px;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.grid.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric, .panel {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 32px;
  margin-top: 8px;
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.panel h3 {
  margin-top: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
}

.form {
  display: grid;
  gap: 14px;
  max-width: 860px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(0,0,0,.22);
  border-radius: 14px;
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid var(--line);
  background: rgba(0,0,0,.15);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
}

.item:hover {
  border-color: rgba(101,183,255,.55);
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.item h4 {
  margin: 0 0 6px;
}

.item p {
  color: var(--muted);
  margin: 0;
}

.badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(101,183,255,.12);
  color: var(--accent);
  border: 1px solid rgba(101,183,255,.25);
  font-size: 12px;
  white-space: nowrap;
}

.badge.high {
  color: var(--bad);
  border-color: rgba(255,107,107,.35);
  background: rgba(255,107,107,.1);
}

.badge.medium {
  color: var(--warn);
  border-color: rgba(255,209,102,.35);
  background: rgba(255,209,102,.1);
}

.detail-box {
  min-height: 220px;
}

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

.output {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 360px;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.output.tall {
  max-height: 70vh;
}

.small {
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 13px;
}

.filters {
  display: flex;
  gap: 9px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  background: rgba(13,27,46,.95);
  border: 1px solid rgba(101,183,255,.35);
  border-radius: 16px;
  padding: 13px 16px;
  box-shadow: var(--shadow);
  transition: .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side {
    position: relative;
    height: auto;
  }

  .status-card {
    position: static;
    margin-top: 20px;
  }

  .grid.cards {
    grid-template-columns: 1fr 1fr;
  }

  .top, .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .grid.cards, .row {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 18px;
  }
}
