/* ═══════════════════════════════════════════════════════════
   AUTH PAGES — login, register, forgot-password, new-password
   Inherits variables from style.css
═══════════════════════════════════════════════════════════ */

/* ── Layout ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 48px;
  position: relative;
}

/* ── Top logo bar ── */
.auth-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: 64px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
.auth-topbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}
.auth-topbar-logo img {
  height: 30px;
  width: auto;
  object-fit: contain;
}
.auth-topbar-logo-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 12px;
}
.auth-topbar-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}
.auth-topbar-link:hover { color: var(--white); }

/* Subtle background grid */
.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(227,25,55,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227,25,55,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Glow orb */
.auth-page::after {
  content: '';
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(227,25,55,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Card ── */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 44px 40px 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
}

/* ── Logo block ── */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  text-decoration: none;
}
.auth-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.auth-logo-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Headings ── */
.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}
.auth-divider span {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider p {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted2);
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  height: 46px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 0 14px;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-control::placeholder { color: var(--muted); }
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(227,25,55,0.12);
}

/* Input with icon */
.input-wrap {
  position: relative;
}
.input-wrap .form-control {
  padding-left: 42px;
}
.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
}

/* Password toggle */
.input-wrap .toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--ease);
}
.input-wrap .toggle-pw:hover { color: var(--muted2); }

/* ── Checkbox ── */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.form-check-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.form-check-label a {
  color: var(--accent);
  text-decoration: none;
}
.form-check-label a:hover { text-decoration: underline; }

/* ── Forgot link ── */
.form-forgot {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}
.form-forgot a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}
.form-forgot a:hover { color: var(--accent); }

/* ── Buttons ── */
.btn-auth {
  width: 100%;
  height: 48px;
  background: var(--accent);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  text-decoration: none;
}
.btn-auth:hover {
  background: var(--accent-h);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(227,25,55,0.35);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ── Footer text ── */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}
.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

/* ── Alert / info box ── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
}
.auth-alert.info {
  background: rgba(227,25,55,0.08);
  border: 1px solid rgba(227,25,55,0.2);
  color: var(--muted2);
}
.auth-alert i { color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ── Step indicator (register) ── */
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.auth-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border2);
  transition: all 0.3s ease;
}
.auth-step-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ── Password strength bar ── */
.pw-strength {
  margin-top: 6px;
}
.pw-strength-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--border2);
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}
.pw-strength-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Back link ── */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color var(--ease);
}
.auth-back:hover { color: var(--white); }
.auth-back i { font-size: 12px; }

/* ── Success state ── */
.auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 12px 0;
}
.auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(227,25,55,0.12);
  border: 1px solid rgba(227,25,55,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--accent);
}
.auth-success h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}
.auth-success p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 320px;
}

/* ── Admin badge ── */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(227,25,55,0.1);
  border: 1px solid rgba(227,25,55,0.25);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin: 0 auto 20px;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .auth-card {
    padding: 32px 22px 28px;
    border-radius: 16px;
  }
  .auth-title { font-size: 20px; }
  .form-row { grid-template-columns: 1fr; }
}
