/* Login page: dark "space" background with floating squares; the sign-in card always sits on the RIGHT of the screen, the promo text on the left (both Arabic and English). */
body.login-space { margin:0; min-height:100vh; background:#050B14; color:#fff; overflow-x:hidden; }
.space-bg { position:fixed; inset:0; z-index:0; overflow:hidden;
  background:radial-gradient(900px 600px at 25% 40%, #0F3D3E 0%, transparent 60%), radial-gradient(700px 500px at 80% 90%, #1A365D 0%, transparent 60%), linear-gradient(160deg, #07121f, #050B14 60%); }
.space-grid { position:absolute; inset:0; background-image:linear-gradient(#ffffff08 1px, transparent 1px), linear-gradient(90deg, #ffffff08 1px, transparent 1px); background-size:60px 60px;
  -webkit-mask-image:radial-gradient(ellipse at 30% 50%, #000 20%, transparent 75%); mask-image:radial-gradient(ellipse at 30% 50%, #000 20%, transparent 75%); }
.space-stars { position:absolute; inset:0; opacity:.9;
  background-image:radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent), radial-gradient(1px 1px at 34% 72%, #fff 50%, transparent), radial-gradient(2px 2px at 58% 26%, #fff 50%, transparent), radial-gradient(1px 1px at 76% 64%, #fff 50%, transparent),
    radial-gradient(2px 2px at 88% 14%, #fff 50%, transparent), radial-gradient(1px 1px at 21% 88%, #fff 50%, transparent), radial-gradient(1px 1px at 47% 52%, #fff 50%, transparent), radial-gradient(2px 2px at 93% 82%, #fff 50%, transparent),
    radial-gradient(1px 1px at 66% 8%, #fff 50%, transparent), radial-gradient(1px 1px at 5% 54%, #fff 50%, transparent); background-size:520px 520px; }
#space-squares { position:absolute; inset:0; }
#space-squares i { position:absolute; display:block; border:1.5px solid; border-radius:6px; transform:rotate(var(--r,0deg)); animation:sq-float 24s ease-in-out infinite; will-change:transform; }
@keyframes sq-float { 0%,100% { transform:translate3d(0,0,0) rotate(var(--r,0deg)); } 50% { transform:translate3d(14px,-22px,0) rotate(calc(var(--r,0deg) + 14deg)); } }
@media (prefers-reduced-motion: reduce) { #space-squares i { animation:none; } }

.space-top { position:fixed; top:0; left:0; right:0; z-index:3; display:flex; justify-content:space-between; align-items:center; direction:ltr; padding:1.4rem 5.5vw; pointer-events:none; }
.space-top > * { pointer-events:auto; }
.space-logo { display:flex; align-items:center; gap:.6rem; font-weight:800; font-size:1.25rem; letter-spacing:.3px; }
.space-logo s { width:12px; height:12px; border:2px solid #2DD4BF; border-radius:3px; transform:rotate(45deg); display:block; }
.space-lang { color:#B8C4D4; text-decoration:none; font-size:.9rem; border:1px solid #ffffff30; border-radius:99px; padding:.3rem 1rem; }
.space-lang:hover { color:#fff; border-color:#2DD4BF; }

/* two columns, always promo on the left and card on the right, whatever the page language */
.login-stage { position:relative; z-index:2; min-height:100vh; display:grid; grid-template-columns:minmax(0, 36rem) minmax(340px, 430px); justify-content:center; align-items:center; column-gap:1.6rem; padding:5rem 3vw 2rem; direction:ltr; }   /* the card sits about 0.7 cm from the text */
.login-stage > .promo { direction:var(--page-dir, inherit); }
html[dir=rtl] .login-stage > .promo { direction:rtl; text-align:right; }
html[dir=ltr] .login-stage > .promo { direction:ltr; text-align:left; }
.promo { display:flex; flex-direction:column; gap:1.3rem; min-width:0; }
.promo-tag { align-self:flex-start; padding:.35rem 1rem; border:1px solid #2DD4BF66; border-radius:99px; color:#2DD4BF; font-size:.95rem; background:#2DD4BF14; }
.promo-text { display:flex; flex-direction:column; gap:1.3rem; }
.promo h2 { margin:0; font-size:clamp(1.9rem, 3.6vw, 3.4rem); line-height:1.35; font-weight:800; color:#fff; }
.promo p { margin:0; font-size:clamp(1rem, 1.35vw, 1.25rem); line-height:1.9; color:#B8C4D4; max-width:38rem; }

/* the card (same markup as before, only its place and glow change) */
body.login-space .auth { min-height:0; display:block; padding:0; background:none; place-items:stretch; justify-self:stretch; width:100%; }
body.login-space .auth-card { direction:var(--card-dir, inherit); max-width:none; width:100%; border:0; border-radius:20px; padding:2.3rem 2.2rem 2rem; color:#111c2c;
  box-shadow:0 30px 80px #000a, 0 0 0 1px #ffffff22, 0 0 60px #2DD4BF33; }
html[dir=rtl] body.login-space .auth-card { direction:rtl; }
html[dir=ltr] body.login-space .auth-card { direction:ltr; }
body.login-space .auth-brand .mark { box-shadow:0 10px 24px #0F3D3E66; }

/* the proof-of-work box that replaces the "I am human" tick */
.human-proof { display:flex; align-items:center; gap:.7rem; margin:1rem 0 1.1rem; padding:.7rem .9rem; border:1px solid var(--input-border); border-radius:10px; background:#F7FAFC; color:var(--neutral); font-size:.9rem; }
.proof-icon { width:22px; height:22px; display:grid; place-items:center; flex:none; }
.proof-icon .tick { display:none; color:#fff; background:#2F855A; width:22px; height:22px; border-radius:50%; font-size:.8rem; line-height:22px; text-align:center; }
.proof-icon .spin { width:18px; height:18px; border:2.5px solid #CBD5E0; border-top-color:var(--primary); border-radius:50%; animation:proof-spin .8s linear infinite; }
.human-proof.ok { border-color:#9AE6B4; background:#F0FFF4; color:#276749; }
.human-proof.ok .spin { display:none; } .human-proof.ok .tick { display:block; }
@keyframes proof-spin { to { transform:rotate(360deg); } }
.btn:disabled { opacity:.55; cursor:not-allowed; }

@media (max-width:900px) {
  .login-stage { grid-template-columns:minmax(0,1fr); padding:4.5rem 1.2rem 2rem; row-gap:1.5rem; align-content:start; }
  .promo { order:2; max-width:none; } .promo h2 { font-size:1.6rem; } .promo p { display:none; }
  body.login-space .auth { order:1; }
  .space-top { padding:1rem 1.2rem; }
}

/* share prices of the published companies (shown to anyone, left side) */
.promo.has-mkt h2 { font-size:clamp(1.6rem, 2.6vw, 2.5rem); }
.promo.has-mkt p { font-size:clamp(.95rem, 1.15vw, 1.1rem); line-height:1.8; }
.promo.has-mkt { gap:1rem; }
.mkt { display:flex; flex-direction:column; gap:.7rem; margin-top:.4rem; padding-top:1.1rem; border-top:1px solid #ffffff1f; }
.mkt[hidden] { display:none; }
.mkt-title { margin:0; font-size:1.15rem; font-weight:700; color:#2DD4BF; }
.mkt-bar { display:flex; gap:.8rem; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.mkt-bar select { height:40px; max-width:15rem; background:#ffffff12; color:#fff; border:1px solid #ffffff33; border-radius:10px; padding:0 .8rem; font:inherit; }
.mkt-bar select option { color:#111c2c; }
.mkt-ranges { display:flex; border:1px solid #ffffff33; border-radius:10px; overflow:hidden; direction:ltr; }
.mkt-ranges button { background:transparent; color:#B8C4D4; border:0; padding:.5rem .9rem; font:inherit; cursor:pointer; }
.mkt-ranges button + button { border-inline-start:1px solid #ffffff22; }
.mkt-ranges button.on { background:#2DD4BF2a; color:#fff; }
.mkt-price { display:flex; align-items:baseline; gap:.9rem; flex-wrap:wrap; }
.mkt-price b { font-size:clamp(1.7rem, 2.6vw, 2.3rem); font-weight:800; }
.mkt-price span { font-weight:700; font-size:1.05rem; }
.mkt-price span.up { color:#34D399; } .mkt-price span.down { color:#F87171; }
.mkt-price small { color:#8FA0B5; font-size:.85rem; }
.mkt-chart { position:relative; width:100%; }
.mkt-chart svg { display:block; width:100%; height:auto; touch-action:pan-y; }
.mkt-tip { position:absolute; pointer-events:none; background:#0B1624; border:1px solid #2DD4BF66; border-radius:8px; padding:.35rem .6rem; font-size:.85rem; white-space:nowrap; transform:translate(-50%, -120%); box-shadow:0 6px 20px #0008; }
.mkt-note { margin:0; color:#8FA0B5; font-size:.8rem; }
