/**
 * ================================================
 * TAILADMIN CSS - FICHIER GLOBAL CONSOLIDÉ
 * ================================================
 * Ce fichier regroupe tous les styles CSS de l'application Livraison
 * Système de nomenclature avec préfixe 'ta-' (TailAdmin)
 */

/* TailAdmin SaaS - Custom CSS */

/**
 * Définition de la taille de base des polices pour l'ensemble du document
 * La taille de 12.8px correspond à 80% de la taille par défaut (16px)
 * Important est utilisé pour s'assurer que cette règle prend la priorité
 */
html, :root {
  font-size: 12.8px !important; /* Taille ajustée pour correspondre à un zoom de 80% */
}

/**
 * Variables CSS globales - Système de design tokens
 * Ces variables sont utilisées dans tout le code pour maintenir une cohérence visuelle
 * et faciliter les modifications à l'échelle du site
 */
:root {
  --primary-color: #3c50e0;      /* Couleur principale, utilisée pour les éléments interactifs et les accents */
  --secondary-color: #6577f3;    /* Variante plus claire de la couleur principale */
  --success-color: #10b981;      /* Pour les messages de succès et validations */
  --danger-color: #ef4444;       /* Pour les erreurs et les alertes */
  --warning-color: #f59e0b;      /* Pour les avertissements */
  --info-color: #0ea5e9;         /* Pour les informations et notifications */
  --dark-color: #0f172a;         /* Pour les textes principaux et titres */
  --body-color: #64748b;         /* Couleur par défaut du texte */
  --body-bg: #f1f5f9;            /* Couleur de fond de la page */
  --card-bg: #ffffff;            /* Couleur de fond des cartes et panneaux */
  --border-color: #e2e8f0;       /* Couleur standard des bordures */
  --sidebar-bg: #1e293b;         /* Couleur de fond de la barre latérale */
  --sidebar-color: #fff;         /* Couleur du texte dans la barre latérale */
  --primary-font: 'Inter', sans-serif; /* Police principale pour tout le site */
}

/* ======= Styles de base ======= */
/**
 * Styles fondamentaux pour les éléments HTML
 * Établit les styles par défaut pour le corps du document
 */
body {
  font-family: var(--primary-font);    /* Utilise la police définie dans les variables */
  background-color: var(--body-bg);    /* Utilise la couleur de fond définie dans les variables */
  color: var(--body-color);            /* Utilise la couleur de texte définie dans les variables */
  line-height: 1.5;                    /* Espacement des lignes pour une meilleure lisibilité */
}

/**
 * Styles pour les titres - MIGRÉ vers tokens.css
 * Typography scale définie dans tokens.css (--h1-size, --h1-leading, etc.)
 * Utiliser classes .text-h1 à .text-h6 pour meilleure cohérence
 */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark-color);            /* Couleur plus foncée pour les titres */
  /* font-weight géré par tokens H1-H6 (Bold/Semibold/Medium) */
}

/**
 * Styles pour les liens
 * Configure l'apparence par défaut des liens et leur état au survol
 */
a {
  text-decoration: none;               /* Supprime le soulignement par défaut */
  color: var(--primary-color);         /* Utilise la couleur principale pour les liens */
  transition: all 0.3s ease;           /* Ajoute une transition fluide pour les changements d'état */
}

a:hover {
  color: var(--secondary-color);       /* Couleur au survol, légèrement plus claire */
}

/* ======= Layout ======= */
/**
 * Structure principale de la page
 * Utilise Flexbox pour créer une mise en page avec sidebar
 */
.ta-layout {
  display: flex;                       /* Utilise Flexbox pour le layout principal */
}

/* ======= Sidebar ======= */
/**
 * Barre latérale de navigation
 * Définit l'apparence et le comportement de la barre latérale
 */
.ta-sidebar {
  width: 270px;                        /* Largeur standard de la sidebar */
  background-color: var(--sidebar-bg); /* Couleur de fond sombre pour la sidebar */
  color: var(--sidebar-color);         /* Texte clair pour contraster avec le fond */
  height: 100vh;                       /* Hauteur pleine page */
  position: fixed;                     /* Position fixe pour rester visible lors du défilement */
  left: 0;
  top: 0;
  z-index: 30;                         /* S'assure que la sidebar est au-dessus du contenu */
  transition: all 0.3s ease;           /* Animation fluide pour le redimensionnement */
  overflow-y: auto;                    /* Permet le défilement si le contenu dépasse */
  scrollbar-width: thin;               /* Barre de défilement fine (Firefox) */
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent; /* Couleur de la barre de défilement (Firefox) */
}

