/**
 * PontajPro Enterprise Auth Pages
 * Login, Register, Password Reset styling
 */

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

:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --primary-lighter: #334155;

  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.3);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --bg-dark: #020617;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-input: rgba(15, 23, 42, 0.8);

  --border: rgba(148, 163, 184, 0.1);
  --border-light: rgba(148, 163, 184, 0.2);
  --border-focus: var(--accent);

  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
  --gradient-radial: radial-gradient(ellipse at top, #1e293b 0%, #020617 70%);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px var(--accent-glow);

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

html {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--gradient-radial);
  color: var(--text-primary);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ========================================
   Navigation
======================================== */
.navbar {
  position: relative;
  z-index: 10;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo i {
  font-size: 1.25rem;
  color: white;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ========================================
   Main Container
======================================== */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* ========================================
   Auth Card
======================================== */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-xl);
}

.auth-card.auth-card-wide {
  max-width: 540px;
}

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

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-glow);
}

.auth-logo i {
  font-size: 1.75rem;
  color: white;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

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

/* ========================================
   Alerts
======================================== */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.alert i {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.alert-error {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* ========================================
   Form Elements
======================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition-fast);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

/* Form Row (2 columns) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Form Options (Remember me + Forgot password) */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.form-options a {
  color: var(--accent-light);
  text-decoration: none;
  transition: var(--transition-fast);
}

.form-options a:hover {
  color: var(--accent);
}

/* Checkbox */
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ========================================
   Buttons
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ========================================
   Divider
======================================== */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* ========================================
   Footer Links
======================================== */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.auth-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.auth-footer a:hover {
  color: var(--accent-light);
}

.auth-footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.auth-footer p a {
  color: var(--accent-light);
  font-weight: 500;
}

/* ========================================
   Page Footer
======================================== */
.page-footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer-left i {
  color: var(--accent);
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.footer-right a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: var(--transition-fast);
}

.footer-right a:hover {
  color: var(--text-primary);
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 480px) {
  .navbar {
    padding: 1rem;
  }

  .brand-text {
    display: none;
  }

  .auth-container {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .form-options {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .page-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ========================================
   Animations
======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  animation: fadeIn 0.4s ease;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
}

.toast {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  color: white;
  min-width: 280px;
  font-size: 0.9375rem;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.toast-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
