/* ===================================================================
   HX Africa — auth page. Split cinematic + form card.
   =================================================================== */
:root {
  --bg: #07090c; --bg-1: #0b0e13; --bg-2: #10141b; --bg-3: #171d28;
  --line: rgba(255,255,255,0.08); --line-2: rgba(255,255,255,0.14);
  --text: #f4f6f9; --text-dim: #9aa4b2; --text-faint: #626b78;
  --gold: #f0b90b; --gold-2: #ffd75e; --up: #2ebd85; --down: #f6465d;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "Roboto Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body.auth { min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--sans); display: grid; grid-template-columns: 1.1fr 1fr; }
a { color: inherit; text-decoration: none; }
.grad { background: linear-gradient(100deg, var(--gold), var(--gold-2) 45%, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand { display: inline-flex; align-items: baseline; gap: 7px; }
.brand-mark { font-weight: 800; font-size: 20px; color: #1a1400; background: linear-gradient(120deg, var(--gold), var(--gold-2)); padding: 3px 8px; border-radius: 7px; }
.brand-name { font-weight: 700; font-size: 20px; }

/* Left visual */
.auth-visual { position: relative; overflow: hidden; background: linear-gradient(160deg, #0b0e13, #05070a); display: flex; align-items: center; padding: 60px; }
#auth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.av-glow { position: absolute; top: -10%; left: -10%; width: 700px; height: 700px; background: radial-gradient(circle, rgba(240,185,11,0.16), transparent 60%); filter: blur(30px); pointer-events: none; }
.av-inner { position: relative; z-index: 2; max-width: 460px; }
.av-inner h1 { font-size: clamp(30px, 3.6vw, 50px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.05; margin: 40px 0 18px; }
.av-inner > p { color: var(--text-dim); font-size: 17px; margin-bottom: 28px; }
.av-points { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }
.av-points li { padding-left: 28px; position: relative; color: var(--text-dim); font-size: 15px; }
.av-points li::before { content: "◆"; position: absolute; left: 0; color: var(--gold); }
.av-points b { color: var(--text); font-family: var(--mono); }
.av-ticker { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--text-dim); border-top: 1px solid var(--line); padding-top: 20px; }
.av-ticker .t-up { color: var(--up); } .av-ticker .t-dn { color: var(--down); }

/* Right form */
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 26px; }
.auth-tabs button { padding: 10px; border: none; background: transparent; color: var(--text-dim); font-weight: 700; font-size: 14px; border-radius: 7px; cursor: pointer; transition: all .15s; }
.auth-tabs button.active { background: linear-gradient(120deg, var(--gold), var(--gold-2)); color: #1a1400; }
.auth-card h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.form-sub { color: var(--text-dim); margin: 6px 0 24px; font-size: 14px; }

#auth-form { display: flex; flex-direction: column; gap: 15px; }
.field span { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 7px; }
.field input { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; color: var(--text); padding: 12px 13px; font-size: 14px; outline: none; transition: border-color .15s; }
.field input:focus { border-color: var(--gold); }
.pw { position: relative; }
.pw input { padding-right: 44px; }
#pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 15px; opacity: .6; padding: 6px; }
#pw-toggle:hover { opacity: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13px; cursor: pointer; }
.check input { accent-color: var(--gold); width: 15px; height: 15px; }
.terms-row { line-height: 1.4; }
.link { color: var(--gold); }
.link:hover { text-decoration: underline; }
.err { color: var(--down); font-size: 13px; min-height: 0; display: none; }
.err.show { display: block; }
.submit { margin-top: 4px; padding: 13px; border: none; border-radius: 9px; background: linear-gradient(120deg, var(--gold), var(--gold-2)); color: #1a1400; font-weight: 700; font-size: 15px; cursor: pointer; transition: filter .15s, transform .1s; }
.submit:hover { filter: brightness(1.06); } .submit:active { transform: scale(.99); }

.divider { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 12px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.socials { display: block; }
.social { width: 100%; padding: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s; }
.social:hover { border-color: var(--gold); }
.social.contisx { display: flex; align-items: center; justify-content: center; gap: 9px; }
.social.contisx:hover { background: var(--bg-3); }
.contisx-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(120deg, var(--gold), var(--gold-2)); color: #1a1400; font-size: 12px; }
.switch { text-align: center; margin-top: 22px; color: var(--text-dim); font-size: 14px; }
.demo-note { text-align: center; margin-top: 14px; color: var(--text-faint); font-size: 11px; line-height: 1.5; }
.powered { text-align: center; margin-top: 10px; color: var(--text-faint); font-size: 12px; letter-spacing: 0.3px; }
.powered b { color: var(--gold); font-weight: 700; }

/* mode visibility */
body:not(.mode-signup) .signup-only { display: none; }
body.mode-signup .login-only { display: none; }

/* toasts */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--bg-3); border: 1px solid var(--line-2); border-left: 3px solid var(--up); border-radius: 8px; padding: 12px 16px; min-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: slideIn .2s; }
.toast.err { border-left-color: var(--down); }
.toast .t-title { font-weight: 700; font-size: 13px; }
.toast .t-body { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: #1a2029; border-radius: 4px; }

@media (max-width: 900px) {
  body.auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-wrap { padding: 30px 20px; }
}