/**
 * État réduit de la barre latérale
 * Réduit la largeur lorsque l'utilisateur la replie
 */
.ta-sidebar.collapsed {
  width: 80px;                         /* Largeur réduite en mode replié */
}

/**
 * Personnalisation de la barre de défilement
 * Compatible avec les navigateurs Webkit (Chrome, Safari, Edge)
 */
.ta-sidebar::-webkit-scrollbar {
  width: 4px;                          /* Largeur fine pour la barre de défilement */
}

.ta-sidebar::-webkit-scrollbar-track {
  background: transparent;             /* Rend le track invisible */
}

.ta-sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2); /* Thumb semi-transparent */
  border-radius: 20px;                 /* Coins arrondis */
}

/**
 * Zone de logo dans la barre latérale
 * Espace en haut de la sidebar pour afficher le logo de l'application
 */
.ta-sidebar-logo {
  padding: 1.5rem 1.5rem;              /* Espacement intérieur */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Séparateur subtil */
}

/**
 * Styles de l'image du logo
 */
.ta-sidebar-logo img {
    width: 32px;                       /* Taille fixe pour le logo */
    height: 32px;
    object-fit: contain;               /* Préserve les proportions du logo */
    border-radius: 4px;                /* Coins légèrement arrondis */
}

/**
 * Masque le texte du logo quand la sidebar est repliée
 */
.ta-sidebar.collapsed .ta-sidebar-logo-text {
  display: none;                       /* Cache le texte en mode replié */
}

.ta-sidebar-menu {
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  height: calc(100% - 80px);
}

.ta-menu-item {
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  transition: all 0.3s ease;
}

.ta-menu-item:hover, .ta-menu-item.active {
  color: rgba(255, 255, 255, 1);
  background-color: rgba(255, 255, 255, 0.1);
}

.ta-sidebar.collapsed .ta-menu-text {
  display: none;
}

/* ======= Main Content ======= */
.ta-main-content {
  flex: 1;
  margin-left: 270px;
  transition: all 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ta-sidebar.collapsed + .ta-main-content {
  margin-left: 80px;
}

.navbar-with-expanded-sidebar + .ta-page-content {
  padding-top: 0;
}

/* ======= Header / Navbar ======= */
.ta-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 0; /* Supprimer la marge en bas du header */
}

.ta-header-left, .ta-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ta-sidebar-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: transparent;
  color: var(--body-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ta-sidebar-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.ta-search-form {
  position: relative;
  width: 240px;
}

.ta-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--body-color);
  font-size: 1rem;
}

.ta-search-input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--body-color);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.ta-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(60, 80, 224, 0.1);
}

.ta-notification-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: transparent;
  color: var(--body-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.ta-notification-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.ta-notification-counter {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  background-color: var(--danger-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.ta-user-dropdown {
  position: relative;
}

.ta-user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ta-user-dropdown-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.ta-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.ta-user-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 240px;
  background-color: var(--card-bg);
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  z-index: 40;
  display: none;
}

.ta-user-dropdown-menu.show {
  display: block;
}

.ta-user-dropdown-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--body-color);
  transition: all 0.3s ease;
}

.ta-user-dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.ta-user-dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.5rem 0;
}

/* ======= Common Components ======= */
.ta-card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.ta-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0;
}

.ta-card-body {
  padding: 1.5rem;
}

.ta-card-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.ta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.ta-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.ta-btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.ta-btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.ta-btn-primary:hover {
  background-color: var(--secondary-color);
  color: white;
}

.ta-btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--body-color);
}

.ta-btn-outline:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.ta-grid {
  display: grid;
  gap: 1.5rem;
}

.ta-grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.ta-grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.ta-grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.ta-grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ======= Stats Cards ======= */
.ta-stats-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
}

.ta-stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 1.25rem;
  flex-shrink: 0;
}

.ta-stats-icon-primary {
  background-color: rgba(60, 80, 224, 0.1);
  color: var(--primary-color);
}

