/* ═══════════════════════════════════════════════════
   AUTH PAGES — Shared styles for all auth pages
   Shared tokens & components: css/style.css
   ═══════════════════════════════════════════════════ */

/* ─── Layout ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: #f0f4f8;
  font-family: 'Poppins', sans-serif;
}

.auth-left {
  flex: 0 0 46%;
  background: linear-gradient(150deg, #001a33 0%, var(--primary) 45%, #004d99 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 64px;
  position: relative;
  overflow: hidden;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  min-height: 100vh;
  overflow-y: auto;
}

/* ─── Left panel decorative ──────────────────────── */
.auth-left-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,174,239,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,174,239,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridMove 20s linear infinite;
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.auth-orb-1 { width: 420px; height: 420px; background: var(--accent); opacity: .12; top: -120px; right: -100px; }
.auth-orb-2 { width: 260px; height: 260px; background: #0056B3; opacity: .18; bottom: -60px; left: -80px; }
.auth-orb-3 { width: 180px; height: 180px; background: rgba(0,174,239,.3); opacity: .12; top: 50%; left: 60%; }

.auth-left-content { position: relative; z-index: 2; width: 100%; }

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 52px;
}
.auth-brand-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent), #007cc7);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  box-shadow: 0 8px 24px rgba(0,174,239,.4);
  flex-shrink: 0;
}
.auth-brand-text .brand-name { font-size: 1.15rem; font-weight: 800; color: white; line-height: 1.1; }
.auth-brand-text .brand-sub  { font-size: .72rem; color: rgba(255,255,255,.45); letter-spacing: .6px; text-transform: uppercase; }

.auth-left-title {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 900;
  color: white;
  line-height: 1.2;
  margin-bottom: 14px;
}
.auth-left-title .hl {
  background: linear-gradient(135deg, var(--accent), #a8edff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-left-desc {
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 360px;
}

.auth-features { display: flex; flex-direction: column; gap: 14px; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  transition: .3s;
}
.auth-feature:hover { background: rgba(255,255,255,.1); }
.auth-feat-icon {
  width: 40px;
  height: 40px;
  background: rgba(0,174,239,.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.auth-feat-title { font-size: .84rem; font-weight: 700; color: white; line-height: 1.2; }
.auth-feat-sub   { font-size: .72rem; color: rgba(255,255,255,.45); }

.auth-left-footer {
  position: absolute;
  bottom: 32px;
  left: 64px;
  right: 64px;
  font-size: .7rem;
  color: rgba(255,255,255,.28);
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

/* ─── Auth Card ──────────────────────────────────── */
.auth-card {
  background: white;
  border-radius: 24px;
  padding: 44px 44px;
  box-shadow: 0 20px 60px rgba(0,51,102,.1);
  width: 100%;
  max-width: 480px;
  position: relative;
}

.auth-card-header { margin-bottom: 32px; }
.auth-page-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(0,51,102,.25);
}
.auth-card-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}
.auth-card-sub {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.auth-card-sub a { color: var(--secondary); font-weight: 600; text-decoration: none; }
.auth-card-sub a:hover { color: var(--primary); }

/* ─── Floating Label Fields ──────────────────────── */
.float-field {
  position: relative;
  margin-bottom: 20px;
}

.float-field label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: .88rem;
  color: #94a3b8;
  pointer-events: none;
  transition: .2s cubic-bezier(.4,0,.2,1);
  background: white;
  padding: 0 4px;
  z-index: 1;
  white-space: nowrap;
}

.float-field .f-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: .95rem;
  z-index: 2;
  transition: color .2s;
  pointer-events: none;
}

.float-field.has-icon label { left: 44px; }
.float-field.has-icon input,
.float-field.has-icon select { padding-left: 44px; }

.float-field input,
.float-field select,
.float-field textarea {
  width: 100%;
  border: 1.8px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 16px 7px;
  font-size: .9rem;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}

.float-field input:focus,
.float-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,174,239,.12); }
.float-field input:focus ~ .f-icon,
.float-field select:focus ~ .f-icon { color: var(--accent); }

/* Float up when filled or focused */
.float-field input:focus ~ label,
.float-field input:not(:placeholder-shown) ~ label,
.float-field select:focus ~ label,
.float-field select:valid ~ label,
.float-field textarea:focus ~ label,
.float-field textarea:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: .7rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .4px;
}

