/* Variables CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --sidebar-width: 250px;
}

/* Styles généraux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    color: #333;
}

/* Navbar personnalisée */
.navbar {
    background: linear-gradient(135deg, var(--success-color), #229954);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: #64ffda !important;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 4px;
    padding: 12px 16px !important;
    position: relative;
    overflow: hidden;
}

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

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

.navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: #64ffda !important;
    border-left: 3px solid #64ffda;
}

.dropdown-menu {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 15px;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease;
}

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

.dropdown-item {
    color: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
    padding: 12px 20px;
    border-radius: 6px;
    margin: 2px 8px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    transform: translateX(8px) scale(1.02);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: #64ffda;
    background: rgba(100,255,218,0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(100,255,218,0.25);
    border-color: #64ffda;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2c255%2c255%2c0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Effet de brillance sur la navbar */
.navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #64ffda, transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Container principal */
.main-container {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 20px auto;
    padding: 30px;
    backdrop-filter: blur(10px);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 15px 15px 0 0 !important;
}

/* Boutons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    padding: 10px 25px;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
}

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.table thead {
    background: linear-gradient(135deg, var(--success-color), #229954);
}

.table thead th {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border: none;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: var(--light-color);
    transform: scale(1.01);
}

/* Main Content */
.main-content {
    padding-top: 100px;
    min-height: 100vh;
}

/* Badges */
.badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Alertes */
.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Formulaires */
.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    padding: 12px 15px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* Titres */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 25px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 20px 0;
    margin-top: 50px;
    border-radius: 15px 15px 0 0;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        margin: 10px;
        padding: 20px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

.dashboard-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Section */
.dashboard-header {
   background: linear-gradient(135deg, var(--success-color), #229954);
   color: white;
   border-radius: 20px;
   padding: 30px;
   margin-bottom: 30px;
   box-shadow: 0 10px 30px rgba(39, 174, 96, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text .dashboard-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 10px 0 0 0;
    font-size: 1.1rem;
}

.time-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 500;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-primary::before { background: linear-gradient(135deg, var(--success-color), #229954); }
.stat-success::before { background: linear-gradient(135deg, #27ae60, #229954); }
.stat-info::before { background: linear-gradient(135deg, var(--success-color), #229954); }
.stat-warning::before { background: linear-gradient(135deg, #f39c12, #e67e22); }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-primary .stat-icon { background: linear-gradient(135deg, #223499ff); }
.stat-success .stat-icon { background: linear-gradient(135deg, #27ae60, #229954); }
.stat-info .stat-icon { background: linear-gradient(135deg, #992222da); }
.stat-warning .stat-icon { background: linear-gradient(135deg, #f39c12, #e67e22); }

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.stat-label {
    font-size: 1rem;
    color: #7f8c8d;
    margin: 5px 0;
    font-weight: 600;
}

.stat-description {
    font-size: 0.85rem;
    color: #95a5a6;
}

.stat-trend {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
}

.stat-primary .stat-trend { background: rgba(39, 174, 96, 0.1); color: #27ae60; }
.stat-success .stat-trend { background: rgba(39, 174, 96, 0.1); color: #27ae60; }
.stat-info .stat-trend { background: rgba(39, 174, 96, 0.1); color: #27ae60; }
.stat-warning .stat-trend { background: rgba(243, 156, 18, 0.1); color: #f39c12; }

/* Main Cards */
.main-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.value-card, .cash-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.value-card {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
}

.cash-card {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.value-header, .cash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.value-info h4, .cash-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.value-info p, .cash-info p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.value-icon, .cash-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.value-amount, .cash-amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 20px 0;
}

.cash-amount.negative { color: #e74c3c; }
.cash-amount.positive { color: #2ecc71; }

.currency {
    font-size: 1.5rem;
    margin-left: 5px;
    opacity: 0.8;
}

.value-chart {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    transition: width 1s ease;
}

.cash-details {
    display: flex;
    gap: 20px;
}

.detail-item {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.detail-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.detail-value {
    font-weight: 600;
    font-size: 1rem;
}

.detail-value.positive { color: #2ecc71; }
.detail-value.negative { color: #e74c3c; }

/* Actions Section */
.actions-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.actions-header {
    text-align: center;
    margin-bottom: 30px;
}

.actions-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.actions-header p {
    margin: 0;
    color: #7f8c8d;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

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

.action-card:hover::before {
    left: 100%;
}

.action-primary { border-color: var(--success-color); }
.action-success { border-color: #27ae60; }
.action-info { border-color: var(--success-color); }
.action-warning { border-color: #f39c12; }

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.action-primary .action-icon { background: linear-gradient(135deg, var(--success-color), #229954); }
.action-success .action-icon { background: linear-gradient(135deg, #27ae60, #229954); }
.action-info .action-icon { background: linear-gradient(135deg, var(--success-color), #229954); }
.action-warning .action-icon { background: linear-gradient(135deg, #f39c12, #e67e22); }

.action-content {
    flex: 1;
}

.action-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.action-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.action-arrow {
    opacity: 0;
    transition: all 0.3s ease;
}

.action-card:hover .action-arrow {
    opacity: 1;
    transform: translateX(5px);
}

/* Stock Alerts Section */
.alerts-section {
    margin-bottom: 30px;
}

.alerts-header {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.35), rgba(34, 153, 84, 0.35));
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--success-color);
}

.alerts-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.alerts-header p {
    margin: 0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.alert-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
}

.alert-card.alert-danger {
    border-left-color: #e74c3c;
}

.alert-card.alert-warning {
    border-left-color: #f39c12;
}

.alert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.2);
}

.alert-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-card.alert-warning .alert-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.alert-quantity,
.alert-seuil {
    margin: 2px 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.alert-action .btn-sm {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.alert-action .btn-sm:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

/* Styles pour les boutons d'action des clients */
.alert-action {
    display: flex;
    gap: 8px;
    align-items: center;
}

.alert-action .btn-sm {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.alert-action .btn-sm:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
}

.alert-action .btn-sm[title*="Appeler"] {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.alert-action .btn-sm[title*="Appeler"]:hover {
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.alert-action .btn-sm[title*="WhatsApp"] {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.alert-action .btn-sm[title*="WhatsApp"]:hover {
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
}

.alert-action .btn-sm[title*="Ajouter"] {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.alert-action .btn-sm[title*="Ajouter"]:hover {
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

/* Styles pour la section clients inactifs */
.alert-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.alert-info {
    flex: 1;
}

.alert-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.alert-zone {
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.alert-status {
    flex-shrink: 0;
}

.alert-details {
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.detail-label {
    color: #7f8c8d;
    font-weight: 500;
}

.detail-value {
    color: #2c3e50;
    font-weight: 600;
}

.alert-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.alert-actions .btn-sm {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.alert-actions .btn-outline-primary {
    border: 1px solid #3498db;
    color: #3498db;
}

.alert-actions .btn-outline-primary:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
}

.alert-actions .btn-outline-success {
    border: 1px solid #27ae60;
    color: #27ae60;
}

.alert-actions .btn-outline-success:hover {
    background: #27ae60;
    color: white;
    transform: translateY(-1px);
}

.empty-state {
    background: linear-gradient(135deg, #d5f4e6 0%, #c8e6c9 100%);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    border: 2px dashed #27ae60;
}

.no-alerts {
    background: linear-gradient(135deg, #d5f4e6 0%, #c8e6c9 100%);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    border: 2px dashed #27ae60;
}

.no-alerts-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #27ae60, #229954);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 20px;
}

.no-alerts h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #27ae60;
}

.no-alerts p {
    margin: 0;
    font-size: 0.95rem;
    color: #7f8c8d;
}

/* Styles pour l'en-tête des sections */
.alerts-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.alerts-header .header-text {
    flex: 1;
}

.alerts-header .header-actions {
    flex-shrink: 0;
}

.alerts-header .btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.alerts-header .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .header-text {
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-cards {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    /* Styles pour les cartes de valeur et caisse comme les cartes MP */
    .value-card, .cash-card {
        padding: 20px;
    }

    .value-header, .cash-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .value-icon, .cash-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .value-amount, .cash-amount {
        font-size: 2.2rem;
        margin: 15px 0;
    }

    .currency {
        font-size: 1.2rem;
    }

    .cash-details {
        flex-direction: column;
        gap: 10px;
    }

    .detail-item {
        padding: 12px;
    }

    .value-info h4, .cash-info h4 {
        font-size: 1.1rem;
    }

    .value-info p, .cash-info p {
        font-size: 0.85rem;
    }
}

/* Styles pour la section rapport journalier */
.daily-report-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-top: 30px;
}

.report-content {
    padding: 30px;
}

.report-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.info-text h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.info-text p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.daily-report-form {
    margin-bottom: 30px;
}

.form-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.input-group {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.input-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.date-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: white;
    font-weight: 500;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 18px;
    pointer-events: none;
}

.button-group {
    display: flex;
    align-items: flex-end;
}

.generate-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 18px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

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

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

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(40, 167, 69, 0.4);
}

.generate-btn:active {
    transform: translateY(-1px);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-content i {
    font-size: 20px;
}

.btn-arrow {
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.generate-btn:hover .btn-arrow {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.report-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.feature-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-text span {
    color: #6c757d;
    font-size: 12px;
}

/* Responsive pour la section rapport journalier */
@media (max-width: 768px) {
    .daily-report-section {
        margin-top: 20px;
    }
    
    .report-content {
        padding: 20px;
    }
    
    .report-info {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .generate-btn {
        min-width: 100%;
        padding: 15px 25px;
    }
    
    .report-features {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        padding: 15px;
    }
}

/* Styles pour les pages Utilisateurs */
.page-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text .page-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 10px 0 0 0;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 15px;
}

/* Table Card */
.table-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Search Container */
.search-container {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 12px 50px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    width: 300px;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #6c757d;
    font-size: 16px;
}

.search-clear-btn,
.search-reset-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear-btn:hover,
.search-reset-btn:hover {
    background: #f8f9fa;
    color: var(--danger-color);
}

/* Utilisateur Cards */
.utilisateur-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.utilisateur-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.utilisateur-card .card-header {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    border: none;
    padding: 15px 20px;
}

.utilisateur-card .card-body {
    padding: 20px;
}

.utilisateur-card .card-footer {
    background: #f8f9fa;
    border: none;
    padding: 15px 20px;
}

/* Grille pour les cartes utilisateurs */
.utilisateurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .utilisateurs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.avatar-circle-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto;
    font-size: 48px;
}

.role-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge-large {
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.role-badge.dg { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.role-badge.logisticien { background: linear-gradient(135deg, #3498db, #2980b9); }
.role-badge.charge_production { background: linear-gradient(135deg, #f39c12, #e67e22); }
.role-badge.caissiere { background: linear-gradient(135deg, #28a745, #20c997); }
.role-badge.vendeur { background: linear-gradient(135deg, #27ae60, #229954); }
.role-badge.associe { background: linear-gradient(135deg, #f39c12, #e67e22); }
.role-badge.charge_communication { background: linear-gradient(135deg, #17a2b8, #138496); }
.role-badge.vendeur_special { background: linear-gradient(135deg, #6f42c1, #5a32a3); }
.role-badge.drh { background: linear-gradient(135deg, #fd7e14, #e55a00); }

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.info-item span:last-child {
    font-weight: 500;
    color: #2c3e50;
}

/* Permission Item */
.permission-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.permission-item:hover {
    background-color: #e9ecef;
    transform: translateX(3px);
}

/* Empty State */
.empty-state {
    background: linear-gradient(135deg, #d5f4e6 0%, #c8e6c9 100%);
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    border: 2px dashed #27ae60;
    margin: 30px 0;
}

.empty-state i {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #27ae60;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Form Styles */
.form-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 0 auto;
    max-width: 800px;
}

.form-container .card-header {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    border: none;
    padding: 25px 30px;
}

.form-container .card-header h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-container .card-body {
    padding: 30px;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
    border: none;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    color: white;
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-container {
        padding: 15px;
    }
    
    .page-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-text .page-title {
        font-size: 2rem;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .table-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .utilisateur-card .card-header {
        padding: 12px 15px;
    }
    
    .utilisateur-card .card-body {
        padding: 15px;
    }
    
    .utilisateur-card .card-footer {
        padding: 12px 15px;
    }
    
    .avatar-circle-large {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .permission-item {
        padding: 10px 12px;
    }
    
    .form-container .card-body {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .header-text .page-title {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .utilisateur-card .card-header h6 {
        font-size: 0.9rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .permission-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .permission-item .badge {
        align-self: flex-end;
    }
}

/* Form Switch Styles */
.form-check-reverse {
    padding-left: 0;
    padding-right: 2.5rem;
}

.form-check-reverse .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -2.5rem;
}

.form-check-reverse .form-check-label {
    margin-right: 1rem;
    font-weight: 500;
    color: #2c3e50;
}

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

.form-check-input:focus {
    border-color: var(--success-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(39, 174, 96, 0.25);
}

/* Status Section Styles */
.status-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
}

.status-header {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border-radius: 10px 10px 0 0;
    padding: 15px 20px;
    margin: -25px -25px 20px -25px;
}

.status-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.status-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.status-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.status-item .form-check {
    margin-bottom: 10px;
}

.status-item .form-text {
    margin-top: 5px;
}

/* Role Badge in Form */
.role-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.dg { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.role-badge.logisticien { background: linear-gradient(135deg, #3498db, #2980b9); }
.role-badge.charge_production { background: linear-gradient(135deg, #f39c12, #e67e22); }
.role-badge.caissiere { background: linear-gradient(135deg, #28a745, #20c997); }
.role-badge.vendeur { background: linear-gradient(135deg, #27ae60, #229954); }
.role-badge.associe { background: linear-gradient(135deg, #f39c12, #e67e22); }
.role-badge.charge_communication { background: linear-gradient(135deg, #17a2b8, #138496); }
.role-badge.vendeur_special { background: linear-gradient(135deg, #6f42c1, #5a32a3); }
.role-badge.drh { background: linear-gradient(135deg, #fd7e14, #e55a00); }

/* Alert Info Styles */
.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 1px solid #bee5eb;
    border-radius: 10px;
}

.alert-info .alert-heading {
    color: #0c5460;
    font-size: 1rem;
    font-weight: 600;
}

