/* Auth pages (login / register) — dark-luxury casino direction.
   Shares the brand tokens used by the admin panel so the surfaces feel related. */
:root {
  --bg: #070808;
  --panel: #111315;
  --panel2: #151719;
  --line: rgba(255, 255, 255, .1);
  --line-red: rgba(255, 43, 43, .42);
  --text: #f6f7f8;
  --muted: #a3a8ad;
  --red: #e82424;
  --red-deep: #9d1111;
  --gold: #ffc33d;
  --green: #4fd863;
  --radius: 16px;
  font-family: Arial, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(232, 36, 36, .22), transparent 60%),
    radial-gradient(900px 600px at 8% 110%, rgba(146, 85, 255, .12), transparent 55%),
    linear-gradient(180deg, #0a0b0c, #050606 60%);
  display: grid;
  place-items: center;
  padding: 24px;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid rgba(255, 52, 52, .85); outline-offset: 2px; }

/* Split shell: editorial brand panel + form panel, grid-breaking on desktop. */
.auth-shell {
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: linear-gradient(160deg, rgba(21, 23, 25, .92), rgba(12, 13, 14, .92));
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, .85),
    0 0 0 1px rgba(232, 36, 36, .08) inset;
  backdrop-filter: blur(6px);
}

/* Left brand / pitch column */
.auth-aside {
  position: relative;
  padding: 40px 36px;
  background:
    radial-gradient(circle at 30% 18%, rgba(232, 36, 36, .28), transparent 55%),
    linear-gradient(180deg, #120a0b, #0a0708);
  border-right: 1px solid var(--line-red);
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow: hidden;
}
.auth-aside::after {
  content: "";
  position: absolute;
  inset: auto -40% -55% -10%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 195, 61, .16), transparent 70%);
  pointer-events: none;
}
.auth-logo img { width: 178px; height: auto; display: block; }
.auth-pitch h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: .2px;
}
.auth-pitch h2 b { color: var(--gold); }
.auth-pitch p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.7; }
.auth-points { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 12px; }
.auth-points li {
  position: relative;
  padding-left: 30px;
  color: #e7e9ea;
  font-size: .95rem;
}
.auth-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: .72rem;
  color: #fff;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(232, 36, 36, .4);
}

/* Right form column */
.auth-main {
  padding: 42px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-head { margin-bottom: 26px; }
.auth-head h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  letter-spacing: .3px;
}
.auth-head p { margin: 0; color: var(--muted); font-size: .92rem; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: .82rem; color: var(--muted); letter-spacing: .3px; }
.field .control { position: relative; }
.field input {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 14px;
  background: #0c0d0e;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input::placeholder { color: #5c6166; }
.field input:hover { border-color: rgba(255, 255, 255, .2); }
.field input:focus {
  border-color: var(--red);
  background: #0e0f10;
  box-shadow: 0 0 0 3px rgba(232, 36, 36, .18);
  outline: none;
}
.field input[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232, 36, 36, .14);
}
.toggle-pw {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.toggle-pw:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.field-hint { font-size: .76rem; color: #6f7479; }
.field-error { font-size: .78rem; color: #ff6a6a; min-height: 0; }

/* Two-column rows (name, bank+account) collapse on mobile */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Native select styled to match inputs */
.field select {
  width: 100%;
  height: 50px;
  padding: 0 38px 0 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a3a8ad' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center,
    #0c0d0e;
  border: 1px solid var(--line);
  border-radius: 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field select:hover { border-color: rgba(255, 255, 255, .2); }
.field select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(232, 36, 36, .18); outline: none; }
.field select option { background: #111315; color: var(--text); }

/* 4-digit PIN: monospace, wide letter-spacing, centred */
.field input.pin {
  text-align: center;
  letter-spacing: 16px;
  font-size: 1.25rem;
  font-weight: 700;
  padding-right: 14px;
  font-family: "Courier New", monospace;
}
.field input.pin::placeholder { letter-spacing: 10px; font-weight: 400; }

@media (max-width: 760px) {
  .row2 { grid-template-columns: 1fr; gap: 0; }
}

/* Step indicator for the OTP-gated register flow */
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.stepper .dot {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--muted);
}
.stepper .dot .num {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: .8rem; font-weight: 700;
  transition: all .2s ease;
}
.stepper .dot.active { color: var(--text); }
.stepper .dot.active .num { border-color: var(--red); background: linear-gradient(180deg, #ff3a3a, var(--red-deep)); color: #fff; }
.stepper .dot.done .num { border-color: var(--green); background: rgba(79,216,99,.18); color: var(--green); }
.stepper .bar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; }

.step { display: none; }
.step.active { display: block; animation: stepIn .25s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* OTP entry */
.field input.otp {
  text-align: center;
  letter-spacing: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: "Courier New", monospace;
  padding-right: 14px;
}
.field input.otp::placeholder { letter-spacing: 8px; font-weight: 400; }
.otp-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px; font-size: .82rem; color: var(--muted);
}
.resend-btn {
  border: 0; background: none; padding: 0;
  color: var(--gold); font-weight: 700; cursor: pointer;
}
.resend-btn[disabled] { color: #6f7479; cursor: not-allowed; font-weight: 400; }
.btn-ghost {
  width: 100%; height: 46px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 12px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.btn-ghost:hover { color: #fff; border-color: var(--line-red); }

.btn-primary {
  width: 100%;
  height: 52px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .4px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #ff3a3a, var(--red-deep));
  box-shadow: 0 14px 26px -10px rgba(232, 36, 36, .7);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 18px 30px -10px rgba(232, 36, 36, .8); }
.btn-primary:active { transform: translateY(0); }
.btn-primary[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-foot { margin-top: 20px; text-align: center; font-size: .9rem; color: var(--muted); }
.auth-foot a { color: var(--gold); font-weight: 700; }
.auth-foot a:hover { text-decoration: underline; }

.form-state {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: .88rem;
  line-height: 1.5;
  display: none;
}
.form-state.show { display: block; }
.form-state.ok { background: rgba(79, 216, 99, .12); border: 1px solid rgba(79, 216, 99, .4); color: #b8f3c2; }
.form-state.bad { background: rgba(232, 36, 36, .12); border: 1px solid var(--line-red); color: #ffb3b3; }
.form-state.info { background: rgba(30, 167, 255, .1); border: 1px solid rgba(30, 167, 255, .35); color: #bfe5ff; }

.btn-primary.loading { position: relative; color: transparent; }
.btn-primary.loading::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: 50%; top: 50%;
  margin: -10px 0 0 -10px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.back-home {
  position: fixed;
  left: 18px; top: 16px;
  font-size: .85rem;
  color: var(--muted);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .3);
  transition: color .15s ease, border-color .15s ease;
}
.back-home:hover { color: #fff; border-color: var(--line-red); }

@media (max-width: 760px) {
  body { padding: 0; place-items: stretch; }
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }
  .auth-aside {
    padding: 64px 26px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line-red);
    gap: 18px;
  }
  .auth-points { display: none; }
  .auth-main { padding: 28px 24px 40px; }
  .back-home { background: rgba(0, 0, 0, .55); }
}
