@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #050812;
  --panel: #0b1220;
  --border: #1b2a42;
  --blue: #35a7ff;
  --red: #ff334f;
  --text: #eaf2ff;
  --muted: #8b9bb5;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

.matrix-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.10;
  z-index: -1;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 30px,
      #17426a 31px 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 30px,
      #17426a 31px 32px
    );
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 6%;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 18, 0.94);
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  box-shadow: 0 0 18px #ff334f33;
}

.brand h1 {
  font: 700 19px 'Orbitron', sans-serif;
  letter-spacing: 2px;
}

.brand p,
.eyebrow {
  color: var(--blue);
  font: 600 10px 'Orbitron', sans-serif;
  letter-spacing: 2px;
  margin-top: 7px;
}

.connection {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a7f3c0;
  font-size: 11px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #32ed8a;
  box-shadow: 0 0 12px #32ed8a;
}

.container {
  width: min(1180px, 90%);
  margin: 36px auto;
}

.welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.welcome h2 {
  font: 700 clamp(23px, 4vw, 34px) 'Orbitron', sans-serif;
  margin: 12px 0;
}

.welcome p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.clock {
  font: 600 18px 'Orbitron', sans-serif;
  color: var(--blue);
  white-space: nowrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card,
.panel {
  background: linear-gradient(145deg, #0d1627, #080d18);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 23px;
}

.stat-card {
  border-top: 2px solid var(--blue);
}

.stat-card.danger {
  border-top-color: var(--red);
}

.stat-card > p {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.stat-card h3 {
  font: 700 34px 'Orbitron', sans-serif;
  margin: 18px 0 10px;
}

.stat-card.danger h3 {
  color: var(--red);
}

.stat-card span,
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.panel {
  margin-bottom: 20px;
}

.alert-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-color: #ff334f66;
}

.panel h2 {
  font: 600 18px 'Orbitron', sans-serif;
  margin: 12px 0;
}

.panel p:not(.eyebrow) {
  line-height: 1.7;
}

.shield {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: 50%;
  font-size: 25px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}

.badge {
  color: #a7f3c0;
  border: 1px solid #32ed8a55;
  padding: 7px 10px;
  font-size: 10px;
  border-radius: 5px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  min-width: 520px;
}

th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

td {
  color: #dce8fa;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.primary-btn {
  background: #ff334f12;
  border: 1px solid var(--red);
  color: #ff7185;
  padding: 12px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 18px;
  transition: 0.2s;
}

.primary-btn:hover {
  background: var(--red);
  color: white;
  box-shadow: 0 0 20px #ff334f55;
}

footer {
  padding: 25px 0;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #ff001b26;
  backdrop-filter: blur(5px);
}

.flash-overlay.show {
  display: flex;
  animation: screenFlash 0.55s ease-in-out 2;
}

.flash-box {
  width: min(480px, 100%);
  text-align: center;
  padding: 35px 25px;
  background: #0a0c16;
  border: 1px solid var(--red);
  border-radius: 12px;
  box-shadow: 0 0 55px #ff001b55;
}

.warning-icon {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  margin: 0 auto 20px;
  border: 2px solid var(--red);
  color: var(--red);
  border-radius: 50%;
  font: 700 32px 'Orbitron', sans-serif;
}

.flash-box h2 {
  color: var(--red);
  font: 700 19px 'Orbitron', sans-serif;
  line-height: 1.6;
  margin: 18px 0;
}

.flash-box > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
}

@keyframes screenFlash {
  0%, 100% { background: #ff001b12; }
  50% { background: #ff001b66; }
}

body.alert-active {
  animation: pageFlash 0.3s ease-in-out 4;
}

@keyframes pageFlash {
  0%, 100% { box-shadow: inset 0 0 0 transparent; }
  50% { box-shadow: inset 0 0 80px #ff001b99; }
}

@media (max-width: 850px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 18px 5%;
  }

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

  .brand p {
    font-size: 8px;
  }

  .connection {
    font-size: 9px;
  }

  .container {
    width: 92%;
    margin-top: 25px;
  }

  .welcome {
    align-items: flex-start;
    flex-direction: column;
  }

  .clock {
    font-size: 15px;
  }

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

  .stat-card,
  .panel {
    padding: 18px;
  }
}