:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --dark-color: #1f2937;
  --light-color: #f9fafb;
  --border-color: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --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);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
}

/* Page de login - background spécial */
body:has(.login-page-container) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Layout avec sidebar et header */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f5f7fa;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

.content-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.brand-icon {
  font-size: 1.75rem;
}

.brand-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  margin: 0.25rem 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: #6366f1;
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: white;
  border-left-color: #6366f1;
}

.nav-item-danger {
  color: #f87171;
}

.nav-item-danger:hover {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.nav-icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.nav-text {
  font-weight: 500;
}

.sidebar-footer {
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Header */
.main-header {
  background: white;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb-item {
  color: var(--text-secondary);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 250px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 1;
}

/* Dropdown de résultats de recherche */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 400px;
  max-width: calc(100vw - 40px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  max-height: 500px;
  overflow-y: auto;
  display: none;
}

.search-results-dropdown.show {
  display: block;
}

.search-result-section {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.search-result-section:last-child {
  border-bottom: none;
}

.search-result-section-title {
  padding: 0.75rem 1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.search-result-item:hover {
  background: #f9fafb;
  border-left-color: var(--primary-color);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.search-result-text {
  color: var(--text-secondary);
}

.search-result-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.625rem;
  font-weight: 600;
  background: #e5e7eb;
  color: var(--text-secondary);
}

.header-notifications {
  position: relative;
}

.header-icon-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.header-icon-btn:hover {
  color: var(--primary-color);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #ef4444;
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  display: inline-block;
  line-height: 1.2;
}

.notification-badge:empty {
  display: none;
}

/* Dropdown de notifications */
.notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  max-height: 500px;
  flex-direction: column;
}

.notifications-dropdown.show {
  display: flex;
}

.notifications-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notifications-header h6 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-link-sm {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.btn-link-sm:hover {
  text-decoration: underline;
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notification-item:hover {
  background: #f9fafb;
}

.notification-item.unread {
  background: #eff6ff;
  border-left: 3px solid var(--primary-color);
}

.notification-item.unread:hover {
  background: #dbeafe;
}

.notification-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notification-message {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.4;
  margin-bottom: 4px;
}

.notification-time {
  font-size: 0.75rem;
  color: #9ca3af;
}

.notification-empty {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
}

.notification-loading {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.notifications-footer {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.notifications-footer a {
  color: var(--primary-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.notifications-footer a:hover {
  text-decoration: underline;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes notificationPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.notification-badge.new {
  animation: notificationPulse 0.5s ease-in-out;
}

/* Styles pour la page de notifications */
.notification-item-page {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.notification-item-page:hover {
  background: #f9fafb;
}

.notification-item-page.unread {
  background: #eff6ff;
  border-left: 3px solid var(--primary-color);
  padding-left: 13px;
}

.notification-item-page.unread:hover {
  background: #dbeafe;
}

.notification-item-page .notification-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.notification-item-page .notification-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.notification-item-page .btn-link {
  padding: 0;
  font-size: 0.875rem;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.header-user:hover {
  background: #f8f9fa;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.user-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.25rem;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  padding: 0.5rem 0;
  z-index: 1000;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: var(--primary-color);
}

/* Page header */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* Profile page */
.profile-container {
  max-width: 1200px;
}

.profile-card {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2.5rem;
  font-weight: 700;
  border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-stat {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .search-input {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .main-header {
    padding: 0 1rem;
  }
  
  .header-search {
    display: none;
  }
  
  .user-info {
    display: none;
  }
  
  .content-area {
    padding: 1rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  border-bottom: 2px solid var(--primary-color);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
  letter-spacing: -0.5px;
}

.nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
}

.nav-link:hover {
  background: var(--primary-color);
  color: white !important;
  transform: translateY(-2px);
}

/* Container principal - seulement pour les pages sans sidebar */
body:not(.app-wrapper) .container {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  margin: 2rem auto;
  padding: 2rem;
  max-width: 1200px;
}

/* Cards dans le content area */
.content-area .card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.content-area .card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.content-area .card-body {
  padding: 1.5rem;
}

/* Tables dans le content area */
.content-area .table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.content-area .table thead {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.content-area .table thead th {
  border: none;
  padding: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.content-area .table tbody tr {
  transition: all 0.2s ease;
}

.content-area .table tbody tr:hover {
  background: #f8f9fa;
}

.content-area .table td {
  padding: 1rem;
  vertical-align: middle;
}

/* Page de login */
.login-page-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.login-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1400px;
  min-height: 100vh;
  margin: 0 auto;
}

.login-left-panel {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 3rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.login-left-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.login-branding {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
}

.brand-logo {
  text-align: center;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease;
}

.logo-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.brand-name {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -1px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.brand-tagline {
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 300;
}

.illustration-container {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  animation: fadeInUp 1s ease 0.2s both;
}

.illustration {
  width: 100%;
  max-width: 280px;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.2));
}

.illustration svg {
  width: 100%;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.features-list {
  margin-top: 1.5rem;
  animation: fadeInUp 1s ease 0.4s both;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.feature-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.feature-item h5 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: white;
}

.feature-item p {
  font-size: 0.8rem;
  opacity: 0.9;
  margin: 0;
  color: white;
  line-height: 1.3;
}

.login-right-panel {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 3rem;
  position: relative;
}

.login-card {
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  max-width: 450px;
  width: 100%;
  animation: slideInRight 0.6s ease;
  position: relative;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.login-footer {
  margin-top: 1.5rem;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive pour la page de login */
@media (max-width: 992px) {
  .login-wrapper {
    grid-template-columns: 1fr;
  }
  
  .login-left-panel {
    display: none;
  }
  
  .login-right-panel {
    padding: 2rem;
  }
  
  .login-card {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .login-right-panel {
    padding: 1.5rem;
  }
  
  .login-card {
    padding: 1.5rem;
    border-radius: 16px;
  }
  
  .brand-name {
    font-size: 2.5rem;
  }
  
  .feature-item {
    padding: 1rem;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card h3 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 2rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border: none;
  border-radius: 10px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

/* Cards */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 1.5rem;
}

.card h6 {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

/* Tables */
.table {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.table thead {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.table thead th {
  border: none;
  padding: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: #f8f9fa;
  transform: scale(1.01);
}

.table td {
  padding: 1rem;
  vertical-align: middle;
}

/* Badges */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: var(--success-color);
  color: white;
}

.badge-warning {
  background: var(--warning-color);
  color: white;
}

.badge-danger {
  background: var(--danger-color);
  color: white;
}

.badge-info {
  background: var(--info-color);
  color: white;
}

/* Buttons */
.btn {
  border-radius: 10px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-warning {
  background: var(--warning-color);
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
}

h2 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

/* Alerts */
.alert {
  border-radius: 12px;
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 500;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Forms */
.form-select {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Dashboard KPIs améliorés */
.kpi-card-enhanced {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: none;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-left: 4px solid;
}

.kpi-card-enhanced:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.kpi-card-enhanced.kpi-primary {
  border-left-color: #6366f1;
}

.kpi-card-enhanced.kpi-success {
  border-left-color: #10b981;
}

.kpi-card-enhanced.kpi-warning {
  border-left-color: #f59e0b;
}

.kpi-card-enhanced.kpi-info {
  border-left-color: #3b82f6;
}

.kpi-card-enhanced .kpi-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.kpi-card-enhanced .kpi-content {
  position: relative;
  z-index: 2;
}

.kpi-card-enhanced .kpi-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.kpi-card-enhanced .kpi-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.kpi-card-enhanced .kpi-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.kpi-card-enhanced .kpi-trend .trend-icon {
  font-size: 0.875rem;
}

.kpi-card-enhanced .kpi-decoration {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.1;
  background: currentColor;
}

.kpi-card-enhanced.kpi-primary .kpi-decoration {
  background: #6366f1;
}

.kpi-card-enhanced.kpi-success .kpi-decoration {
  background: #10b981;
}

.kpi-card-enhanced.kpi-warning .kpi-decoration {
  background: #f59e0b;
}

.kpi-card-enhanced.kpi-info .kpi-decoration {
  background: #3b82f6;
}

/* KPI Cards pour les rapports */
.kpi-card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  background: white;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.kpi-card .card-body {
  padding: clamp(1rem, 2vw, 1.25rem);
}

.kpi-card .kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.kpi-card h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--text-primary);
}

.kpi-card h6 {
  font-size: clamp(0.65rem, 1.2vw, 0.8rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Chart containers pour les rapports */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

.chart-container canvas {
  max-height: 100% !important;
  max-width: 100% !important;
}

/* Dashboard container moderne */
.dashboard-container {
  max-width: 100%;
  margin: 0 auto;
}

/* Dashboard header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  color: white;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.dashboard-header-content {
  flex: 1;
}

.dashboard-header .dashboard-title {
  color: white;
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-header .dashboard-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.dashboard-header .dashboard-actions .btn {
  background: white;
  color: #667eea;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-header .dashboard-actions .btn:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Grille KPI moderne */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card-modern {
  background: white;
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
  border-top: 4px solid;
}

.kpi-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.kpi-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.kpi-card-modern.kpi-primary {
  border-top-color: #6366f1;
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.kpi-card-modern.kpi-success {
  border-top-color: #10b981;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.kpi-card-modern.kpi-warning {
  border-top-color: #f59e0b;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.kpi-card-modern.kpi-info {
  border-top-color: #3b82f6;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.kpi-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kpi-primary .kpi-icon-wrapper {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.kpi-success .kpi-icon-wrapper {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.kpi-warning .kpi-icon-wrapper {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.kpi-info .kpi-icon-wrapper {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.kpi-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-badge-primary { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.kpi-badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.kpi-badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.kpi-badge-info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

.kpi-card-body {
  margin-bottom: 1rem;
}

.kpi-card-modern .kpi-label {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.kpi-card-modern .kpi-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  word-break: break-word;
  overflow-wrap: break-word;
  transition: font-size 0.3s ease;
  max-width: 100%;
}

.kpi-card-modern .kpi-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.kpi-card-modern .trend-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.kpi-card-modern .trend-icon.up {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.kpi-card-modern .trend-icon.down {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.kpi-card-modern .trend-icon.neutral {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.kpi-card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.kpi-chart-mini {
  height: 40px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.kpi-chart-mini canvas {
  max-height: 40px !important;
  max-width: 100% !important;
  height: 40px !important;
  display: block !important;
}

/* Section graphiques - Utilise Bootstrap grid */
.charts-section {
  /* Bootstrap row/col gère maintenant le layout */
}

.secondary-charts-section {
  /* Bootstrap row/col gère maintenant le layout */
}

.chart-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chart-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.chart-card.large {
  /* Bootstrap col-lg-8 gère maintenant la taille */
}

.chart-card.medium {
  /* Bootstrap col-md-6 gère maintenant la taille */
}

.chart-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.chart-title-section {
  flex: 1;
}

.chart-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-title i {
  font-size: 1.5rem;
  color: #6366f1;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.chart-controls {
  display: flex;
  gap: 0.5rem;
}

.chart-body {
  padding: 1.5rem;
  height: 350px;
  position: relative;
  overflow: hidden;
}

.chart-body canvas {
  display: block !important;
  max-height: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  width: 100% !important;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* Amélioration de la netteté pour les graphiques donut */
#statusChart {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
}

/* Hauteurs spécifiques selon le type de graphique */
.chart-card.large .chart-body {
  height: 400px;
}

.chart-card.medium .chart-body {
  height: 350px;
}

/* Section tableaux - Utilise Bootstrap grid */
.tables-section {
  /* Bootstrap row/col gère maintenant le layout */
}

.table-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.table-card.large {
  /* Bootstrap col-lg-8 gère maintenant la taille */
}

.table-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.table-title-section {
  flex: 1;
}

.table-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-title i {
  font-size: 1.5rem;
  color: #6366f1;
}

.table-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.table-body {
  padding: 0;
}

.actions-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Section statistiques et actions */
.stats-actions-section {
  /* Bootstrap row/col gère maintenant le layout */
}

.stats-card,
.quick-actions-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.stats-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.stats-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-title i {
  font-size: 1.5rem;
  color: #6366f1;
}

.stats-body {
  padding: 1.5rem;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: #f3f4f6;
  transform: translateX(4px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.stat-icon-pending { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon-progress { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon-rejected { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-icon-success { background: linear-gradient(135deg, #10b981, #059669); }

.stat-content {
  flex: 1;
}

.stat-item .stat-label {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-item .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

/* Actions rapides améliorées */
.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1.5rem;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #f9fafb;
  text-decoration: none;
  color: #111827;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.quick-action-item:hover {
  background: white;
  border-color: #6366f1;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  color: #111827;
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.quick-action-icon.primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.quick-action-icon.success { background: linear-gradient(135deg, #10b981, #059669); }
.quick-action-icon.warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.quick-action-icon.info { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.quick-action-content {
  flex: 1;
}

.quick-action-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  color: #111827;
}

.quick-action-subtitle {
  font-size: 0.8125rem;
  color: #6b7280;
}

/* Responsive */
@media (max-width: 1200px) {
  .charts-section {
    grid-template-columns: 1fr;
  }
  .chart-card.large {
    grid-column: span 1;
  }
  .tables-section {
    grid-template-columns: 1fr;
  }
  /* Bootstrap gère maintenant la responsivité */
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
  }
  
  .dashboard-header .dashboard-title {
    font-size: 1.75rem;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .secondary-charts-section {
    grid-template-columns: 1fr;
  }
  
  .stat-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.dashboard-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.dashboard-actions {
  display: flex;
  gap: 1rem;
}

/* Dashboard cards améliorées */
.dashboard-card {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header-enhanced {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title-enhanced {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
}

/* Quick actions */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: #f8f9fa;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.quick-action-btn:hover {
  background: white;
  border-color: var(--primary-color);
  transform: translateX(5px);
  color: var(--primary-color);
}

.quick-action-btn .action-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-action-btn .action-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.quick-action-btn .action-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Statistiques */
.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Chart legend */
.chart-legend {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: var(--text-secondary);
}

.legend-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Chart legend compact */
.chart-legend-compact {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.legend-item-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.legend-label-compact {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.legend-value-compact {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Request table dans dashboard */
.request-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.request-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Info items dans les détails */
.info-item {
  margin-bottom: 0.5rem;
}

.info-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Modals */
.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

.btn-close {
  opacity: 0.5;
}

.btn-close:hover {
  opacity: 1;
}

/* Canvas pour les graphiques */
#requestsChart,
#statusChart {
  max-height: 300px;
}

/* Amélioration des boutons */
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive dashboard */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .dashboard-actions {
    width: 100%;
  }
  
  .dashboard-actions .btn {
    flex: 1;
  }
}

/* Status badges */
.status-draft {
  background: #e5e7eb;
  color: #374151;
}

.status-submitted {
  background: #dbeafe;
  color: #1e40af;
}

.status-approved {
  background: #d1fae5;
  color: #065f46;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* Styles pour les factures */
.invoice-container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  position: relative;
}

.invoice-header {
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
}

.invoice-logo h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.invoice-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.invoice-number {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.invoice-section {
  margin-bottom: 1.5rem;
}

.invoice-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.invoice-section-content {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.invoice-table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.invoice-table thead {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.invoice-table thead th {
  padding: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  border: none;
}

.invoice-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.invoice-table tbody tr:last-child td {
  border-bottom: none;
}

.invoice-table tbody tr:hover {
  background-color: #f9fafb;
}

.invoice-totals-box {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.invoice-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.invoice-total-row:last-child {
  border-bottom: none;
}

.invoice-total-final {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--primary-color);
  font-size: 1.25rem;
  font-weight: 700;
}

.invoice-total-label {
  font-weight: 600;
  color: var(--text-primary);
}

.invoice-total-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.invoice-total-final .invoice-total-value {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.invoice-actions {
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  margin-top: 2rem;
}

/* Styles d'impression pour la facture */
@media print {
  body {
    background: white;
  }
  
  .sidebar,
  .header,
  .page-header,
  .invoice-actions,
  .btn {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
  
  .content-area {
    padding: 0 !important;
  }
  
  .invoice-container {
    box-shadow: none;
    padding: 0;
    max-width: 100%;
  }
  
  .invoice-header {
    page-break-inside: avoid;
  }
  
  .invoice-items {
    page-break-inside: avoid;
  }
  
  .invoice-totals {
    page-break-inside: avoid;
  }
}

.status-invoiced {
  background: #fef3c7;
  color: #92400e;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .login-card {
    padding: 2rem;
  }
}

