/*
 * auth.css — Croissance+
 * Shared styles for all authentication pages (login, register, reset-password)
 * Uses Bootstrap 5 + Remix Icons
 */

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --c-teal:        #088395;
  --c-teal-dark:   #09637E;
  --c-teal-light:  #7AB2B2;
  --c-blue:        #177abf;
  --c-blue-light:  #63aadb;
  --c-green:       #83c756;
  --c-green-light: #a5d680;
  --c-bg:          #EBF4F6;
  --c-text:        #1e293b;
  --c-muted:       #64748b;
  --c-border:      #e2e8f0;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body.auth-body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  background: #f0f6f8;
  color: var(--c-text);
  margin: 0;
}

/* ── Layout ──────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  min-height: 100vh;
}

/* ── Left panel ──────────────────────────────────────────────── */
.auth-left {
  flex: 0 0 52%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #071e3d 0%, #0d4f82 35%, #088395 70%, #109393 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
}

/* Orbs */
.auth-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(72px);
}
.auth-orb-1 {
  width: 420px; height: 420px;
  top: -100px; right: -80px;
  background: radial-gradient(circle, rgba(131,199,86,.18) 0%, transparent 70%);
  animation: authOrbFloat 10s ease-in-out infinite;
}
.auth-orb-2 {
  width: 300px; height: 300px;
  bottom: -60px; left: -60px;
  background: radial-gradient(circle, rgba(99,170,219,.16) 0%, transparent 70%);
  animation: authOrbFloat 13s ease-in-out infinite reverse;
}
.auth-orb-3 {
  width: 200px; height: 200px;
  top: 45%; left: 30%;
  background: radial-gradient(circle, rgba(8,131,149,.14) 0%, transparent 70%);
  animation: authOrbFloat 8s ease-in-out 2s infinite;
}
@keyframes authOrbFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-22px) scale(1.05); }
}

/* Left content */
.auth-left-content {
  position: relative; z-index: 1;
  animation: authFadeUp .8s .1s both cubic-bezier(.22,1,.36,1);
}
.auth-left-bottom {
  position: relative; z-index: 1;
  animation: authFadeUp .8s .3s both cubic-bezier(.22,1,.36,1);
}

/* Logo */
.auth-logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 56px;
}
.auth-logo-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 900; color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.auth-logo-text {
  font-size: 1.25rem; font-weight: 800; color: #fff;
  letter-spacing: -.3px;
}
.auth-logo-text em { color: var(--c-green); font-style: normal; }

/* Left headline */
.auth-headline {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 900; color: #fff;
  line-height: 1.18; letter-spacing: -.4px;
  margin-bottom: 16px;
}
.auth-headline .accent { color: var(--c-green); }
.auth-sub {
  font-size: .95rem; color: rgba(255,255,255,.68);
  line-height: 1.7; max-width: 420px;
  margin-bottom: 40px;
}

/* Feature list */
.auth-features {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 48px;
}
.auth-feature {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  transition: background .2s, transform .2s;
}
.auth-feature:hover {
  background: rgba(255,255,255,.12);
  transform: translateX(4px);
}
.auth-feature-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; flex-shrink: 0;
}
.auth-feature-label {
  font-size: .88rem; font-weight: 600; color: rgba(255,255,255,.9);
}
.auth-feature-desc {
  font-size: .75rem; color: rgba(255,255,255,.5); margin-top: 1px;
}

/* Mini stat badges */
.auth-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.auth-stat {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
}
.auth-stat-val {
  font-size: 1.3rem; font-weight: 800; color: #fff; line-height: 1;
}
.auth-stat-lbl {
  font-size: .7rem; color: rgba(255,255,255,.5);
  font-weight: 500; margin-top: 3px;
}

/* ── Right panel ─────────────────────────────────────────────── */
.auth-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: #fff;
  position: relative;
}

.auth-back {
  position: absolute; top: 24px; left: 28px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600; color: var(--c-muted);
  text-decoration: none;
  padding: 7px 14px; border-radius: 8px;
  transition: background .15s, color .15s;
}
.auth-back:hover { background: var(--c-bg); color: var(--c-teal-dark); }

.auth-form-wrap {
  width: 100%; max-width: 400px;
  animation: authFadeUp .65s .15s both cubic-bezier(.22,1,.36,1);
}

/* Role badge */
.auth-role-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px 5px 8px;
  border-radius: 20px;
  font-size: .78rem; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Title */
.auth-form-title {
  font-size: 1.55rem; font-weight: 900;
  color: var(--c-text); letter-spacing: -.3px;
  margin-bottom: 6px; line-height: 1.2;
}
.auth-form-desc {
  font-size: .88rem; color: var(--c-muted);
  margin-bottom: 32px; line-height: 1.6;
}

