:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e8e4df;
  --accent: #1a3a4a;
  --danger: #d94f3d;
  --danger-hover: #c44333;
  --danger-soft: #fef3f1;
  --success: #1a7f5a;
  --success-soft: #edf8f2;
  --warning: #b45309;
  --warning-soft: #fff8ed;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 64px rgba(26, 26, 26, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.bg-blob-1 {
  width: 420px;
  height: 420px;
  background: rgba(26, 58, 74, 0.07);
  top: -120px;
  right: -80px;
}

.bg-blob-2 {
  width: 360px;
  height: 360px;
  background: rgba(217, 79, 61, 0.06);
  bottom: -100px;
  left: -60px;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: cardIn 0.6s var(--ease) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-header {
  padding: 24px 28px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.35s var(--ease);
}

.step.active .step-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(26, 58, 74, 0.12);
  transform: scale(1.15);
}

.step.done .step-dot {
  background: var(--success);
}

.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.3s;
}

.step.active .step-label,
.step.done .step-label {
  color: var(--text);
}

.step-line {
  flex: 0 0 32px;
  height: 2px;
  background: var(--border);
  margin-bottom: 20px;
  border-radius: 1px;
  transition: background 0.4s var(--ease);
}

.step-line.done {
  background: var(--success);
}

.card-body {
  padding: 28px;
  min-height: 320px;
  position: relative;
}

.view {
  animation: viewIn 0.4s var(--ease) both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.view.view-out {
  animation: viewOut 0.25s var(--ease) both;
}

@keyframes viewOut {
  to {
    opacity: 0;
    transform: translateX(-8px);
  }
}

.hidden {
  display: none !important;
}

h1 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.lead {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.inline-email {
  color: var(--text);
  word-break: break-all;
}

.email-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #faf9f7 0%, #f3f1ee 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.email-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.email-info {
  min-width: 0;
}

.email-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.email-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-all;
  color: var(--text);
}

.info-list {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.info-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.info-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 14px rgba(217, 79, 61, 0.25);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-hover);
  box-shadow: 0 6px 20px rgba(217, 79, 61, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: #faf9f7;
  color: var(--text);
}

.btn-primary-stay {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(26, 58, 74, 0.2);
}

.btn-primary-stay:hover:not(:disabled) {
  background: #153040;
  box-shadow: 0 6px 20px rgba(26, 58, 74, 0.25);
}

.btn-primary-stay .spinner {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: white;
}

.confirm-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--warning-soft);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 18px;
}

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fcd9d4;
}

.success-ring {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
}

.checkmark {
  width: 72px;
  height: 72px;
}

.checkmark-circle {
  stroke: var(--success);
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: drawCircle 0.5s var(--ease) 0.1s forwards;
}

.checkmark-check {
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck 0.35s var(--ease) 0.55s forwards;
}

@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.muted-note {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .card-header {
    padding: 20px 20px 0;
  }

  .card-body {
    padding: 24px 20px;
  }

  .step-label {
    font-size: 0.62rem;
  }

  .step-line {
    flex-basis: 20px;
  }
}
