/* =============================================================
   BIRDS EMPIRE - Auth Shell
   Full-screen dark stage + centered glass card
   (icon inputs, gradient CTA, centre toasts, floating support)
   ============================================================= */

:root {
  --auth-deep:   #03081A;
  --auth-stage:  #061434;
  --auth-input:  rgba(6, 18, 45, 0.92);
  --auth-line:   rgba(196, 181, 253, 0.16);
  --auth-focus:  #7B3FE4;
}

/* ---------------- Stage ---------------- */
html, body {
  min-height: 100%;
  background: var(--auth-deep);
}

.auth-stage {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 18px;
  overflow: hidden;
}

/* Background artwork */
.auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  object-fit: cover;
  object-position: center top;
  width: 100%;
  height: 100%;
}
.auth-bg-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1100px 720px at 14% -6%,  rgba(23, 70, 184, 0.60), transparent 62%),
    radial-gradient(900px 640px at 92% 6%,    rgba(123, 63, 228, 0.55), transparent 60%),
    radial-gradient(820px 700px at 80% 96%,   rgba(228, 92, 255, 0.34), transparent 62%),
    radial-gradient(700px 620px at 4% 84%,    rgba(169, 76, 255, 0.32), transparent 60%),
    linear-gradient(170deg, #061434 0%, #04102e 52%, #03081a 100%);
}
.auth-bg-fallback::after {
  content: '';
  position: absolute;
  inset: -55%;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(169, 76, 255, 0.34), transparent 44%),
    radial-gradient(circle at 70% 66%, rgba(228, 92, 255, 0.26), transparent 44%);
  filter: blur(100px);
  animation: authMesh 28s ease-in-out infinite alternate;
}
@keyframes authMesh {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(4%, -3%) scale(1.1); }
  100% { transform: translate(-4%, 3%) scale(1.05); }
}

/* Bottom-weighted darkening overlay */
.auth-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(2, 8, 24, 0.20) 0%,
    rgba(2, 8, 24, 0.38) 22%,
    rgba(2, 8, 24, 0.66) 50%,
    rgba(2, 8, 24, 0.90) 76%,
    #03081a 100%
  );
}

.auth-inner {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 430px;
}

/* ---------------- Brand ---------------- */
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}
.auth-logo img {
  width: 215px;
  max-width: 78%;
  object-fit: contain;
}
.auth-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 26px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 12px 36px rgba(123, 63, 228, 0.55), inset 0 1px 0 rgba(255,255,255,.28);
  margin: 0 auto;
}

/* ---------------- Heading ---------------- */
.auth-heading { margin-top: 26px; }
.auth-heading h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.4px;
}
.auth-heading p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}
.auth-heading.center { text-align: center; }

