/* =========================================================
   auth.css — Signup, Login, Forgot Password Pages
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --auth-bg: #f0f4ff;
  --auth-card-bg: #ffffff;
  --accent: #ff5a3c;
  --accent-2: #ff8a3d;
  --navy: #0b1736;
  --ink: #1a2547;
  --ink-soft: #4b5879;
  --muted: #6b7693;
  --line: #e8ecf3;
  --ok: #16a34a;
  --err: #dc2626;
  --warn: #f59e0b;
  --shadow: 0 20px 60px rgba(11,23,54,.12), 0 8px 20px rgba(11,23,54,.06);
  --radius: 16px;
}

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

body.auth-page {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--auth-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Transparent header ---- */
.header--transparent {
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  border-bottom: none;
}
.header--transparent .header__inner {
  padding-top: 20px;
  padding-bottom: 20px;
}

/* ---- Logo ---- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo__text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--navy);
}
.logo__text span { color: var(--accent); }
.logo__text--light { color: #fff; }
.logo__text--light span { color: var(--accent-2); }

/* ---- Auth main ---- */
.auth-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 48px;
  position: relative;
}
.auth-main::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,90,60,.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-main::after {
  content: '';
  position: fixed;
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,138,61,.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ---- Auth card ---- */
.auth-card {
  background: var(--auth-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

/* ---- Brand header ---- */
.auth-brand { margin-bottom: 24px; }
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--navy);
}
.auth-logo span { color: var(--accent); }

/* ---- Title & subtitle ---- */
.auth-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 6px;
  letter-spacing: -.02em;
}
.auth-subtitle {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ---- Alerts ---- */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
}
.auth-alert--error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.auth-alert--success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ---- Form ---- */
.auth-form { display: flex; flex-direction: column; gap: 4px; }

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-row label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-row label a { font-weight: 500; color: var(--accent); }
.forgot-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* Input wrapper */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}
.input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input-wrap input::placeholder { color: var(--muted); }
.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,90,60,.1);
}
.input-wrap input.has-error {
  border-color: var(--err);
  box-shadow: 0 0 0 4px rgba(220,38,38,.1);
}

/* Toggle password */
.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color .12s;
}
.toggle-pass:hover { color: var(--ink); }

/* Field error */
.field-error {
  font-size: 12px;
  color: var(--err);
  font-weight: 600;
  display: none;
}
.field-error.is-visible { display: block; }

/* Help text */
.help-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---- Phone row ---- */
.phone-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
}
.country-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.country-select-wrap select {
  width: 100%;
  padding: 13px 30px 13px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.country-select-wrap select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,90,60,.1);
}
.country-select-wrap .select-arrow {
  position: absolute;
  right: 10px;
  color: var(--muted);
  pointer-events: none;
}
.phone-input-wrap input { padding-left: 42px !important; }

/* ---- Password strength ---- */
.pass-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}
.strength-bars .bar {
  height: 4px;
  flex: 1;
  background: var(--line);
  border-radius: 2px;
  transition: background .2s;
}
.strength-bars .bar.active-weak { background: #dc2626; }
.strength-bars .bar.active-fair { background: #f59e0b; }
.strength-bars .bar.active-good { background: #3b82f6; }
.strength-bars .bar.active-strong { background: #16a34a; }
.strength-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* ---- Checkbox ---- */
.form-row--check { margin-bottom: 8px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.5;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}
.checkbox-label a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Submit button ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 0;
  transition: transform .15s, box-shadow .2s, background .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 20px rgba(255,90,60,.3);
  margin-top: 8px;
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255,90,60,.38);
}
.btn--primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.btn--block { width: 100%; }

.btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- OAuth ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.oauth-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn--oauth {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 16px;
  gap: 8px;
}
.btn--oauth:hover {
  border-color: var(--ink);
  background: #f8f9fc;
  transform: none;
  box-shadow: none;
}

/* ---- Auth footer ---- */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.auth-footer a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ---- Trust badges ---- */
.auth-trust {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 600;
}
.trust-item svg { color: var(--ok); }

/* ---- Features strip ---- */
.features-strip {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 24px 0;
  margin-top: 48px;
  width: 100%;
}
.features-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.fs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 32px;
}
.fs-item .fs-icon {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}
.fs-item span:last-child {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.fs-divider {
  width: 1px;
  height: 40px;
  background: var(--line);
}

/* ---- Auth footer ---- */
.footer--auth { background: transparent; border: none; padding-top: 0; }
.footer__bottom--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer__bottom--centered p { color: var(--muted); font-size: 13px; margin: 0; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { color: var(--muted); font-size: 13px; font-weight: 600; }
.footer__links a:hover { color: var(--accent); text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 540px) {
  .auth-card { padding: 28px 20px; border-radius: 12px; }
  .auth-title { font-size: 22px; }
  .phone-row { grid-template-columns: 1fr; }
  .oauth-buttons { grid-template-columns: 1fr; }
  .fs-item { padding: 8px 16px; }
  .auth-trust { gap: 12px; }
}