.ta-stats-icon-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.ta-stats-icon-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.ta-stats-icon-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.ta-stats-icon-info {
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--info-color);
}

.ta-stats-content {
  flex: 1;
}

.ta-stats-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-color);
  margin: 0 0 0.25rem 0;
}

.ta-stats-label {
  font-size: 0.875rem;
  color: var(--body-color);
  margin: 0;
}

.ta-stats-percentage {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

.ta-stats-percentage-up {
  color: var(--success-color);
}

.ta-stats-percentage-down {
  color: var(--danger-color);
}

.ta-stats-percentage i {
  margin-right: 0.25rem;
}

/* Dashboard Specific Styles - Part 1 */
.ta-dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .ta-dashboard-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.ta-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-color);
  margin: 0;
}

.ta-dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ta-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: var(--body-color);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.ta-filter-btn:hover, .ta-filter-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.ta-stats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .ta-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .ta-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ta-stats-widget {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.ta-stats-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--primary-color);
}

.ta-stats-widget.ta-stats-primary::before {
  background-color: var(--primary-color);
}

.ta-stats-widget.ta-stats-success::before {
  background-color: var(--success-color);
}

.ta-stats-widget.ta-stats-warning::before {
  background-color: var(--warning-color);
}

.ta-stats-widget.ta-stats-info::before {
  background-color: var(--info-color);
}

.ta-stats-widget.ta-stats-danger::before {
  background-color: var(--danger-color);
}

.ta-stats-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
}

.ta-stats-primary .ta-stats-icon {
  background-color: rgba(60, 80, 224, 0.1);
  color: var(--primary-color);
}

.ta-stats-success .ta-stats-icon {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.ta-stats-warning .ta-stats-icon {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.ta-stats-info .ta-stats-icon {
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--info-color);
}

.ta-stats-danger .ta-stats-icon {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.ta-stats-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin: 0 0 0.25rem;
}

.ta-stats-label {
  font-size: 0.875rem;
  color: var(--body-color);
  margin: 0;
}

.ta-stats-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-top: 0.5rem;
}

.ta-stats-trend.positive {
  color: var(--success-color);
  background-color: rgba(16, 185, 129, 0.1);
}

.ta-stats-trend.negative {
  color: var(--danger-color);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Section Styles */
.ta-section {
  margin-bottom: 2rem;
}

.ta-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0 0 1.25rem;
}

/* Action Cards Section */
.ta-action-cards {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.25rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .ta-action-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .ta-action-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ta-action-card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.ta-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.ta-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.ta-icon-primary {
  background-color: rgba(60, 80, 224, 0.1);
  color: var(--primary-color);
}

.ta-icon-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.ta-icon-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.ta-icon-info {
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--info-color);
}

.ta-icon-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.ta-action-content {
  flex: 1;
}

.ta-action-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0 0 0.25rem;
}

.ta-action-desc {
  font-size: 0.875rem;
  color: var(--body-color);
  margin: 0;
}

/* Chart Section Styles */
.ta-chart-container {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.ta-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .ta-chart-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ta-chart-box {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.ta-chart-box:nth-child(3) {
  grid-column: 1 / -1;
}

@media (min-width: 1024px) {
  .ta-chart-box:nth-child(3) {
    grid-column: auto;
  }
}

.ta-chart-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.ta-chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0;
}

.ta-chart-body {
  padding: 1.25rem;
}

.ta-status-chart,
.ta-chart-area {
  height: 280px;
  width: 100%;
}

/* Chart Legend */
.ta-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.ta-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.ta-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.ta-status-pending .ta-legend-color {
  background-color: var(--warning-color);
}

.ta-status-progress .ta-legend-color {
  background-color: var(--primary-color);
}

.ta-status-completed .ta-legend-color {
  background-color: var(--success-color);
}

.ta-status-problem .ta-legend-color {
  background-color: var(--danger-color);
}

.ta-legend-label {
  color: var(--body-color);
}

.ta-legend-value {
  font-weight: 600;
  color: var(--dark-color);
}

/* Ranking Lists */
.ta-ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ta-ranking-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.ta-ranking-item:last-child {
  border-bottom: none;
}

.ta-ranking-position {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(60, 80, 224, 0.1);
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.ta-ranking-content {
  flex: 1;
}

.ta-ranking-title {
  display: block;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.25rem;
}

.ta-ranking-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--body-color);
}

