/* ═══════════════════════════════════════════════════════════════════
   GLOBAL FISHERS INVESTMENT — AUTH STYLES
   Login, Register, and Auth flow pages
   ═══════════════════════════════════════════════════════════════════ */

.auth-body {
  min-height: 100svh;
  background: var(--surface-dark-1);
  font-family: var(--font-sans);
}

/* ─── LAYOUT ─────────────────────────────────────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100svh;
}

@media (min-width: 1024px) {
  .auth-layout { grid-template-columns: 1fr 1fr; }
}

/* ─── VISUAL PANEL ───────────────────────────────────────────────── */
.auth-panel--visual {
  display: none;
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) { .auth-panel--visual { display: flex; } }

.auth-panel-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(46, 170, 111, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.1) 0%, transparent 50%),
    linear-gradient(160deg, var(--surface-dark-3), var(--surface-dark-1));
}

.auth-panel-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46, 170, 111, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 170, 111, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.auth-panel-content {
  position: relative;
  z-index: 1;
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  width: 100%;
  height: 100%;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.auth-logo .logo-text {
  display: flex;
  flex-direction: column;
}

.auth-visual-quote blockquote p {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  max-width: 360px;
}

.auth-visual-quote::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 6rem;
  color: rgba(46, 170, 111, 0.15);
  line-height: 0.6;
  display: block;
  margin-bottom: var(--space-4);
}

.auth-visual-stats {
  display: flex;
  gap: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.08);
}

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

.auth-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.auth-stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* Onboarding Steps Preview */
.auth-steps-preview {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-step {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  opacity: 0.45;
  transition: opacity var(--transition-base);
}

.auth-step--active { opacity: 1; }

.auth-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
  background: transparent;
  transition: all var(--transition-base);
}

.auth-step--active .auth-step-circle {
  background: var(--color-emerald-light);
  border-color: var(--color-emerald-light);
  color: var(--color-white);
}

.auth-step-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-step-info strong {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
}

.auth-step-info span {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

.auth-step-line {
  width: 1.5px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  margin-left: 17px;
}

.auth-disclaimer-mini {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
}

.auth-disclaimer-mini a {
  color: rgba(255,255,255,0.5);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-disclaimer-mini a:hover { color: var(--color-white); }

/* ─── FORM PANEL ─────────────────────────────────────────────────── */
.auth-panel--form {
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--container-pad);
  min-height: 100svh;
}

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

.auth-form-header { margin-bottom: var(--space-8); }

.auth-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-charcoal);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  font-size: var(--text-base);
  color: var(--color-steel);
}

/* ─── FORM ELEMENTS ──────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.form-forgot-link {
  font-size: var(--text-sm);
  color: var(--color-emerald-light);
  font-weight: 500;
  transition: color var(--transition-fast);
}
.form-forgot-link:hover { color: var(--color-emerald); }

.form-input-wrapper {
  position: relative;
}

.form-input-wrapper .form-input {
  padding-right: 3rem;
}

.form-toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}
.form-toggle-password:hover { color: var(--color-forest); }

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-slate);
  line-height: 1.5;
  padding: var(--space-1) 0;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-light);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--color-forest);
  border-color: var(--color-forest);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  width: 4px;
  height: 8px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

.checkbox-input:focus-visible + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(46, 170, 111, 0.2);
}

.checkbox-label a {
  color: var(--color-emerald-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.checkbox-label a:hover { color: var(--color-forest); }

.form-remember { margin-bottom: var(--space-6); }

.form-agreements {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

/* Select */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Form row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-row--actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-2);
}

/* Global error */
.form-error--global {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-error-bg);
  border: 1px solid rgba(229, 62, 62, 0.2);
  color: var(--color-error);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* Submit button */
.auth-submit {
  margin-top: var(--space-2);
  position: relative;
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  animation: spin 0.8s linear infinite;
}

/* ─── PASSWORD STRENGTH ──────────────────────────────────────────── */
.password-strength {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.password-strength-bars {
  display: flex;
  gap: var(--space-1);
  flex: 1;
}

.strength-bar {
  height: 3px;
  flex: 1;
  border-radius: var(--radius-full);
  background: var(--color-light);
  transition: background var(--transition-base);
}

.strength-bar.weak   { background: var(--color-error); }
.strength-bar.fair   { background: var(--color-warning); }
.strength-bar.good   { background: #3182CE; }
.strength-bar.strong { background: var(--color-success); }

.password-strength-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
  min-width: 50px;
  text-align: right;
}

/* ─── REGISTER PROGRESS ──────────────────────────────────────────── */
.register-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-8);
}

.progress-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}

.progress-step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--color-light);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-muted);
  transition: all var(--transition-base);
}

.progress-step label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  transition: color var(--transition-base);
}

.progress-step--active span {
  background: var(--color-forest);
  border-color: var(--color-forest);
  color: var(--color-white);
}

.progress-step--active label { color: var(--color-charcoal); }
.progress-step--done span   { background: var(--color-success); border-color: var(--color-success); color: white; }

.progress-line {
  flex: 1;
  height: 1.5px;
  background: var(--color-light);
  margin: 0 var(--space-2);
  position: relative;
  top: -8px;
}

/* ─── REGISTER STEPS ─────────────────────────────────────────────── */
.register-step { display: flex; flex-direction: column; gap: 0; }

/* ─── SWITCH & SECURITY NOTE ─────────────────────────────────────── */
.auth-switch-link {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-steel);
  margin-top: var(--space-6);
}

.auth-switch-link a {
  color: var(--color-emerald-light);
  font-weight: 600;
  transition: color var(--transition-fast);
}
.auth-switch-link a:hover { color: var(--color-forest); }

.auth-security-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
  justify-content: center;
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-lighter);
}
