/* ==========================================================================
   SmartBinaryTrade — auth screens (login, register, forgot, reset)
   Split layout: copy + hero art on the left, form card on the right.
   ========================================================================== */
body.auth {
  --auth-elev: #FFFFFF;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bv-page);
  color: var(--bv-text);
}
[data-theme="dark"] body.auth { --auth-elev: #080B12; }

.auth-split { display: flex; min-height: 100vh; min-height: 100dvh; }
.auth-promo, .auth-panel { flex: 1 1 50%; min-width: 0; }

/* ---------- Left: promo ---------- */
.auth-promo {
  position: relative;
  overflow: hidden;
  background: var(--bv-page);
  display: flex;
  flex-direction: column;
  padding: clamp(2.5rem, 6vh, 4.5rem) 3rem 0;
}
.auth-promo-brand { display: inline-flex; width: max-content; margin-bottom: clamp(1.75rem, 4vh, 2.75rem); color: var(--bv-text); }
.auth-promo-brand:hover { color: var(--bv-text); }
.auth-promo .bv-wordmark { font-size: 21px; }
.auth-promo .bv-mark { width: 36px; height: 36px; }
.auth-title {
  font-family: var(--bv-font-head);
  font-weight: 800;
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--bv-text);
  margin-bottom: 1rem;
}
.auth-title .accent { color: var(--bv-primary); }
.auth-intro { color: var(--bv-muted); max-width: 28rem; font-size: 15px; margin-bottom: 1.6rem; }
.auth-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; max-width: 36rem; }
.auth-feature { display: flex; gap: .9rem; align-items: flex-start; }
.auth-feature strong { display: block; font-weight: 600; font-size: 14.5px; color: var(--bv-text); }
.auth-feature div > span { display: block; font-size: 13px; color: var(--bv-soft); }
[data-theme="dark"] .auth-feature div > span { color: var(--bv-muted); }
.feature-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--bv-primary); font-size: 18px;
  border: 1px solid rgba(249, 11, 11, .55);
  background: rgba(249, 11, 11, .06);
  backdrop-filter: blur(4px);
}
[data-theme="dark"] .feature-icon { background: rgba(8, 11, 18, .35); border-color: rgba(249, 11, 11, .7); }

/* Copy sits above the art; the art fills the lower part of the panel and fades up behind it. */
.auth-promo-brand, .auth-content { position: relative; z-index: 5; }
[data-theme="dark"] .auth-content { text-shadow: 0 1px 12px rgba(8, 11, 18, .55); }
.auth-art {
  position: absolute; z-index: 0;
  left: 0; right: 0; bottom: 0; top: 30%;
  overflow: hidden;
  pointer-events: none;
}
/* Top fade into the page colour, plus a soft right-edge vignette. */
.auth-art::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, var(--bv-page) 0%, rgba(247, 248, 250, .85) 14%, rgba(247, 248, 250, 0) 46%),
    linear-gradient(90deg, rgba(247, 248, 250, 0) 70%, rgba(247, 248, 250, .55) 100%);
}
[data-theme="dark"] .auth-art::before {
  background:
    linear-gradient(180deg, #080B12 0%, rgba(8, 11, 18, .88) 14%, rgba(8, 11, 18, .25) 46%, rgba(8, 11, 18, 0) 62%),
    linear-gradient(90deg, rgba(8, 11, 18, 0) 72%, rgba(8, 11, 18, .45) 100%);
}
.auth-art-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 22% 80%; z-index: 0; }

