/* ============================================================
   LOGIN PAGE — reuses tokens from parking-form.css
   ============================================================ */

/* PAGE WRAPPER */
.login-page {
  background: var(--surface-page);
  min-height: calc(100vh - 60px - 34px);      /* subtract navbar + utility bar */
  padding: var(--sp-40) var(--sp-40);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.login-layout {
  width: 100%;
  max-width: 1240px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0,30,48,0.14);
  overflow: hidden;
  border: 1px solid var(--border-card);
}

/* Single-column auth — no marketing hero */
.login-layout--simple {
  grid-template-columns: 1fr;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.login-page:has(.login-layout--simple) {
  align-items: center;
}
.login-layout--simple .login-panel {
  padding: 40px 36px;
}
.login-layout--simple .login-panel__head {
  margin-bottom: var(--sp-24);
}
.login-panel__title--plain {
  font-family: var(--alias-font-heading);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

/* =====================================================
   LEFT: HERO / BRAND IMAGE PANEL
   ===================================================== */
.login-hero {
  position: relative;
  min-height: 640px;
  color: var(--text-on-dark);
  overflow: hidden;
  background-image: url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?auto=format&fit=crop&w=1400&q=80');
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.login-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0,30,48,0.88) 0%, rgba(1,51,78,0.82) 45%, rgba(225,126,41,0.60) 100%);
  z-index: 1;
}

.login-hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-32);
}

/* BADGE */
.login-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  align-self: flex-start;
  padding: 8px 14px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-pill);
  font-family: var(--alias-font-body);
  font-size: 11px;
  font-weight: var(--brand-weight-bold);
  letter-spacing: 0.16em;
  color: var(--alias-white);
  backdrop-filter: blur(4px);
}
.login-hero__badge svg {
  width: 14px;
  height: 14px;
  fill: var(--alias-accent-default);
}

/* TITLE + SUB */
.login-hero__title {
  font-family: var(--alias-font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: var(--brand-weight-extrabold);
  color: var(--alias-white);
  margin: 0 0 var(--sp-16);
}
.login-hero__title em {
  font-style: italic;
  color: var(--alias-accent-muted);
  font-weight: var(--brand-weight-semibold);
}

.login-hero__sub {
  font-family: var(--alias-font-body);
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
  margin: 0 0 var(--sp-24);
  max-width: 460px;
}

/* FEATURES LIST */
.login-hero__features {
  list-style: none;
  margin: 0 0 var(--sp-16);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-14);
}
.login-hero__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-12);
  font-family: var(--alias-font-body);
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
  font-weight: var(--brand-weight-medium);
}
.login-hero__feature-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--alias-accent-default);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(225,126,41,0.4);
}
.login-hero__feature-icon svg {
  width: 13px;
  height: 13px;
  fill: var(--alias-white);
}

/* STATS ROW */
.login-hero__stats {
  display: flex;
  align-items: center;
  gap: var(--sp-20);
  padding-top: var(--sp-20);
  border-top: 1px solid rgba(255,255,255,0.2);
}
.login-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.login-hero__stat-num {
  font-family: var(--alias-font-display);
  font-size: 22px;
  font-weight: var(--brand-weight-extrabold);
  color: var(--alias-white);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.login-hero__stat-num span {
  font-size: 13px;
  font-weight: var(--brand-weight-semibold);
  color: var(--alias-accent-muted);
}
.login-hero__stat-label {
  font-family: var(--alias-font-body);
  font-size: 11px;
  font-weight: var(--brand-weight-medium);
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.login-hero__stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.22);
}

/* =====================================================
   RIGHT: LOGIN FORM PANEL
   ===================================================== */
.login-panel {
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
}

.login-panel__inner {
  width: 100%;
  max-width: 420px;
}

