:root {
  --bg: #0a0e1a;
  --bg2: #111827;
  --bg3: #1f2937;
  --border: #2d3748;
  --accent: #00d4aa;
  --accent2: #0099ff;
  --danger: #ff4455;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --radius: 10px;
}

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

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

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

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.nav-links { display: flex; gap: 1rem; align-items: center; }
.nav-links a { color: var(--text2); font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--accent); color: #000; }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }

/* ── CARDS ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ── FORMS ── */
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-size: 0.85rem; color: var(--text2); }
.field input, .field select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus { border-color: var(--accent); }

/* ── BADGE ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: rgba(0,212,170,0.15); color: var(--accent); }
.badge-blue { background: rgba(0,153,255,0.15); color: var(--accent2); }
.badge-red { background: rgba(255,68,85,0.15); color: var(--danger); }
.badge-gray { background: var(--bg3); color: var(--text2); }

/* ── TABLE ── */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--text2); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── ALERT ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert-error { background: rgba(255,68,85,0.1); border: 1px solid rgba(255,68,85,0.3); color: var(--danger); }
.alert-success { background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.3); color: var(--accent); }

/* ── CONTAINER ── */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── STATS ROW ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--text2); margin-top: 0.2rem; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
}
.modal h2 { margin-bottom: 1.5rem; font-size: 1.1rem; }

/* ── SPINNER ── */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── HERO (landing) ── */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,212,170,0.08) 0%, transparent 70%);
}
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 1.2rem; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.15rem; color: var(--text2); max-width: 540px; margin-bottom: 2.5rem; line-height: 1.6; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 6rem; }
.feature { text-align: left; }
.feature-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.feature h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.feature p { font-size: 0.9rem; color: var(--text2); line-height: 1.5; }

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header h2 { font-size: 1.2rem; }

/* ── LIVE VIEW ── */
.live-container { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
.live-feed { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.live-feed img { width: 100%; height: 100%; object-fit: contain; }
.live-panel { display: flex; flex-direction: column; gap: 1rem; }
.live-counter { font-size: 3rem; font-weight: 800; color: var(--accent); text-align: center; }
.live-label { text-align: center; font-size: 0.85rem; color: var(--text2); }

@media (max-width: 768px) {
  .live-container { grid-template-columns: 1fr; }
}

/* ── REPORT ── */
.report-body {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}
