/* ═══════════════════════════════════════════════════════════════════════
   PartsHound — Auth Pages (Login / Signup)
   Dark industrial theme with amber accents
   ═══════════════════════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--steel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  animation: authIn 0.3s ease;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--amber);
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.auth-logo span {
  color: var(--text-primary);
}

.auth-card h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 3px solid var(--red);
  color: #fca5a5;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  animation: shakeIn 0.3s ease;
}

@keyframes shakeIn {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.auth-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}
.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}
.auth-footer a {
  color: var(--amber);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover {
  color: var(--amber-bright);
  text-decoration: underline;
}

.auth-tagline {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  opacity: 0.6;
  font-style: italic;
}

/* ─── DEMO BUTTON ────────────────────────────────────────────────────── */

.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.25rem 0;
}
.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  position: relative;
  background: var(--steel);
  padding: 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 2px solid var(--amber);
  border-radius: var(--radius-sm);
  color: var(--amber);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-demo:hover {
  background: var(--amber);
  color: var(--charcoal);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245,158,11,0.25);
}
.btn-demo-icon {
  font-size: 1.1rem;
  animation: spin 3s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.demo-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* ─── PASSWORD REQUIREMENTS ───────────────────────────────────────────── */

.password-requirements {
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.pw-req {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.2rem 0;
  transition: color 0.2s ease;
}

.pw-req-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--iron);
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
}

.pw-req.met .pw-req-icon {
  background: var(--green);
  border-color: var(--green);
}

.pw-req.met .pw-req-icon::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 4px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pw-req.met {
  color: var(--green);
}

/* ─── USER MENU (in app nav) ─────────────────────────────────────────── */

.btn-user-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--concrete);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  margin-left: 0.5rem;
}
.btn-user-menu:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.user-dropdown {
  position: fixed;
  top: 56px;
  right: 1.5rem;
  width: 260px;
  background: var(--steel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 150;
  animation: modalIn 0.15s ease;
}

.user-dropdown-header {
  padding: 1rem 1.25rem;
}

.user-email {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.user-company {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
}

.user-dropdown-item {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}
.user-dropdown-item:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--red);
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-card h1 {
    font-size: 1.2rem;
  }

  .btn-user-menu {
    display: none;
  }
}