.login-panel__head {
  margin-bottom: var(--sp-28);
  text-align: left;
}
.login-panel__eyebrow {
  font-family: var(--alias-font-body);
  font-size: 11px;
  font-weight: var(--brand-weight-bold);
  letter-spacing: 0.18em;
  color: var(--text-accent-label);
  margin-bottom: var(--sp-8);
}
.login-panel__title {
  font-family: var(--alias-font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: var(--brand-weight-extrabold);
  color: var(--text-heading);
  margin: 0 0 var(--sp-8);
}
.login-panel__title em {
  font-style: italic;
  color: var(--text-accent);
  font-weight: var(--brand-weight-semibold);
}
.login-panel__sub {
  font-family: var(--alias-font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-caption);
  margin: 0;
}

/* FORM */
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}

/* SIGN-UP specific: two-column field row */
.login-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
}

/* SIGN-UP: terms checkbox */
.login-terms {
  align-items: flex-start;
  margin-top: var(--sp-4);
  line-height: 1.5;
}
.login-terms input[type="checkbox"] {
  margin-top: 2px;
}
.login-terms span a {
  color: var(--text-accent);
  font-weight: var(--brand-weight-semibold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.login-terms span a:hover { border-bottom-color: var(--text-accent); }

/* SIGN-UP: password strength meter */
.pw-strength {
  margin-top: var(--sp-8);
  display: none;
}
.pw-strength.is-active { display: block; }
.pw-strength__bar {
  height: 4px;
  width: 100%;
  background: var(--brand-warm-200);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.pw-strength__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: transparent;
  border-radius: var(--radius-pill);
  transition: width .25s, background .25s;
}
.pw-strength__label {
  margin-top: 6px;
  font-family: var(--alias-font-body);
  font-size: 11px;
  font-weight: var(--brand-weight-semibold);
  letter-spacing: 0.06em;
  color: var(--text-caption);
  text-transform: uppercase;
}

/* SIGN-UP hero variant: different image */
.login-hero--signup {
  background-image: url('https://images.unsplash.com/photo-1449965408869-eaa3f722e40d?auto=format&fit=crop&w=1400&q=80');
}
.login-hero--signup .login-hero__overlay {
  background:
    linear-gradient(135deg, rgba(225,126,41,0.65) 0%, rgba(1,51,78,0.85) 55%, rgba(0,30,48,0.92) 100%);
}

/* Password toggle (eye icon) */
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background .15s;
}
.password-toggle:hover {
  background: var(--brand-warm-200);
}
.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: var(--icon-muted);
}
/* Shift password input's right padding so text doesn't overlap the toggle */
.input-with-icon .form-input[type="password"],
.input-with-icon .form-input[type="text"]#loginPassword {
  padding-right: 42px;
}

/* OPTIONS ROW */
.login-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: var(--sp-4);
}
.login-remember {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  cursor: pointer;
  font-family: var(--alias-font-body);
  font-size: 13px;
  font-weight: var(--brand-weight-medium);
  color: var(--text-body);
  user-select: none;
}
.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--alias-accent-default);
  cursor: pointer;
}

