/* ============================================================
   FARGOSCAPITAL — Login Page Styles
   ============================================================ */

.login-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--off-white);
}

/* ===== SPLIT LAYOUT ===== */
.login-wrap {
  display: grid;
  grid-template-columns: 480px 1fr;
  min-height: 100vh;
}

/* ===== LEFT PANEL ===== */
.login-panel--left {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy-mid) 60%, #1e5080 100%);
  position: relative;
  overflow: hidden;
}

.login-panel--left::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(201,168,76,0.06);
  border: 60px solid rgba(201,168,76,0.05);
  pointer-events: none;
}
.login-panel--left::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.login-panel__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 44px 48px;
  height: 100%;
}

/* Brand */
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: auto;
}
.login-brand__logo svg { width: 42px; height: 42px; }
.login-brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.login-brand__top {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}
.login-brand__sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Hero text */
.login-panel__hero {
  margin: auto 0 48px;
}
.login-panel__hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}
.login-panel__hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.login-panel__hero p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 340px;
}

/* Highlights */
.login-highlights {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}
.login-highlight {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.login-highlight__icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}
.login-highlight__icon svg { width: 18px; height: 18px; }
.login-highlight strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 2px;
}
.login-highlight span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

/* Panel footer */
.login-panel__footer {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
}

/* ===== RIGHT PANEL ===== */
.login-panel--right {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  padding: 48px 32px;
}

.login-form-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
}

/* ===== STEP HEADER ===== */
.login-form__header {
  margin-bottom: 32px;
}
.login-form__header h2 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.login-form__header p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== FORM ELEMENTS ===== */
.login-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label-link {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-label-link:hover { color: var(--gold-dark); }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

.input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  border: 1.5px solid var(--mid-gray);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input-wrap input::placeholder { color: var(--text-muted); }
.input-wrap input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.1);
}
.input-wrap input.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.toggle-pw:hover { color: var(--navy); }
.eye-icon { width: 17px; height: 17px; }

/* Error text */
.form-error {
  font-size: 0.78rem;
  color: #dc2626;
  min-height: 18px;
  display: block;
}

/* Form row (checkbox row) */
.form-row { display: flex; align-items: center; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-body);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] { display: none; }

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--mid-gray);
  border-radius: 4px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--navy);
  border-color: var(--navy);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

/* Submit button full width */
.btn--full { width: 100%; margin-top: 4px; justify-content: center; position: relative; }

.btn-arrow { width: 18px; height: 18px; margin-left: 4px; }

.btn-spinner {
  position: absolute;
  right: 18px;
  display: flex;
  align-items: center;
}
.btn-spinner svg { width: 18px; height: 18px; }

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

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mid-gray);
}

/* Alt login buttons */
.login-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1.5px solid var(--mid-gray);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-alt svg { width: 18px; height: 18px; color: var(--navy); }
.btn-alt:hover { border-color: var(--navy); background: var(--off-white); }

/* Register link */
.login-register {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.login-register a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-register a:hover { color: var(--gold-dark); }

/* Admin portal label */
.admin-portal-label {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             6px;
  font-size:       0.75rem;
  font-weight:     600;
  color:           #1a3a5c;
  background:      #f0f4f8;
  border:          1.5px dashed #93adc8;
  border-radius:   8px;
  padding:         10px 16px;
  margin-bottom:   24px;
  text-align:      center;
  line-height:     1.4;
  width:           100%;
  cursor:          pointer;
  text-decoration: none;
  transition:      background .18s, border-color .18s, color .18s;
  box-sizing:      border-box;
}
.admin-portal-label:hover {
  background:    #e2ecf5;
  border-color:  #1a3a5c;
  color:         #0f2a4a;
}
.admin-portal-label svg { flex-shrink: 0; opacity: .7; }

/* Security footer */
.login-security {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  color: var(--text-muted);
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--light-gray);
}
.login-security svg { color: var(--navy); flex-shrink: 0; }
.login-security a { color: var(--text-muted); text-decoration: underline; }
.login-security a:hover { color: var(--navy); }

/* ===== MFA STEP ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 28px;
  padding: 0;
  transition: color var(--transition);
}
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { color: var(--navy); }

.mfa-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(26,58,92,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--navy);
}
.mfa-icon svg { width: 26px; height: 26px; }

/* OTP inputs */
.otp-wrap {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 28px 0 6px;
}

.otp-input {
  width: 52px;
  height: 58px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  border: 1.5px solid var(--mid-gray);
  border-radius: var(--radius-sm);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.otp-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.12);
}
.otp-input.filled { border-color: var(--navy); background: rgba(26,58,92,0.04); }
.otp-input.error  { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.1); }

/* Resend */
.mfa-resend {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 20px;
}

.mfa-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.8rem;
}
.mfa-sep { color: var(--mid-gray); }

.link-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: inherit;
  color: var(--navy);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.link-btn:hover { color: var(--gold-dark); }
.link-btn:disabled { color: var(--text-muted); text-decoration: none; cursor: default; }

/* ===== SUCCESS STEP ===== */
.success-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(26,58,92,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--navy);
  animation: successPop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes successPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.success-icon svg { width: 36px; height: 36px; }

.success-wrap h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.success-wrap p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.redirect-bar {
  width: 100%;
  height: 4px;
  background: var(--light-gray);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.redirect-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 4px;
  transition: width 2.8s linear;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-panel--left { display: none; }
  .login-panel--right { min-height: 100vh; }
}

@media (max-width: 480px) {
  .login-panel--right { padding: 32px 20px; }
  .otp-wrap { gap: 7px; }
  .otp-input { width: 44px; height: 52px; font-size: 1.3rem; }
  .login-alt { grid-template-columns: 1fr; }
}