/* Ambient scene: warm red light pooling in the room, brighter toward the bottom. */
.auth-art-scene {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(22rem 16rem at 14% 44%, rgba(249, 11, 11, .16), transparent 72%),
    radial-gradient(18rem 12rem at 82% 30%, rgba(255, 96, 64, .12), transparent 72%),
    radial-gradient(40rem 20rem at 42% 96%, rgba(249, 11, 11, .26), transparent 70%),
    linear-gradient(180deg, #F7F8FA 0%, #FBEFEF 55%, #F8E1E2 100%);
}
[data-theme="dark"] .auth-art-scene {
  background:
    radial-gradient(20rem 15rem at 10% 46%, rgba(249, 11, 11, .42), transparent 70%),
    radial-gradient(16rem 11rem at 84% 34%, rgba(255, 70, 40, .22), transparent 72%),
    radial-gradient(26rem 14rem at 64% 62%, rgba(150, 10, 20, .30), transparent 72%),
    radial-gradient(44rem 22rem at 40% 100%, rgba(249, 11, 11, .45), transparent 70%),
    linear-gradient(180deg, #0B0D14 0%, #160A10 52%, #24070B 100%);
}
/* Out-of-focus lights (bokeh) */
.auth-bokeh {
  position: absolute; inset: 0; z-index: 1; filter: blur(5px); opacity: .5;
  background:
    radial-gradient(circle at 6% 34%, rgba(249, 11, 11, .55) 0 10px, transparent 18px),
    radial-gradient(circle at 20% 20%, rgba(255, 120, 80, .40) 0 6px, transparent 13px),
    radial-gradient(circle at 46% 16%, rgba(255, 150, 110, .35) 0 5px, transparent 11px),
    radial-gradient(circle at 64% 24%, rgba(255, 170, 120, .55) 0 8px, transparent 16px),
    radial-gradient(circle at 74% 38%, rgba(249, 11, 11, .45) 0 14px, transparent 24px),
    radial-gradient(circle at 84% 18%, rgba(255, 190, 140, .55) 0 6px, transparent 13px),
    radial-gradient(circle at 90% 46%, rgba(255, 140, 90, .45) 0 9px, transparent 17px),
    radial-gradient(circle at 96% 30%, rgba(255, 200, 150, .45) 0 5px, transparent 11px),
    radial-gradient(circle at 58% 44%, rgba(255, 200, 150, .35) 0 4px, transparent 10px),
    radial-gradient(circle at 52% 30%, rgba(249, 11, 11, .30) 0 18px, transparent 30px),
    radial-gradient(circle at 98% 64%, rgba(255, 110, 70, .40) 0 8px, transparent 16px),
    radial-gradient(circle at 3% 60%, rgba(255, 150, 110, .35) 0 9px, transparent 17px);
}
[data-theme="dark"] .auth-bokeh { opacity: .95; filter: blur(6px); }

/* Phone mockup */
.auth-phone {
  position: absolute; z-index: 3;
  left: 13%; bottom: -9%;
  width: clamp(200px, min(17vw, 28vh), 250px); aspect-ratio: 9 / 18.5;
  border-radius: 34px; padding: 10px;
  background: linear-gradient(160deg, #2a3142, #0c0f16);
  box-shadow: 0 30px 60px rgba(8, 11, 18, .35), 0 0 0 1px rgba(255, 255, 255, .06), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
  transform: rotate(-9deg);
}
[data-theme="dark"] .auth-phone {
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6), -18px 0 60px rgba(249, 11, 11, .28), 0 0 0 1px rgba(255, 120, 100, .18), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
}
.auth-phone::before { content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 34%; height: 18px; border-radius: 99px; background: #0c0f16; z-index: 2; }
.ph-screen { position: relative; height: 100%; border-radius: 26px; overflow: hidden; background: #111621; color: #F5F7FA; padding: 40px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.ph-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255, 255, 255, .10), transparent 38%); pointer-events: none; }
.ph-top { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; }
.ph-top img { width: 18px; height: 18px; }
.ph-pill { margin-left: auto; font-size: 9px; padding: 2px 7px; border-radius: 99px; background: #F90B0B; color: #fff; }
.ph-price { font-family: var(--bv-font-head); font-weight: 800; font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ph-price b { color: #F90B0B; }
.ph-sub { font-size: 9.5px; color: #A9B2C1; margin-top: -6px; }
.ph-chart { width: 100%; height: 34%; display: block; }
.ph-digits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.ph-digits span { text-align: center; font-size: 10.5px; font-weight: 800; padding: 4px 0; border-radius: 7px; background: #171E2B; border: 1px solid #293142; }
.ph-digits span.on { background: #F90B0B; border-color: #F90B0B; }
.ph-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.ph-btns span { text-align: center; padding: 8px 0; border-radius: 10px; font-family: var(--bv-font-head); font-weight: 800; font-size: 12px; color: #fff; }
.ph-btns .a { background: #22C55E; } .ph-btns .b { background: #F90B0B; }

.auth-chip {
  position: absolute; z-index: 4;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .8rem; border-radius: 12px; font-size: 12.5px; font-weight: 700;
  background: color-mix(in srgb, var(--bv-card) 88%, transparent); color: var(--bv-text);
  border: 1px solid var(--bv-border); box-shadow: var(--bv-shadow); backdrop-filter: blur(8px);
  animation: authFloat 5.5s ease-in-out infinite;
}
[data-theme="dark"] .auth-chip { background: rgba(17, 22, 33, .72); border-color: rgba(255, 255, 255, .10); }
.auth-chip i { font-size: 16px; color: var(--bv-primary); }
.auth-chip .ok { color: var(--bv-success); }
.auth-chip.c1 { left: calc(13% + clamp(200px, min(17vw, 28vh), 250px) - 6px); top: 40%; }
.auth-chip.c2 { left: 55%; top: 56%; animation-delay: -2.7s; }
@keyframes authFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Silky red wave across the bottom */
.auth-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34%; min-height: 150px; max-height: 260px; z-index: 4; display: block; }
.auth-caption {
  position: absolute; left: 1.5rem; bottom: 1.4rem; z-index: 6;
  max-width: 13.5rem; margin: 0;
  color: #fff; font-family: "Great Vibes", cursive; font-size: 2.3rem; line-height: 1.05;
  text-shadow: 0 .15rem .6rem rgba(0, 0, 0, .55);
}
.auth-caption-swoosh { position: absolute; left: 1.4rem; bottom: .6rem; z-index: 6; width: 13rem; height: 1.5rem; }

/* ---------- Right: form panel ---------- */
.auth-panel {
  position: relative;
  background: var(--bv-page);
  display: flex; flex-direction: column; align-items: center;
  overflow-y: auto; overflow-x: hidden;
  padding: 4.75rem 1.25rem 5.5rem;
  scrollbar-width: thin;
}
.auth-card {
  margin: auto;
  width: 100%; max-width: 28rem;
  background: #FFFFFF;
  color: var(--bv-text);
  border: 1px solid #E0E4EA;
  border-radius: 1.25rem;
  box-shadow: 0 1.25rem 3rem rgba(21, 25, 34, .16);
  padding: 1.5rem;
}
[data-theme="dark"] .auth-card { background: #111621; border-color: #293142; box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, .45); }
@media (min-width: 992px) { .auth-card { padding: 1.5rem 1.5rem 1.6rem; } }
.auth-card-brand { display: flex; justify-content: center; margin-bottom: 1.4rem; color: var(--bv-text); }
.auth-card-brand:hover { color: var(--bv-text); }
.auth-card-brand .bv-wordmark { font-size: 17px; }
.auth-card-brand .bv-mark { width: 30px; height: 30px; }
.auth-card h1 { font-family: var(--bv-font-head); font-weight: 700; letter-spacing: -0.03em; font-size: 1.75rem; margin-bottom: .5rem; }
.auth-card .auth-secondary { color: var(--bv-muted); font-size: 15px; margin-bottom: 1.25rem; }
.auth-card .form-label { font-weight: 600; font-size: 15px; color: var(--bv-text); margin-bottom: .45rem; }
.auth-card .form-control {
  background: var(--auth-elev); border: 1px solid var(--bv-border); color: var(--bv-text);
  min-height: 3rem; padding-left: 2.75rem; border-radius: 12px; font-size: 15px;
}
.auth-card .form-control::placeholder { color: var(--bv-muted); }
.auth-card .form-control:focus { background: var(--auth-elev); border-color: var(--bv-primary); color: var(--bv-text); box-shadow: 0 0 0 4px rgba(249, 11, 11, .28); }
[data-theme="dark"] .auth-card .form-control:focus { box-shadow: 0 0 0 4px rgba(249, 11, 11, .40); }
.auth-card .form-check-label { color: var(--bv-muted); font-size: 15px; }
.auth-card .form-check-input { width: 1.05em; height: 1.05em; margin-top: .22em; }
.auth-card .form-text { color: var(--bv-muted); }
.auth-card .link-small { font-size: 14px; font-weight: 500; }
.input-wrap { position: relative; }
.input-wrap > .ti { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--bv-soft); pointer-events: none; z-index: 2; font-size: 16px; }
[data-theme="dark"] .input-wrap > .ti { color: var(--bv-muted); }
.input-wrap .pw-toggle { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--bv-soft); z-index: 2; padding: .25rem; font-size: 17px; line-height: 1; }
.input-wrap .form-control.has-action { padding-right: 2.75rem; }
.btn-auth {
  background-color: var(--bv-primary); border-color: var(--bv-primary); color: #fff;
  font-weight: 700; min-height: 3rem; border-radius: 999px; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-auth:hover, .btn-auth:focus-visible { background-color: var(--bv-primary-dark); border-color: var(--bv-primary-dark); color: #fff; }
.auth-foot { text-align: center; font-size: 14px; color: var(--bv-muted); margin: 0; }
.auth-foot a { font-weight: 700; }
.auth-theme {
  position: fixed; top: 0; right: 0; margin: 1rem; z-index: 1080;
  width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--bv-border); background: var(--bv-card); color: var(--bv-text); font-size: 16px;
}
.auth-theme:hover { background: var(--bv-surface-2); }
.auth-risk { font-size: 12px; color: var(--bv-soft); text-align: center; margin-top: 1rem; }

/* ---------- Desktop: left stays put, right column scrolls ---------- */
@media (min-width: 992px) {
  body.auth { height: 100vh; height: 100dvh; overflow: hidden; }
  .auth-split { height: 100%; min-height: 0; }
  .auth-promo { height: 100%; }
  .auth-panel { height: 100%; }
}
@media (min-width: 992px) and (max-height: 700px) {
  .auth-art { display: none; }
}
@media (min-width: 1400px) {
  .auth-promo { padding-left: 3.5rem; padding-right: 3.5rem; }
}

/* ---------- Tablet / mobile: card only ---------- */
@media (max-width: 991.98px) {
  .auth-promo { display: none; }
  .auth-panel { padding: 4.75rem 1rem 3rem; min-height: 100vh; min-height: 100dvh; }
}
@media (max-width: 575.98px) {
  .auth-card { padding: 1.15rem; }
  .auth-card h1 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) { .auth-chip { animation: none; } }


/* ---------- Sign-up bonus code ---------- */
.label-optional { color: var(--bv-muted); font-weight: 400; }
.auth-card .promo-input { text-transform: uppercase; letter-spacing: .04em; padding-right: 2.75rem; }
.auth-card .promo-input::placeholder { letter-spacing: .02em; }
.promo-ok { position: absolute; right: .85rem; top: 50%; transform: translateY(-50%) scale(.6); opacity: 0; color: var(--bv-success); font-size: 19px; transition: .2s; pointer-events: none; }
.promo-wrap.is-applied .promo-ok { opacity: 1; transform: translateY(-50%) scale(1); }
.auth-card .promo-wrap.is-applied .form-control { border-color: var(--bv-success); }
.auth-card .promo-note { color: var(--bv-muted); font-size: 13px; margin-top: .4rem; }