/* SUBMIT BUTTON */
.login-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-10);
  margin-top: var(--sp-8);
}
.login-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s;
}
.login-submit:hover svg {
  transform: translateX(3px);
}
.login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* FOOTER NOTE */
.login-footer-note {
  margin-top: var(--sp-24);
  text-align: center;
  font-family: var(--alias-font-body);
  font-size: 13px;
  color: var(--text-caption);
}
.login-footer-note span {
  margin-right: 4px;
}
.login-footer-note a {
  color: var(--text-accent);
  font-weight: var(--brand-weight-bold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.login-footer-note a:hover {
  border-bottom-color: var(--text-accent);
}

/* =====================================================
   RESPONSIVE — TABLET (≤1199px)
   ===================================================== */
@media (max-width: 1199px) {
  .login-page {
    padding: var(--sp-32) var(--sp-24);
  }
  .login-layout {
    grid-template-columns: 1fr 1fr;
  }
  .login-hero__content {
    padding: 44px 40px;
  }
  .login-panel {
    padding: 48px 36px;
  }
  .login-hero__title {
    font-size: clamp(26px, 3vw, 36px);
  }
}

/* =====================================================
   RESPONSIVE — SMALL TABLET (≤1023px) -> stack vertically
   ===================================================== */
@media (max-width: 1023px) {
  .login-page {
    padding: var(--sp-24) var(--sp-20);
    min-height: auto;
  }
  .login-layout {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
  .login-layout.login-layout--simple {
    max-width: 440px;
  }
  .login-hero {
    min-height: 320px;
  }
  .login-hero__content {
    padding: 40px 36px;
    gap: var(--sp-24);
  }
  .login-hero__title {
    font-size: clamp(24px, 4.2vw, 34px);
  }
  .login-hero__sub {
    font-size: 14px;
  }
  .login-hero__stats {
    gap: var(--sp-16);
    padding-top: var(--sp-16);
  }
  .login-panel {
    padding: 44px 36px;
  }
  .login-panel__inner {
    max-width: 100%;
  }
}

/* =====================================================
   RESPONSIVE — MOBILE (≤767px)
   ===================================================== */
@media (max-width: 767px) {
  .login-page {
    padding: var(--sp-16) var(--sp-12);
  }
  .login-layout {
    border-radius: var(--radius-lg);
  }
  .login-hero {
    min-height: 260px;
  }
  .login-hero__content {
    padding: 32px 24px;
    gap: var(--sp-20);
  }
  .login-hero__title {
    font-size: clamp(22px, 6vw, 30px);
    margin-bottom: var(--sp-12);
  }
  .login-hero__sub {
    font-size: 13px;
    margin-bottom: var(--sp-16);
  }
  .login-hero__features {
    gap: var(--sp-10);
  }
  .login-hero__features li {
    font-size: 13px;
  }
  .login-hero__feature-icon {
    width: 22px;
    height: 22px;
  }
  .login-hero__feature-icon svg { width: 11px; height: 11px; }

  .login-hero__stats {
    flex-wrap: wrap;
    gap: var(--sp-12);
  }
  .login-hero__stat-num { font-size: 18px; }
  .login-hero__stat-label { font-size: 10px; }
  .login-hero__stat-divider { height: 28px; }

  .login-panel {
    padding: 32px 24px;
  }
  .login-panel__head {
    margin-bottom: var(--sp-20);
    text-align: center;
  }
  .login-panel__title {
    font-size: clamp(20px, 5.4vw, 24px);
  }
  .login-panel__sub {
    font-size: 13px;
  }
  .login-field-row {
    grid-template-columns: 1fr;
    gap: var(--sp-16);
  }
  .login-footer-note {
    font-size: 12px;
  }
}

/* =====================================================
   RESPONSIVE — COMPACT (≤480px)
   ===================================================== */
@media (max-width: 480px) {
  .login-page {
    padding: var(--sp-12) var(--sp-8);
  }
  .login-layout {
    border-radius: var(--radius-md);
  }
  .login-hero {
    min-height: 220px;
  }
  .login-hero__content {
    padding: 24px 20px;
  }
  .login-hero__badge {
    font-size: 10px;
    padding: 6px 11px;
  }
  .login-hero__badge svg { width: 12px; height: 12px; }

  .login-hero__features li { font-size: 12px; }
  .login-hero__stats {
    gap: var(--sp-8);
  }
  .login-hero__stat-divider { display: none; }
  .login-hero__stat { flex: 1; min-width: 72px; }

  .login-panel {
    padding: 24px 18px;
  }
  .login-panel__head { margin-bottom: var(--sp-16); }

  .login-form {
    gap: var(--sp-12);
  }

  /* Keep input font-size >=16px on iOS to prevent zoom */
  .login-form .form-input {
    font-size: 16px;
  }
}

/* ============================================================
   FORGOT-PASSWORD: success banner shown after sending reset link
   ============================================================ */
.forgot-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: var(--sp-12, 12px);
  background: #e6f7ec;
  border: 1px solid #b7e2c4;
  border-left: 4px solid #2e7d32;
  border-radius: 10px;
  color: #0f5132;
  font-family: var(--alias-font-body);
}
.forgot-success svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 2px;
  fill: #2e7d32;
}
.forgot-success strong {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}
.forgot-success span {
  font-size: 13px;
  line-height: 1.4;
  color: #2c5938;
}
