/* ============================================================
   EverInternational Bank — login.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #3a56e8;
  --blue-dark: #2a3fb8;
  --blue-light: #5470f0;
  --blue-pale: #eef1fd;
  --blue-xlight: #f4f6ff;
  --navy: #0d1a3e;
  --navy-mid: #1a2d60;
  --accent-green: #1a6b3c;
  --accent-green-light: #22c55e;
  --accent-green-pale: #f0fdf4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --red: #ef4444;
  --red-pale: #fef2f2;
  --font: 'Inter', sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(58,86,232,.10);
  --shadow-lg: 0 8px 40px rgba(58,86,232,.16);
}

body {
  font-family: var(--font);
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--gray-900);
}

/* ── HEADER ── */
.login-header {
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo-icon { position: relative; width: 38px; height: 38px; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.logo-stripe { height: 9px; background: white; border-radius: 2px; transform: skewX(-18deg); display: block; }
.logo-stripe:first-child { width: 34px; }
.logo-stripe:last-child { width: 24px; margin-left: 4px; }
.logo-text-wrap { display: flex; flex-direction: column; }
.logo-name { font-size: 15px; font-weight: 700; color: white; line-height: 1.1; }
.logo-tagline { font-size: 9px; font-weight: 500; color: rgba(255,255,255,.65); letter-spacing: .08em; text-transform: uppercase; }

.header-links { display: flex; gap: 20px; align-items: center; }
.header-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.header-links a:hover { color: white; }

/* ── MAIN WRAPPER ── */
.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}

.login-main::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(84,112,240,.18) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}

.login-main::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(34,197,94,.10) 0%, transparent 70%);
  bottom: -80px; left: -80px;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

/* ── CARD ── */
.login-card {
  background: white;
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-green-pale);
  color: var(--accent-green);
  border: 1px solid rgba(34,197,94,.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 12px;
  margin-bottom: 20px;
}

.card-badge i { font-size: 9px; }

.login-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.login-card .subtitle {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ── STEP INDICATOR ── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--gray-200);
  color: var(--gray-400);
  transition: all .3s;
  flex-shrink: 0;
}

.step-label { font-size: 11px; font-weight: 600; color: var(--gray-400); transition: color .3s; }
.step-line { height: 2px; background: var(--gray-200); flex: 1; margin: 0 10px; transition: background .3s; }

.step.active .step-num { background: var(--blue); color: white; }
.step.active .step-label { color: var(--blue); }
.step.done .step-num { background: var(--accent-green-light); color: white; }
.step.done .step-label { color: var(--accent-green); }
.step-line.done { background: var(--accent-green-light); }

/* ── FORM ── */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

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

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  color: var(--gray-400);
  font-size: 14px;
  pointer-events: none;
  transition: color .2s;
}

.input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-900);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  background: white;
}

.input-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(58,86,232,.12); }
.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon { color: var(--blue); }
.input-wrap input.error { border-color: var(--red); }
.input-wrap input.error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }

.password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 14px;
  padding: 4px;
  transition: color .2s;
}

.password-toggle:hover { color: var(--blue); }

.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }

.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  margin-top: -8px;
}

.remember-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember-wrap input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

.remember-wrap span { font-size: 13px; color: var(--gray-600); }
.forgot-link { font-size: 13px; color: var(--blue); text-decoration: none; font-weight: 500; }
.forgot-link:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
}

.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 4px 16px rgba(58,86,232,.3); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: none;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  padding: 11px 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all .2s;
}

.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ── ALERT ── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.alert-error { background: var(--red-pale); color: var(--red); border: 1px solid rgba(239,68,68,.2); }
.alert-success { background: var(--accent-green-pale); color: var(--accent-green); border: 1px solid rgba(34,197,94,.2); }
.alert i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.alert.hidden { display: none; }

/* ── OTP STEP ── */
.otp-info-box {
  background: var(--blue-pale);
  border: 1.5px solid rgba(58,86,232,.25);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.otp-info-box i { color: var(--blue); font-size: 22px; flex-shrink: 0; margin-top: 2px; }

.otp-info-content { display: flex; flex-direction: column; gap: 6px; }

.otp-info-box p { font-size: 13.5px; color: var(--navy); line-height: 1.65; }
.otp-info-box strong { color: var(--blue); font-weight: 700; }

.otp-email-hint {
  font-size: 13px !important;
  color: var(--gray-600) !important;
  background: rgba(58,86,232,.06);
  border: 1px solid rgba(58,86,232,.15);
  border-radius: 8px;
  padding: 6px 12px;
  display: inline-block;
}

.otp-email-hint strong { color: var(--navy) !important; font-family: 'Courier New', monospace; font-size: 13px; }

.otp-digits-wrap {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 10px;
}

.otp-digit {
  width: 60px; height: 72px;
  border: 3px solid var(--gray-200);
  border-radius: 12px;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  caret-color: var(--blue);
  background: var(--gray-50);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.04);
}

.otp-digit:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(58,86,232,.15), inset 0 2px 4px rgba(0,0,0,.04);
  background: white;
}
.otp-digit.filled {
  border-color: var(--blue);
  background: var(--blue-pale);
  color: var(--blue-dark);
  box-shadow: 0 0 0 2px rgba(58,86,232,.1);
}
.otp-digit.error { border-color: var(--red); background: var(--red-pale); color: var(--red); animation: shake .3s; }

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

.otp-timer {
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.otp-timer span { color: var(--blue); font-weight: 600; }
.otp-timer.expired span { color: var(--red); }

.resend-wrap {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--gray-600);
}

.resend-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  text-decoration: underline;
}

.resend-btn:disabled { color: var(--gray-400); cursor: not-allowed; text-decoration: none; }

/* ── FOOTER LINKS ── */
.card-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--gray-600);
}

.card-footer a { color: var(--blue); text-decoration: none; font-weight: 500; }
.card-footer a:hover { text-decoration: underline; }

/* ── SECURITY BADGES ── */
.security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}

.security-badge i { font-size: 13px; color: rgba(255,255,255,.45); }

/* ── STEP PANELS ── */
.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeSlide .3s ease; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SPINNER ── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}

.btn-primary.loading .spinner { display: block; }
.btn-primary.loading .btn-text { display: none; }

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

/* ── FOOTER ── */
.login-footer {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.login-footer p { font-size: 12px; color: rgba(255,255,255,.4); }
.login-footer-links { display: flex; gap: 16px; }
.login-footer-links a { font-size: 12px; color: rgba(255,255,255,.4); text-decoration: none; transition: color .2s; }
.login-footer-links a:hover { color: rgba(255,255,255,.7); }

/* ── FDIC STRIP ── */
.fdic-strip {
  background: rgba(255,255,255,.06);
  text-align: center;
  padding: 10px;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  letter-spacing: .03em;
}

/* ── RESPONSIVE ── */
@media (max-width: 540px) {
  .login-card { padding: 32px 24px; }
  .login-card h1 { font-size: 24px; }
  .otp-digits-wrap { gap: 6px; }
  .otp-digit { width: 44px; height: 54px; font-size: 20px; }
  .login-header { padding: 16px 20px; }
  .header-links { display: none; }
  .login-footer { justify-content: center; }
}
