/* =========================================================
   Auth Page — Login / Register
   Houston Trade Pros
   ========================================================= */

/* ── Layout ─────────────────────────────────────────────── */
.auth-root {
  min-height: calc(100vh - 56px);
  background: #f8f9fb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 72px;
}

/* ── Form panel ─────────────────────────────────────────── */
.auth-form-panel {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
}

/* ── Redirect note ──────────────────────────────────────── */
.auth-redirect-note {
  font-size: 13px;
  color: #64748b;
  background: #fff3cd;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  display: none;
}

.auth-redirect-note:not(:empty) {
  display: block;
}

/* ── Tab shell (CSS-only radio toggle) ──────────────────── */
.auth-mode-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.auth-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 12px;
  background: #e8edf2;
  margin-bottom: 32px;
  width: 100%;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
  user-select: none;
  white-space: nowrap;
}

.auth-tab:hover {
  color: #0f172a;
}

#auth-mode-login:checked ~ .auth-tabs [data-auth-link="login"],
#auth-mode-register:checked ~ .auth-tabs [data-auth-link="register"] {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* ── Panes ──────────────────────────────────────────────── */
.auth-card-grid {
  display: block;
}

.auth-pane {
  display: none;
}

#auth-mode-login:checked ~ .auth-card-grid .auth-pane-login,
#auth-mode-register:checked ~ .auth-card-grid .auth-pane-register {
  display: block;
}

/* ── Card ───────────────────────────────────────────────── */
.auth-pane-header {
  margin-bottom: 28px;
}

.auth-pane-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.auth-pane-header p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

/* ── Form fields ────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.01em;
}

.auth-field input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-field input::placeholder {
  color: #94a3b8;
}

.auth-field input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.auth-field input:hover:not(:focus) {
  border-color: #cbd5e1;
}

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap input {
  padding-right: 78px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #f97316;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 120ms ease, background 120ms ease;
}

.auth-password-toggle:hover {
  color: #ea6c0e;
  background: rgba(249, 115, 22, 0.08);
}

.auth-password-toggle:focus-visible {
  outline: 2px solid rgba(249, 115, 22, 0.35);
  outline-offset: 2px;
}

/* ── Submit button ──────────────────────────────────────── */
.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: #f97316;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease, box-shadow 150ms ease;
  margin-top: 4px;
  box-shadow: 0 1px 2px rgba(249, 115, 22, 0.3), 0 4px 12px rgba(249, 115, 22, 0.2);
}

.auth-submit-btn:hover {
  background: #ea6c0e;
  box-shadow: 0 1px 2px rgba(249, 115, 22, 0.4), 0 6px 16px rgba(249, 115, 22, 0.3);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(249, 115, 22, 0.3);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-btn-arrow {
  flex-shrink: 0;
  transition: transform 150ms ease;
}

.auth-submit-btn:hover .auth-btn-arrow {
  transform: translateX(3px);
}

/* ── Feedback ───────────────────────────────────────────── */
.auth-feedback {
  min-height: 0;
  font-size: 13.5px;
  line-height: 1.4;
  border-radius: 8px;
  transition: all 150ms ease;
}

.auth-feedback:not(:empty) {
  padding: 10px 14px;
}

.auth-feedback.success {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.auth-feedback.error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

/* ── Switch hint ────────────────────────────────────────── */
.auth-switch-hint {
  margin-top: 20px;
  font-size: 13.5px;
  color: #64748b;
  text-align: center;
}

.auth-switch-link {
  color: #f97316;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 120ms ease;
}

.auth-switch-link:hover {
  color: #ea6c0e;
  text-decoration: underline;
}

/* ── Legal ──────────────────────────────────────────────── */
.auth-legal {
  margin-top: 28px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.6;
}

.auth-legal a {
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 120ms ease;
}

.auth-legal a:hover {
  color: #0f172a;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .auth-root {
    padding: 32px 16px 56px;
    align-items: flex-start;
  }

  .auth-form-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 400px) {
  .auth-form-panel {
    padding: 32px 16px 56px;
  }

  .auth-tab {
    font-size: 13px;
    padding: 10px 10px;
  }
}