/* Float up when filled + has icon */
.float-field.has-icon input:focus ~ label,
.float-field.has-icon input:not(:placeholder-shown) ~ label,
.float-field.has-icon select:focus ~ label,
.float-field.has-icon select:valid ~ label { left: 44px; }

/* Validation states */
.float-field.is-error input,
.float-field.is-error select { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,53,69,.1); }
.float-field.is-error label { color: var(--danger); }
.float-field.is-error .f-icon { color: var(--danger); }

.float-field.is-valid input,
.float-field.is-valid select { border-color: var(--success); box-shadow: 0 0 0 3px rgba(40,167,69,.08); }
.float-field.is-valid label { color: var(--success); }
.float-field.is-valid .f-icon { color: var(--success); }

.field-msg {
  font-size: .72rem;
  margin-top: 5px;
  padding-left: 4px;
  display: none;
}
.field-msg.show { display: block; }
.field-msg.error { color: var(--danger); }
.field-msg.success { color: var(--success); }
.field-msg.hint { color: var(--text-muted); }

/* Trailing icons (show/hide password + validation check) */
.float-field .trail-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: .95rem;
  color: #94a3b8;
  z-index: 3;
  transition: color .2s;
  background: none;
  border: none;
  padding: 4px;
  line-height: 1;
}
.float-field .trail-icon:hover { color: var(--primary); }
.float-field.is-valid  .valid-icon  { display: flex; align-items: center; color: var(--success); }
.float-field .valid-icon { display: none; }

.float-field.has-trail input { padding-right: 46px; }

/* ─── Password Strength Meter ────────────────────── */
.pass-strength-wrap { margin-top: -8px; margin-bottom: 18px; }
.pass-strength-bars {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}
.psb {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: #e2e8f0;
  transition: background .3s;
}
.psb.weak    { background: var(--danger); }
.psb.fair    { background: #f59e0b; }
.psb.good    { background: #3b82f6; }
.psb.strong  { background: var(--success); }

.pass-strength-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  transition: color .3s;
}
.pass-strength-label.weak   { color: var(--danger); }
.pass-strength-label.fair   { color: #f59e0b; }
.pass-strength-label.good   { color: #3b82f6; }
.pass-strength-label.strong { color: var(--success); }

/* ─── Password Requirements Checklist ────────────── */
.pass-requirements {
  background: #f8fafc;
  border: 1.5px solid #e8eef5;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.pass-req-title { font-size: .7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.pass-req-list  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.pass-req-item  {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: #94a3b8;
  transition: color .2s;
}
.pass-req-item i { font-size: .7rem; color: #cbd5e1; transition: .2s; }
.pass-req-item.met   { color: var(--success); }
.pass-req-item.met i { color: var(--success); }

/* ─── Auth Submit Button ─────────────────────────── */
.btn-auth-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 6px 20px rgba(0,51,102,.25);
  margin-top: 4px;
}
.btn-auth-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,51,102,.35); }
.btn-auth-submit:active { transform: translateY(0); }
.btn-auth-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.btn-auth-submit .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-auth-submit.loading .btn-spinner { display: block; }
.btn-auth-submit.loading .btn-text   { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

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

/* ─── Social Login Buttons ───────────────────────── */
.social-auth-row { display: flex; gap: 12px; }
.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1.8px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: .25s;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
}
.btn-social:hover { border-color: #c7d2e0; box-shadow: 0 4px 14px rgba(0,0,0,.08); background: #f8fafc; color: var(--text); transform: translateY(-2px); }
.btn-social img { width: 18px; height: 18px; }
.btn-social-google { }
.btn-social-microsoft .social-icon { color: #00a4ef; font-size: 1.1rem; }

/* ─── Remember / Forgot row ──────────────────────── */
.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.form-check-label { font-size: .8rem; color: var(--text-muted); cursor: pointer; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.auth-forgot-link {
  font-size: .8rem;
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
}
.auth-forgot-link:hover { color: var(--primary); }

/* ─── Back link ──────────────────────────────────── */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 26px;
  transition: .2s;
}
.auth-back-link:hover { color: var(--primary); gap: 8px; }

/* ─── Bottom link ────────────────────────────────── */
.auth-bottom-link {
  text-align: center;
  margin-top: 22px;
  font-size: .82rem;
  color: var(--text-muted);
}
.auth-bottom-link a { color: var(--secondary); font-weight: 700; text-decoration: none; }
.auth-bottom-link a:hover { color: var(--primary); }

/* ─── OTP Input (email verification) ────────────── */
.otp-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 6px;
}
.otp-input {
  width: 58px;
  height: 64px;
  border: 1.8px solid #e2e8f0;
  border-radius: 14px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: .2s;
}
.otp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,174,239,.12); }
.otp-input.is-filled { border-color: var(--primary); background: rgba(0,51,102,.04); }
.otp-input.is-error  { border-color: var(--danger);  background: rgba(220,53,69,.04); animation: shake .3s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}

