/* ==========================================================================
   Auth pages — Sign In / Sign Up
   Split layout: photo hero panel (left) + form card panel (right).
   Site navbar/footer bookend the page; no redundant logo-to-home inside.
   ========================================================================== */

.auth-shell {
  display: flex;
  min-height: 640px;
}

/* ------------------------- Visual hero panel ------------------------- */

.auth-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 45%;
  flex-shrink: 0;
  position: relative;
  padding: var(--space-12);
  overflow: hidden;
}

.auth-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.auth-visual-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 33, 85, 0.93) 0%, rgba(0, 53, 128, 0.8) 100%);
  z-index: 1;
}

.auth-visual-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.auth-visual-content h1 {
  color: var(--color-overlay-text);
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.auth-visual-content .auth-visual-subtext {
  font-family: var(--font-heading);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  max-width: 320px;
}

.auth-benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-overlay-text);
  font-size: var(--fs-small);
  font-weight: 500;
}

.auth-benefit-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------- Form panel ------------------------- */

.auth-form-panel {
  flex: 1 0 0;
  min-width: 0;
  background: var(--color-bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
}

.auth-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-route-card);
  padding: var(--space-8);
  width: 100%;
  max-width: 440px;
}

.auth-card h2 {
  font-size: 28px;
  margin-bottom: var(--space-1);
}

.auth-subtext {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Icon-prefixed inputs */

.field-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon-wrap .field-icon {
  position: absolute;
  left: 13px;
  color: var(--color-text-placeholder);
  pointer-events: none;
}

.field-icon-wrap .field-input {
  padding-left: 40px;
}

.field-icon-wrap .field-input.has-trailing {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 13px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-small);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-label-row label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-body);
}

.auth-checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-small);
  color: var(--color-text-body);
}

.auth-checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-navy);
}

.auth-link {
  color: var(--color-navy);
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--color-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.btn-google {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-weight: 500;
  font-size: var(--fs-small);
  color: var(--color-text-body);
  background: var(--color-white);
}

.btn-google:hover {
  background: var(--color-bg-section);
}

.auth-footer-note {
  text-align: center;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-top: var(--space-6);
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-small);
}

.auth-info-banner {
  background: var(--color-success-bg);
  border: 1px solid #bbf7d0;
  color: #15803d;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-small);
}

/* ------------------------- Phone / OTP ------------------------- */

.otp-row {
  display: flex;
  gap: var(--space-2);
}

.otp-row .field-icon-wrap {
  flex: 1;
  min-width: 0;
}

.btn-otp-action {
  flex-shrink: 0;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-small);
  white-space: nowrap;
}

.btn-otp-action.outline {
  border: 1.5px solid var(--color-navy);
  color: var(--color-navy);
  background: var(--color-white);
}

.btn-otp-action.outline:hover:not(:disabled) {
  background: var(--color-navy);
  color: var(--color-bg-page);
}

.btn-otp-action.solid {
  background: var(--color-navy-cta);
  color: var(--color-overlay-text);
}

.btn-otp-action.solid:hover:not(:disabled) {
  background: var(--color-navy-cta-hover);
}

.btn-otp-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#otp-section .field-input {
  letter-spacing: 0.3em;
  font-family: var(--font-heading);
  font-weight: 600;
}

.otp-status-line {
  margin-top: 6px;
  font-size: 12px;
}

.otp-status-line.error {
  color: #dc2626;
}

.otp-status-line.success {
  color: #16a34a;
  font-weight: 600;
}

.otp-resend-row {
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.otp-resend-row button {
  font-weight: 600;
  color: var(--color-navy);
}

.otp-resend-row button:disabled {
  color: var(--color-text-placeholder);
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .auth-visual {
    display: none;
  }

  .auth-form-panel {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: var(--space-6);
  }
}
