/* Sign-in page: animated map on the left, form on the right. Builds on the tokens in styles.css. */
html, body.login-page { height: auto; min-height: 100%; }
body.login-page { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 1fr); min-height: 100vh; min-height: 100dvh; background: var(--panel); }

/* Left: map */
.login-art { position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh; background: radial-gradient(120% 90% at 55% 45%, #16335a 0%, #0c1c33 55%, #081325 100%); color: #fff; }
.login-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; animation: art-drift 20s ease-in-out infinite alternate; }
.login-art canvas.still { animation-play-state: paused; }
@keyframes art-drift { from { transform: scale(1); } to { transform: scale(1.04); } }
.login-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(8,19,37,.75) 0, rgba(8,19,37,0) 18%, rgba(8,19,37,0) 62%, rgba(8,19,37,.92) 100%); }
.art-top, .art-caption, .art-pause { position: absolute; z-index: 1; }
.art-top { top: 28px; left: 36px; right: 36px; }
.art-title { display: block; font-weight: 700; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.1; letter-spacing: -.01em; }
.art-caption { left: 36px; right: 36px; bottom: 32px; padding-right: 150px; }
.art-eyebrow { margin: 8px 0 0; font-size: clamp(18px, 1.8vw, 26px); line-height: 1.25; color: #d7e4f4; }
.art-label { margin: 0 0 12px; font-size: clamp(20px, 2.2vw, 30px); font-weight: 650; line-height: 1.2; min-height: 2.4em; display: flex; align-items: flex-end; transition: opacity .6s ease; }
.art-label.fading { opacity: 0; }
.art-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b9cde6; }
.art-ramp { width: 160px; height: 8px; border-radius: 99px; background: linear-gradient(to right, #482475, #414487, #2a788e, #22a884, #7ad151, #fde725); }
.art-pause { right: 36px; bottom: 32px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; padding: 6px 14px; font-size: 13px; backdrop-filter: blur(4px); }
.art-pause:hover { background: rgba(255,255,255,.2); border-color: #fff; }
.art-pause[hidden] { display: none; }

/* Right: form */
.login-main { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: var(--panel); }
.login-box { width: 100%; max-width: 380px; animation: login-rise .6s ease both; }
@keyframes login-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.login-box .badge { display: inline-block; }
.login-box h1 { font-size: 32px; line-height: 1.15; margin: 18px 0 6px; letter-spacing: -.01em; }
.login-sub { margin: 0 0 28px; color: var(--muted); }
.login-field { margin-bottom: 18px; }
.login-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.login-field input { width: 100%; height: 46px; padding: 0 12px; font-size: 16px; background: #fff; border: 1px solid #8a94a3; border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.login-field input:hover { border-color: var(--accent); }
.login-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11,92,173,.18); outline: none; }
.login-field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.login-field input[aria-invalid=true] { border-color: #b3261e; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 72px; }
.pw-toggle { position: absolute; top: 5px; right: 5px; height: 36px; padding: 0 12px; background: transparent; border: 0; border-radius: 6px; color: var(--accent); font-weight: 600; font-size: 14px; }
.pw-toggle:hover { background: #eaf2fb; }
.login-err { margin: 6px 0 0; font-size: 13px; color: #b3261e; }
.login-submit { width: 100%; height: 48px; margin-top: 4px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius); font-size: 16px; font-weight: 650; transition: background .15s; }
.login-submit:hover { background: #094c90; }
.login-status { margin: 12px 0 0; font-size: 14px; }
.login-status:empty { display: none; }
.login-status.notice { background: #fff7e0; border: 1px solid #f2d27a; border-radius: var(--radius); padding: 8px 10px; }
.login-note { margin: 24px 0 0; font-size: 13px; color: var(--muted); }
.login-submit:disabled { opacity: .65; cursor: progress; }

/* Narrow screens: the map becomes a banner above the form */
@media (max-width: 860px) {
  body.login-page { display: block; }
  .login-art { min-height: 340px; height: 42vh; }
  .art-top { top: 16px; left: 16px; right: 16px; }
  .art-caption { left: 16px; right: 16px; bottom: 14px; padding-right: 0; }
  .art-title { font-size: 26px; }
  .art-eyebrow { margin-top: 4px; font-size: 15px; }
  .art-legend { display: none; }
  .art-label { font-size: 17px; margin: 0; min-height: 2.4em; padding-right: 76px; }
  .art-pause { right: 16px; bottom: 14px; padding: 4px 10px; font-size: 12px; }
  .login-main { padding: 28px 16px 36px; }
  .login-box { max-width: 460px; }
  .login-box h1 { font-size: 28px; margin-top: 14px; }
  .login-sub { margin-bottom: 20px; }
}