/* ---------------- Card ---------------- */
.auth-panel {
  margin-top: 26px;
  padding: 24px 22px;
  border-radius: 22px;
  background: rgba(9, 18, 42, 0.62);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid var(--auth-line);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.auth-panel.flat {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

/* ---------------- Icon input ---------------- */
.ibox {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  margin-bottom: 11px;
  background: var(--auth-input);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 5px 16px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.ibox:hover { border-color: rgba(169, 76, 255, 0.45); }
.ibox:focus-within {
  border-color: rgba(169, 76, 255, 0.90);
  background: rgba(6, 18, 45, 0.98);
  box-shadow:
    0 0 0 2px rgba(169, 76, 255, 0.14),
    0 6px 20px rgba(0, 0, 0, 0.22),
    0 0 22px rgba(123, 63, 228, 0.22);
}
.ibox.has-error { border-color: rgba(251, 113, 133, 0.7); }

.ibox > .ic {
  width: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  text-align: center;
}
.ibox > .ic svg { width: 16px; height: 16px; fill: currentColor; }

.ibox input,
.ibox select,
.ibox textarea {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: none;
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  padding-left: 11px;
}
.ibox textarea { padding: 14px 0 0 11px; height: auto; }
.ibox input::placeholder,
.ibox textarea::placeholder { color: rgba(255, 255, 255, 0.55); }
.ibox input[type=number]::-webkit-outer-spin-button,
.ibox input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ibox .eye {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 15px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.ibox .eye:hover { color: #fff; background: rgba(255,255,255,.08); }
.ibox .eye svg { width: 17px; height: 17px; fill: currentColor; }

/* Textarea variant */
.ibox.textarea-box {
  height: auto;
  min-height: 92px;
  align-items: flex-start;
  padding-top: 0;
}

/* Select variant */
.ibox select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.ibox select option { background: #0a122a; color: #fff; }
.ibox .chev {
  flex-shrink: 0;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  pointer-events: none;
}

/* ---------------- Label ---------------- */
.alabel {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.62);
  margin: 14px 0 7px;
}

/* ---------------- CTA ---------------- */
.login-btn {
  width: 100%;
  height: 50px;
  margin-top: 20px;
  border: none;
  outline: none;
  border-radius: 14px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #1746B8 0%, #7B3FE4 50%, #A94CFF 100%);
  background-size: 200% 100%;
  box-shadow: 0 8px 22px rgba(123, 63, 228, 0.36);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, background-position .4s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.login-btn:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 14px 32px rgba(169, 76, 255, 0.48);
}
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.login-btn.is-loading { pointer-events: none; opacity: .8; }

.login-btn.green  { background: linear-gradient(90deg, #0E9F6E, #4ADE80); background-size: 200% 100%; box-shadow: 0 8px 22px rgba(74,222,128,.32); color: #03281c; }
.login-btn.gold   { background: linear-gradient(90deg, #D99A1C, #F5C451); background-size: 200% 100%; box-shadow: 0 8px 22px rgba(245,196,81,.30); color: #241a05; }
.login-btn.red    { background: linear-gradient(90deg, #BE123C, #FB7185); background-size: 200% 100%; box-shadow: 0 8px 22px rgba(251,113,133,.30); }
.login-btn.ghost  { background: rgba(255,255,255,.06); border: 1px solid var(--auth-line); box-shadow: none; color: #fff; }
.login-btn.sm { height: 42px; font-size: 14px; border-radius: 12px; margin-top: 12px; }

.spin {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin .7s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

/* ---------------- Remember / switch rows ---------------- */
.auth-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  user-select: none;
  cursor: pointer;
}
.auth-row input[type=checkbox] {
  width: 16px; height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--auth-focus);
}
.auth-row .grow { flex: 1; }
.auth-row a { color: #A94CFF; text-decoration: none; font-weight: 600; }
.auth-row a:hover { text-decoration: underline; }

/* ---------------- Footer links ---------------- */
.auth-signup {
  margin-top: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}
.auth-signup a {
  color: #A94CFF;
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}
.auth-signup a:hover { text-decoration: underline; }

.auth-alt {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}
.auth-alt a {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--auth-line);
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.auth-alt a:hover { background: rgba(255,255,255,.10); transform: translateY(-2px); }

.auth-note {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.auth-note a { color: #A94CFF; text-decoration: none; font-weight: 600; }

/* ---------------- Referrer banner ---------------- */
.ref-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.30);
  color: #a7f3d0;
  font-size: 12.5px;
}
.ref-banner b { color: #fff; letter-spacing: .5px; }

/* =============================================================
   CENTRE TOAST (black glass + blurred backdrop)
   ============================================================= */
.toast-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.toast-backdrop.active { opacity: 1; pointer-events: auto; }

.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: calc(100% - 48px);
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 16px;
  text-align: center;
  border-radius: 13px;
  background: rgba(6, 11, 26, 0.92);
  border: 1px solid rgba(196, 181, 253, 0.16);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transform: scale(.88);
  opacity: 0;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), opacity .25s ease;
  pointer-events: auto;
  font-family: 'Inter', system-ui, sans-serif;
}
.toast.show { transform: scale(1); opacity: 1; }
.toast.hide { transform: scale(.88); opacity: 0; }
.toast i, .toast svg { flex-shrink: 0; font-size: 16px; font-style: normal; }
.toast svg { width: 17px; height: 17px; fill: currentColor; }
.toast span { flex: 0 1 auto; color: #fff; font-size: 13px; line-height: 1.38; text-align: center; }

.toast.success i, .toast.success svg { color: #4ade80; }
.toast.error   i, .toast.error   svg { color: #fb7185; }
.toast.warning i, .toast.warning svg { color: #f5c451; }
.toast.info    i, .toast.info    svg { color: #7dd3fc; }

/* =============================================================
   FLOATING SUPPORT BUTTON (draggable)
   ============================================================= */
#supportFab {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #1746B8 0%, #7B3FE4 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  z-index: 900;
  box-shadow:
    0 10px 28px rgba(123, 63, 228, 0.42),
    0 4px 10px rgba(0, 0, 0, 0.28);
  transition: transform .2s ease, box-shadow .2s ease;
}
#supportFab:hover {
  transform: scale(1.07);
  box-shadow: 0 16px 36px rgba(169, 76, 255, 0.5), 0 6px 14px rgba(0,0,0,.3);
}
#supportFab.dragging { cursor: grabbing; transform: scale(.96); }
#supportFab svg { width: 30px; height: 30px; fill: currentColor; pointer-events: none; }

#supportFab .online-dot {
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 13px;
  height: 13px;
  background: #22c55e;
  border: 2px solid #0a122a;
  border-radius: 50%;
  pointer-events: none;
}
#supportFab .online-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(34, 197, 94, 0.38);
  border-radius: 50%;
  animation: fabPulse 1.8s infinite;
}
@keyframes fabPulse {
  0%   { transform: scale(.7); opacity: .85; }
  70%  { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

#supportFab::before {
  content: attr(data-label);
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: #0b1120;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(196,181,253,.16);
}
#supportFab:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 430px) {
  .auth-stage { padding: 24px 18px; align-items: flex-start; padding-top: 34px; }
  .auth-inner { max-width: 100%; }
  .auth-panel { padding: 20px 17px; border-radius: 19px; }
  .auth-logo-mark { width: 62px; height: 62px; font-size: 22px; border-radius: 19px; }
  .auth-heading { margin-top: 20px; }
  .auth-heading h1 { font-size: 25px; }
  .auth-heading p { font-size: 13.5px; }
  .auth-panel { margin-top: 20px; }
  .ibox { height: 47px; padding: 0 13px; margin-bottom: 10px; }
  .ibox > .ic { font-size: 15px; }
  .ibox input { font-size: 13px; padding-left: 9px; }
  .login-btn { height: 47px; margin-top: 17px; font-size: 15px; border-radius: 13px; }
  .auth-signup { margin-top: 15px; font-size: 12px; }
  .toast-container { width: calc(100% - 40px); }
  .toast { padding: 11px 14px; border-radius: 11px; gap: 7px; }
  .toast span { font-size: 11.5px; }
  .toast svg, .toast i { font-size: 15px; }
  #supportFab { right: 15px; bottom: 78px; width: 54px; height: 54px; }
  #supportFab svg { width: 27px; height: 27px; }
  #supportFab::before { display: none; }
}

@media (max-height: 720px) {
  .auth-heading { margin-top: 18px; }
  .auth-panel { margin-top: 16px; }
}

/* =============================================================
   CAPTCHA CARD + HEADING HIGHLIGHT
   ============================================================= */
.auth-heading .hl {
  background: linear-gradient(135deg, #4D9BFF, #2E86FF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cap-box {
  background: rgba(9, 18, 42, 0.72);
  border: 1px solid rgba(120, 165, 240, 0.22);
  border-radius: var(--r, 12px);
  padding: 13px;
  margin: 6px 0 14px;
}
.cap-head .cap-t {
  font-size: 13.5px;
  font-weight: 750;
  color: #fff;
}
.cap-head .cap-s {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}
.cap-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  flex-wrap: wrap;
}
.cap-img {
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(120, 165, 240, 0.28);
  flex-shrink: 0;
  line-height: 0;
  background: #16274A;
}
.cap-img svg { display: block; }
.cap-refresh {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2E86FF, #1E6BE6);
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 0 5px 16px rgba(30, 107, 230, 0.35);
  transition: transform .2s;
}
.cap-refresh:hover { transform: scale(1.06); }
.cap-input {
  flex: 1;
  min-width: 150px;
  margin-bottom: 0 !important;
  height: 44px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px !important;
}
.cap-input svg { flex-shrink: 0; opacity: .75; }
@media (max-width: 380px) {
  .cap-img { width: 100%; text-align: center; }
  .cap-input { min-width: 100%; }
}