.otp-hint {
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 22px;
}
.otp-timer { font-weight: 700; color: var(--primary); }
.otp-resend { display: none; color: var(--secondary); font-weight: 700; cursor: pointer; background: none; border: none; font-family: 'Poppins', sans-serif; font-size: .78rem; padding: 0; }
.otp-resend.show { display: inline; }
.otp-resend:hover { color: var(--primary); }

/* ─── Verification success state ─────────────────── */
.verify-success-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0;
}
.verify-success-wrap.show { display: flex; }
.verify-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #1a8537);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 0 12px 32px rgba(40,167,69,.35);
  margin-bottom: 22px;
  animation: popIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  from { transform: scale(0) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}
.verify-success-title { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.verify-success-desc  { font-size: .84rem; color: var(--text-muted); line-height: 1.7; max-width: 300px; margin-bottom: 26px; }

/* ─── Step indicator (register) ─────────────────── */
.reg-steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  gap: 0;
}
.reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.reg-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  color: #94a3b8;
  background: white;
  transition: .3s;
}
.reg-step.active .reg-step-circle { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px rgba(0,51,102,.1); }
.reg-step.done   .reg-step-circle { border-color: var(--success); background: var(--success); color: white; }
.reg-step-label { font-size: .67rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.reg-step.active .reg-step-label { color: var(--primary); }
.reg-step.done   .reg-step-label { color: var(--success); }

.reg-step-line { flex: 1; height: 2px; background: #e2e8f0; align-self: flex-start; margin-top: 17px; transition: .3s; }
.reg-step-line.done { background: var(--success); }

/* Form panels for multi-step register */
.reg-panel { display: none; }
.reg-panel.active { display: block; }

.reg-nav-btns { display: flex; gap: 12px; margin-top: 8px; }
.btn-reg-prev {
  flex: 0 0 auto;
  padding: 13px 22px;
  border: 1.8px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Poppins', sans-serif;
  transition: .2s;
}
.btn-reg-prev:hover { border-color: var(--primary); color: var(--primary); }
.btn-reg-next {
  flex: 1;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: .3s;
}
.btn-reg-next:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,51,102,.3); }

/* Terms checkbox row */
.terms-row {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.terms-row .form-check-input { margin-top: 2px; }
.terms-row .form-check-label { font-size: .78rem; color: var(--text-muted); line-height: 1.6; }
.terms-row a { color: var(--secondary); font-weight: 600; text-decoration: none; }

/* ─── Alert boxes ────────────────────────────────── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .8rem;
  line-height: 1.6;
  margin-bottom: 18px;
}
.auth-alert.info    { background: rgba(0,174,239,.08); border: 1px solid rgba(0,174,239,.2); color: #0369a1; }
.auth-alert.success { background: rgba(40,167,69,.08); border: 1px solid rgba(40,167,69,.2); color: #166534; }
.auth-alert.warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: #92400e; }
.auth-alert i { margin-top: 1px; flex-shrink: 0; }

/* ─── Trust badges ───────────────────────────────── */
.auth-trust {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  color: var(--text-muted);
}
.auth-trust-item i { color: var(--accent); }

/* ─── Mobile: hide left panel ────────────────────── */
@media (max-width: 991px) {
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px; }
  .auth-card  { padding: 34px 28px; max-width: 440px; }
}

@media (max-width: 480px) {
  .auth-card  { padding: 28px 22px; border-radius: 20px; }
  .otp-input  { width: 46px; height: 54px; font-size: 1.4rem; }
  .otp-group  { gap: 8px; }
  .social-auth-row { flex-direction: column; }
}

/* ─── Floating mobile logo (when left panel hidden) ─ */
.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.auth-mobile-brand .brand-icon-sm {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: white;
}
.auth-mobile-brand .brand-name { font-size: .95rem; font-weight: 800; color: var(--primary); }

@media (max-width: 991px) {
  .auth-mobile-brand { display: flex; }
}
