/* ========================================
   AUTH PAGES CSS - auth.css
   Login, Register, Forgot Password
   ======================================== */

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

:root {
  --primary: #003366;
  --secondary: #007bff;
  --accent: #00d4ff;
  --dark: #0a1929;
  --gray: #64748b;
  --light: #f8fafc;
  --white: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --gradient-primary: linear-gradient(135deg, #003366 0%, #007bff 100%);
  --gradient-accent: linear-gradient(135deg, #007bff 0%, #00d4ff 100%);
  --gradient-dark: linear-gradient(180deg, #0a1929 0%, #1e293b 100%);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
  overflow-x: hidden;
}

/* =================================
   AUTH CONTAINER
   ================================= */

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* =================================
   BRAND SIDE (LEFT)
   ================================= */

.auth-brand {
  background: var(--gradient-primary);
  color: white;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

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

.brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.logo-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.logo-icon svg {
  stroke-width: 2;
}

.brand-name {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.brand-name span {
  color: var(--accent);
}

.brand-message {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-message h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.brand-message p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 3rem;
  line-height: 1.7;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  opacity: 0.95;
}

.feature-item svg {
  flex-shrink: 0;
  stroke-width: 2.5;
}

.brand-footer {
  margin-top: 3rem;
  opacity: 0.7;
  font-size: 0.875rem;
}

/* =================================
   FORM SIDE (RIGHT)
   ================================= */

.auth-form-section {
  background: white;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-wrapper {
  width: 100%;
  max-width: 480px;
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--secondary);
  gap: 0.75rem;
}

.back-link svg {
  stroke-width: 2;
}

/* Form Header */
.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 123, 255, 0.3);
}

.form-icon svg {
  stroke: white;
  stroke-width: 2;
}

.form-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.form-header p {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.6;
}

/* =================================
   ALERTS
   ================================= */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  animation: slideInDown 0.4s ease;
}

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

.alert svg {
  flex-shrink: 0;
  stroke-width: 2.5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 4px solid var(--success);
}

.alert-error,
.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: rgba(0, 123, 255, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(0, 123, 255, 0.2);
  border-left: 4px solid var(--secondary);
}

/* =================================
   FORM STYLING
   ================================= */

.auth-form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.form-group label svg {
  stroke: var(--secondary);
  stroke-width: 2;
  flex-shrink: 0;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  background: white;
  color: var(--dark);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1),
              0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input:hover {
  border-color: var(--secondary);
}

.form-group input::placeholder {
  color: var(--gray);
  opacity: 0.6;
}

.input-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray);
}

/* Submit Button */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 2rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  margin-top: 0.5rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
}

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

.submit-btn svg {
  stroke-width: 2.5;
  flex-shrink: 0;
}

/* Loading State */
.submit-btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.submit-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* =================================
   FORM FOOTER
   ================================= */

.form-footer {
  text-align: center;
}

.divider {
  position: relative;
  text-align: center;
  margin: 2rem 0 1.5rem;
}

.divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: #e2e8f0;
}

.divider span {
  position: relative;
  background: white;
  padding: 0 1rem;
  color: var(--gray);
  font-size: 0.875rem;
  font-weight: 500;
}

.help-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--light);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.help-link:hover {
  background: white;
  border-color: var(--secondary);
  color: var(--secondary);
}

.help-link svg {
  stroke-width: 2;
}

.contact-support {
  font-size: 0.875rem;
  color: var(--gray);
  margin-top: 1.5rem;
}

.contact-support a {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.contact-support a:hover {
  text-decoration: underline;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-form-section {
    padding: 2rem 1rem;
  }
}

@media (max-width: 768px) {
  .form-wrapper {
    max-width: 100%;
  }

  .form-header h2 {
    font-size: 1.75rem;
  }

  .form-icon {
    width: 64px;
    height: 64px;
  }

  .form-icon svg {
    width: 32px;
    height: 32px;
  }

  .submit-btn {
    font-size: 0.9375rem;
  }
}

@media (max-width: 480px) {
  .auth-form-section {
    padding: 1.5rem 1rem;
  }

  .form-header {
    margin-bottom: 2rem;
  }

  .form-header h2 {
    font-size: 1.5rem;
  }

  .form-header p {
    font-size: 0.9375rem;
  }

  .form-group input {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }

  .help-links {
    gap: 0.5rem;
  }

  .help-link {
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
  }
}

/* =================================
   CHECKBOX/REMEMBER ME
   ================================= */

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

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

.remember-me label {
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  margin: 0;
}

/* =================================
   ADDITIONAL LINKS
   ================================= */

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

.auth-links a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.auth-links a:hover {
  text-decoration: underline;
  color: var(--primary);
}