:root {
  color-scheme: dark;
  --bg: #07080b;
  --panel: rgba(15, 17, 23, 0.84);
  --panel-strong: rgba(22, 24, 31, 0.94);
  --line: rgba(255, 72, 72, 0.24);
  --red: #ef2e2e;
  --red-strong: #ff4545;
  --text: #f6f1f1;
  --muted: #a59ca1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 14%, rgba(239, 46, 46, 0.24), transparent 34%),
    radial-gradient(circle at 88% 72%, rgba(116, 0, 0, 0.35), transparent 38%),
    linear-gradient(135deg, #12070a 0%, var(--bg) 45%, #0d0d12 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle, black, transparent 76%);
}

.glow {
  position: fixed;
  width: 36vw;
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(82px);
  opacity: 0.35;
  pointer-events: none;
}

.glow-a { left: -8vw; top: 10vh; background: #ef2e2e; }
.glow-b { right: -8vw; bottom: 6vh; background: #7e0606; }

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: Orbitron, Inter, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(239, 46, 46, 0.55));
}

.auth-panel,
.dashboard {
  animation: lift 0.45s ease both;
}

.auth-panel {
  min-height: 72vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 42px;
}

.auth-copy h1,
.hero-card h1,
.section-title h2 {
  margin: 0;
  font-family: Orbitron, Inter, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-copy h1 {
  font-size: clamp(3.2rem, 10vw, 7.4rem);
  line-height: 0.9;
  text-shadow: 0 0 34px rgba(239, 46, 46, 0.4);
}

.auth-copy p,
.hero-card p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red-strong);
  font-weight: 900;
  text-transform: uppercase;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.signal-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: #d8cfd2;
  background: rgba(239, 46, 46, 0.08);
}

.auth-card,
.panel,
.hero-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel-strong), rgba(11, 12, 16, 0.82));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.45), 0 0 42px rgba(239, 46, 46, 0.08);
  backdrop-filter: blur(18px);
}

.auth-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 8px;
}

.back-button {
  position: absolute;
  top: 14px;
  right: 14px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  width: 38px;
  max-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  appearance: none;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

label {
  display: grid;
  gap: 10px;
  color: #d8d0d2;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  padding: 0 16px;
  outline: none;
}

input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 46, 46, 0.14);
}

.button,
.ghost {
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  background: linear-gradient(135deg, #ff4747, #a70c0c);
  box-shadow: 0 16px 38px rgba(239, 46, 46, 0.26);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.secondary,
.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.form-note {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.legal-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.legal-note a {
  color: #ffd1d1;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 209, 209, 0.32);
}

.hero-card {
  border-radius: 8px;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 22px;
}

.hero-card h1 { font-size: clamp(2rem, 5vw, 4.5rem); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.panel {
  border-radius: 8px;
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-head span { color: var(--muted); }
.panel-head strong { color: var(--red-strong); }

dl {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

dt { color: var(--muted); }
dd { margin: 0; font-weight: 900; }

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

.action-list a {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
}

.plans-section { margin-top: 42px; }

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

.plan-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: linear-gradient(160deg, rgba(24, 25, 32, 0.94), rgba(12, 12, 16, 0.88));
}

.plan-card.selected {
  border-color: rgba(255, 88, 88, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 88, 88, 0.24), 0 24px 70px rgba(239, 46, 46, 0.14);
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: -50% -30% auto;
  height: 120px;
  background: radial-gradient(circle, rgba(239, 46, 46, 0.28), transparent 68%);
}

.plan-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.plan-card .price {
  position: relative;
  font-family: Orbitron, Inter, sans-serif;
  font-size: 2rem;
  font-weight: 900;
}

.plan-card p {
  position: relative;
  color: var(--muted);
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 13, 18, 0.94);
  padding: 14px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.44);
}

.hidden { display: none !important; }

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

@media (max-width: 820px) {
  .auth-panel,
  .grid,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    align-items: stretch;
    flex-direction: column;
  }
}
