/* Unified Authentication UI Styling — theTechMentor */

:root {
  --auth-bg: #070b10;
  --auth-card: #0e1520;
  --auth-border: #1e293b;
  --auth-text: #f1f5f9;
  --auth-muted: #94a3b8;
  --auth-accent: #0284c7;
  --auth-accent-light: #38bdf8;
  --auth-gold: #f59e0b;
  --auth-green: #10b981;
  --auth-red: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-nav {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--auth-border);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-badge {
  background: linear-gradient(135deg, var(--auth-accent), #a855f7);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.auth-box {
  width: min(440px, 100%);
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.auth-header p {
  color: var(--auth-muted);
  font-size: 0.9rem;
}

/* Alert Message Banner */
.auth-alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  display: none;
}

.auth-alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.auth-alert.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

.auth-form-group {
  margin-bottom: 1.25rem;
}

.auth-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--auth-muted);
  margin-bottom: 0.4rem;
}

.input-password-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  background: #080d14;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-accent-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.pwd-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--auth-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.pwd-toggle-btn:hover {
  color: #fff;
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--auth-muted);
  cursor: pointer;
}

.forgot-link {
  color: var(--auth-accent-light);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.auth-btn-primary {
  width: 100%;
  background: var(--auth-accent);
  color: #fff;
  border: none;
  padding: 0.9rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.1s;
}

.auth-btn-primary:hover {
  background: #0369a1;
}

.auth-btn-primary:active {
  transform: scale(0.99);
}

.auth-footer-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--auth-border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--auth-muted);
}

.auth-footer-links a {
  color: var(--auth-accent-light);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-links a:hover {
  text-decoration: underline;
}

/* Modals for Registration & Password Reset */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  width: min(480px, 100%);
  padding: 2rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--auth-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}
