/* ==========================================================================
   QUANT Terminal ? Login gate (reuses tokens from workspace.css)
   ========================================================================== */
.login-locked, .login-locked body { overflow: hidden; }
.login-locked .app { display: none; }

.login {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  padding: 32px; overflow-y: auto;
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(59,130,246,.17), transparent 62%),
    radial-gradient(900px 520px at 96% 108%, rgba(16,185,129,.09), transparent 60%),
    #080c14;
}
.login[hidden] { display: none; }
.login-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 78%);
}
.login-wrap {
  position: relative; width: min(1140px, 100%); display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr);
  gap: 56px; align-items: center;
}

/* ---- left intro ---- */
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .brand-mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  color: #93c5fd; border: 1px solid rgba(59,130,246,.4);
  background: linear-gradient(145deg, rgba(59,130,246,.26), rgba(59,130,246,.05));
}
.login-brand strong {
  display: block; font-size: 16px; font-weight: 700; letter-spacing: 2.6px;
  color: #f8fafc; line-height: 1.25;
}
.login-brand span { display: block; font-size: 11.5px; color: #6c7f99; margin-top: 2px; }
.login-intro h1 {
  margin: 40px 0 0; font-size: 42px; line-height: 1.22; font-weight: 700;
  letter-spacing: -.6px; color: #f8fafc;
}
.login-lede { margin: 18px 0 0; max-width: 30em; font-size: 14px; line-height: 1.85; color: #9fb0c7; }
.login-points { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 18px; max-width: 440px; }
.login-points li { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 14px; align-items: start; }
.login-points b {
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: #60a5fa;
  border: 1px solid rgba(59,130,246,.34); background: rgba(59,130,246,.1);
  border-radius: 6px; height: 24px; display: grid; place-items: center; margin-top: 1px;
}
.login-points strong { display: block; font-size: 13.5px; font-weight: 600; color: #e2e8f0; }
.login-points span { display: block; font-size: 12.5px; color: #6c7f99; margin-top: 3px; }
.login-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(33,44,62,.9); max-width: 440px;
}
.login-stats strong { display: block; font-family: var(--mono); font-size: 21px; font-weight: 700; color: #f1f5f9; }
.login-stats span { display: block; font-size: 11.5px; color: #6c7f99; margin-top: 2px; }

/* ---- right card ---- */
.login-card {
  background: linear-gradient(180deg, #141c29, #111825);
  border: 1px solid #243248; border-radius: 14px; padding: 30px 30px 26px;
  box-shadow: 0 30px 70px rgba(2,6,16,.6);
}
.login-card-head .tag { height: 22px; font-size: 11px; }
.login-card-head h2 { margin: 14px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.2px; color: #f8fafc; }
.login-card-head p { margin: 6px 0 0; font-size: 12.5px; color: #6c7f99; }

.lf { display: block; margin-top: 22px; }
.lf > span { display: block; font-size: 12px; font-weight: 500; color: #9fb0c7; margin-bottom: 8px; }
.lf-in { position: relative; display: flex; align-items: center; }
.lf-in > svg { position: absolute; left: 12px; color: #6c7f99; pointer-events: none; }
.lf-in input {
  width: 100%; height: 44px; border-radius: 8px; border: 1px solid #2d3b52;
  background: #0b111c; color: #f1f5f9; font-size: 14px; padding: 0 40px 0 38px;
  outline: none; transition: border-color .14s ease, background .14s ease;
}
.lf-in input::placeholder { color: #52627a; }
.lf-in input:focus {
  border-color: #3b82f6; background: #0d1420;
  box-shadow: 0 0 0 3px rgba(59,130,246,.16);
}
.pw-toggle {
  position: absolute; right: 6px; width: 30px; height: 30px; border-radius: 6px;
  display: grid; place-items: center; color: #6c7f99;
}
.pw-toggle:hover { color: #cbd5e1; background: rgba(148,163,184,.1); }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.login-row .chk { font-size: 12.5px; }
.login-hint { font-size: 11.5px; color: #6c7f99; }
.login-err { margin: 0; min-height: 12px; font-size: 12px; color: #fca5a5; line-height: 1.5; }
.login-submit {
  width: 100%; height: 44px; justify-content: center; font-size: 14px;
  font-weight: 600; letter-spacing: .5px; margin-top: 6px;
}
.login-submit[disabled] { opacity: .72; cursor: progress; }
.login-note {
  margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(33,44,62,.9);
  font-size: 11.5px; line-height: 1.7; color: #6c7f99;
}

/* ---- account menu ---- */
.top-right { position: relative; }
.acc-menu {
  position: absolute; top: 48px; right: 0; min-width: 190px; background: #131a26;
  border: 1px solid #2d3b52; border-radius: 9px; padding: 6px; z-index: 80;
  box-shadow: 0 18px 40px rgba(3,7,18,.55);
}
.acc-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px;
  padding: 0 10px; border-radius: 6px; font-size: 12.5px; color: #cbd5e1; text-align: left;
}
.acc-menu button:hover { background: rgba(59,130,246,.14); color: #fff; }

@media (max-width: 1040px) {
  .login-wrap { grid-template-columns: minmax(0,1fr); gap: 36px; max-width: 480px; }
  .login-intro h1 { font-size: 30px; margin-top: 26px; }
  .login-points, .login-stats { display: none; }
}
@media (max-width: 560px) {
  .login { padding: 20px 16px; place-items: start center; }
  .login-card { padding: 24px 20px 22px; }
  .login-intro h1 { font-size: 25px; }
  .login-lede { font-size: 13px; }
}
