/* InsureCRM - Premium Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Premium color palette - Elegant indigo/violet tones */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  
  /* Secondary - Teal accents */
  --secondary: #14b8a6;
  --secondary-light: #2dd4bf;
  --secondary-dark: #0d9488;
  
  /* Accent - Warm amber */
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  
  /* Semantic colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  /* Neutral palette - Warm grays */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  
  /* Backgrounds */
  --bg-main: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #f8fafc 100%);
  --bg-sidebar: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  --bg-card: #ffffff;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  
  /* Border radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: var(--bg-main);
  min-height: 100vh;
  color: var(--gray-700);
}

/* ============================================
   PREMIUM SIDEBAR
   ============================================ */
.sidebar-premium {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--gray-200);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 1.5rem;
  margin: 0.75rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.sidebar-logo h1 {
  color: white;
  font-weight: 700;
}

.sidebar-logo p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

.sidebar-nav {
  padding: 0.5rem 0.75rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  margin: 0.25rem 0;
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar-item i {
  width: 1.5rem;
  font-size: 1rem;
  margin-right: 0.75rem;
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.sidebar-item:hover {
  background: var(--primary-50);
  color: var(--primary);
  border-left-color: var(--primary-light);
}

.sidebar-item:hover i {
  color: var(--primary);
}

.sidebar-item.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-left-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-item.active i {
  color: white;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  padding: 1rem 1rem 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--gray-100);
}

/* ============================================
   PREMIUM HEADER
   ============================================ */
.header-premium {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  transition: background 0.2s;
}

.header-user:hover {
  background: var(--gray-100);
}

.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: var(--shadow-md);
}

.header-avatar i {
  color: var(--primary);
  font-size: 1rem;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.stat-card.blue::before { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); }