.ta-ranking-value {
  font-weight: 600;
  color: var(--success-color);
}

/* Activities Section */
.ta-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.ta-section-action {
  font-size: 0.875rem;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ta-section-action:hover {
  text-decoration: underline;
}

.ta-activities-container {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.ta-activities-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ta-activity-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.ta-activity-item:last-child {
  border-bottom: none;
}

.ta-activity-item:hover {
  background-color: rgba(0, 0, 0, 0.01);
}

.ta-activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ta-activity-primary {
  background-color: rgba(60, 80, 224, 0.1);
  color: var(--primary-color);
}

.ta-activity-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.ta-activity-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.ta-activity-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.ta-activity-info {
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--info-color);
}

.ta-activity-content {
  flex: 1;
}

.ta-activity-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.ta-activity-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0;
}

.ta-activity-time {
  font-size: 0.75rem;
  color: var(--body-color);
}

.ta-activity-desc {
  font-size: 0.875rem;
  color: var(--body-color);
  margin: 0 0 0.75rem;
}

.ta-activity-link {
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--primary-color);
}

.ta-activity-link:hover {
  text-decoration: underline;
}

/* Empty State */
.ta-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--body-color);
  text-align: center;
}

.ta-empty-icon {
  font-size: 2.5rem;
  color: var(--border-color);
  margin-bottom: 1rem;
}

/* Content Wrapper for proper spacing */
.ta-content-wrapper {
  padding: 1.5rem;
  width: 100%;
}

@media (max-width: 767.98px) {
  .ta-content-wrapper {
    padding: 1rem;
  }
}

/* Media Queries for Responsive Design */
@media (max-width: 767.98px) {
  .ta-grid-cols-2,
  .ta-grid-cols-3,
  .ta-grid-cols-4 {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .ta-sidebar {
    transform: translateX(-100%);
    z-index: 50;
  }
  
  .ta-sidebar.show {
    transform: translateX(0);
  }
  
  .ta-main-content {
    margin-left: 0;
    width: 100%;
  }
  
  .ta-header {
    padding: 0.75rem 1rem;
  }
  
  .ta-search-form {
    display: none;
  }
  
  .ta-activity-header {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .ta-chart-legend {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Layout du tableau de bord */
.ta-dashboard-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.5rem;
}

.ta-dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .ta-dashboard-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.ta-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.ta-subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

/* Filtres */
.ta-filters-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ta-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ta-filter-btn:hover {
    background-color: #e2e8f0;
    color: #334155;
}

.ta-filter-btn.active {
    background-color: #3c50e0;
    color: white;
}

/* Cartes de statistiques */
.ta-stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .ta-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ta-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ta-stat-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.ta-stat-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
}

.ta-stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.ta-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.375rem;
}

.ta-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.ta-stat-trend.positive {
    color: #10b981;
}

.ta-stat-trend.negative {
    color: #ef4444;
}

.ta-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 1.25rem;
}

.ta-bg-primary {
    background-color: #3c50e0;
}

.ta-bg-success {
    background-color: #10b981;
}

.ta-bg-warning {
    background-color: #f59e0b;
}

.ta-bg-info {
    background-color: #0ea5e9;
}

.ta-bg-danger {
    background-color: #ef4444;
}

.ta-stat-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.ta-action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #3c50e0;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.ta-action-link:hover {
    color: #2c3de0;
}

/* Sections */
.ta-section {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ta-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.ta-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

/* Boutons d'action */
.ta-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.ta-btn-primary {
    background-color: #3c50e0;
    color: white;
}

.ta-btn-primary:hover {
    background-color: #2c3ed3;
}

.ta-btn-success {
    background-color: #10b981;
    color: white;
}

.ta-btn-success:hover {
    background-color: #0ca678;
}

.ta-btn-warning {
    background-color: #f59e0b;
    color: white;
}

.ta-btn-warning:hover {
    background-color: #e59008;
}

.ta-btn-info {
    background-color: #0ea5e9;
    color: white;
}

.ta-btn-info:hover {
    background-color: #0993d3;
}

/* Cartes de statut */
.ta-status-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .ta-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ta-status-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ta-status-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-left: 4px solid;
}

.ta-status-pending {
    border-color: #f59e0b;
}

.ta-status-progress {
    border-color: #3c50e0;
}

