:root {
  --bg: #070a0f;
  --card: #121821;
  --line: #2a3340;
  --text: #f3f5f7;
  --muted: #9aa3af;
  --gold: #d4a017;
  --gold-2: #f0c14b;
  --danger: #ef4444;
  --ok: #22c55e;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; font-family: "Tajawal", sans-serif; color: var(--text);
  background: var(--bg);
}
.bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(212,160,23,.18), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(45,90,140,.22), transparent 55%),
    linear-gradient(180deg, #0b1018, #070a0f 60%);
}
.shell {
  position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.card {
  width: min(440px, 100%); background: rgba(18,24,33,.92); border: 1px solid var(--line);
  border-radius: 22px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
}
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.mark {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: #1a1200; font-weight: 800; font-size: 1.3rem;
}
h1,h2 { margin: 0 0 4px; font-size: 1.35rem; }
.brand p, .muted, .hint { margin: 0; color: var(--muted); line-height: 1.6; font-size: .92rem; }
.hint { margin-top: 16px; }
.form { display: grid; gap: 8px; margin-top: 8px; }
label { font-size: .85rem; color: var(--muted); }
input {
  width: 100%; border: 1px solid var(--line); background: #0c1118; color: var(--text);
  border-radius: 12px; padding: 12px 14px; font: inherit; outline: none;
}
input:focus { border-color: var(--gold); }
.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; font: inherit; font-weight: 700; cursor: pointer;
}
.btn.primary { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1200; margin-top: 8px; }
.btn.ghost { background: transparent; color: var(--muted); margin-top: 10px; width: 100%; }
.error { color: var(--danger); margin-top: 12px; font-size: .9rem; }
.hidden { display: none !important; }
.portals { display: grid; gap: 10px; margin: 18px 0; }
.portal {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #0d131b;
  color: inherit; text-decoration: none; transition: .15s ease;
}
.portal:hover { border-color: var(--gold); transform: translateY(-1px); }
.portal strong { display: block; }
.portal span { color: var(--muted); font-size: .85rem; }
.badge {
  font-size: .75rem; padding: 4px 8px; border-radius: 999px; background: #241c08; color: var(--gold-2); font-weight: 700;
}
.otp-boxes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 4px;
  direction: ltr;
}
.otp-digit {
  width: 48px;
  height: 56px;
  padding: 0;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0c1118;
  color: var(--text);
  caret-color: var(--gold-2);
}
.otp-digit:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.18);
}
@media (max-width: 420px) {
  .otp-boxes { gap: 6px; }
  .otp-digit { width: 42px; height: 50px; font-size: 1.25rem; border-radius: 12px; }
}
