/* ═══════════════════════════════════════════════════════════
   SUNCONNECT — Auth Pages (login, register, etc.)
   ═══════════════════════════════════════════════════════════ */

.auth-page {
  min-height: calc(100vh - 56px - var(--bottom-nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--gray-bg);
}

.auth-shell {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-shell--wide {
  max-width: 440px;
}

.auth-shell .breadcrumb {
  padding: 0;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.auth-card--wide {
  max-width: 440px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-decoration: none;
}
.auth-brand img { height: 30px; width: auto; }

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.auth-alert--success { background: var(--blue-light); color: var(--blue-dark); }
.auth-alert--info    { background: #eff6ff; color: #1e40af; }
.auth-alert--error   { background: #fef2f2; color: #dc2626; }

/* ── Form ── */
.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color 0.15s;
  outline: none;
}
.auth-form input:focus,
.auth-form select:focus { border-color: var(--blue); }
.auth-form input.is-error,
.auth-form select.is-error { border-color: #dc2626; }
.auth-form input.is-match { border-color: #16a34a; }
.auth-form input::placeholder { color: var(--text-muted); }
.auth-form input[readonly] {
  background: var(--gray-bg);
  color: var(--text-secondary);
  cursor: not-allowed;
}

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

.field-error {
  font-size: 12.5px;
  color: #dc2626;
  margin-top: 2px;
}

/* ── Password toggle ── */
.input-password-wrap { position: relative; }
.input-password-wrap input { padding-right: 44px; }
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.toggle-pw:hover { color: var(--blue); }

/* ── Remember / forgot row ── */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.auth-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer;
}

.auth-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s;
}
.auth-link:hover { color: var(--blue-dark); }

/* ── Submit button ── */
.btn-auth {
  width: 100%;
  padding: 13px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-auth:hover { background: var(--blue-dark); }

/* ── Footer text ── */
.auth-footer-text {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 20px;
}

.auth-back-link {
  display: block;
  text-align: center;
  margin-top: 16px;
}

.auth-form--stacked {
  margin-top: 12px;
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Verify Email ── */
.verify-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 28px;
  margin: 8px auto 24px;
}

.btn-auth-outline {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-auth-outline:hover { border-color: var(--blue); color: var(--blue); }

/* ── Change email details ── */
.change-email-details {
  width: 100%;
  margin-bottom: 8px;
}
.change-email-details summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--blue);
  text-align: center;
  list-style: none;
  padding: 6px 0;
  user-select: none;
}
.change-email-details summary::-webkit-details-marker { display: none; }
.change-email-details[open] summary { margin-bottom: 12px; }
.change-email-form { margin-top: 0; }

/* ── Desktop ── */
@media (min-width: 640px) {
  .auth-page {
    min-height: calc(100vh - 56px);
  }
  .auth-card {
    padding: 40px 36px;
  }
}
