:root {
  --bg: #0b0b12;
  --bg-soft: #121420;
  --panel: rgba(18, 20, 32, 0.9);
  --panel-border: rgba(255, 255, 255, 0.08);
  --card: #141827;
  --card-solid: #171b2b;
  --text: #f4f4f9;
  --muted: #b5b8c9;
  --purple: #8b5cf6;
  --purple-strong: #7c3aed;
  --purple-soft: rgba(139, 92, 246, 0.2);
  --success: #22c55e;
  --error: #f87171;
  --warning: #fbbf24;
  --shadow: 0 20px 40px rgba(15, 16, 24, 0.5);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(139, 92, 246, 0.18), transparent 35%),
    linear-gradient(180deg, #090a10 0%, #0b0b12 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 24px;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), #c084fc);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.app-container {
  display: grid;
  place-items: center;
}

.section {
  display: none;
  width: 100%;
  max-width: 520px;
  animation: fadeIn 0.25s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: rgba(20, 24, 39, 0.92);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 62px 28px;
  text-align: center;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #d8c6ff;
  margin-bottom: 18px;
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.1;
}

.hero-card p {
  margin: 18px auto 0;
  max-width: 400px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.04rem;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.form-card,
.dashboard-card {
  padding: 24px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.8rem;
}

.message {
  min-height: 22px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.message.success {
  color: var(--success);
}

.message.error {
  color: var(--error);
}

.field-group {
  margin-bottom: 16px;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.field-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text);
  padding: 14px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input:focus {
  border-color: rgba(139, 92, 246, 0.9);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.btn {
  border: none;
  border-radius: 12px;
  font-weight: 600;
  padding: 14px 18px;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-strong));
  color: #fff;
  box-shadow: 0 12px 22px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.full-width {
  width: 100%;
}

.small-btn {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.mt-8 {
  margin-top: 8px;
}

.otp-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.otp-label {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

#otpCodeInput {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text);
  padding: 14px 14px;
  text-align: center;
  letter-spacing: 0.24em;
  font-size: 1.6rem;
  font-weight: 700;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dashboard-head h2 {
  font-size: 1.6rem;
}

.status-badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: #d9c5ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.dashboard-actions {
  margin-top: 18px;
}

.test-email-panel {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}

.hidden {
  display: none !important;
}

@media (max-width: 580px) {
  .page-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-card {
    padding: 44px 20px;
  }

  .form-card,
  .dashboard-card {
    padding: 18px;
  }

  .dashboard-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn {
    width: 100%;
  }
}
