/*
 * YatGo — Auth Pages Stylesheet (Redesign)
 * Matches brand: navy #1b2a4a, green #2e7d32, Outfit font
 * Mobile-first; logo always visible
 */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: "Outfit", sans-serif;
  background: var(--off-white, #f5f7fa);
  color: #3d4a5c;
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
ul {
  list-style: none;
}

/* ── CSS Variables (mirrors global style.css) ─────────── */
:root {
  --navy: #1b2a4a;
  --navy-deep: #111e35;
  --navy-mid: #1e3156;
  --navy-pale: #eef1f7;
  --green: #2e7d32;
  --green-light: #388e3c;
  --green-dark: #1b5e20;
  --green-pale: #e8f5e9;
  --green-mid: #c8e6c9;
  --green-bright: #4caf50;
  --white: #ffffff;
  --off-white: #f5f7fa;
  --grey-light: #edf0f5;
  --grey-mid: #b0bac8;
  --grey-text: #6b7a96;
  --text-dark: #1a2238;
  --text-body: #3d4a5c;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(27, 42, 74, 0.08);
  --shadow-md: 0 6px 24px rgba(27, 42, 74, 0.12);
  --shadow-lg: 0 16px 48px rgba(27, 42, 74, 0.18);
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════
   AUTH WRAPPER
═══════════════════════════════════════════════════════ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar: logo + back link (mobile-first, always shown) ── */
.auth-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 200;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}
.auth-topbar-logo img {
  height: 36px;
}
.auth-topbar-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}
.auth-topbar-link:hover {
  color: var(--white);
}
.auth-topbar-link svg {
  flex-shrink: 0;
}

/* ── Main content starts below topbar ─────────────────── */
.auth-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr; /* mobile: single column */
  min-height: 100vh;
  padding-top: 64px; /* clear topbar */
}

/* ── Brand panel (hidden on mobile, shown ≥ 960px) ─────── */
.auth-brand {
  display: none;
  background: var(--navy-deep);
  position: relative;
  overflow: hidden;
  padding: 64px 52px 52px;
  flex-direction: column;
  justify-content: space-between;
}
.auth-brand-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.auth-brand-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(46, 125, 50, 0.2) 0%,
    transparent 65%
  );
  pointer-events: none;
}
.auth-brand-glow2 {
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(76, 175, 80, 0.12) 0%,
    transparent 65%
  );
  pointer-events: none;
}
.auth-brand-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-brand-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.auth-brand-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-bright);
  animation: dotPulse 2.2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.65);
  }
}
.auth-brand-headline {
  font-size: clamp(1.9rem, 2.6vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.auth-brand-headline span {
  color: var(--green-bright);
}
.auth-brand-desc {
  font-size: 0.93rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.75;
  max-width: 340px;
  margin-bottom: 36px;
}
.auth-brand-pills {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.auth-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}
.auth-brand-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-bright);
  flex-shrink: 0;
}
.auth-brand-foot {
  position: relative;
  z-index: 1;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.22);
  margin-top: 48px;
}

/* ── Form panel ────────────────────────────────────────── */
.auth-form-panel {
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px 56px;
  overflow-y: auto;
}
.auth-form-inner {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

/* Page eyebrow */
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}
.auth-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.auth-form-inner h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.auth-subtitle {
  font-size: 0.9rem;
  color: var(--grey-text);
  margin-bottom: 28px;
  line-height: 1.55;
}
.auth-subtitle a {
  color: var(--green);
  font-weight: 600;
}

/* ── Form fields ────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
}
.auth-field {
  margin-bottom: 16px;
}
.auth-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}
.auth-input-wrap {
  position: relative;
}
.auth-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-mid);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color var(--transition);
}
.auth-input-wrap:focus-within .auth-icon {
  color: var(--green);
}
.auth-input {
  width: 100%;
  padding: 12px 40px 12px 40px;
  border: 1.5px solid var(--grey-light);
  border-radius: 10px;
  font-family: "Outfit", sans-serif;
  font-size: 0.94rem;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--off-white);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.auth-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
  background: var(--white);
}
.auth-input.is-error {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.08);
}
.auth-input::placeholder {
  color: var(--grey-mid);
}
.auth-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--grey-mid);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}
.auth-toggle-pw:hover {
  color: var(--navy);
}
/* select */
.auth-select-wrap {
  position: relative;
}
.auth-select-wrap .auth-input {
  cursor: pointer;
  padding-right: 34px;
}
.auth-select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--grey-mid);
}
/* textarea */
.auth-input.is-textarea {
  min-height: 100px;
  resize: vertical;
  padding-top: 12px;
}
.auth-field-hint {
  font-size: 0.78rem;
  color: var(--grey-text);
  margin-top: 5px;
  line-height: 1.5;
}
.auth-field-error {
  font-size: 0.76rem;
  color: #c62828;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 2-col field row ────────────────────────────────────── */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Password strength ──────────────────────────────────── */
.strength-wrap {
  margin-top: 7px;
}
.strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--grey-light);
  transition: background 0.3s;
}
.strength-bar.weak {
  background: #e53935;
}
.strength-bar.fair {
  background: #fb8c00;
}
.strength-bar.good {
  background: #fdd835;
}
.strength-bar.strong {
  background: var(--green);
}
.strength-label {
  font-size: 0.73rem;
  color: var(--grey-text);
}

