/* ==============================================
   TapPlaza Custom Auth Pages
   Login · Register · Forgot Password
   ============================================== */

/* ── Auth Page Wrapper ── */
.tapplaza-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  padding: 32px 16px;
}

/* Background glow effect */
.tapplaza-auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 20% 10%, rgba(0,212,255,.06) 0%, transparent 55%),
    radial-gradient(ellipse 45% 45% at 80% 85%, rgba(0,102,255,.05) 0%, transparent 55%);
}

/* Subtle grid lines */
.tapplaza-auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,212,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 80%);
}

/* ── Auth Card ── */
.tapplaza-auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: var(--surf);
  border: 1px solid var(--bdr);
  border-radius: var(--rlg);
  padding: 40px 36px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

/* ── Auth Logo / Brand ── */
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 12px;
  box-shadow: 0 0 24px rgba(0,212,255,.25);
}
.auth-site-name {
  font-family: var(--ffd);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -.02em;
}

/* ── Auth Headings ── */
.auth-title {
  font-family: var(--ffd);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--t1);
  text-align: center;
  letter-spacing: -.025em;
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: .82rem;
  color: var(--t2);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ── Divider ── */
.auth-divider {
  height: 1px;
  background: var(--bdr);
  margin: 20px 0;
}

/* ── Form Groups ── */
.auth-form-group {
  margin-bottom: 16px;
}
.auth-form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.auth-form-group input[type="text"],
.auth-form-group input[type="email"],
.auth-form-group input[type="password"],
.auth-form-group input[type="url"],
.auth-form-group input[type="number"] {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  color: var(--t1);
  font-family: var(--ffb);
  font-size: .88rem;
  padding: 10px 14px;
  transition: border-color .18s, box-shadow .18s;
  outline: none;
  -webkit-appearance: none;
}
.auth-form-group input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(0,212,255,.12);
}
.auth-form-group input::placeholder {
  color: var(--t3);
}

/* Password toggle wrapper */
.auth-pass-wrap {
  position: relative;
}
.auth-pass-wrap input {
  padding-right: 42px;
}
.auth-pass-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--t3);
  font-size: .85rem; padding: 4px;
  transition: color .15s;
}
.auth-pass-toggle:hover { color: var(--t1); }

/* Checkbox row */
.auth-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  color: var(--t2);
  cursor: pointer;
}
.auth-check-label input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--acc);
  cursor: pointer;
}
.auth-forgot-link {
  font-size: .78rem;
  color: var(--acc);
  text-decoration: none;
  transition: opacity .15s;
}
.auth-forgot-link:hover { opacity: .75; }

/* ── Submit Button ── */
.auth-submit {
  width: 100%;
  background: var(--acc);
  color: #000;
  font-family: var(--ffb);
  font-size: .9rem;
  font-weight: 700;
  padding: 11px 20px;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  transition: background .18s, box-shadow .18s, transform .15s;
  box-shadow: 0 0 18px rgba(0,212,255,.2);
  margin-top: 4px;
}
.auth-submit:hover {
  background: #19dbff;
  box-shadow: 0 0 26px rgba(0,212,255,.35);
  transform: translateY(-1px);
}
.auth-submit:active { transform: translateY(0); }

/* ── Alt link (login / register toggle) ── */
.auth-alt-text {
  text-align: center;
  font-size: .8rem;
  color: var(--t2);
  margin-top: 20px;
}
.auth-alt-text a {
  color: var(--acc);
  text-decoration: none;
  font-weight: 600;
}
.auth-alt-text a:hover { text-decoration: underline; }

/* ── Messages / Errors ── */
.auth-message {
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: .82rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.auth-message.error {
  background: rgba(255,71,87,.1);
  border: 1px solid rgba(255,71,87,.25);
  color: var(--red);
}
.auth-message.success {
  background: rgba(0,230,118,.08);
  border: 1px solid rgba(0,230,118,.2);
  color: var(--grn);
}
.auth-message.info {
  background: rgba(0,212,255,.07);
  border: 1px solid rgba(0,212,255,.18);
  color: var(--acc);
}

/* ── Privacy note ── */
.auth-privacy {
  text-align: center;
  font-size: .71rem;
  color: var(--t3);
  margin-top: 16px;
  line-height: 1.5;
}
.auth-privacy a {
  color: var(--t2);
  text-decoration: underline;
}

/* ── Loading spinner ── */
.auth-submit.loading {
  pointer-events: none;
  opacity: .7;
  position: relative;
}
.auth-submit.loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 480px) {
  .tapplaza-auth-card { padding: 28px 20px; }
  .auth-title { font-size: 1.25rem; }
}
