*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body { display: block !important; opacity: 1 !important; transition: opacity 0.15s ease-in; }

h1, h2, h3, .view-title, .brand-title {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#video-intro {
  position: fixed; inset: 0; z-index: 300;
  background: #000000;
  opacity: 1;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
#intro-video { width: 100%; height: 100%; object-fit: contain; display: block; transform: scale(0.85); }
#video-intro.fade-out { opacity: 0; pointer-events: none; }

/* skip button */
#skip-btn {
  position: absolute; top: 24px; right: 24px;
  background: rgba(2, 216, 232, 0.18);
  border: 1.5px solid rgba(2, 216, 232, 0.5);
  color: #02D8E8;
  font-family: 'Sora', sans-serif;
  font-size: calc(12px * var(--sn-font-scale, 1)); 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(2, 216, 232, 0.35);
  border-color: #02D8E8;
  transform: translateY(-1px);
}
@keyframes skipFadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

#login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: #E0FAFC;
  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; }

/* soft ambient glow blobs on #E0FAFC */
.login-bg-blob { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(90px); }
.lbb1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #C2F6F9 0%, #E0FAFC 60%, transparent 70%);
  opacity: 0.6;
  top: -120px; right: -120px;
}
.lbb2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #C2F6F9 0%, #E0FAFC 60%, transparent 70%);
  opacity: 0.5;
  bottom: -100px; left: -100px;
}

.login-card {
  position: relative; z-index: 10;
  width: min(900px, 95vw); min-height: 520px;
  border-radius: 28px; overflow: hidden; display: flex;
  background: #FFFFFF;
  border: 1.5px solid #C2F6F9;
  box-shadow:
    0 2px 6px rgba(2, 216, 232, 0.08),
    0 12px 36px rgba(2, 216, 232, 0.22),
    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 with grade-in grade-out vertical beam Aqua gradient */
.left-panel {
  width: 45%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(224, 250, 252, 0.5) 0%, rgba(109, 233, 242, 0.3) 45%, transparent 75%),
    linear-gradient(177deg, #02D8E8 0%, #1CDCEA 16%, #36E0ED 32%, #6DE9F2 46%, #89EDF4 50%, #6DE9F2 54%, #36E0ED 68%, #1CDCEA 84%, #02D8E8 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(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 28px 28px;
}
.left-panel::after {
  content: ''; position: absolute;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 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.25); 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.28);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px; backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(2, 216, 232, 0.3), 0 0 15px rgba(255, 255, 255, 0.45);
  animation: iconFloat 3s ease-in-out infinite alternate;
}
@keyframes iconFloat { from { transform: translateY(0); } to { transform: translateY(-8px); } }
.left-brand img {
  width: min(280px, 88%);
  max-width: 300px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.15));
}