/* Form groups */
.auth-field {
  margin-bottom: 18px;
}
.auth-label {
  display: block;
  font-size: .8rem; font-weight: 600; color: #475569;
  margin-bottom: 7px;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; color: var(--c-teal-light); pointer-events: none;
  transition: color .2s;
}
.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 44px;
  border: 1.5px solid var(--c-border);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: .9rem; color: var(--c-text);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-input:focus {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 4px rgba(8,131,149,.1);
}
.auth-input:focus ~ .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon { color: var(--c-teal); }
.auth-input.is-invalid { border-color: #ef4444; }
.auth-input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(239,68,68,.1); }
.auth-input-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: var(--c-teal-light); padding: 0;
  transition: color .15s;
}
.auth-input-toggle:hover { color: var(--c-teal); }
.auth-invalid-msg {
  font-size: .77rem; color: #ef4444; margin-top: 5px;
  display: flex; align-items: center; gap: 4px;
}

/* Options row */
.auth-options {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 8px;
}
.auth-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: .83rem; color: var(--c-muted); cursor: pointer;
}
.auth-remember input[type="checkbox"] {
  width: 16px; height: 16px; border-radius: 4px;
  accent-color: var(--c-teal);
  cursor: pointer;
}
.auth-forgot {
  font-size: .83rem; font-weight: 600;
  color: var(--c-teal); text-decoration: none;
  transition: color .15s;
}
.auth-forgot:hover { color: var(--c-teal-dark); }

/* Submit button */
.auth-btn {
  width: 100%; height: 50px;
  background: linear-gradient(135deg, var(--c-teal), var(--c-blue));
  border: none; border-radius: 11px;
  color: #fff; font-family: 'Inter', sans-serif;
  font-size: .92rem; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(8,131,149,.3);
  transition: opacity .15s, transform .15s, box-shadow .15s;
  margin-bottom: 20px;
}
.auth-btn:hover {
  opacity: .92; transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(8,131,149,.38);
}
.auth-btn:active { transform: translateY(0); }

/* Alerts */
.auth-alert {
  border-radius: 10px; padding: 12px 16px;
  font-size: .84rem; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid transparent;
}
.auth-alert-error {
  background: #fef2f2; border-color: #fecaca; color: #b91c1c;
}
.auth-alert-success {
  background: #f0fdf4; border-color: #bbf7d0; color: #15803d;
}
.auth-alert i { margin-top: 1px; flex-shrink: 0; }

/* Footer note */
.auth-footer-note {
  text-align: center;
  font-size: .78rem; color: #94a3b8;
  margin-top: 24px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}

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

/* Steps list (forgot/reset password) */
.auth-steps {
  display: flex; flex-direction: column; gap: 0;
  margin-bottom: 48px;
}
.auth-step {
  display: flex; align-items: flex-start; gap: 16px;
  position: relative; padding-bottom: 24px;
}
.auth-step:last-child { padding-bottom: 0; }
.auth-step-line {
  position: absolute; left: 17px; top: 36px;
  width: 2px; height: calc(100% - 12px);
  background: rgba(255,255,255,.15);
}
.auth-step:last-child .auth-step-line { display: none; }
.auth-step-num {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; color: #fff;
}
.auth-step-body { padding-top: 6px; }
.auth-step-label {
  font-size: .88rem; font-weight: 700; color: rgba(255,255,255,.9);
  margin-bottom: 2px;
}
.auth-step-desc {
  font-size: .76rem; color: rgba(255,255,255,.5); line-height: 1.5;
}

/* Password strength tips */
.auth-tips {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 40px;
}
.auth-tip {
  display: flex; align-items: center; gap: 10px;
  font-size: .84rem; color: rgba(255,255,255,.75);
}
.auth-tip i { color: var(--c-green); font-size: .9rem; flex-shrink: 0; }

/* Password hint */
.auth-input-hint {
  font-size: .75rem; color: #94a3b8; margin-top: 5px;
}

/* Back to login link */
.auth-back-login {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 20px;
  font-size: .84rem; font-weight: 600;
  color: var(--c-teal); text-decoration: none;
  transition: color .15s;
}
.auth-back-login:hover { color: var(--c-teal-dark); }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes authFadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .auth-left { display: none; }
  .auth-right { min-height: 100vh; padding: 80px 24px 40px; background: #f0f6f8; }
  .auth-form-wrap { max-width: 460px; }
}
@media (max-width: 480px) {
  .auth-right { padding: 72px 16px 32px; }
}
