@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #0b0f14;
  --panel: #0f1623;
  --panel-2: #141d2b;
  --ink: #e7f0ff;
  --muted: #8a97ab;
  --accent: #36f6ff;
  --accent-2: #7dffb2;
  --danger: #ff6b6b;
  --warning: #ffb84d;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(54, 246, 255, 0.08), transparent 60%),
    radial-gradient(800px 400px at 80% 0%, rgba(125, 255, 178, 0.08), transparent 60%),
    linear-gradient(135deg, #090d13 0%, #0c1220 45%, #0a1018 100%);
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  padding: 32px 36px 64px;
  position: relative;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(54, 246, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 246, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.2;
  pointer-events: none;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-radius: var(--radius);
  background: rgba(15, 22, 35, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(54, 246, 255, 0.12);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand span {
  font-size: 12px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-links a.active {
  background: rgba(54, 246, 255, 0.15);
  border-color: rgba(54, 246, 255, 0.4);
  color: var(--accent);
}

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

.btn {
  border: none;
  background: linear-gradient(120deg, rgba(54, 246, 255, 0.3), rgba(125, 255, 178, 0.3));
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(54, 246, 255, 0.18);
  border: 1px solid rgba(54, 246, 255, 0.25);
}

.btn.secondary {
  background: linear-gradient(120deg, rgba(255, 107, 107, 0.35), rgba(255, 184, 77, 0.35));
  border-color: rgba(255, 107, 107, 0.35);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(54, 246, 255, 0.25);
  box-shadow: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(54, 246, 255, 0.12);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(125, 255, 178, 0.08);
  pointer-events: none;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.card strong {
  font-size: 28px;
}

.section {
  margin-top: 32px;
}

.section h2 {
  font-size: 18px;
  margin: 0 0 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(54, 246, 255, 0.1);
}

.table.compact th,
.table.compact td {
  padding: 10px 8px;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge.ok {
  background: rgba(125, 255, 178, 0.18);
  color: var(--accent-2);
  border-color: rgba(125, 255, 178, 0.4);
}

.badge.off {
  background: rgba(255, 107, 107, 0.18);
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.4);
}

.badge.neutral {
  background: rgba(231, 240, 255, 0.12);
  color: var(--muted);
  border-color: rgba(231, 240, 255, 0.2);
}

.table th,
.table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(231, 240, 255, 0.08);
  font-size: 14px;
}

.table th {
  background: var(--panel-2);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.table tr:last-child td {
  border-bottom: none;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(231, 240, 255, 0.15);
  font-size: 14px;
  background: rgba(15, 22, 35, 0.9);
  color: var(--ink);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(54, 246, 255, 0.15);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(54, 246, 255, 0.35);
}

.tag.soft {
  background: rgba(231, 240, 255, 0.08);
  color: var(--muted);
  border-color: rgba(231, 240, 255, 0.16);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(54, 246, 255, 0.12);
}

.meta-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-shell {
  max-width: 420px;
  margin: 12vh auto 0;
  padding: 32px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(54, 246, 255, 0.18);
}

.login-shell h2 {
  margin: 0 0 12px;
}

.footer {
  margin-top: 40px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }
}