.ta-status-completed {
    border-color: #10b981;
}

.ta-status-problem {
    border-color: #ef4444;
}

.ta-status-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.ta-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    font-size: 1.125rem;
}

.ta-status-pending .ta-status-icon {
    background-color: #fef3c7;
    color: #f59e0b;
}

.ta-status-progress .ta-status-icon {
    background-color: #e0e7ff;
    color: #3c50e0;
}

.ta-status-completed .ta-status-icon {
    background-color: #d1fae5;
    color: #10b981;
}

.ta-status-problem .ta-status-icon {
    background-color: #fee2e2;
    color: #ef4444;
}

.ta-status-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.ta-status-label {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.ta-status-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.ta-status-link:hover {
    color: #3c50e0;
}

/* Liste d'activités */
.ta-activities-container {
    margin-top: 1rem;
}

.ta-activities-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.ta-activity-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.ta-activity-item:last-child {
    border-bottom: none;
}

.ta-activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-size: 1rem;
    margin-top: 0.25rem;
}

.ta-activity-primary {
    background-color: #e0e7ff;
    color: #3c50e0;
}

.ta-activity-success {
    background-color: #d1fae5;
    color: #10b981;
}

.ta-activity-warning {
    background-color: #fef3c7;
    color: #f59e0b;
}

.ta-activity-danger {
    background-color: #fee2e2;
    color: #ef4444;
}

.ta-activity-info {
    background-color: #e0f2fe;
    color: #0ea5e9;
}

.ta-activity-content {
    flex: 1;
}

.ta-activity-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ta-activity-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.ta-activity-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.ta-activity-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.ta-activity-link {
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #3c50e0;
    text-decoration: none;
}

.ta-activity-link:hover {
    text-decoration: underline;
}

/* État vide */
.ta-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
}

.ta-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Graphiques */
.ta-grid-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .ta-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ta-chart-box {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.ta-chart-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.ta-chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.ta-chart-body {
    padding: 1.5rem;
}

.ta-chart {
    width: 100%;
    height: 300px;
}

/* Liste de classement */
.ta-ranking-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.ta-ranking-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.ta-ranking-item:last-child {
    border-bottom: none;
}

.ta-ranking-position {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem;
}

.ta-ranking-content {
    flex: 1;
}

.ta-ranking-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.ta-ranking-subtitle {
    display: block;
    font-size: 0.8125rem;
    color: #64748b;
}

.ta-ranking-value {
    font-size: 1rem;
    font-weight: 600;
    color: #3c50e0;
}

/* Formulaires */
.ta-form {
    width: 100%;
}

.ta-form-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ta-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ta-form-group {
    margin-bottom: 1rem;
}

.ta-form-group-full {
    grid-column: 1 / -1;
}

.ta-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.375rem;
}

.ta-required {
    color: #ef4444;
}

.ta-form-input,
.ta-form-select,
.ta-form-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background-color: #fff;
    color: #1e293b;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.ta-form-input:focus,
.ta-form-select:focus,
.ta-form-textarea:focus {
    border-color: #3c50e0;
    box-shadow: 0 0 0 3px rgba(60, 80, 224, 0.1);
    outline: none;
}

.ta-form-textarea {
    min-height: 6rem;
    resize: vertical;
}

.ta-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Tableaux */
.ta-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ta-table {
    width: 100%;
    border-collapse: collapse;
}

.ta-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ta-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.ta-table tr:hover {
    background-color: #f8fafc;
}

.ta-table-empty {
    padding: 3rem 1rem !important;
    text-align: center;
}

.ta-table-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.ta-search-box {
    position: relative;
    width: 100%;
    max-width: 20rem;
}

.ta-search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.ta-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background-color: #fff;
    color: #1e293b;
    font-size: 0.875rem;
}

.ta-search-input:focus {
    border-color: #3c50e0;
    box-shadow: 0 0 0 3px rgba(60, 80, 224, 0.1);
    outline: none;
}

/* Onglets */
.ta-tabs-header {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #e2e8f0;
}

.ta-tab-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.ta-tab-btn:hover {
    color: #334155;
}

.ta-tab-btn.active {
    color: #3c50e0;
    border-bottom-color: #3c50e0;
}

/* Badges */
.ta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.ta-badge-admin,
.ta-badge-primary {
    background-color: rgba(60, 80, 224, 0.1);
    color: #3c50e0;
}

