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

body {
  font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
}

.auth-shell { display: flex; min-height: 100vh; }

/* ── Visual panel ── */

.auth-visual {
  flex: 1 1 54%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 56px 0;
  color: #fff;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(79,70,229,0.35), transparent 60%),
    radial-gradient(ellipse 700px 600px at 100% 100%, rgba(15,157,142,0.30), transparent 55%),
    linear-gradient(165deg, #050e1f 0%, #0a1f3d 42%, #0c3140 75%, #0c2b30 100%);
  background-size: 140% 140%, 140% 140%, 100% 100%;
  animation: aurora-shift 22s ease-in-out infinite;
}
@keyframes aurora-shift {
  0%, 100% { background-position: 0% 0%, 100% 100%, 0% 0%; }
  50%      { background-position: 12% 8%, 88% 92%, 0% 0%; }
}

.auth-visual::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 90% 80% at 30% 20%, #000 40%, transparent 90%);
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  animation: drift 16s ease-in-out infinite;
}
.glow-a { width: 420px; height: 420px; top: -140px; left: -100px; background: #4f46e5; }
.glow-b { width: 380px; height: 380px; bottom: -60px; right: -120px; background: #0f9d8e; animation-delay: -8s; }
.glow-c { width: 260px; height: 260px; top: 38%; left: 42%; background: #2ab8c9; opacity: 0.22; animation-delay: -4s; animation-duration: 20s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(26px, -18px) scale(1.08); }
}

.auth-visual-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.visual-logo { height: 56px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.9; }
.visual-logo-text { font-size: 13px; font-weight: 600; letter-spacing: 0.4px; color: rgba(255,255,255,0.85); }

.auth-visual-body { position: relative; z-index: 2; margin-top: 64px; max-width: 460px; }

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-visual-top,
.visual-eyebrow, .visual-title, .visual-sub, .visual-features {
  animation: fade-in-up 0.7s ease-out both;
}
.visual-eyebrow    { animation-delay: 0.05s; }
.visual-title      { animation-delay: 0.15s; }
.visual-sub        { animation-delay: 0.25s; }
.visual-features   { animation-delay: 0.35s; }
.visual-features li:nth-child(1) { animation: fade-in-up 0.6s ease-out both; animation-delay: 0.4s; }
.visual-features li:nth-child(2) { animation: fade-in-up 0.6s ease-out both; animation-delay: 0.5s; }
.visual-features li:nth-child(3) { animation: fade-in-up 0.6s ease-out both; animation-delay: 0.6s; }

.visual-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: #7fe3d4;
  background: rgba(15,157,142,0.15);
  border: 1px solid rgba(127,227,212,0.3);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 22px;
}
.visual-eyebrow i {
  width: 6px; height: 6px; border-radius: 50%; background: #7fe3d4;
  box-shadow: 0 0 0 0 rgba(127,227,212,0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(127,227,212,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(127,227,212,0); }
  100% { box-shadow: 0 0 0 0 rgba(127,227,212,0); }
}

.visual-title {
  font-size: clamp(26px, 3.1vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.8px;
  margin-bottom: 18px; white-space: nowrap;
  background: linear-gradient(100deg, #ffffff 25%, #a9c9ff 65%, #7fe3d4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.visual-sub { font-size: 14.5px; line-height: 1.65; color: rgba(226,236,245,0.78); margin-bottom: 34px; }

.visual-features { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.visual-features li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.9); }
.vf-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  color: #7fe3d4;
}

/* ── Route map accent ── */

.route-map { position: relative; margin-top: 30px; height: 150px; z-index: 1; opacity: 0.9; animation: float-y 6s ease-in-out infinite; }
.route-svg { width: 100%; height: 100%; overflow: visible; }

.route-line {
  fill: none; stroke: rgba(127,227,212,0.4); stroke-width: 1.5;
  stroke-dasharray: 5 9; stroke-linecap: round;
  animation: dash-flow 7s linear infinite;
}
@keyframes dash-flow { to { stroke-dashoffset: -140; } }
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.port { fill: #0c3140; stroke: #7fe3d4; stroke-width: 1.6; }
.port-active { fill: #7fe3d4; animation: port-pulse 2.6s ease-in-out infinite; transform-origin: 610px 70px; }
@keyframes port-pulse {
  0%, 100% { r: 5; opacity: 1; }
  50%      { r: 7; opacity: 0.55; }
}

/* ── Form panel ── */

.auth-form-panel {
  flex: 1 1 46%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 800px 500px at 50% 0%, #eef1f8, #f7f9fc 60%);
  padding: 40px 32px;
}

.login-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 42px 44px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 30px 70px -18px rgba(10,31,68,0.28), 0 4px 16px rgba(10,31,68,0.06);
  border: 1px solid #edf0f6;
  overflow: hidden;
  animation: fade-in-up 0.6s ease-out both;
  animation-delay: 0.1s;
}
.login-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #4f46e5, #0f9d8e);
}

.card-logo { display: none; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid #e8edf3; }
.card-logo img { height: 40px; object-fit: contain; mix-blend-mode: multiply; }
.card-logo-text { font-size: 12.5px; font-weight: 600; color: #3d5175; letter-spacing: 0.5px; }

.card-title { font-size: 23px; font-weight: 700; color: #0A1F44; margin-bottom: 4px; }
.card-subtitle { font-size: 13px; color: #5a6a7e; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }

.form-label {
  display: block; font-size: 11.5px; font-weight: 600; color: #1a2535;
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px;
}

.input-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8fa4bf; pointer-events: none; }

.form-input {
  width: 100%; padding: 11px 12px 11px 38px;
  border: 1.5px solid #e2e8f0; border-radius: 9px;
  font-size: 14px; color: #1a2535; background: #f8fafc;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
.form-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.12); background: #fff; }

.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #8fa4bf; padding: 4px;
  display: flex; align-items: center;
}
.pw-toggle:hover { color: #1a2535; }

.btn-login {
  width: 100%; padding: 13px;
  background: linear-gradient(120deg, #1e2560, #14405a, #0f9d8e);
  background-size: 200% 200%;
  color: #fff; border: none; border-radius: 9px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  margin-top: 8px; letter-spacing: 0.3px;
  transition: background-position .5s, transform .15s, box-shadow .2s;
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px;
  box-shadow: 0 14px 28px -8px rgba(15,64,90,0.45);
}
.btn-login:hover      { background-position: 100% 50%; transform: translateY(-1px); box-shadow: 0 18px 34px -8px rgba(15,64,90,0.5); }
.btn-login:active     { transform: translateY(0); }
.btn-login:disabled   { opacity: 0.75; cursor: not-allowed; transform: none; }

.btn-spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-login.loading .btn-spinner { display: block; }
.btn-login.loading .btn-text { opacity: 0.6; }

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

.msg-box {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: 13px;
  display: none; align-items: center; gap: 7px;
}
.msg-box.error   { display: flex; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.msg-box.success { display: flex; background: #ecfbf8; color: #0f9d8e; border: 1px solid #bfeee6; }

.version-tag { margin-top: 22px; font-size: 11px; color: #b6c0d1; text-align: center; }

@media (max-width: 900px) {
  .auth-visual { display: none; }
  .auth-form-panel { flex: 1 1 100%; }
  .card-logo { display: flex; }
}