/* StarTraderFX client portal — sign-in and sign-up pages.
 * Split layout: dark brand panel on the left, white form on the right.
 * Plain CSS, no build step; scoped to these two documents only. */

:root {
  --bg: #FCFDFD;
  --card: #FFFFFF;
  --ink: #0C1D1A;
  --ink-soft: #3A4256;
  --muted: #6A7389;
  --line: #E0EBE7;
  --line-strong: #C9D8D2;
  --field: #FFFFFF;
  --green: #1C9266;
  --green-deep: #0F6B49;
  --green-soft: #E6F5EE;
  --green-ring: rgba(28,146,102,.18);
  --panel: #06231D;
  --panel-2: #0A3A2F;
  --danger: #D7263D;
  --ok: #12A150;
  --radius: 10px;
  --radius-lg: 18px;
  --field-h: 48px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }

/* ── Shell ───────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

.pane-brand { position: relative; overflow: hidden; background: var(--panel); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; }
.pane-brand::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(16,185,129,.35), transparent 65%); top: -160px; right: -140px; pointer-events: none; }
.pane-brand::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(59,130,246,.22), transparent 65%); bottom: -140px; left: -120px; pointer-events: none; }
.pane-brand canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.pane-brand > * { position: relative; z-index: 1; }
.pane-brand__logo img { height: 46px; width: auto; }
.pane-brand__copy { max-width: 460px; }
.pane-brand__eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #34D399; margin: 0 0 14px; font-weight: 600; }
.pane-brand__title { font-family: var(--font-display); font-size: clamp(32px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 16px; }
.pane-brand__lede { font-size: 16px; color: rgba(255,255,255,.72); margin: 0 0 28px; line-height: 1.65; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: rgba(255,255,255,.88); }
.points svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }
.quotes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.quote { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 14px; min-width: 130px; }
.quote b { display: block; font-family: var(--font-display); font-size: 13px; }
.quote span { font-family: var(--font-mono); font-size: 12.5px; color: #34D399; }
.pane-brand__foot { font-size: 12.5px; color: rgba(255,255,255,.5); margin: 0; }

.pane-form { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 32px 24px 28px; }
.topbar { width: 100%; max-width: 440px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.topbar__logo img { height: 36px; width: auto; }
.topbar__logo .on-dark { display: none; }
.topbar__tools { display: flex; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 16px; height: 16px; }

.card { width: 100%; max-width: 440px; }
.card__title { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.card__sub { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; }
.steps { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 12.5px; color: var(--muted); }
.steps b { color: var(--ink); font-weight: 600; }
.steps .sep { flex: 1; height: 1px; background: var(--line); }
.steps [data-active="true"] { color: var(--green); font-weight: 600; }

.alert { display: none; margin: 0 0 16px; padding: 11px 14px; border-radius: var(--radius); font-size: 14px; line-height: 1.45; border: 1px solid transparent; }
.alert[data-show="true"] { display: block; }
.alert[data-kind="error"] { background: #FDECEE; border-color: #F6C5CB; color: #8A1C2A; }
.alert[data-kind="ok"], .alert[data-kind="success"] { background: var(--green-soft); border-color: #B8E6D1; color: var(--green-deep); }

.form { display: grid; gap: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.label .req { color: var(--danger); }
.label .opt { color: var(--muted); font-weight: 400; }
.fieldset-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 4px 0 -6px; color: var(--ink); }
.input, .select { width: 100%; height: var(--field-h); padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.input::placeholder { color: #9AA6B2; }
.input:focus, .select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-ring); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236A7389' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.password { position: relative; }
.password .input { padding-right: 46px; }
.password__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.password__eye svg { width: 18px; height: 18px; }
.phone { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.phone__code { height: var(--field-h); border-radius: var(--radius); border: 1px solid var(--line); background: #F6F9F8; display: grid; place-items: center; font-family: var(--font-mono); font-size: 14px; color: var(--ink-soft); }
.field-error { margin: 0; font-size: 12.5px; color: var(--danger); min-height: 1em; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.meter span { height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.meter[data-score="2"] span:nth-child(-n+2) { background: #E0881A; }
.meter[data-score="3"] span:nth-child(-n+3) { background: #D4A62B; }
.meter[data-score="4"] span { background: var(--ok); }
.rules { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.rules li::before { content: '○ '; color: var(--line-strong); }
.rules li[data-met="true"] { color: var(--green-deep); }
.rules li[data-met="true"]::before { content: '● '; color: var(--green); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }
.check .req { color: var(--danger); }
.consents { display: grid; gap: 10px; }
.remember { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.remember .check { align-items: center; }

.btn { width: 100%; height: var(--field-h); border: 0; border-radius: var(--radius); background: var(--green); color: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s, transform .15s, box-shadow .2s; box-shadow: 0 6px 16px rgba(28,146,102,.28); }
.btn:hover { background: #178158; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(28,146,102,.34); }
.btn:disabled { background: #B9CFC6; cursor: not-allowed; box-shadow: none; transform: none; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn--ghost:hover { background: #F6F9F8; box-shadow: none; }
.btn__spin { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn[data-busy="true"] .btn__spin { display: inline-block; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 600; cursor: pointer; }
.hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--muted); font-size: 12.5px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.switcher { margin: 22px 0 0; font-size: 14px; color: var(--muted); text-align: center; }

.legal { width: 100%; max-width: 440px; margin-top: 30px; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.legal p { margin: 0 0 8px; }
.legal__links { display: flex; gap: 14px; flex-wrap: wrap; }
.legal__links a { color: var(--muted); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card, .topbar, .legal { animation: rise .6s cubic-bezier(.16,1,.3,1) both; }
.card { animation-delay: .08s; } .legal { animation-delay: .16s; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .pane-brand { display: none; }
  .pane-form { min-height: 100vh; }
}
@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .card__title { font-size: 24px; }
  .btn-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .card, .topbar, .legal { animation: none; } }
