/* TradeOS sign-in, sign-up and password pages: a calm brand panel beside a clean form. */
:root { --bg: #070b14; --panel: #0c1220; --line: #1c2538; --line-2: #2a3550; --text: #e8edf6; --muted: #8b97ad; --dim: #5f6b82; --blue: #3b82f6; --blue-2: #2563eb; --green: #22c55e; --red: #f43f5e; }
html { background: var(--bg); }
body.auth-body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--text); font-family: Inter, ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; background: var(--bg); }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .auth { grid-template-columns: minmax(420px, 46%) 1fr; } }

/* brand panel (desktop only) */
.auth-brand { display: none; position: relative; overflow: hidden; padding: 44px 56px; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 520px at 0% 0%, rgba(37,99,235,.28), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(34,197,94,.10), transparent 60%), #0a1020;
  border-right: 1px solid var(--line); }
.auth-brand::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
@media (min-width: 1024px) { .auth-brand { display: flex; } }
.auth-brand > * { position: relative; }
.brand-logo { height: 52px; width: auto; display: block; align-self: flex-start; object-fit: contain; }
.brand-copy h2 { font-size: clamp(30px, 2.6vw, 40px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; margin: 0 0 14px; color: #fff; }
.brand-copy h2 span { background: linear-gradient(90deg, #60a5fa, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-copy p { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin: 0 0 26px; max-width: 30rem; }
.brand-points { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.brand-points li { display: flex; gap: 12px; align-items: center; font-size: 14.5px; color: #cbd5e1; font-weight: 500; }
.brand-points svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--green); }
.guard-card { width: min(100%, 360px); padding: 16px 18px; border-radius: 16px; background: rgba(12,18,32,.85); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.guard-card .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.guard-card .state { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 700; font-size: 12px; }
.guard-card .state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.guard-card .nums { display: flex; justify-content: space-between; margin: 10px 0 8px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; font-size: 15px; color: #fff; }
.guard-card .nums b { color: var(--green); font-weight: 700; }
.guard-card .bar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.07); overflow: hidden; }
.guard-card .bar i { display: block; height: 100%; width: 72%; border-radius: 9px; background: linear-gradient(90deg, #22c55e, #4ade80); }
.brand-foot { font-size: 12px; color: var(--dim); line-height: 1.6; max-width: 30rem; }

/* form side */
.auth-main { display: flex; align-items: center; justify-content: center; padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .auth-main { padding: 48px 32px; } }
.auth-card { width: 100%; max-width: 420px; }
.auth-head { margin-bottom: 28px; }
.auth-logo { height: 40px; width: auto; display: block; margin-bottom: 30px; }
@media (min-width: 1024px) { .auth-logo { display: none; } }
.auth-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.auth-head p { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.auth-card form { display: grid; gap: 18px; }
.auth-card form.space-y-5 > * + * { margin-top: 0 !important; }

/* fields and buttons, the class names the forms already use */
.field-label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #cbd5e1; }
.lg-field { position: relative; }
.lg-field .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--dim); pointer-events: none; transition: color .15s; }
.lg-field:focus-within .ico { color: #93c5fd; }
.lg-input { width: 100%; box-sizing: border-box; height: 48px; color: #fff; border-radius: 12px; padding: 0 14px 0 42px; font-size: 15px; font-weight: 500;
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.lg-input::placeholder { color: var(--dim); }
.lg-input:hover { border-color: #38465f; }
.lg-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(59,130,246,.18); }
.lg-input[readonly] { opacity: .7; }
.lg-input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 1000px var(--panel) inset; caret-color: #fff; transition: background-color 9999s; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 9px; border-radius: 9px; color: var(--dim); background: transparent; border: 0; cursor: pointer; }
.eye:hover { color: #fff; background: rgba(255,255,255,.06); }
.lg-check { -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 18px; height: 18px; border-radius: 5px; cursor: pointer; background: var(--panel); border: 1px solid #3a4763; display: inline-flex; align-items: center; justify-content: center; }
.lg-check:checked { background: var(--blue); border-color: var(--blue); }
.lg-check:checked::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.lg-check:focus-visible { outline: 2px solid rgba(59,130,246,.6); outline-offset: 2px; }
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border-radius: 12px; font-size: 15.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #3b82f6, #2563eb); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 8px 24px rgba(37,99,235,.35), inset 0 1px 0 rgba(255,255,255,.18); transition: filter .15s, transform .15s; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary svg { display: none; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; box-sizing: border-box; border-radius: 12px; font-size: 15px; font-weight: 600; color: #e8edf6; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line-2); transition: border-color .15s, background .15s; }
.btn-google:hover { border-color: #3a4763; background: #101829; }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0; font-size: 12.5px; color: var(--dim); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-link { color: #93c5fd; font-weight: 600; text-decoration: none; }
.auth-link:hover { color: #bfdbfe; text-decoration: underline; }
.auth-switch { margin-top: 26px; text-align: center; font-size: 14px; color: var(--muted); }
.err ul, .err li, .err p { color: #fda4af !important; font-size: 13px; font-weight: 500; margin: 6px 0 0; padding: 0; list-style: none; }
.status-box { display: flex; gap: 8px; color: #86efac; background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.28); border-radius: 12px; padding: 11px 13px; font-size: 13.5px; font-weight: 500; }
.status-box div, .status-box p { color: #86efac !important; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 10px; }
.meter i { height: 4px; border-radius: 99px; background: rgba(255,255,255,.1); transition: background .2s; }
.meter[data-level="1"] i:nth-child(-n+1) { background: #fb7185; }
.meter[data-level="2"] i:nth-child(-n+2) { background: #fbbf24; }
.meter[data-level="3"] i:nth-child(-n+3) { background: #60a5fa; }
.meter[data-level="4"] i:nth-child(-n+4) { background: #34d399; }
.hint { font-size: 12.5px; font-weight: 500; margin-top: 6px; min-height: 1em; color: var(--dim); }
.hint.ok { color: #86efac; } .hint.bad { color: #fda4af; }
.logo-fallback { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 26px; }
.logo-fallback[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