.right-panel {
  flex: 1; background: var(--white, #FFFFFF);
  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: calc(24px * var(--sn-font-scale, 1)); font-weight: 800; color: var(--text, #000000); letter-spacing: -0.03em; margin-bottom: 6px; }
.view-sub { font-size: calc(13px * var(--sn-font-scale, 1)); color: var(--text-muted, #000000); margin-bottom: 28px; line-height: 1.6; }

/* back button */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: calc(12px * var(--sn-font-scale, 1)); font-weight: 600; color: var(--primary, #02D8E8);
  background: none; border: none; cursor: pointer; padding: 0;
  margin-bottom: 28px; font-family: var(--font-family-primary) !important;
  transition: color 0.15s;
}
.back-btn:hover { color: #1CDCEA; }

/* fields */
.field { margin-bottom: 16px; position: relative; }
.field-label { 
  display: block; 
  font-family: 'Sora', sans-serif;
  font-size: calc(12.5px * var(--sn-font-scale, 1)); 
  font-weight: 700; 
  color: var(--text, #000000); 
  letter-spacing: 0.01em; 
  margin-bottom: 6px; 
}
.pass-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.forgot { font-size: calc(12px * var(--sn-font-scale, 1)); font-weight: 600; color: var(--primary, #02D8E8); text-decoration: none; transition: color 0.15s; cursor: pointer; }
.forgot:hover { color: #1CDCEA; text-decoration: underline; }
.field-wrap { position: relative; }

.field-input {
  width: 100%; padding: 10px 14px 10px 40px;
  min-height: 40px;
  background: var(--input-bg, #FFFFFF); border: 1.5px solid var(--border, #C2F6F9);
  border-radius: 8px; font-family: var(--font-family-primary) !important; font-size: calc(13px * var(--sn-font-scale, 1)); color: var(--text, #000000); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
}
.field-input::placeholder { color: #000000; opacity: 0.55; }
.field-input:hover { border-color: #36E0ED; background: #E0FAFC; }
.field-input:focus { border-color: #02D8E8; background: var(--white, #FFFFFF); box-shadow: 0 0 0 3px rgba(2, 216, 232, 0.25); transform: translateY(-1px); }
.field-input.error { border-color: #02D8E8; box-shadow: 0 0 0 3px rgba(2, 216, 232, 0.2); }

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

.err-msg { font-size: calc(11px * var(--sn-font-scale, 1)); color: #02D8E8; 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, #02D8E8); cursor: pointer; }
.remember label { font-size: calc(12.5px * var(--sn-font-scale, 1)); color: var(--text-muted, #000000); cursor: pointer; user-select: none; }

/* login button with rich Aqua gradient */
.login-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, #02D8E8 0%, #1CDCEA 35%, #36E0ED 70%, #51E5EF 100%);
  color: #000000; font-family: var(--font-family-primary) !important; font-size: calc(14px * var(--sn-font-scale, 1)); 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 18px rgba(2, 216, 232, 0.45);
  position: relative; overflow: hidden;
}
.login-btn:hover {
  background: linear-gradient(90deg, #1CDCEA 0%, #36E0ED 35%, #51E5EF 70%, #6DE9F2 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(2, 216, 232, 0.65);
}
.login-btn:active { transform: translateY(0); }
.login-btn.loading { opacity: 0.8; cursor: not-allowed; }
.login-btn.success { background: #02D8E8; }
.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(0,0,0,0.35); border-top-color: #000000; 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: calc(22px * var(--sn-font-scale, 1)); font-weight: 700;
  border: 2px solid var(--border, #C2F6F9); border-radius: 10px;
  background: var(--input-bg, #FFFFFF); font-family: var(--font-family-primary) !important;
  color: var(--text, #000000); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.otp-box:focus { border-color: #02D8E8; box-shadow: 0 0 0 3px rgba(2, 216, 232, 0.25); background: var(--white, #FFFFFF); }
.otp-box.filled { border-color: #02D8E8; background: #E0FAFC; }
.otp-box.error-box { border-color: #02D8E8; }

.resend-row { font-size: calc(12px * var(--sn-font-scale, 1)); color: var(--text-muted, #000000); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.resend-btn { background: none; border: none; color: var(--primary, #02D8E8); font-weight: 600; cursor: pointer; font-family: var(--font-family-primary) !important; font-size: calc(12px * var(--sn-font-scale, 1)); padding: 0; transition: color 0.15s; }
.resend-btn:hover { color: #1CDCEA; }
.resend-btn:disabled { color: #89EDF4; 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, #C2F6F9); border-radius: 4px; overflow: hidden; }
.strength-fill { height: 100%; width: 0%; border-radius: 4px; transition: width 0.3s, background 0.3s; background: #02D8E8; }
.strength-label { font-size: calc(11px * var(--sn-font-scale, 1)); font-weight: 600; min-width: 40px; color: #02D8E8; }

/* global error */
.global-error { display: none; align-items: center; gap: 9px; padding: 11px 14px; background: #E0FAFC; border: 1.5px solid #02D8E8; border-radius: 10px; margin-bottom: 16px; font-size: calc(12.5px * var(--sn-font-scale, 1)); font-weight: 600; color: #000000; }
.global-error.show { display: flex; }

.login-note-box {
  margin-top: 24px;
  padding: 14px;
  background-color: #E0FAFC;
  border-radius: 8px;
  border-left: 3px solid #02D8E8;
  font-size: calc(11.5px * var(--sn-font-scale, 1));
  color: #000000;
  line-height: 1.6;
  text-align: left;
}
.login-note-box strong {
  color: #000000;
}
.login-note-box a {
  color: #02D8E8;
  text-decoration: none;
  font-weight: 600;
}
.login-note-box a:hover {
  text-decoration: underline;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* toast */
.toast {
  position: fixed; top: 24px; right: 24px; z-index: 999;
  background: #02D8E8; color: #000000;
  padding: 12px 20px; border-radius: 12px; font-size: calc(13px * var(--sn-font-scale, 1)); font-weight: 700;
  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(2, 216, 232, 0.50);
}
.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; }
}
