@import url('https://fonts.googleapis.com/css2?family=Cabinet+Grotesk:wght@400;500;700;800;900&family=Geist+Mono:wght@400;600&display=swap');

:root {
  --green: #16a34a;
  --greenHover: #14833b;
  --green-light: #f0fdf4;
  --text: #0a0d12;
  --muted: #4b5563;
  --muted2: #6b7280;
  --line: #e8ecf1;
  --soft: #f6f8fb;
  --bg: #f0f4f8;
  --font: 'Cabinet Grotesk', system-ui, sans-serif;
  --mono: 'Geist Mono', monospace;
}

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

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(22,163,74,.08) 0%, transparent 60%),
    linear-gradient(160deg, #dde6f0 0%, #eaf0f6 30%, #f4f7fa 60%, #ffffff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  width: 100%;
  max-width: 440px;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ── BRAND ── */
.auth-brand {
  margin-bottom: 4px;
}

.auth-brand a {
  display: block;
  text-decoration: none;
}

.auth-logo {
  height: 36px;
  width: auto;
  display: block;
}

/* ── CARD ── */
.auth-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 8px 40px rgba(10,20,40,.09), 0 1px 4px rgba(10,20,40,.04);
}

/* ── HEADER ── */
.auth-header {
  margin-bottom: 24px;
  text-align: center;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green-light);
  border: 1px solid rgba(22,163,74,.25);
  color: #15803d;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22,163,74,.2); }
  50% { box-shadow: 0 0 0 6px rgba(22,163,74,.06); }
}

.auth-header h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  margin: 0 0 8px;
  color: var(--text);
}

.auth-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ── FORM ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.field input {
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}

.field input::placeholder { color: var(--muted2); }

.field-hint {
  font-size: 12px;
  color: var(--muted2);
}

.field-hint-link {
  text-decoration: none;
  color: var(--green);
  font-weight: 600;
  align-self: flex-end;
  margin-top: -2px;
}

.field-hint-link:hover { color: var(--greenHover); }

/* ── ERROR ── */
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #dc2626;
  line-height: 1.5;
}

.auth-error a { color: #dc2626; font-weight: 700; }

/* ── BUTTON ── */
.btn-auth {
  height: 50px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s;
  margin-top: 4px;
  text-decoration: none;
}

.btn-auth:hover:not(:disabled) {
  background: var(--greenHover);
  box-shadow: 0 6px 24px rgba(22,163,74,.25);
  transform: translateY(-1px);
}

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

/* ── SPINNER ── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.loading-spinner-lg {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}

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

/* ── TERMS ── */
.auth-terms {
  font-size: 12px;
  color: var(--muted2);
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

.auth-terms a { color: var(--muted2); }
.auth-terms a:hover { color: var(--text); }

/* ── SUCCESS ── */
.auth-success {
  text-align: center;
  padding: 8px 0;
}

.success-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.auth-success h2 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 12px;
  letter-spacing: -0.4px;
}

.auth-success p {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.6;
}

.success-sub { font-size: 14px !important; }

.success-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-light);
  border: 1px solid rgba(22,163,74,.2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #15803d;
  font-weight: 500;
  margin-top: 16px;
  text-align: left;
}

/* ── FOOTER ── */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.auth-footer a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer a:hover { color: var(--greenHover); }

/* ── TRUST BAR ── */
.auth-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted2);
  font-weight: 500;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── DOWNLOAD PAGE ── */
.download-card {
  text-align: center;
}

.download-header {
  margin-bottom: 24px;
}

.download-check {
  width: 56px;
  height: 56px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(22,163,74,.3);
}

.download-header h1 {
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.plan-badge-box {
  border: 1.5px solid var(--green);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: var(--green-light);
}

.plan-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #15803d;
  font-family: var(--mono);
}

.plan-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  background: var(--text);
  color: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  text-decoration: none;
  margin-bottom: 24px;
  transition: all .15s;
  box-shadow: 0 8px 28px rgba(10,20,40,.15);
}

.btn-download:hover {
  background: #1a2030;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(10,20,40,.2);
}

.download-icon {
  font-size: 22px;
  font-weight: 900;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-label {
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.download-sub {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  text-align: left;
  margin-top: 2px;
  font-family: var(--mono);
}

/* ── INSTRUCTIONS ── */
.instructions {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
  text-align: left;
}

.instructions-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 14px;
  font-family: var(--mono);
}

.step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.step-row:last-child { margin-bottom: 0; }

.step-num {
  width: 22px;
  height: 22px;
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.step-row strong { color: var(--text); }

/* ── DOWNLOAD FOOTER ── */
.download-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.download-footer-links a {
  font-size: 13px;
  color: var(--muted2);
  text-decoration: none;
  font-weight: 600;
}

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

.signout-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted2);
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}

.signout-btn:hover { color: var(--text); }

.lock-icon { font-size: 40px; margin-bottom: 12px; }
