/* ============================================
   Authentication Pages Styles
   Beautiful, Modern Design
   ============================================ */

:root {
  --auth-primary: #2563EB;
  --auth-primary-dark: #1E40AF;
  --auth-secondary: #8B5CF6;
  --auth-accent: #EC4899;
  --auth-success: #10B981;
  --auth-error: #EF4444;
  --auth-text: #1F2937;
  --auth-text-light: #6B7280;
  --auth-bg-light: #F9FAFB;
}

/* ============================================
   Body & Background
   ============================================ */

.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  overflow-x: hidden;
}

.auth-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.auth-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 25%, #F093FB 50%, #4FACFE 75%, #00F2FE 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  opacity: 0.9;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.auth-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: patternFloat 20s ease-in-out infinite;
}

@keyframes patternFloat {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20px, -20px);
  }
}

/* ============================================
   Container & Card
   ============================================ */

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

.auth-card {
  width: 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.5);
  padding: 3rem 2.5rem;
  animation: cardSlideIn 0.6s ease-out;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Typography
   ============================================ */

.auth-card h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--auth-text);
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-card .auth-subtitle {
  font-size: 1rem;
  color: var(--auth-text-light);
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

/* ============================================
   Flash Messages
   ============================================ */

.auth-card .alert,
.auth-card .notice {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-card .alert i,
.auth-card .notice i {
  font-size: 1.125rem;
  flex-shrink: 0;
}

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

.auth-card .alert {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.auth-card .notice {
  background: #D1FAE5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

/* ============================================
   Form Styles
   ============================================ */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  position: relative;
}

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

.form-input-wrapper {
  position: relative;
}

.form-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-text-light);
  font-size: 1.125rem;
  z-index: 1;
  transition: color 0.3s ease;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 1rem;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  background: white;
  color: var(--auth-text);
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-input:focus + .form-icon,
.form-input:not(:placeholder-shown) + .form-icon {
  color: var(--auth-primary);
}

.form-input::placeholder {
  color: #9CA3AF;
}

.form-help-text {
  font-size: 0.8125rem;
  color: var(--auth-text-light);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-help-text i {
  font-size: 0.75rem;
}

/* ============================================
   Error Messages
   ============================================ */

.error-messages {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.error-messages h2 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #991B1B;
  margin: 0 0 0.75rem 0;
}

.error-messages ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.error-messages li {
  font-size: 0.875rem;
  color: #991B1B;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.error-messages li::before {
  content: "⚠";
  position: absolute;
  left: 0;
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ============================================
   Links
   ============================================ */

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.auth-link {
  font-size: 0.875rem;
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-link:hover {
  color: var(--auth-secondary);
  transform: translateX(2px);
}

.auth-link i {
  font-size: 0.75rem;
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  color: var(--auth-text-light);
  font-size: 0.875rem;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #E5E7EB;
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 640px) {
  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

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

  .auth-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-card > * {
  animation: fadeIn 0.6s ease-out backwards;
}

.auth-card > *:nth-child(1) { animation-delay: 0.1s; }
.auth-card > *:nth-child(2) { animation-delay: 0.2s; }
.auth-card > *:nth-child(3) { animation-delay: 0.3s; }
.auth-card > *:nth-child(4) { animation-delay: 0.4s; }

