/* SCS AI Trader 0.9.3 - approved branding; local assets and system fonts only. */
.branded-login {
  display: block;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  background: #07101c;
  isolation: isolate;
}
.login-backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(3,9,18,.06), rgba(3,9,18,.42)),
    url('/static/brand/login-background.webp?v=0.9.3') center center / cover no-repeat;
}
.login-shell {
  width: 100%; min-width: 0; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(24px, 5vh, 56px) 24px 24px;
}
.branded-login .login-card {
  width: min(492px, 100%); min-width: 0;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid #355c91; border-radius: 22px;
  background: linear-gradient(150deg, rgba(17,32,54,.91), rgba(6,14,25,.96));
  box-shadow: 0 24px 90px rgba(0,0,0,.48), 0 0 30px rgba(22,83,158,.10), inset 0 1px rgba(161,204,255,.06);
  backdrop-filter: blur(14px);
}
.login-brand { text-align: center; }
.login-brand-icon { display: block; width: 102px; height: 102px; object-fit: contain; margin: 0 auto 17px; filter: drop-shadow(0 0 18px rgba(40,142,253,.20)); }
.branded-login .login-card h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -.8px; }
.login-brand h1 span { color: #66a7ff; }
.login-tagline { color: #a0b4d0; margin: 12px 0 0; font-size: 13px; line-height: 1.6; }
.branded-login .login-form { margin-top: 27px; gap: 17px; }
.login-field { min-width: 0; }
.branded-login .login-field > label { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; margin-bottom: 8px; color: #d6e2f5; font-size: 13px; font-weight: 550; }
.login-field .field-optional { color: #99aac2; font-size: 11px; font-weight: 400; }
.login-input-wrap { position: relative; min-width: 0; }
.branded-login .login-form input {
  display: block; height: 49px; padding: 10px 46px; font-size: 15px;
  border-radius: 12px; border: 1px solid #304561;
  background: rgba(16,29,47,.83); color: #f2f6ff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.branded-login .login-form input::placeholder { color: #8fa2bd; font-size: 13px; opacity: 1; }
.branded-login .login-form input:focus { border-color: #68a8ff; box-shadow: 0 0 0 3px rgba(74,139,249,.18); }
.branded-login input:-webkit-autofill { -webkit-text-fill-color: #eef4ff; box-shadow: 0 0 0 1000px #14243b inset; caret-color: #eef4ff; }
.input-icon { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); width: 19px; height: 19px; pointer-events: none; }
.input-icon, .password-toggle svg, .login-submit svg { fill: none; stroke: #b9d4f6; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle { position: absolute; right: 4px; top: 3px; width: 42px; height: 43px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #b9d4f6; cursor: pointer; }
.password-toggle[hidden] { display: none; }
.password-toggle svg { width: 21px; height: 21px; }
.password-toggle:hover { background: rgba(99,160,247,.12); }
.login-field-help { display: block; font-size: 11px; color: #9bacc4; line-height: 1.5; margin-top: 7px; }
.login-turnstile { min-width: 0; width: 100%; display: flex; justify-content: center; }
.login-turnstile > div { width: 100%; }
.branded-login .login-submit { display: flex; justify-content: center; align-items: center; gap: 18px; min-height: 51px; margin-top: 4px; border: 1px solid #6aa9ff; border-radius: 12px; background: linear-gradient(180deg,#418aff,#2169ee); box-shadow: 0 7px 25px rgba(25,93,210,.20); font-size: 16px; font-weight: 650; }
.login-submit svg { width: 21px; height: 21px; stroke: currentColor; }
.branded-login .login-submit:hover { background: linear-gradient(180deg,#5899ff,#2e78fc); }
.login-help { margin-top: 19px; text-align: center; font-size: 12px; color: #95bff5; }
.login-help summary { cursor: pointer; padding: 4px; }
.login-help p { color: #a8b7cd; font-size: 12px; text-align: left; line-height: 1.65; margin: 12px 0 0; }
.login-access-note { margin-top: 20px; border-top: 1px solid #293c58; padding-top: 16px; color: #92a5c1; font-size: 10px; text-align: center; line-height: 1.6; }
.login-access-note span { padding: 0 5px; }
.login-legal { width: min(690px, 100%); text-align: center; font-size: 12px; line-height: 1.65; margin-top: 25px; color: #b7c9e2; }
.login-legal p { margin: 0; }
.login-legal strong { font-weight: 500; }
.login-legal nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px 0; margin: 10px 0; }
.login-legal a { color: #83bdff; text-decoration: underline; text-underline-offset: 4px; padding: 2px 13px; line-height: 1.3; }
.login-legal a + a { border-left: 1px solid #426184; }
.login-legal a:hover { color: #d3e7ff; }
.login-legal .login-copyright { color: #95abc6; font-size: 11px; }
.legal-mobile-break { display: none; }
.branded-login .alert { font-size: 13px; line-height: 1.6; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #76b5ff; outline-offset: 3px; }

/* Header: keep actual status controls and version visible without overflow. */
.app-brand { min-width: 0; flex: 0 1 300px; gap: 9px; }
.app-brand-logo { display: block; width: clamp(170px, 17vw, 250px); max-width: 100%; height: auto; object-fit: contain; }
.app-brand-version { color: #98acc9; font-size: 11px; white-space: nowrap; }
.topbar { flex-wrap: wrap; gap: 8px 14px; }
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
.page, .app-view, .card, .builder-rules { min-width: 0; }
@media(max-width:700px) {
  .branded-login .login-backdrop { background-image: linear-gradient(180deg,rgba(3,9,18,.24),rgba(3,9,18,.65)),url('/static/brand/login-background-mobile.webp?v=0.9.3'); background-position: center, center; }
  .login-shell { padding: 23px 16px 24px; }
  .branded-login .login-card { padding: 25px 24px; }
  .login-brand-icon { width: 88px; height: 88px; margin-bottom: 14px; }
  .branded-login .login-form input { font-size: 16px; }
  .login-legal a { padding: 4px 10px; }
  .login-legal { font-size: 11px; }
  .legal-mobile-break { display: initial; }
  .app-brand { flex-basis: auto; flex-wrap: wrap; }
  .app-brand-logo { width: 200px; }
  .top-actions { gap: 7px; }
  .top-actions .user-chip { max-width: 160px; overflow-wrap: anywhere; }
}
@media(max-width:420px) {
  .login-shell { padding: 18px 12px; }
  .branded-login .login-card { padding: 23px 18px; border-radius: 18px; }
  .branded-login .login-card h1 { font-size: 30px; }
  .login-tagline { font-size: 11px; }
  .branded-login .login-form input::placeholder { font-size: 12px; }
  .login-legal a { padding: 5px 8px; }
  .app-brand-logo { width: 177px; }
  .top-actions { justify-content: flex-start; }
  .topbar { padding: 10px 12px; }
}
@media(prefers-reduced-motion:reduce) { .branded-login *, .builder-card * { transition: none !important; scroll-behavior: auto !important; } }
#loginTurnstileWidget { display: flex; justify-content: center; }
.builder-card { scroll-margin-top: 82px; }
