/* ============================================
   AutoMKT - Modern Marketing Automation Platform
   CSS Structure: .parent-class .child-class
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --email: #6366f1;
  --facebook: #1877f2;
  --zalo: #0068ff;
  --tiktok: #000000;
  --background: #0f172a;
  --surface: #1e293b;
  --card: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 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);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track {
  background: var(--surface);
}

body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ============================================
   Typography
   ============================================ */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

body h1 { font-size: 2.5rem; }
body h2 { font-size: 2rem; }
body h3 { font-size: 1.5rem; }
body h4 { font-size: 1.25rem; }
body h5 { font-size: 1.125rem; }
body h6 { font-size: 1rem; }

body p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

body a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

body a:hover {
  color: var(--primary-light);
}

body .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Auth Container - Login/Register Page
   ============================================ */
body .auth-container {
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* Left Side - Branding */
body .auth-container .auth-branding {
  flex: 1;
  position: relative;
  display: none;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

@media (min-width: 1024px) {
  body .auth-container .auth-branding {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

body .auth-container .auth-branding::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background: 
    radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.3) 0%, transparent 50%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

body .auth-container .auth-branding .auth-branding-content {
  position: relative;
  z-index: 10;
  padding: 4rem;
  max-width: 600px;
}

body .auth-container .auth-branding .auth-branding-content .auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

body .auth-container .auth-branding .auth-branding-content .auth-logo .auth-logo-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

body .auth-container .auth-branding .auth-branding-content .auth-logo .auth-logo-text {
  font-size: 1.875rem;
  font-weight: 700;
}

body .auth-container .auth-branding .auth-branding-content .auth-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

body .auth-container .auth-branding .auth-branding-content .auth-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

body .auth-container .auth-branding .auth-branding-content .auth-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body .auth-container .auth-branding .auth-branding-content .auth-features .auth-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.5s ease-out forwards;
}

body .auth-container .auth-branding .auth-branding-content .auth-features .auth-feature:nth-child(1) { animation-delay: 0.2s; }
body .auth-container .auth-branding .auth-branding-content .auth-features .auth-feature:nth-child(2) { animation-delay: 0.3s; }
body .auth-container .auth-branding .auth-branding-content .auth-features .auth-feature:nth-child(3) { animation-delay: 0.4s; }
body .auth-container .auth-branding .auth-branding-content .auth-features .auth-feature:nth-child(4) { animation-delay: 0.5s; }

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body .auth-container .auth-branding .auth-branding-content .auth-features .auth-feature .auth-feature-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body .auth-container .auth-branding .auth-branding-content .auth-features .auth-feature .auth-feature-icon::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* Right Side - Form Container */
body .auth-container .auth-form-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

body .auth-container .auth-form-container .auth-form-wrapper {
  width: 100%;
  max-width: 450px;
  animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile Logo */
body .auth-container .auth-form-container .auth-form-wrapper .auth-mobile-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  body .auth-container .auth-form-container .auth-form-wrapper .auth-mobile-logo {
    display: none;
  }
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-mobile-logo .auth-mobile-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-mobile-logo .auth-mobile-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Auth Card */
body .auth-container .auth-form-container .auth-form-wrapper .auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .auth-card-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .auth-card-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Alert Messages */
body .auth-container .auth-form-container .auth-form-wrapper .auth-card .alert {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .alert.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #059669;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .alert.alert-success .icon {
  width: 1rem;
  height: 1rem;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .alert.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .alert.alert-error .icon {
  width: 1rem;
  height: 1rem;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .alert.alert-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #2563eb;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .alert.alert-info .icon {
  width: 1rem;
  height: 1rem;
}

/* Form Elements */
body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group {
  margin-bottom: 1.25rem;
}

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

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: all var(--transition-base);
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group .form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group .form-control::placeholder {
  color: var(--text-dim);
}

/* Input with Icon */
body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group .input-with-icon {
  position: relative;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group .input-with-icon .form-control {
  padding-left: 2.75rem;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group .input-with-icon .input-icon-left {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  width: 1.25rem;
  height: 1.25rem;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group .input-with-icon .input-icon-right {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--transition-base);
  width: 1.25rem;
  height: 1.25rem;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .form-group .input-with-icon .input-icon-right:hover {
  color: var(--text);
}

/* Form Footer */
body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .auth-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .auth-form-footer .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .auth-form-footer .form-check .form-check-input {
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  cursor: pointer;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .auth-form-footer .form-check .form-check-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .auth-form-footer .auth-link {
  color: var(--primary);
  font-weight: 500;
  transition: color var(--transition-base);
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .auth-form-footer .auth-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Button */
body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .btn.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  box-shadow: var(--shadow-glow);
  width: 100%;
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .btn.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .btn.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card form .btn .icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Auth Switch */
body .auth-container .auth-form-container .auth-form-wrapper .auth-card .auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .auth-switch .auth-link {
  color: var(--primary);
  font-weight: 500;
  transition: color var(--transition-base);
}

body .auth-container .auth-form-container .auth-form-wrapper .auth-card .auth-switch .auth-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Loading Spinner */
body .spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Utility Classes */
body .d-none { display: none; }
body .d-block { display: block; }
body .d-flex { display: flex; }
body .text-center { text-align: center; }
body .text-muted { color: var(--text-muted); }
body .text-primary { color: var(--primary); }
body .text-danger { color: var(--danger); }
body .text-success { color: var(--success); }

/* Responsive */
@media (max-width: 768px) {
  body .auth-container .auth-form-container .auth-form-wrapper .auth-card {
    padding: 1.5rem;
  }
  
  body .auth-container .auth-branding .auth-branding-content .auth-title {
    font-size: 2rem;
  }
  
  body h1 { font-size: 2rem; }
  body h2 { font-size: 1.5rem; }
}
