/* =========================================================================
   SAC Express — Auth pages (signup, login)
   Split-screen layout: form card on left, full-bleed hero image on right.
   ========================================================================= */

/* ---------- Body & full-page reset ---------- */
.auth-body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  font-family: var(--font-sans);
  color: var(--color-text);
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 1fr;
  min-height: 100vh;
}

/* ---------- Left pane: form ---------- */
.auth-pane {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px 64px;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  padding: 32px 32px 28px;
  box-shadow: 0 1px 2px rgba(15, 30, 60, 0.04);
}

.auth-logo {
  display: block;
  margin: 0 auto 28px;
  width: 140px;
}
.auth-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-title {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 24px;
  line-height: 1.1;
}

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

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

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.form-input {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
  background: #fff;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}
.form-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(21, 70, 116, 0.15);
}
.form-input::placeholder {
  color: #9aa4ad;
}
.form-input:invalid:not(:placeholder-shown) {
  border-color: #d97757;
}

/* ---------- Checkbox row ---------- */
.form-row--checkbox {
  margin-top: 4px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}
.form-checkbox input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  cursor: pointer;
  accent-color: var(--color-brand);
}
.form-checkbox-label a {
  color: var(--color-brand);
  font-weight: 500;
  text-decoration: none;
}
.form-checkbox-label a:hover {
  text-decoration: underline;
}

/* ---------- Submit button ---------- */
.btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
  position: relative;
}
.btn-block:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-block.is-loading .btn-spinner {
  display: inline-block;
}
.btn-block.is-loading .btn-label {
  opacity: 0.6;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Form error ---------- */
.form-error {
  background: #fef2ed;
  border: 1px solid #fbcab4;
  color: #b34a26;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  margin-top: 4px;
}

/* ---------- Footnote (login link) ---------- */
.auth-footnote {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin: 18px 0 0;
}
.auth-footnote a {
  color: var(--color-brand);
  font-weight: 600;
  text-decoration: none;
}
.auth-footnote a:hover {
  text-decoration: underline;
}

/* ---------- Success state ---------- */
.auth-success {
  text-align: center;
  padding: 16px 8px 8px;
}
.auth-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f6ee;
  color: #2ecc71;
  margin: 0 auto 16px;
}
.auth-success-icon svg {
  width: 28px;
  height: 28px;
}
.auth-success-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--color-text);
}
.auth-success-body {
  font-size: 15px;
  line-height: 1.55;
  color: #4b5563;
  margin: 0 0 18px;
}
.auth-success-body strong {
  color: var(--color-text);
}
.auth-success-help {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}
.auth-success-help a {
  color: var(--color-brand);
  font-weight: 500;
  text-decoration: none;
}
.auth-success-help a:hover {
  text-decoration: underline;
}

/* ---------- Right pane: hero image ---------- */
.auth-hero {
  position: relative;
  overflow: hidden;
  background: #1a2332;
}
.auth-hero picture,
.auth-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Google Places autocomplete dropdown ---------- */
/* Restyle the .pac-container that Google injects */
.pac-container {
  font-family: var(--font-sans) !important;
  border: 1px solid #e2e6ea !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(15, 30, 60, 0.08) !important;
  margin-top: 4px !important;
}
.pac-item {
  padding: 8px 12px !important;
  font-size: 14px !important;
  cursor: pointer !important;
  border-top: 1px solid #f1f3f5 !important;
}
.pac-item:first-child { border-top: none !important; }
.pac-item:hover { background: #f7f9fb !important; }
.pac-item-query {
  font-size: 14px !important;
  color: var(--color-text) !important;
}
.pac-matched { font-weight: 600 !important; }
.pac-icon { margin-right: 8px !important; }

/* ---------- Responsive: stack on mobile/tablet ---------- */
@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
  .auth-pane {
    padding: 24px 16px 48px;
  }
  .auth-card {
    padding: 24px 20px 20px;
    border: none;
    box-shadow: none;
  }
  .auth-title {
    font-size: 28px;
  }
}
