:root {
  --bg: #1a0202;
  --bg-elevated: #240303;
  --bg-panel: #3b0505;
  --bg-panel-soft: #580707;
  --line: rgba(232, 68, 44, 0.18);
  --line-strong: rgba(232, 68, 44, 0.34);
  --text: #fff3f1;
  --muted: #d9b7b3;
  --accent: #db2315;
  --accent-strong: #ee4d31;
  --accent-hot: #ff7a59;
  --success: #34d399;
  --warning: #fbbf24;
  --shadow: 0 28px 80px rgba(12, 0, 0, 0.62);
  --radius: 8px;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --sans: "Space Grotesk", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(238, 77, 49, 0.24), transparent 24rem),
    radial-gradient(circle at top right, rgba(219, 35, 21, 0.18), transparent 22rem),
    radial-gradient(circle at center, rgba(154, 18, 14, 0.12), transparent 28rem),
    linear-gradient(180deg, #0c0000 0%, #1a0202 100%);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.bg-orb {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.18;
}
.orb-a { top: -80px; left: -100px; background: #db2315; }
.orb-b { top: 80px; right: -100px; background: #ee4d31; }

a { color: inherit; text-decoration: none; }
code,
pre { font-family: var(--mono); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 1, 1, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand-logo {
  width: 82px;
  height: auto;
  filter: drop-shadow(0 0 24px rgba(238, 77, 49, 0.28));
}

.brand-kicker {
  color: var(--accent-hot);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  margin-bottom: 4px;
}

.brand strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topnav a {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255,255,255,0.01);
  transition: 0.18s ease;
}

.topnav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.03);
}

.page-shell {
  position: relative;
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 52px;
}

.hero-card,
.auth-card,
.info-card,
.panel-card,
.stats-card {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.8fr);
  gap: 20px;
  padding: 30px;
  background:
    linear-gradient(120deg, rgba(227, 27, 35, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(59, 5, 5, 0.96), rgba(21, 2, 2, 0.98));
}

.hero-copy h1,
.dashboard-hero h1,
.auth-card h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy p,
.dashboard-hero p,
.auth-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.label {
  display: inline-block;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-hot);
}

.hero-actions,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-rail {
  display: grid;
  gap: 16px;
  align-content: start;
}

.brand-spotlight,
.terminal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 1, 1, 0.56);
  padding: 18px;
}

.brand-spotlight img {
  width: min(120px, 100%);
  display: block;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 18px rgba(238,77,49,0.22));
}

.brand-spotlight strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.brand-spotlight p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.terminal-card header {
  color: var(--accent-hot);
  margin-bottom: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.terminal-card p {
  margin: 10px 0 0;
  color: #c8ffe5;
  font-size: 13px;
  line-height: 1.55;
  font-family: var(--mono);
}

.terminal-card span { color: var(--accent-hot); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
}

.dashboard-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-hero > div {
  max-width: 760px;
}

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

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  margin: 18px 0;
}

.info-card,
.panel-card,
.auth-card,
.stats-card {
  padding: 22px;
  background:
    radial-gradient(circle at top, rgba(238, 77, 49, 0.12), transparent 14rem),
    linear-gradient(180deg, rgba(59, 5, 5, 0.96), rgba(21, 2, 2, 0.98));
}

.info-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 10px;
}

.info-card p,
.helper,
.muted {
  color: var(--muted);
  line-height: 1.6;
}

.compact strong { font-size: 20px; }

.auth-shell {
  display: flex;
  justify-content: center;
  padding: 30px 0;
}

.auth-card {
  width: min(540px, 100%);
  display: grid;
  gap: 14px;
}

.auth-card.auth-wide {
  width: min(760px, 100%);
}

.auth-logo {
  width: clamp(88px, 16vw, 118px);
  display: block;
  margin: 0 auto 6px;
  filter: drop-shadow(0 0 22px rgba(238,77,49,0.26));
}

.auth-card h1 {
  font-size: clamp(28px, 4vw, 50px);
}

.auth-card .btn {
  width: 100%;
  margin-top: 4px;
}

.auth-card .helper {
  margin: 0;
}

label {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 2, 2, 0.9);
  color: var(--text);
  font: inherit;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: 1px solid rgba(238,77,49,0.42);
}

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

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 72ch;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 1, 1, 0.38);
}

.list-item strong { font-size: 16px; }
.list-item small { color: var(--muted); line-height: 1.5; }
.list-item .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.list-item.empty-state {
  min-height: 108px;
  align-content: center;
  background:
    radial-gradient(circle at top right, rgba(238, 77, 49, 0.1), transparent 12rem),
    rgba(8, 1, 1, 0.34);
}

.list-item.empty-state strong {
  font-size: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}

.pill.ok {
  color: #dbffef;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.12);
}

.pill.warn {
  color: #fff1d9;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.12);
}

.charge-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(8, 1, 1, 0.34);
}

.charge-card img {
  display: block;
  width: min(240px, 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  background: white;
  padding: 8px;
}

.charge-grid {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.cli-block {
  display: inline-flex;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.provider-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(8, 1, 1, 0.34);
  align-self: start;
}

.provider-card-head {
  display: grid;
  gap: 12px;
}

.provider-card h3 {
  margin: 0 0 6px;
}

.provider-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.provider-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.provider-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.provider-switches {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.check-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.check-item span {
  display: grid;
  gap: 4px;
}

.check-item strong {
  font-size: 15px;
  color: var(--text);
}

.check-item small {
  color: var(--muted);
  line-height: 1.45;
}

.provider-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.provider-links {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.provider-card .helper {
  margin: 0;
}

.mono-link {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.provider-doc-link {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.stats-card strong {
  display: block;
  font-size: 30px;
  margin-top: 10px;
}

.stats-card {
  min-height: 136px;
}

.hidden { display: none !important; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(10, 2, 2, 0.94);
  box-shadow: 0 16px 30px rgba(0,0,0,0.32);
}

@media (max-width: 960px) {
  .hero-card,
  .panel-grid,
  .provider-grid,
  .grid-main,
  .form-grid.two,
  .provider-form-grid,
  .charge-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav { justify-content: flex-start; }
  .page-shell { width: min(100% - 24px, 100%); }
  .provider-footer { align-items: stretch; }
}
