/* ============================================================
   BINAREX - AUTH PAGES CSS  (Fixed — scrollable, mobile-first)
   ============================================================ */

/* The key fix: body must NOT have overflow:hidden — forms need to scroll */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;      /* always top-align so content is reachable */
  justify-content: center;
  padding: 40px 16px 60px;      /* generous bottom padding */
  background: var(--bg-primary);
  position: relative;
  /* NO overflow:hidden */
}

/* Decorative background — fixed so it doesn't scroll */
.auth-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(0,212,170,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(124,58,237,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.auth-container {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 1;
  /* allow natural height growth */
}

/* Wider container for register page which has more fields */
.auth-container-wide {
  max-width: 580px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  /* allow card to grow with content */
  width: 100%;
  box-sizing: border-box;
}

.auth-card h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Step progress bar */
.step-progress-bar {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 24px;
  width: 100%;
}

.step-pb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  min-width: 0;
}

.step-pb-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.08);
  z-index: 0;
}

.step-pb-item.done:not(:last-child)::after   { background: var(--teal); }
.step-pb-item.active:not(:last-child)::after { background: rgba(0,212,170,0.3); }

.step-pb-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.step-pb-item.active .step-pb-dot {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 0 12px rgba(0,212,170,0.5);
}

.step-pb-item.done .step-pb-dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.step-pb-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 2px;
}

.step-pb-item.active .step-pb-label { color: var(--teal); }
.step-pb-item.done .step-pb-label   { color: var(--green); }

/* Responsive */
@media (max-width: 600px) {
  .auth-body     { padding: 24px 12px 48px; }
  .auth-brand    { margin-bottom: 18px; }
  .auth-card     { padding: 24px 16px; border-radius: var(--radius-lg); }
  .auth-card h2  { font-size: 1.3rem; }

  /* On very small screens, hide step labels */
  .step-pb-label { display: none; }
  .step-pb-dot   { width: 22px; height: 22px; font-size: 0.6rem; }
}

@media (max-width: 380px) {
  .auth-body  { padding: 16px 8px 40px; }
  .auth-card  { padding: 20px 12px; }
}