.stat-card.green::before { background: linear-gradient(90deg, var(--success) 0%, #34d399 100%); }
.stat-card.amber::before { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%); }
.stat-card.teal::before { background: linear-gradient(90deg, var(--secondary) 0%, var(--secondary-light) 100%); }

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-card.blue .stat-icon {
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
  color: var(--primary);
}

.stat-card.green .stat-icon {
  background: linear-gradient(135deg, var(--success-light) 0%, #ecfdf5 100%);
  color: var(--success);
}

.stat-card.amber .stat-icon {
  background: linear-gradient(135deg, var(--warning-light) 0%, #fffbeb 100%);
  color: var(--accent);
}

.stat-card.purple .stat-icon {
  background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%);
  color: #8b5cf6;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* ============================================
   PREMIUM CARDS
   ============================================ */
.card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title i {
  color: var(--primary);
}

.card-body {
  padding: 1.5rem;
}

/* ============================================
   PREMIUM BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

/* ============================================
   PREMIUM TABLES
   ============================================ */
.table-premium {
  width: 100%;
}

.table-premium thead {
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.table-premium thead th {
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--gray-200);
  text-align: left;
}

.table-premium tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--gray-100);
}

.table-premium tbody tr:hover {
  background: linear-gradient(90deg, var(--primary-50) 0%, transparent 100%);
}

.table-premium tbody td {
  padding: 1rem 1.25rem;
  color: var(--gray-700);
  font-size: 0.9rem;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-active, .badge-active, .status-paid, .badge-paid, .status-settled, .badge-settled, .status-approved, .badge-approved {
  background: linear-gradient(135deg, var(--success-light) 0%, #d1fae5 100%);
  color: #065f46;
}

.status-pending, .badge-pending, .status-submitted, .badge-submitted {
  background: linear-gradient(135deg, var(--warning-light) 0%, #fef3c7 100%);
  color: #92400e;
}

.status-proposal, .badge-proposal, .status-under_review, .badge-under_review {
  background: linear-gradient(135deg, var(--info-light) 0%, #dbeafe 100%);
  color: #1e40af;
}

.status-lapsed, .badge-lapsed, .status-rejected, .badge-rejected {
  background: linear-gradient(135deg, var(--danger-light) 0%, #fee2e2 100%);
  color: #991b1b;
}

/* ============================================
   PREMIUM INPUTS
   ============================================ */
.input-premium {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: white;
}

.input-premium:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  outline: none;
}

.input-premium::placeholder {
  color: var(--gray-400);
}

/* ============================================
   LOGIN PAGE - PREMIUM DESIGN
   ============================================ */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6366f1 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

.login-card {
  background: white;
  border-radius: var(--radius-2xl);
  padding: 3rem;
  width: 100%;
  max-width: 26rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.login-logo i {
  font-size: 2rem;
  color: white;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-800);
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.login-form .form-group {
  margin-bottom: 1.25rem;
}

.login-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.login-form input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

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

.login-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.demo-credentials {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gray-300);
}

.demo-credentials h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.demo-credentials p {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin: 0.25rem 0;
}

.demo-credentials strong {
  color: var(--gray-700);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 40rem;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, white 0%, var(--gray-50) 100%);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-800);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--gray-50);
}

/* ============================================
   CHARTS
   ============================================ */
.chart-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
}

.chart-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-card h3 i {
  color: var(--primary);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state i {
  font-size: 4rem;
  color: var(--gray-300);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--gray-500);
}

/* ============================================
   AVATARS
   ============================================ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.avatar-primary {
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
  color: var(--primary);
}

.avatar-success {
  background: linear-gradient(135deg, var(--success-light) 0%, #ecfdf5 100%);
  color: var(--success);
}

.avatar-purple {
  background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%);
  color: #7c3aed;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
}

.product-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  color: white;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 200;
  animation: toastSlideIn 0.3s ease;
}

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

.toast-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.toast-error {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.toast-info {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

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

/* ============================================
   TABS
   ============================================ */
.tab-btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--gray-700);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.section-subtitle {
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-up {
  animation: slideUp 0.4s ease;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ADMIN STAT CARDS
   ============================================ */
.admin-stat-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  color: white;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.admin-stat-card.green {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.admin-stat-card.purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.admin-stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

.admin-stat-value {
  font-size: 2rem;
  font-weight: 700;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 1024px) {
  .sidebar-premium {
    transform: translateX(-100%);
    position: fixed;
    z-index: 50;
    transition: transform 0.3s ease;
  }
  
  .sidebar-premium.open {
    transform: translateX(0);
  }
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-bg {
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease;
}

.toggle-bg::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-bg.bg-green-500::after {
  transform: translateX(20px);
}

.toggle-dot {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

/* ============================================
   CAMPAIGN BADGES
   ============================================ */
.campaign-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.campaign-type-whatsapp {
  background-color: #dcfce7;
  color: #166534;
}

.campaign-type-sms {
  background-color: #f3e8ff;
  color: #6b21a8;
}

.campaign-type-email {
  background-color: #dbeafe;
  color: #1e40af;
}

.campaign-type-social {
  background-color: #fef3c7;
  color: #92400e;
}

/* ============================================
   ENHANCED HEADER - QUICK ACTIONS
   ============================================ */
.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  cursor: pointer;
}

.quick-action-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
}

.quick-action-btn i {
  font-size: 0.875rem;
}

/* Enhanced Profile Dropdown Links */
.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  margin: 0.125rem 0;
  border-radius: var(--radius-lg);
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.dropdown-link:hover {
  background: var(--gray-50);
}

.dropdown-link-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Mobile Quick Actions Button */
.mobile-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-quick-btn i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.mobile-quick-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary);
  color: var(--primary);
}

/* Sidebar Collapsible Groups */
.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.sidebar-group-header:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.sidebar-group-header i.fa-chevron-down {
  font-size: 0.625rem;
  transition: transform 0.2s ease;
}

.sidebar-group-header.collapsed i.fa-chevron-down {
  transform: rotate(-90deg);
}

.sidebar-group-items {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 1000px;
}

.sidebar-group-items.collapsed {
  max-height: 0;
}

/* Header with padding adjustment */
.header-premium {
  padding: 0.75rem 1.5rem;
}

/* =====================================================
   AI ASSISTANT STYLES
   ===================================================== */

/* AI Assistant Nav Item - Highlighted */
.ai-assistant-nav {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-left: 3px solid #8b5cf6;
  margin-bottom: 0.5rem;
}

.ai-assistant-nav:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
}

.ai-assistant-nav.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
}

/* AI Chat Messages */
#aiChatMessages {
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

#aiChatMessages::-webkit-scrollbar {
  width: 6px;
}

#aiChatMessages::-webkit-scrollbar-track {
  background: transparent;
}

#aiChatMessages::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 3px;
}

#aiChatMessages::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

/* AI Response Formatting */
.ai-response {
  line-height: 1.6;
}

.ai-response strong {
  color: #4f46e5;
  font-weight: 600;
}

.ai-response ul, .ai-response ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.ai-response li {
  margin: 0.25rem 0;
}

.ai-response table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.875rem;
}

.ai-response table th,
.ai-response table td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.ai-response table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
}

.ai-response table tr:hover {
  background: #f9fafb;
}

/* AI Typing Indicator Animation */
@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
}

/* AI Chat Input */
#aiChatInput {
  max-height: 150px;
  overflow-y: auto;
  resize: none;
}

#aiChatInput:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* AI Suggestion Chips */
#aiSuggestionChips button {
  transition: all 0.2s ease;
}

#aiSuggestionChips button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* AI Quick Actions Panel */
#aiQuickActions {
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

/* AI File Preview */
#aiFilePreview {
  animation: slideUp 0.2s ease;
}

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

/* AI Send Button Pulse */
#aiSendBtn:not(:disabled):hover {
  transform: scale(1.05);
}

#aiSendBtn:not(:disabled):active {
  transform: scale(0.95);
}

/* Prose styling for AI responses */
.prose-sm {
  font-size: 0.875rem;
}

.prose a {
  color: #4f46e5;
  text-decoration: underline;
}

.prose code {
  background: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.8em;
}
