/* ══════════════════════════════════════
   login.css — Login page styles
   All colours via tokens.css variables
══════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: 'Sora', sans-serif; }

/* ── VIDEO INTRO ── */
#video-intro {
  position: fixed; inset: 0; z-index: 300;
  background: #000;
  opacity: 1;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
#intro-video { width: 100%; height: 100%; object-fit: cover; display: block; }
#video-intro.fade-out { opacity: 0; pointer-events: none; }

/* skip button */
#skip-btn {
  position: absolute; top: 24px; right: 24px;
  background: rgba(0, 82, 204, 0.18);
  border: 1.5px solid rgba(0, 82, 204, 0.45);
  color: var(--primary-light);
  font-family: 'Sora', sans-serif;
  font-size: 12px; font-weight: 600;
  padding: 8px 18px; border-radius: 20px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  backdrop-filter: blur(10px);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  opacity: 0;
  animation: skipFadeIn 0.6s 1.5s ease forwards;
  letter-spacing: 0.05em;
}
#skip-btn:hover {
  background: rgba(0, 82, 204, 0.30);
  border-color: rgba(0, 82, 204, 0.70);
  transform: translateY(-1px);
}
@keyframes skipFadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── LOGIN SCREEN ── */
#login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
#login-screen.visible { opacity: 1; pointer-events: all; }

/* bg blobs */
.login-bg-blob { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(80px); }
.lbb1 { width: 500px; height: 500px; background: rgba(0, 82, 204, 0.10); top: -100px; right: -100px; }
.lbb2 { width: 350px; height: 350px; background: rgba(76, 154, 255, 0.09); bottom: -80px; left: -80px; }

/* ── CARD ── */
.login-card {
  position: relative; z-index: 10;
  width: min(900px, 95vw); min-height: 520px;
  border-radius: 28px; overflow: hidden; display: flex;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 82, 204, 0.18),
    0 32px 80px rgba(0, 0, 0, 0.08);
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ── LEFT PANEL ── */
.left-panel {
  width: 45%;
  background: linear-gradient(145deg, #0052CC 0%, #003d9e 40%, #002785 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 40px; position: relative; overflow: hidden;
}
.left-panel::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(76, 154, 255, 0.10) 1px, transparent 1px);
  background-size: 28px 28px;
}
.left-panel::after {
  content: ''; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 154, 255, 0.25) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation: leftGlow 4s ease-in-out infinite alternate;
}
@keyframes leftGlow {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
  to   { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}
.left-content { position: relative; z-index: 2; text-align: center; }

.left-shield {
  width: 72px; height: 72px; margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px; backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(76, 154, 255, 0.40);
  animation: iconFloat 3s ease-in-out infinite alternate;
}
@keyframes iconFloat { from { transform: translateY(0); } to { transform: translateY(-8px); } }
.left-brand img {
  height: 150px;  /* Adjust as needed */
  width: auto;
  object-fit: contain;
  display: block;
  position: relative;
  top: -15px;
}
/* ── RIGHT PANEL ── */
.right-panel {
  flex: 1; background: var(--white);
  display: flex; flex-direction: column; justify-content: center;
  padding: 52px;
}
.right-view { display: none; flex-direction: column; justify-content: center; }
.right-view.active { display: flex; animation: fD 0.4s ease both; }
@keyframes fD { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.view-title { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; margin-bottom: 6px; }
.view-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }

/* back button */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--primary);
  background: none; border: none; cursor: pointer; padding: 0;
  margin-bottom: 28px; font-family: 'Sora', sans-serif;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--primary-dark); }

/* fields */
.field { margin-bottom: 18px; }
.field-label { display: block; font-size: 11px; font-weight: 600; color: var(--text); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 7px; }
.pass-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.forgot { font-size: 12px; font-weight: 600; color: var(--primary); text-decoration: none; transition: color 0.15s; cursor: pointer; }
.forgot:hover { color: var(--primary-dark); text-decoration: underline; }
.field-wrap { position: relative; }

.field-input {
  width: 100%; padding: 12px 14px 12px 42px;
  background: var(--input-bg); border: 1.5px solid var(--border);
  border-radius: 10px; font-family: 'Sora', sans-serif; font-size: 13.5px; color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
}
.field-input::placeholder { color: #b3bac5; }
.field-input:hover { border-color: var(--primary-light); background: #eef0fb; }
.field-input:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15); transform: translateY(-1px); }
.field-input.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08); }

.field-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #b3bac5; pointer-events: none; display: flex; transition: color 0.2s; }
.field-wrap:focus-within .field-icon { color: var(--primary); }
.eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #b3bac5; display: flex; align-items: center; padding: 4px; border-radius: 4px; transition: color 0.15s; }
.eye-btn:hover { color: var(--primary); }

.err-msg { font-size: 11px; color: var(--danger); font-weight: 500; margin-top: 5px; display: none; align-items: center; gap: 4px; }
.err-msg.show { display: flex; }

/* remember */
.remember { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.remember input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.remember label { font-size: 12.5px; color: var(--text-muted); cursor: pointer; user-select: none; }

/* login button */
.login-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--primary);
  color: #fff; font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 82, 204, 0.40);
  position: relative; overflow: hidden;
}
.login-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 82, 204, 0.50); }
.login-btn:active { transform: translateY(0); }
.login-btn.loading { opacity: 0.8; cursor: not-allowed; }
.login-btn.success { background: #2d7a5f; }
.btn-inner { display: flex; align-items: center; gap: 8px; }
.login-btn.loading .btn-inner { display: none; }
.login-btn.loading .spinner { display: block; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* OTP */
.otp-wrap { display: flex; gap: 10px; margin-bottom: 12px; }
.otp-box {
  width: 48px; height: 56px; text-align: center;
  font-size: 22px; font-weight: 700;
  border: 2px solid var(--border); border-radius: 10px;
  background: var(--input-bg); font-family: 'Sora', sans-serif;
  color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.otp-box:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15); background: var(--white); }
.otp-box.filled { border-color: var(--primary); background: #eef0fb; }
.otp-box.error-box { border-color: var(--danger); }

.resend-row { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.resend-btn { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; font-family: 'Sora', sans-serif; font-size: 12px; padding: 0; transition: color 0.15s; }
.resend-btn:hover { color: var(--primary-dark); }
.resend-btn:disabled { color: #b3bac5; cursor: not-allowed; }

/* password strength */
.strength-wrap { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.strength-bar { flex: 1; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.strength-fill { height: 100%; width: 0%; border-radius: 4px; transition: width 0.3s, background 0.3s; }
.strength-label { font-size: 11px; font-weight: 600; min-width: 40px; }

/* global error */
.global-error { display: none; align-items: center; gap: 9px; padding: 11px 14px; background: #fdf0ed; border: 1px solid rgba(192, 57, 43, 0.22); border-radius: 10px; margin-bottom: 16px; font-size: 12.5px; font-weight: 500; color: var(--danger); }
.global-error.show { display: flex; }

/* toast */
.toast {
  position: fixed; top: 24px; right: 24px; z-index: 999;
  background: var(--primary); color: #fff;
  padding: 12px 20px; border-radius: 12px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  transform: translateY(-80px); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s;
  box-shadow: 0 8px 32px rgba(0, 82, 204, 0.40);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* responsive */
@media (max-width: 640px) {
  .left-panel { display: none; }
  .right-panel { padding: 32px 24px; }
  .login-card { border-radius: 20px; }
}