/* ── Checkbox ────────────────────────────────────────────── */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
}
.auth-check input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--green);
  cursor: pointer;
}
.auth-check-lbl {
  font-size: 0.84rem;
  color: var(--grey-text);
  line-height: 1.55;
  cursor: pointer;
}
.auth-check-lbl a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
}

/* ── Remember + forgot ──────────────────────────────────── */
.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  color: var(--grey-text);
  cursor: pointer;
}
.auth-remember input {
  accent-color: var(--green);
}
.auth-forgot {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
}
.auth-forgot:hover {
  color: var(--green-dark);
}

/* ── Submit button ──────────────────────────────────────── */
.auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: var(--transition);
  margin-top: 6px;
}
.auth-btn-green {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.3);
}
.auth-btn-green:hover {
  background: var(--green-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}
.auth-btn-navy {
  background: var(--navy-deep);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(17, 30, 53, 0.3);
}
.auth-btn-navy:hover {
  background: var(--navy);
  transform: translateY(-1px);
}
.auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Alerts ─────────────────────────────────────────────── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 18px;
}
.auth-alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-alert.error {
  background: #fdf2f2;
  border: 1px solid #f5c6c6;
  color: #b71c1c;
}
.auth-alert.success {
  background: #f0faf0;
  border: 1px solid var(--green-mid);
  color: #1b5e20;
}
.auth-alert.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.auth-alert.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ── Or divider ─────────────────────────────────────────── */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--grey-mid);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--grey-light);
}

/* ── Switch link ────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: 0.875rem;
  color: var(--grey-text);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--grey-light);
}
.auth-switch a {
  color: var(--green);
  font-weight: 700;
}

/* ── Role selector (signup landing) ────────────────────── */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.role-card {
  position: relative;
  cursor: pointer;
}
.role-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.role-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 14px;
  border: 2px solid var(--grey-light);
  border-radius: 14px;
  cursor: pointer;
  transition:
    border-color 0.22s,
    background 0.22s,
    box-shadow 0.22s;
}
.role-card input:checked + .role-label {
  border-color: var(--green);
  background: var(--green-pale);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}
.role-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--navy-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s;
}
.role-card input:checked + .role-label .role-icon-wrap {
  background: var(--green);
}
.role-icon-wrap svg {
  stroke: var(--navy);
}
.role-card input:checked + .role-label .role-icon-wrap svg {
  stroke: var(--white);
}
.role-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}
.role-desc {
  font-size: 0.76rem;
  color: var(--grey-text);
  line-height: 1.4;
}
.role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge-free {
  background: var(--green-pale);
  color: var(--green);
}
.badge-earn {
  background: var(--navy-pale);
  color: var(--navy);
}

/* ── Step indicator (driver signup) ────────────────────── */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.step {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--grey-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--grey-mid);
  flex-shrink: 0;
  transition: all 0.25s;
}
.step.active .step-num {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}
.step.done .step-num {
  border-color: var(--green);
  background: var(--green-pale);
  color: var(--green);
}
.step-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--grey-mid);
  white-space: nowrap;
}
.step.active .step-lbl {
  color: var(--navy);
}
.step.done .step-lbl {
  color: var(--green);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--grey-light);
  margin: 0 5px;
  border-radius: 1px;
  transition: background 0.25s;
}
.step-line.done {
  background: var(--green);
}

/* ── File upload zone ───────────────────────────────────── */
.file-zone {
  border: 2px dashed var(--grey-light);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  position: relative;
}
.file-zone:hover,
.file-zone.over {
  border-color: var(--green);
  background: var(--green-pale);
}
.file-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-zone-text {
  font-size: 0.85rem;
  color: var(--grey-text);
  line-height: 1.5;
  pointer-events: none;
}
.file-zone-text strong {
  color: var(--green);
}
.file-zone-name {
  font-size: 0.8rem;
  color: var(--navy);
  font-weight: 600;
  margin-top: 5px;
}

/* ── Success screen ────────────────────────────────────── */
.auth-success {
  text-align: center;
  padding: 16px 0;
}
.auth-success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: var(--white);
  margin: 0 auto 18px;
}
.auth-success h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.auth-success p {
  font-size: 0.9rem;
  color: var(--grey-text);
  line-height: 1.7;
  max-width: 360px;
  margin: 0 auto 24px;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */

/* ≥ 960px: show brand panel side by side */
@media (min-width: 960px) {
  .auth-body {
    grid-template-columns: 1fr 1fr;
  }
  .auth-brand {
    display: flex;
  }
  .auth-form-panel {
    padding: 56px 64px;
  }
  .auth-topbar {
    display: none;
  } /* topbar hidden — brand panel shows logo */
  .auth-body {
    padding-top: 0;
  }
}

/* Medium phone */
@media (max-width: 540px) {
  .auth-row {
    grid-template-columns: 1fr;
  }
  .role-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .step-line {
    display: none;
  }
}
@media (max-width: 380px) {
  .auth-form-panel {
    padding: 32px 16px 48px;
  }
  .auth-form-inner h1 {
    font-size: 1.5rem;
  }
}