.ta-badge-livreur,
.ta-badge-info {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.ta-badge-client,
.ta-badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.ta-badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.ta-badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Alertes */
.ta-alert {
    border-radius: 0.5rem;
    overflow: hidden;
}

.ta-alert-content {
    display: flex;
    padding: 1rem;
}

.ta-alert-info {
    background-color: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.ta-alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ta-alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.ta-alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.ta-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.ta-alert-info .ta-alert-icon {
    background-color: rgba(14, 165, 233, 0.2);
    color: #0ea5e9;
}

.ta-alert-success .ta-alert-icon {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.ta-alert-warning .ta-alert-icon {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.ta-alert-danger .ta-alert-icon {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.ta-alert-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.ta-alert-desc {
    font-size: 0.8125rem;
    color: #475569;
    margin: 0;
}

/* Information utilisateur */
.ta-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ta-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.ta-user-name {
    display: block;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.875rem;
}

.ta-user-phone {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
}

/* Actions sur les lignes de tableau */
.ta-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.ta-btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background-color: #f1f5f9;
    color: #64748b;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.ta-btn-action:hover {
    background-color: #e2e8f0;
}

.ta-btn-edit:hover {
    background-color: rgba(60, 80, 224, 0.1);
    color: #3c50e0;
}

.ta-btn-delete:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.ta-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: #64748b;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
}

.ta-btn-icon:hover {
    background-color: #e2e8f0;
    color: #334155;
}

/* Ajustements pour réduire l'espace entre le header et le contenu */
.ta-main-content {
    display: flex;
    flex-direction: column;
}

.ta-header {
    margin-bottom: 0; /* Supprimer la marge en bas du header */
}

.ta-section-header {
    margin-top: 0; /* Supprimer la marge en haut de l'en-tête de section */
}

/* Correction pour le conteneur principal */
.ta-main-content > .ta-dashboard-container {
    padding-top: 0.5rem; /* Réduire le padding en haut */
}

/* Styles spécifiques pour le conteneur d'administration */
.ta-admin-container {
    padding-top: 0.75rem;
}

.ta-admin-container .ta-section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.ta-admin-container .ta-section {
    margin-top: 0;
}

/* Styles pour les filtres dans les pages admin */
.ta-filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ta-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ta-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ta-filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.ta-search-box {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 300px;
}

.ta-search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.ta-search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 0.75rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
}

.ta-search-button:hover {
    color: #1e293b;
}

/* Styles spécifiques pour le tableau des livraisons */
.ta-id-column {
    font-family: monospace;
    font-size: 0.875rem;
    color: #64748b;
    white-space: nowrap;
}

.ta-actions-column {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

/* Styles de table améliorés */
.ta-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1rem;
    text-align: left;
}

.ta-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.ta-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.875rem;
    vertical-align: middle;
}

.ta-table tbody tr:hover {
    background-color: #f8fafc;
}

.ta-table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* État vide amélioré */
.ta-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.ta-empty-state-icon {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.ta-empty-state-text {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Styles pour les statistiques */
.ta-stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .ta-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .ta-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .ta-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1280px) {
    .ta-stats-grid.ta-grid-cols-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

.ta-stat-card {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s;
    height: 100%;
    border-top: 3px solid transparent;
}

/* Variantes de couleurs */
.ta-stat-card.ta-primary {
    border-top-color: #3b82f6;
}

.ta-stat-card.ta-success {
    border-top-color: #10b981;
}

.ta-stat-card.ta-warning {
    border-top-color: #f59e0b;
}

.ta-stat-card.ta-info {
    border-top-color: #0ea5e9;
}

.ta-stat-card.ta-danger {
    border-top-color: #ef4444;
}

.ta-stat-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ta-stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.ta-stat-card-label {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 1rem 0;
}

.ta-stat-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ta-stat-trend {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-right: 1rem;
}

.ta-progress-bar {
    height: 4px;
    background-color: #3b82f6;
    border-radius: 2px;
    margin-bottom: 0.25rem;
}

.ta-progress-bar.ta-bg-warning {
    background-color: #f59e0b;
}

.ta-progress-bar.ta-bg-success {
    background-color: #10b981;
}

.ta-progress-bar.ta-bg-info {
    background-color: #0ea5e9;
}

.ta-progress-bar.ta-bg-danger {
    background-color: #ef4444;
}

.ta-progress-value {
    font-size: 0.75rem;
    color: #64748b;
}

.ta-stat-card-link {
    font-size: 0.75rem;
    color: #3b82f6;
    text-decoration: none;
    white-space: nowrap;
}

.ta-stat-card-link:hover {
    text-decoration: underline;
}

/* Section modifications */
.ta-section {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

/* Styles pour les adresses tronquées dans les tableaux */
.ta-address-truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Styles pour l'affichage des dates et heures */
.ta-datetime {
    display: flex;
    flex-direction: column;
}

.ta-time {
    font-size: 0.75rem;
    color: #64748b;
}

/* Styles pour les textes secondaires */
.ta-text-muted {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Styles pour la pagination */
.ta-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.ta-pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
}

.ta-pagination-item:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.ta-pagination-item.active {
    background-color: #3b82f6;
    color: white;
}

/* Styles pour la section de filtres améliorée */
.ta-section-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ta-section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.ta-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

@media (min-width: 768px) {
    .ta-section-title {
        margin: 0;
        padding-top: 0.5rem;
    }
}

/* Améliorations pour les filtres */
.ta-filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .ta-filter-wrapper {
        width: auto;
        min-width: 60%;
    }
}

.ta-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    align-items: center;
}

@media (min-width: 768px) {
    .ta-filter-container {
        justify-content: flex-end;
    }
}

.ta-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ta-filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.ta-form-select {
    padding: 0.5rem;
    min-width: 180px;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #1e293b;
    background-color: #ffffff;
}

.ta-search-box {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 300px;
}

@media (min-width: 768px) {
    .ta-search-box {
        margin-top: 0;
        margin-left: auto;
    }
}

.ta-search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #1e293b;
}

.ta-search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 0.75rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
}

