/* ============================================================
   Split-screen "brand showcase" login.
   Left = branded panel (tagline + floating stat-chips + rising
   results chart). Right = clean sign-in form.
   Pure CSS/SVG animation — no libraries, CSP-safe.
   ============================================================ */

#client-login-modal.auth-overlay { background: var(--bg); overflow: hidden; }
.auth-split { display: flex; align-items: stretch; padding: 0; }

/* ---------------- LEFT: brand showcase ---------------- */
.auth-brand {
  position: relative; flex: 1.15; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6vmin 6vmin; color: #fff;
}
.auth-brand-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(90% 90% at 12% 8%, rgba(43,111,199,.55) 0%, transparent 55%),
    radial-gradient(85% 85% at 88% 95%, rgba(31,122,90,.42) 0%, transparent 55%),
    linear-gradient(135deg, #16284a 0%, #0d1320 72%);
}
.auth-brand-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 24px 24px; opacity: .5;
}
.brand-glow { position: absolute; border-radius: 50%; filter: blur(60px); z-index: 0; will-change: transform; }
.brand-glow.g1 { width: 34vmin; height: 34vmin; background: rgba(91,163,245,.45); top: -6vmin; left: -4vmin; animation: gdrift1 17s ease-in-out infinite; }
.brand-glow.g2 { width: 30vmin; height: 30vmin; background: rgba(52,200,138,.40); bottom: -7vmin; right: 8vmin; animation: gdrift2 21s ease-in-out infinite; }
@keyframes gdrift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4vmin,3vmin) scale(1.12); } }
@keyframes gdrift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4vmin,-3vmin) scale(1.15); } }

.auth-brand-content { position: relative; z-index: 2; max-width: 660px; }
.auth-logo { display: inline-flex; align-items: center; gap: 0; font-size: clamp(38px, 5.5vmin, 62px); font-weight: 800; letter-spacing: -.02em; color: #fff; margin-bottom: 6vmin; }
.auth-logo .dot { width: clamp(13px, 1.6vmin, 18px); height: clamp(13px, 1.6vmin, 18px); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,200,138,.6); animation: pulseDot 2.4s ease-out infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(52,200,138,.55); } 70% { box-shadow: 0 0 0 10px rgba(52,200,138,0); } 100% { box-shadow: 0 0 0 0 rgba(52,200,138,0); } }

.auth-headline { font-size: clamp(48px, 8.5vmin, 96px); font-weight: 800; line-height: 1.0; letter-spacing: -.03em; margin-bottom: 26px; }
.auth-headline .accent { color: #7db8ff; }
.auth-tagline { font-size: clamp(15px, 2vmin, 19px); line-height: 1.55; color: rgba(255,255,255,.78); max-width: 480px; }


/* rising results chart along the bottom */
.auth-chart { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 24%; z-index: 1; }
.auth-chart .chart-area { opacity: 0; animation: fadeArea 1.6s ease-out forwards 2s; }
.auth-chart .chart-line { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 760; stroke-dashoffset: 760; animation: drawLine 2.6s ease-out forwards .5s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes fadeArea { to { opacity: 1; } }

/* ---------------- RIGHT: sign-in form ---------------- */
.auth-panel { flex: .85; display: flex; align-items: center; justify-content: center; padding: 6vmin 5vmin; background: var(--bg); position: relative; z-index: 1; }
.auth-card { width: 360px; max-width: 100%; animation: authCardIn .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes authCardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.auth-card .auth-card-logo { display: none; align-items: center; gap: 9px; font-size: 22px; font-weight: 800; color: var(--accent); margin-bottom: 22px; }
.auth-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.auth-sub { font-size: 14px; color: var(--muted); margin-bottom: 26px; }

.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.auth-field input {
  width: 100%; padding: 13px 15px; border-radius: 13px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font-size: 15px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-field input::placeholder { color: #566578; }
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,163,245,.20); }

/* password show/hide toggle (login + change-password) */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 62px; }
.pw-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); border: none; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.pw-toggle:hover { color: var(--accent); }

/* "your session expired" banner at the top of the login card */
.auth-session-msg { background: rgba(224,168,50,.12); border: 1px solid rgba(224,168,50,.35); color: var(--amber); font-size: 13px; line-height: 1.45; padding: 10px 13px; border-radius: 10px; margin-bottom: 18px; }

.auth-error { color: var(--red); font-size: 13.5px; margin: 4px 0 2px; }

.auth-submit {
  width: 100%; margin-top: 10px; padding: 14px; border: none; border-radius: 13px;
  background: linear-gradient(135deg, #5ba3f5, #4178c8); color: #fff;
  font-size: 15.5px; font-weight: 700; cursor: pointer; letter-spacing: .01em;
  box-shadow: 0 10px 26px rgba(91,163,245,.38);
  transition: transform .15s ease, box-shadow .25s ease, filter .2s;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(91,163,245,.52); filter: brightness(1.06); }
.auth-submit:active { transform: translateY(0); }

.auth-forgot { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--muted); text-decoration: none; }
.auth-forgot:hover { color: var(--accent); }
.auth-forgot-msg { margin-top: 14px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.auth-forgot-msg p { font-size: 13.5px; line-height: 1.55; }

/* ---------------- responsive: stack on small screens ---------------- */
@media (max-width: 860px) {
  .auth-split { flex-direction: column; }
  .auth-brand { flex: none; min-height: 32vh; padding: 8vw 7vw; justify-content: flex-end; }
  .auth-logo { margin-bottom: 4vw; }
  .auth-chart { display: none; }
  .auth-panel { flex: 1; padding: 9vw 7vw; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-glow, .auth-card, .auth-logo .dot, .auth-chip, .auth-adcard, .chart-line, .chart-area { animation: none !important; }
  .chart-line { stroke-dashoffset: 0; } .chart-area { opacity: 1; }
}
