/* ==========================================================================
   LOGIN — supplements the Tailwind utility classes already used inline.
   Same visual language as the landing page: soft white cards, pill
   buttons, subtle glass on floating surfaces only, blob backgrounds.
   ========================================================================== */

body { font-family: 'Inter', sans-serif; }
.font-display { font-family: 'Plus Jakarta Sans', sans-serif; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #0B4A6F; }

/* ---- Brand panel background ---- */
.brand-panel {
  position: relative;
  background: radial-gradient(circle at 20% 20%, #e0f2fe 0%, #f8fafc 55%);
  overflow: hidden;
}
.login-blob {
  position: absolute; border-radius: 9999px; filter: blur(90px); opacity: .55;
  animation: blobFloat 9s ease-in-out infinite;
}
@keyframes blobFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-22px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

.particle {
  position: absolute; border-radius: 50%; background: rgba(11, 74, 111, .18);
  animation: particleDrift linear infinite;
}
@keyframes particleDrift {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-120px) translateX(20px); opacity: 0; }
}

/* ---- Glass surfaces (used sparingly — floating cards only) ---- */
.glass-card {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, .8);
}

/* ---- Auth card entrance ---- */
.auth-card-in { animation: authCardIn .6s cubic-bezier(.16,1,.3,1) both; }
@keyframes authCardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Custom checkbox ---- */
.viva-checkbox {
  appearance: none; width: 18px; height: 18px; border: 1.5px solid #cbd5e1; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}
.viva-checkbox:checked { background: #0B4A6F; border-color: #0B4A6F; }
.viva-checkbox:checked::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #fff; font-size: 10px; }

/* ---- Password field toggle ---- */
.pw-toggle { cursor: pointer; color: #94a3b8; transition: color .15s ease; }
.pw-toggle:hover { color: #0B4A6F; }

/* ---- Password strength meter ---- */
.strength-track { display: flex; gap: 4px; height: 4px; }
.strength-seg { flex: 1; border-radius: 2px; background: #e2e8f0; transition: background .25s ease; }
.strength-seg.on-weak { background: #ef4444; }
.strength-seg.on-fair { background: #f59e0b; }
.strength-seg.on-good { background: #0ea5e9; }
.strength-seg.on-strong { background: #10b981; }

/* ---- Field validation state ---- */
.field-ok { border-color: #10b981 !important; }
.field-bad { border-color: #ef4444 !important; }
.field-hint { font-size: 12px; margin-top: 4px; min-height: 16px; }
.field-hint.ok { color: #059669; }
.field-hint.bad { color: #dc2626; }

/* ---- Loading spinner on submit buttons ---- */
.btn-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite; display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.is-loading .btn-spinner { display: inline-block; }
.is-loading .btn-label { display: none; }

/* ---- Slide panel (sign up) ---- */
.slide-scrim {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
  z-index: 100; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.slide-scrim.open { opacity: 1; visibility: visible; }
.slide-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw);
  background: #fff; z-index: 101; overflow-y: auto;
  transform: translateX(100%); transition: transform .4s cubic-bezier(.16,1,.3,1);
  box-shadow: -20px 0 60px rgba(15,23,42,.15);
}
.slide-panel.open { transform: translateX(0); }

/* ---- Small modal (forgot password) ---- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 110;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-scrim.open { display: flex; }
.modal-box { animation: authCardIn .3s cubic-bezier(.16,1,.3,1) both; }

/* ---- Toasts ---- */
.toast-stack { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast-item {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(15,23,42,.12);
  font-size: 14px; font-weight: 600; color: #0f172a; max-width: 320px;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
.toast-item.success i { color: #10b981; }
.toast-item.error i { color: #ef4444; }
.toast-item.info i { color: #0ea5e9; }

@media (max-width: 1023px) {
  .brand-panel { display: none; }
}