.ta-search-button:hover {
    color: #1e293b;
}

/* Styles pour les boutons d'action dans le tableau */
.ta-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    color: white;
}

.ta-btn-icon.ta-btn-primary {
    background-color: #3c50e0;
}

.ta-btn-icon.ta-btn-primary:hover {
    background-color: #3444c2;
}

.ta-btn-icon.ta-btn-info {
    background-color: #0ea5e9;
}

.ta-btn-icon.ta-btn-info:hover {
    background-color: #0284c7;
}

.ta-btn-icon.ta-btn-danger {
    background-color: #ef4444;
}

.ta-btn-icon.ta-btn-danger:hover {
    background-color: #dc2626;
}

.ta-table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Styles pour la gestion des clients */
.ta-info-group {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.ta-info-group:last-child {
    border-bottom: none;
}

.ta-info-label {
    width: 35%;
    font-weight: 600;
    color: #374151;
}

.ta-info-value {
    width: 65%;
    color: #1f2937;
}

.ta-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ta-stat-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.ta-stat-card:hover {
    transform: translateY(-2px);
}

.ta-stat-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
}

.ta-stat-card-primary .ta-stat-icon {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.ta-stat-card-success .ta-stat-icon {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.ta-stat-card-info .ta-stat-icon {
    background-color: rgba(14, 165, 233, 0.2);
    color: #0ea5e9;
}

.ta-stat-card-danger .ta-stat-icon {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.ta-stat-content {
    display: flex;
    flex-direction: column;
}

.ta-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.ta-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
}

.ta-truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ta-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.ta-empty-state-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.ta-empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.ta-empty-state-text {
    color: #6b7280;
    max-width: 500px;
}

/* Styles pour le formulaire client */
.ta-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ta-form-row .ta-form-group {
    flex: 1;
}

.ta-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: border-color 0.2s ease-in-out;
    resize: vertical;
}

.ta-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ta-form-textarea.ta-input-error {
    border-color: #ef4444;
}

.ta-form-textarea.ta-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.ta-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* Style pour les modals */
.ta-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.ta-modal-content {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.ta-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.ta-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.ta-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
}

.ta-modal-body {
    padding: 1.5rem;
}

.ta-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 640px) {
    .ta-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ta-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ta-info-group {
        flex-direction: column;
    }
    
    .ta-info-label, .ta-info-value {
        width: 100%;
    }
    
    .ta-info-label {
        margin-bottom: 0.25rem;
    }
}

