/* Login pages (trader + admin): split screen. Brand panel on one side, clean form on the other. Colours come from the palette variables. */
body.lg-page { min-height: 100vh; }
.lg { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: var(--bg); }

/* ── Brand panel ──────────────────────────────────────────────────────── */
.lg-hero {
  position: relative; overflow: hidden; color: #fff; display: flex;
  background:
    radial-gradient(700px 480px at 0% 0%, color-mix(in srgb, var(--primary-2) 55%, transparent), transparent 65%),
    radial-gradient(640px 520px at 100% 100%, color-mix(in srgb, var(--cyan) 30%, transparent), transparent 65%),
    linear-gradient(155deg, color-mix(in srgb, var(--primary) 78%, #000) 0%, color-mix(in srgb, var(--primary) 38%, #05070d) 100%);
}
.lg-hero::before { /* fine dot grid */
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: clamp(28px, 5vw, 64px); width: 100%; }
.hero-logo { color: #fff; }
.hero-logo .logo-img { border-radius: 10px; }
.hero-logo .logo-mark { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.hero-logo .logo-text { color: #fff; background: none; -webkit-text-fill-color: #fff; }
.hero-logo .logo-for-light { display: none !important; }
.hero-logo .logo-for-dark { display: inline-block !important; }
.hero-copy { max-width: 470px; margin-bottom: clamp(60px, 16vh, 200px); }
.hero-copy h2 { margin: 0 0 14px; font-size: clamp(28px, 3.3vw, 46px); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; }
.hero-copy p { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.hero-feats { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-feats li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.hero-feats svg { opacity: .9; }

.hero-chart { position: absolute; inset-inline-end: 0; bottom: 0; width: min(62%, 520px); height: auto; z-index: 0; opacity: .5; }
[dir="rtl"] .hero-chart { transform: scaleX(-1); }
.hero-chart .cd { transform-box: fill-box; transform-origin: bottom; animation: candle .7s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--i) * 70ms + .2s); }
.hero-chart line { stroke-width: 1.4; stroke-linecap: round; }
.hero-chart .up line { stroke: rgba(255, 255, 255, .55); } .hero-chart .up rect { fill: rgba(255, 255, 255, .8); }
.hero-chart .dn line { stroke: rgba(255, 255, 255, .3); } .hero-chart .dn rect { fill: rgba(255, 255, 255, .28); }
@keyframes candle { from { transform: scaleY(0); opacity: 0; } }

/* ── Form side ────────────────────────────────────────────────────────── */
.lg-side { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.lg-top { position: relative; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 32px; flex-wrap: wrap; }
.lg-mlogo { display: none; }
.lg-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.lg-center { flex: 1; display: grid; place-items: center; padding: 8px 32px 32px; }
.lg-foot { text-align: center; padding: 16px; color: var(--muted); font-size: 12.5px; }

.lg-card { width: min(390px, 100%); text-align: start; animation: lgin .4s ease-out both; }
@keyframes lgin { from { opacity: 0; transform: translateY(10px); } }
.lg-icon { width: 52px; height: 52px; border-radius: 15px; margin: 0 0 22px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 32%, transparent); }
.lg-chip { display: inline-block; margin-bottom: 10px; padding: 3px 11px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--amber-bg); color: var(--amber); }
.lg-card h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.15; letter-spacing: -.025em; font-weight: 800; }
.lg-sub { margin: 0 0 28px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.lg-label { display: block; margin: 0 0 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); }

.lg-field { position: relative; margin-bottom: 18px; }
.lg-field > svg { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; transition: color .15s; }
.lg-field .input { height: 50px; padding: 0 14px; padding-inline-start: 46px; font-size: 15px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.lg-field:focus-within > svg { color: var(--primary); }
.lg-field .peek { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--primary-2); font-weight: 700; font-size: 13px; cursor: pointer; padding: 8px; border-radius: 8px; }
.lg-field .peek:hover { background: var(--surface-2); }
.lg-field:has(.peek) .input { padding-inline-end: 66px; }

.lg-btn { height: 50px; margin-top: 8px; font-size: 15.5px; font-weight: 700; border-radius: 12px; gap: 10px; }
.lg-btn .arr { transition: transform .15s; }
.lg-btn:hover .arr { transform: translateX(3px); }
[dir="rtl"] .lg-btn .arr { transform: scaleX(-1); }
[dir="rtl"] .lg-btn:hover .arr { transform: scaleX(-1) translateX(3px); }

/* ── Tablet / phone: the brand panel becomes a slim header ───────────── */
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; }
  .lg-hero { min-height: 0; }
  .hero-in { padding: 20px 22px; gap: 0; }
  .hero-copy, .hero-chart { display: none; }
  .lg-side { min-height: 0; }
  .lg-top { padding: 14px 18px 0; }
  .lg-center { padding: 22px 20px 28px; place-items: start center; }
  .lg-card h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .lg-card, .hero-chart .cd { animation: none; } }
