:root {
  --primary: #6B46C1;
  --primary-dark: #553C9A;
  --primary-light: #9F7AEA;
  --secondary: #D53F8C;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --gradient-primary: linear-gradient(135deg, #9F7AEA 0%, #D53F8C 100%);
  --gradient-secondary: linear-gradient(135deg, #6B46C1 0%, #9F7AEA 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), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-700);
  line-height: 1.6;
  min-height: 100vh;
}

.auth-container {
  display: flex;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  z-index: 10;
}

.auth-image {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: none;
}

.auth-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.auth-image:hover img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(107, 70, 193, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 2rem;
}

.image-overlay h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.image-overlay p {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
}

.auth-form-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--white);
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.auth-logo {
  text-align: center;
  margin-bottom: 3rem;
}

.auth-logo h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.auth-logo p {
  color: var(--gray-500);
  font-size: 1.1rem;
  font-weight: 400;
}

.auth-form {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.auth-form:hover {
  box-shadow: 0 25px 50px -12px rgba(107, 70, 193, 0.15);
  transform: translateY(-2px);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
  color: var(--gray-700);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
  background: var(--white);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-control.success {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-control.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field-error::before {
  content: '⚠';
  font-size: 0.7rem;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.3s ease;
  padding: 0.25rem;
  border-radius: 0.25rem;
  z-index: 10;
}

.password-toggle:hover {
  color: var(--primary);
  background: var(--gray-100);
}

.password-strength {
  margin-top: 0.75rem;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0%;
  transition: all 0.5s ease;
  border-radius: 2px;
}

.strength-weak {
  width: 33.33% !important;
  background: var(--danger);
}

.strength-medium {
  width: 66.66% !important;
  background: var(--warning);
}

.strength-strong {
  width: 100% !important;
  background: var(--success);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--primary);
  transform: scale(1.1);
}

.checkbox-group label {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
}

.checkbox-group a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.checkbox-group a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(107, 70, 193, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.auth-links {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.auth-links p {
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.auth-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.auth-links a:hover {
  color: var(--primary-dark);
}

.auth-links a:hover::after {
  width: 100%;
}

.messages {
  margin-bottom: 2rem;
}

.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 500;
  border: 1px solid transparent;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.alert-info {
  background: rgba(107, 70, 193, 0.1);
  color: var(--primary);
  border-color: rgba(107, 70, 193, 0.2);
}

.custom-alert {
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid;
  animation: slideInRight 0.3s ease;
}

.custom-alert.alert-success {
  background: var(--white);
  border-left-color: var(--success);
}

.custom-alert.alert-error {
  background: var(--white);
  border-left-color: var(--danger);
}

/* Responsive Design */
@media (min-width: 768px) {
  .auth-image {
    display: block;
  }
  
  .auth-form-container {
    padding: 4rem 3rem;
  }

  .password-toggle {
    top: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .auth-container {
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
    min-height: 95vh;
    margin-top: 2.5vh;
    border-radius: 1rem;
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  .auth-container {
    min-height: 100vh;
  }
  
  .auth-form-container {
    padding: 2rem 1.5rem;
  }
  
  .auth-form {
    padding: 2rem 1.5rem;
  }
  
  .auth-logo h1 {
    font-size: 2rem;
  }
}

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.loading-pulse {
  animation: pulse 2s infinite;
}

/* Floating animation for visual interest */
.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Enhanced focus states for accessibility */
.form-control:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
button, input, a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}