:root {
  --bg: #090d16;
  --bg-card: #111827;
  --bg-elevated: #182235;
  --border: #24324b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #10b981;
  --accent-hover: #059669;
  --blue: #38bdf8;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 12px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

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

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 50% -10%, #13233f 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--border);
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 66px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.radar-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2), 0 0 14px var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #04130d;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--blue);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

/* Hero & Live Scanner */
.hero {
  padding: 56px 0 36px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 860px;
  margin: 0 auto 16px;
}

.hero p.lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 720px;
  margin: 0 auto 30px;
}

.scanner-box {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: left;
}

.scanner-form {
  display: grid;
  grid-template-columns: 1fr 160px auto;
  gap: 10px;
}

@media (max-width: 720px) {
  .scanner-form {
    grid-template-columns: 1fr;
  }
}

input, select {
  background: #0b111e;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--blue);
}

.scanner-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Scan Result Panel */
.scan-result {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.hidden {
  display: none !important;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.badge-ok { background: rgba(16, 185, 129, 0.16); color: #34d399; }
.badge-warn { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-info { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 {
  font-size: 1.02rem;
  margin-bottom: 10px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

/* Dashboard Section */
.section {
  padding: 42px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

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

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

.meter-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.meter-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.meter-val {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 4px 0 8px;
}

.progress-track {
  height: 6px;
  background: #0b111e;
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}

/* Table */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Pricing */
.pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 40px rgba(16, 185, 129, 0.12);
}

.popular-tag {
  position: absolute;
  top: -12px;
  right: 18px;
  background: var(--accent);
  color: #04130d;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.price-big {
  font-size: 2.3rem;
  font-weight: 800;
  margin: 10px 0 4px;
}

.price-big span {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.feature-list {
  list-style: none;
  margin: 16px 0 22px;
  display: grid;
  gap: 9px;
  font-size: 0.9rem;
}

.feature-list li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 800;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1e293b;
  border: 1px solid var(--blue);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 100;
  max-width: 400px;
  font-size: 0.9rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 90;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 460px;
  width: 100%;
  padding: 24px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}
