/* Auth Layout CSS - Dedicated styling for authentication pages */

:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #1e3a8a;
  --secondary-color: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --input-bg: #1e293b;
  --error-color: #ef4444;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.25);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.auth-layout {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: #0f172a;
  overflow-x: hidden;
}

/* Auth Wrapper */
.auth-wrapper {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

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

.pattern-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, #334155 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.2;
}

.pattern-circles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}

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

/* Main Content Area */
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

/* Logo Section */
.auth-logo-section {
  margin-bottom: 1.5rem;
  text-align: center;
  animation: fadeInDown 0.8s ease-out;
}

.auth-logo-image {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.auth-logo-image:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

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

/* Auth Container */
.auth-container {
  width: 100%;
  max-width: 500px;
  position: relative;
}

/* Auth Card */
.auth-card {
  background: var(--input-bg);
  border-radius: 9px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #2563eb, #1d4ed8);
  background-size: 200% 100%;
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Auth Header */
.auth-header {
  text-align: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

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

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
}

/* Auth Body */
.auth-body {
  padding: 1.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background: var(--input-bg);
  color: var(--text-primary);
  position: relative;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(31, 42, 93, 0.1);
  transform: translateY(-1px);
}

.form-input:hover {
  border-color: var(--primary-light);
}

.form-input.error {
  border-color: var(--error-color);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: var(--success-color);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Error Messages */
.error-message {
  color: var(--error-color);
  font-size: 0.75rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  animation: slideIn 0.3s ease;
}

.error-message::before {
  content: '⚠';
  font-size: 0.875rem;
}

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

/* Form Check */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.form-check-input:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

.form-check-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color), #3b82f6);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  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.2), transparent);
  transition: left 0.5s ease;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-primary.loading {
  position: relative;
  color: transparent;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Link Buttons */
.btn-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.btn-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.2s ease;
}

.btn-link:hover::after {
  width: 100%;
}

.btn-link:hover {
  color: var(--primary-hover);
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Social Login */
.social-login {
  margin: 1.25rem 0;
}

.social-login-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  position: relative;
}

.social-login-text::before,
.social-login-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--border-color);
}

.social-login-text::before {
  left: 0;
}

.social-login-text::after {
  right: 0;
}

.social-login-text span {
  background: var(--input-bg);
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.social-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn-social {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

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

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

.btn-social:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(30, 64, 175, 0.05);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

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

.btn-google:hover {
  border-color: #4285F4;
  color: #4285F4;
  background: rgba(66, 133, 244, 0.05);
}

.btn-facebook:hover {
  border-color: #1877F2;
  color: #1877F2;
  background: rgba(24, 119, 242, 0.05);
}

.social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.social-loading {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

/* Success/Error States */
.form-group.success .form-label {
  color: var(--success-color);
}

.form-group.error .form-label {
  color: var(--error-color);
}

/* Floating Labels */
.form-group.floating {
  position: relative;
}

.form-group.floating .form-label {
  position: absolute;
  top: 0.875rem;
  left: 1rem;
  background: var(--input-bg);
  padding: 0 0.25rem;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.form-group.floating .form-input:focus + .form-label,
.form-group.floating .form-input:not(:placeholder-shown) + .form-label {
  top: -0.5rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 480px) {
  .auth-main {
    padding: 1rem 0.5rem;
  }
  
  .auth-card {
    border-radius: 16px;
  }
  
  .auth-header,
  .auth-body,
  .auth-footer {
    padding: 1.25rem 1rem;
  }
  
  .auth-title {
    font-size: 1.75rem;
  }
  
  .auth-logo-image {
    height: 28px;
  }
  
  .auth-logo-section {
    margin-bottom: 1.25rem;
  }
  
  .social-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn-social {
    padding: 0.875rem;
  }
}

@media (max-width: 768px) {
  .pattern-circles {
    width: 600px;
    height: 600px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --input-bg: #1e293b;
    --border-color: #334155;
    --secondary-color: #0f172a;
  }
  
  body.auth-layout {
    background: #0f172a;
  }
  
  .auth-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .pattern-dots {
    background-image: radial-gradient(circle, #334155 1px, transparent 1px);
  }
} 