/* ===================================================
   AUTH GATE — full-screen login/register overlay
   Uses Retas-app CSS variables (--dark, --surface, --neon, etc.)
=================================================== */
#auth-gate {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: var(--dark);
  overflow-y: auto;
}

/* ── Hero ─────────────────────────────────────── */
.ag-hero {
  flex-shrink: 0;
  padding: calc(52px + env(safe-area-inset-top, 0px)) 28px 44px;
  background: linear-gradient(170deg, #220055 0%, var(--dark2) 100%);
  text-align: center;
  position: relative;
}
.ag-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
}
.ag-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 72px;
  color: var(--neon);
  text-shadow: 0 0 40px rgba(200, 85, 255, 0.5), 0 0 80px rgba(200, 85, 255, 0.2);
  letter-spacing: 8px;
  line-height: 1;
}
.ag-tagline {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 12px;
}

/* ── Body / Form ──────────────────────────────── */
.ag-body {
  flex: 1;
  padding: 28px 24px 36px;
  display: flex;
  flex-direction: column;
  background: var(--dark);
}

/* Tab switcher */
.ag-tabs {
  display: flex;
  background: var(--dark3);
  border: 1px solid rgba(200, 85, 255, 0.18);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.ag-tab {
  flex: 1;
  padding: 11px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'Outfit', sans-serif;
}
.ag-tab.active {
  background: var(--neon-dim);
  color: var(--neon);
}

/* Labels */
.ag-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
  margin-top: 18px;
  display: block;
}

/* Inputs */
.ag-input {
  width: 100%;
  display: block;
  background: var(--dark3);
  border: 1px solid rgba(200, 85, 255, 0.2);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  padding: 14px 15px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
}
.ag-input:focus {
  border-color: var(--neon-dim);
  box-shadow: 0 0 0 3px rgba(200, 85, 255, 0.12);
}
.ag-input::placeholder { color: var(--text-muted); opacity: 0.6; }
.ag-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239070B0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.ag-select:disabled { opacity: 0.45; cursor: not-allowed; }
.ag-select option { background: var(--dark3); color: var(--text); }

/* Forgot password */
#ag-forgot-row {
  text-align: right;
  margin-top: 8px;
}
.ag-forgot-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  transition: color 0.18s;
}
.ag-forgot-btn:hover { color: var(--neon); }

/* Submit button */
.ag-submit {
  width: 100%;
  background: var(--neon);
  color: #0A0010;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  padding: 16px;
  cursor: pointer;
  margin-top: 28px;
  letter-spacing: 0.3px;
  transition: opacity 0.18s, transform 0.12s;
  flex-shrink: 0;
}
.ag-submit:active  { transform: scale(0.98); }
.ag-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* Error */
.ag-error {
  font-size: 12.5px;
  color: var(--red);
  text-align: center;
  margin-top: 14px;
  min-height: 18px;
  line-height: 1.4;
}
