/* ===================================================
   CLIENTS PAGE - STYLES COMPLETS ET ORGANISÉS
   =================================================== */

/* ===========================================
   1. VARIABLES ET CONFIGURATION GLOBALE
   =========================================== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --warning-gradient: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    --info-gradient: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    --danger-gradient: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    
    /* Couleurs principales */
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.25);
}

/* ===========================================
   2. HEADER DE LA PAGE
   =========================================== */
.page-header {
    background: linear-gradient(to right, #764ba2 0%, #764ba2 40%, #6f5fc7 70%, #667eea 100%);
    color: white;
    padding: 2rem 0 2rem 2rem;
    margin: -1rem -1rem 2rem -1rem;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .breadcrumb-wrapper {
     background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.page-header h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.page-header p {
    margin: 0;
    opacity: 0.9;
}

/* ===========================================
   3. CARTES DE STATISTIQUES
   =========================================== */
.stat-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

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

.stat-card.total::before { background: var(--primary-gradient); }
.stat-card.active::before { background: var(--success-gradient); }
.stat-card.prospect::before { background: var(--warning-gradient); }
.stat-card.weekly-audits::before { background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); }
.stat-card.recent::before { background: var(--info-gradient); }

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

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

.stat-icon.total { background: var(--primary-gradient); }
.stat-icon.active { background: var(--success-gradient); }
.stat-icon.prospect { background: var(--warning-gradient); }
.stat-icon.weekly-audits { background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); }
.stat-icon.recent { background: var(--info-gradient); }

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.stat-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* ===========================================
   4. BARRE DE RECHERCHE ET FILTRES
   =========================================== */
.search-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--card-border);
}

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

.search-input-group input {
    padding-left: 3rem;
    border-radius: 0.75rem;
    border: 2px solid var(--card-border);
    transition: all 0.3s ease;
}

.search-input-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input-group .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.view-buttons {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.view-btn:hover:not(.active) {
    border-color: #667eea;
    color: #667eea;
}

/* ===========================================
   5. CARTES CLIENTS - STYLE PRINCIPAL
   =========================================== */
.client-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Badge nombre d'audits */
.audit-count-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5);
    z-index: 10;
    animation: fadeInScale 0.3s ease;
    border: 2px solid white;
}

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

.audit-count-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(220, 53, 69, 0.7);
}

/* Barre colorée en haut */
.client-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 12px 12px 0 0;
}

/* Structure interne de la carte */
.client-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.client-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.client-title {
    flex: 1;
    min-width: 0;
}

.client-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-item i {
    color: #667eea;
    width: 16px;
    opacity: 0.7;
}

.info-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    margin-top: auto;
}

/* Badges de statut */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.actif {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.status-badge.prospect {
    background: #fed7aa;
    color: #92400e;
}

.status-badge.inactif {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Actions rapides */
.quick-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.125rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.client-card:hover .quick-actions {
    opacity: 1;
}

.quick-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    padding: 0;
}

.quick-action-btn:hover {
    transform: scale(1.1);
    background: #667eea;
    color: white;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.quick-action-btn i {
    font-size: 0.75rem;
    pointer-events: none;
}

/* ===========================================
   6. VUE LISTE
   =========================================== */
.list-view .col-xl-4,
.list-view .col-lg-6,
.list-view .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

.list-view .client-card {
    flex-direction: row !important;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 0.75rem !important;
    height: auto !important;
    overflow: hidden !important;
}

.list-view .client-content {
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
    width: 100% !important;
    justify-content: space-between !important;
}

.list-view .client-header {
    border: none !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
    min-width: 200px !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.list-view .client-title {
    flex: 1 !important;
    min-width: 0 !important;
}

.list-view .client-name {
    font-size: 1rem !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.list-view .client-info {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 0 !important;
}

.list-view .info-item {
    min-width: 0 !important;
    flex: 0 1 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
}

.list-view .info-item span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 120px !important;
}

.list-view .info-item i {
    flex-shrink: 0 !important;
    font-size: 0.8rem !important;
}

.list-view .client-footer {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    min-width: fit-content !important;
}

/* Responsive pour la vue liste */
@media (max-width: 1200px) {
    .list-view .info-item {
        display: none !important;
    }
    
    .list-view .info-item:first-child,
    .list-view .info-item:nth-child(2) {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .list-view .client-content {
        flex-wrap: wrap !important;
    }
    
    .list-view .client-header {
        flex: 1 1 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    .list-view .client-info {
        display: none !important;
    }
    
    .list-view .client-footer {
        flex: 1 1 100% !important;
        justify-content: space-between !important;
    }
}

.list-view .client-avatar {
    width: 40px !important;
    height: 40px !important;
    font-size: 0.9rem !important;
    flex-shrink: 0 !important;
}

.list-view .client-top-bar {
    display: none !important;
}

.list-view .badge {
    display: none !important;
}

.list-view .quick-actions {
    position: static !important;
    opacity: 1 !important;
    gap: 0.125rem !important;
}

.list-view .quick-action-btn {
    width: 26px !important;
    height: 26px !important;
    border-radius: 5px !important;
}

.list-view .quick-action-btn i {
    font-size: 0.7rem !important;
}

/* ===========================================
   7. ÉTAT VIDE
   =========================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.empty-state-icon {
    font-size: 5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===========================================
   8. MODE SOMBRE (DARK MODE)
   =========================================== */
body.dark-mode {
    --card-bg: #2d3748;
    --card-border: #4a5568;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e0;
    --text-muted: #718096;
}

body.dark-mode .page-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

body.dark-mode .stat-card,
body.dark-mode .search-card,
body.dark-mode .client-card,
body.dark-mode .empty-state {
    background: #2d3748;
    border-color: #4a5568;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .client-top-bar {
    background: linear-gradient(135deg, #667eea 0%, #9f7aea 100%);
}

body.dark-mode .client-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.dark-mode .info-item i {
    color: #9f7aea;
}

body.dark-mode .quick-action-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

body.dark-mode .quick-action-btn:hover {
    background: #9f7aea;
    color: white;
}

body.dark-mode input,
body.dark-mode select {
    background: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .view-btn {
    background: #2d3748;
    border-color: #4a5568;
    color: #a0aec0;
}

body.dark-mode .status-badge.actif {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

body.dark-mode .status-badge.prospect {
    background: rgba(246, 173, 85, 0.2);
    color: #f6ad55;
}

body.dark-mode .status-badge.inactif {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* ===========================================
   9. ANIMATIONS
   =========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.client-item {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: calc(var(--index) * 0.05s);
}

/* ===========================================
   10. RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 0;
        margin: -1rem -0.5rem 1.5rem -0.5rem;
    }
    
    .client-card {
        padding: 1rem;
    }
    
    .view-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .search-card {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .client-header {
        flex-wrap: wrap;
    }
}/* ===================================================
   GLOBAL STYLES - AI LABS AUDIT
   =================================================== */

/* ===========================================
   1. VARIABLES GLOBALES
   =========================================== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --warning-gradient: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    --info-gradient: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    --danger-gradient: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    --stats-gradient: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
}

/* ===========================================
   2. NAVIGATION & LAYOUT
   =========================================== */
.navbar-brand {
    font-weight: bold;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* ===========================================
   3. HERO SECTION
   =========================================== */
.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 4rem 0;
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section .lead {
    opacity: 0.9;
}

/* ===========================================
   4. BREADCRUMB
   =========================================== */
/* Wrapper pour le breadcrumb qui prend toute la largeur */
.breadcrumb-wrapper {
    background: linear-gradient(to right, #764ba2 0%, #764ba2 40%, #6f5fc7 70%, #667eea 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 0 !important;
    padding: 0.75rem 0 0.75rem 2rem;
}

.breadcrumb-wrapper .container {
    margin-top: 0 !important;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #ffffff !important;
}

.breadcrumb-item.active {
    color: #ffffff;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0.75rem;
}

.breadcrumb-item i {
    margin-right: 0.25rem;
    opacity: 0.8;
}

/* ===========================================
   5. UNIFORMISATION COULEUR TEXTE BOUTONS
   =========================================== */
.btn-warning,
.btn-info,
.btn-success,
.btn-danger,
.btn-primary,
.btn-secondary {
    color: #ffffff !important;
}

.btn-warning:hover,
.btn-info:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-primary:hover,
.btn-secondary:hover {
    color: #ffffff !important;
}

/* Mode sombre - garder le texte blanc sur tous les boutons colorés */
body.dark-mode .btn-warning,
body.dark-mode .btn-info,
body.dark-mode .btn-success,
body.dark-mode .btn-danger,
body.dark-mode .btn-primary,
body.dark-mode .btn-secondary {
    color: #ffffff !important;
}

body.dark-mode .btn-warning:hover,
body.dark-mode .btn-info:hover,
body.dark-mode .btn-success:hover,
body.dark-mode .btn-danger:hover,
body.dark-mode .btn-primary:hover,
body.dark-mode .btn-secondary:hover {
    color: #ffffff !important;
}

/* ===========================================
   6. BOUTONS RÉSEAUX SOCIAUX
   =========================================== */
/* LinkedIn */
.btn-linkedin {
    color: #0077b5 !important;
    border-color: #0077b5 !important;
    background-color: transparent;
}

.btn-linkedin:hover {
    color: #ffffff !important;
    background-color: #0077b5 !important;
    border-color: #0077b5 !important;
}

/* Facebook */
.btn-facebook {
    color: #1877f2 !important;
    border-color: #1877f2 !important;
    background-color: transparent;
}

.btn-facebook:hover {
    color: #ffffff !important;
    background-color: #1877f2 !important;
    border-color: #1877f2 !important;
}

/* Instagram */
.btn-instagram {
    color: #E4405F !important;
    border-color: #E4405F !important;
    background-color: transparent;
}

.btn-instagram:hover {
    color: #ffffff !important;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
    border-color: #E4405F !important;
}

/* Twitter/X */
.btn-twitter {
    color: #1DA1F2 !important;
    border-color: #1DA1F2 !important;
    background-color: transparent;
}

.btn-twitter:hover {
    color: #ffffff !important;
    background-color: #1DA1F2 !important;
    border-color: #1DA1F2 !important;
}

/* YouTube */
.btn-youtube {
    color: #FF0000 !important;
    border-color: #FF0000 !important;
    background-color: transparent;
}

.btn-youtube:hover {
    color: #ffffff !important;
    background-color: #FF0000 !important;
    border-color: #FF0000 !important;
}

/* TikTok */
.btn-tiktok {
    color: #000000 !important;
    border-color: #000000 !important;
    background-color: transparent;
}

.btn-tiktok:hover {
    color: #ffffff !important;
    background-color: #000000 !important;
    border-color: #000000 !important;
}

/* Pinterest */
.btn-pinterest {
    color: #E60023 !important;
    border-color: #E60023 !important;
    background-color: transparent;
}

.btn-pinterest:hover {
    color: #ffffff !important;
    background-color: #E60023 !important;
    border-color: #E60023 !important;
}

/* Mode sombre - ajuster les couleurs pour une meilleure visibilité */
body.dark-mode .btn-linkedin,
body.dark-mode .btn-facebook,
body.dark-mode .btn-instagram,
body.dark-mode .btn-twitter,
body.dark-mode .btn-youtube,
body.dark-mode .btn-tiktok,
body.dark-mode .btn-pinterest {
    opacity: 0.9;
}

body.dark-mode .btn-tiktok {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

body.dark-mode .btn-tiktok:hover {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* ===========================================
   7. CARTES
   =========================================== */
.card-hover {
    transition: transform 0.2s;
}

.card-hover:hover {
    transform: translateY(-5px);
}

.stats-card {
    background: var(--stats-gradient);
    color: white;
}

/* ===========================================
   6. MESSAGES FLASH (ALERTS)
   =========================================== */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.alert {
    animation: pulse 0.5s ease-in-out 0.5s;
    border-left-width: 5px !important;
}

.alert.animate-slide-down {
    animation: slideDown 0.5s ease-out;
}

.alert.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

.alert.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
}

.alert.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border-color: #ffc107;
}

.alert.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #17a2b8;
}

/* ===========================================
   7. MODE SOMBRE - ALERTS
   =========================================== */
[data-bs-theme="dark"] .alert.alert-success,
body.dark-mode .alert.alert-success {
    background: linear-gradient(135deg, #1e7e34 0%, #28a745 100%);
    color: white;
}

[data-bs-theme="dark"] .alert.alert-danger,
body.dark-mode .alert.alert-danger {
    background: linear-gradient(135deg, #bd2130 0%, #dc3545 100%);
    color: white;
}

[data-bs-theme="dark"] .alert.alert-warning,
body.dark-mode .alert.alert-warning {
    background: linear-gradient(135deg, #d39e00 0%, #ffc107 100%);
    color: #212529;
}

[data-bs-theme="dark"] .alert.alert-info,
body.dark-mode .alert.alert-info {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%) !important;
    color: #90cdf4 !important;
    border-color: #63b3ed !important;
}

body.dark-mode .alert.alert-info strong {
    color: #ffffff !important;
}

body.dark-mode .alert.alert-info i {
    color: #63b3ed !important;
}

/* Styles pour les alertes avec border-left */
.alert.border-left {
    border-left-width: 4px !important;
    border-left-style: solid !important;
}

.alert-info.border-left {
    border-left-color: #17a2b8 !important;
}

body.dark-mode .alert-info.border-left {
    background: rgba(30, 58, 95, 0.9) !important;
    border-left-color: #63b3ed !important;
    color: #b8e3f5 !important;
}

body.dark-mode .alert.border-left strong {
    color: #ffffff !important;
}

body.dark-mode .alert.border-left i {
    color: #63b3ed !important;
    margin-right: 0.5rem;
}

/* Styles pour les formulaires en mode sombre */
body.dark-mode .form-label {
    color: #cbd5e0 !important;
}

body.dark-mode .form-label.small {
    color: #a0aec0 !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #1a202c !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: #2d3748 !important;
    border-color: #667eea !important;
    color: #e2e8f0 !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

body.dark-mode .form-control:disabled,
body.dark-mode .form-control[readonly] {
    background-color: #374151 !important;
    color: #9ca3af !important;
}

body.dark-mode input[type="number"],
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode textarea {
    background-color: #1a202c !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode input[type="number"]:focus,
body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="email"]:focus,
body.dark-mode input[type="password"]:focus,
body.dark-mode textarea:focus {
    background-color: #2d3748 !important;
    border-color: #667eea !important;
    color: #e2e8f0 !important;
}

body.dark-mode .input-group-text {
    background-color: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #cbd5e0 !important;
}

body.dark-mode .form-control-sm {
    background-color: #1a202c !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .form-control-sm:focus {
    background-color: #2d3748 !important;
    border-color: #667eea !important;
    color: #e2e8f0 !important;
}

/* Styles pour les éléments HR et model-settings en mode sombre */
body.dark-mode hr {
    border-color: #4a5568 !important;
    opacity: 0.6 !important;
}

body.dark-mode .model-settings {
    background-color: rgba(45, 55, 72, 0.3) !important;
    padding: 0.75rem !important;
    border-radius: 0.5rem !important;
}

body.dark-mode .model-settings hr {
    border-color: #667eea !important;
    opacity: 0.3 !important;
    margin: 0.75rem 0 !important;
}

/* ===========================================
   8. RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* ===========================================
   9. UTILITAIRES
   =========================================== */
.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.border-3 {
    border-width: 3px !important;
}

.fs-3 {
    font-size: 1.75rem !important;
}

.fs-5 {
    font-size: 1.25rem !important;
}

/* ===========================================
   10. FOOTER
   =========================================== */
footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

body.dark-mode footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-top: 1px solid #4a5568;
    color: #cbd5e0;
}

body.dark-mode footer .text-muted {
    color: #718096 !important;
}/* ===================================================
   GLOBAL STYLES - AI LABS AUDIT - TOUT COMPILÉ
   =================================================== */

/* ===========================================
   ADMIN USERS
   =========================================== */
.user-card {
            border-radius: 15px;
            transition: all 0.3s;
            margin-bottom: 20px;
        }
        
        .user-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        
        .role-badge {
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
        }
        
        .role-admin {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .role-user {
            background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
            color: #333;
        }
        
        .status-active {
            color: #28a745;
            font-weight: bold;
        }
        
        .status-inactive {
            color: #dc3545;
            font-weight: bold;
        }
        
        .action-buttons .btn {
            margin: 0 5px;
            border-radius: 10px;
            padding: 5px 15px;
        }
        
        .stats-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
        }
        
        .stats-card h3 {
            font-size: 2.5rem;
            font-weight: bold;
        }
        
        .add-user-btn {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .add-user-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
        }
        
        .search-box {
            border-radius: 25px;
            padding: 10px 20px;
            border: 2px solid #e0e0e0;
        }
        
        .search-box:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        }
        
        .modal-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .attempts-table {
            font-size: 0.9rem;
        }
        
        .attempts-table .success {
            color: #28a745;
        }
        
        .attempts-table .failed {
            color: #dc3545;
        }

/* ===========================================
   AGENTS
   =========================================== */
.agent-card {
        border: 1px solid #dee2e6;
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
        transition: all 0.3s ease;
        background: white;
    }
    
    .agent-card:hover {
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }
    
    .agent-status {
        display: inline-block;
        padding: 5px 15px;
        border-radius: 20px;
        font-weight: bold;
        font-size: 0.85rem;
    }
    
    .status-running {
        background: #d4edda;
        color: #155724;
    }
    
    .status-stopped {
        background: #f8d7da;
        color: #721c24;
    }
    
    .status-pending {
        background: #fff3cd;
        color: #856404;
    }
    
    .status-error {
        background: #f8d7da;
        color: #721c24;
    }
    
    .metric-box {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .metric-value {
        font-size: 2rem;
        font-weight: bold;
        color: #495057;
    }
    
    .metric-label {
        color: #6c757d;
        font-size: 0.9rem;
        margin-top: 5px;
    }
    
    .log-container {
        background: #1e1e1e;
        color: #d4d4d4;
        padding: 15px;
        border-radius: 8px;
        height: 300px;
        overflow-y: auto;
        font-family: 'Courier New', monospace;
        font-size: 0.85rem;
    }
    
    .log-entry {
        margin-bottom: 5px;
        padding: 3px 0;
    }
    
    .log-timestamp {
        color: #858585;
        margin-right: 10px;
    }
    
    .log-level-info {
        color: #3a96dd;
    }
    
    .log-level-warning {
        color: #ce9178;
    }
    
    .log-level-error {
        color: #f48771;
    }
    
    .log-level-success {
        color: #4ec9b0;
    }
    
    .control-btn {
        margin: 0 5px;
        min-width: 100px;
    }
    
    .dark-mode .agent-card {
        background: #2b2b2b;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .dark-mode .metric-box {
        background: #1e1e1e;
    }
    
    .dark-mode .metric-value {
        color: #e0e0e0;
    }
    
    .pulse {
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0% { opacity: 1; }
        50% { opacity: 0.5; }
        100% { opacity: 1; }
    }
    
    .performance-chart {
        height: 200px;
        background: #f8f9fa;
        border-radius: 8px;
        padding: 10px;
        margin-top: 20px;
    }
    
    .dark-mode .performance-chart {
        background: #1e1e1e;
    }

/* ===========================================
   AUDIT RESULTS
   =========================================== */
.response-cell {
    max-width: 300px;
    position: relative;
}

.response-preview {
    max-height: 100px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.response-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, white);
}

.response-preview:hover {
    background-color: #f8f9fa;
}

.star-rating {
    display: inline-flex;
    gap: 1px;
    cursor: pointer;
    flex-wrap: wrap;
    max-width: 300px;
}

.star-rating .star {
    color: #ddd;
    font-size: 1.1rem;
    transition: color 0.2s;
    padding: 0 1px;
}

.star-rating .star.filled {
    color: #ffc107;
}

.star-rating:hover .star {
    color: #ffc107;
}

.score-input {
    width: 60px;
    text-align: center;
}

.model-header {
    min-width: 350px;
    text-align: center;
}

.scoring-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
}

.error-response {
    color: #dc3545;
    font-style: italic;
}

.success-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.error-badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Style pour la boîte de réponse dans le modal */
.response-content-box {
    white-space: pre-wrap;
    padding: 15px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e9ecef;
}

/* Mode clair - surcharge si nécessaire */
[data-bs-theme="light"] .response-content-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #212529;
}

/* ===========================================
   CLIENT AI CONFIG
   =========================================== */
/* Style personnalisé pour les sliders */
    .form-switch .form-check-input {
        background-color: #dc3545;
        border-color: #dc3545;
        transition: all 0.3s ease;
    }
    
    .form-switch .form-check-input:checked {
        background-color: #28a745;
        border-color: #28a745;
    }
    
    .form-switch .form-check-input:focus {
        box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
        border-color: #28a745;
    }
    
    .model-card {
        transition: all 0.3s ease;
    }
    
    .model-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .card.border-success {
        border-width: 2px !important;
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
    }
    
    .model-settings {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 10px;
    }
    
    .filter-btn.active {
        background: #0d6efd;
        color: white;
    }

/* ===========================================
   CLIENT CREATION SUCCESS
   =========================================== */
.card {
    animation: fadeInUp 0.6s ease-out;
}

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

.bi-1-circle, .bi-2-circle, .bi-3-circle {
    color: #28a745;
    font-weight: bold;
}

/* ===========================================
   CLIENT DETAIL
   =========================================== */
/* KPI Card styles */
    .kpi-card {
        background: #ffffff;
        border: 2px solid #dee2e6 !important;
        color: #212529;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        border-color: #6f42c1 !important;
    }
    
    .kpi-card .card-body {
        color: inherit;
        background: transparent;
    }
    
    .kpi-card .opacity-75 {
        opacity: 0.75 !important;
    }
    
    /* Dark mode adjustments */
    body.dark-mode .kpi-card {
        background: #1a202c;
        border: 2px solid #4a5568 !important;
        color: #e2e8f0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    body.dark-mode .kpi-card:hover {
        border-color: #9f7aea !important;
    }
    
    body.dark-mode .kpi-card .card-body {
        color: #e2e8f0;
    }
    
    .timeline {
        position: relative;
        padding-left: 1.5rem;
    }
    
    .timeline::before {
        content: '';
        position: absolute;
        left: 0.5rem;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(to bottom, #dee2e6, #6c757d, #dee2e6);
        border-radius: 1px;
    }
    
    .timeline-item {
        position: relative;
    }
    
    .timeline-marker {
        position: absolute;
        left: -2rem;
        top: 0.25rem;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 2px solid #fff;
        box-shadow: 0 0 0 2px var(--bs-border-color);
    }
    
    .timeline-content {
        padding: 0.5rem 0;
    }
    
    /* Animation d'entrée pour les cartes */
    .card {
        animation: slideInUp 0.6s ease-out;
    }
    
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes fadeInLeft {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    /* Hover effects pour les boutons d'action */
    .btn-lg:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.2s ease;
    }
    
    /* Style amélioré pour les badges de zone géo */
    .bg-outline-primary {
        background-color: rgba(13, 110, 253, 0.1);
        color: var(--bs-primary);
        border: 1px solid rgba(13, 110, 253, 0.2);
    }
    
    /* Animation au survol des cartes concurrent */
    .card.border-0:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }
    
    /* Style pour l'avatar */
    .avatar-sm {
        width: 40px;
        height: 40px;
    }

/* ===========================================
   CLIENT EDIT
   =========================================== */
.edit-container {
        max-width: 1000px;
        margin: 0 auto;
        padding: 20px 40px;
    }

    @media (max-width: 768px) {
        .edit-container {
            padding: 15px 20px;
        }
    }

    .card {
        border: 1px solid #dee2e6;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-bottom: 2rem;
    }

    .card-header {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-bottom: 1px solid #dee2e6;
        padding: 1rem 1.5rem;
        border-radius: 12px 12px 0 0 !important;
    }

    .card-header h5 {
        margin: 0;
        font-weight: 600;
        color: #495057;
    }

    .card-header i {
        color: #6c757d;
        margin-right: 0.5rem;
    }

    .card-body {
        padding: 2rem;
    }

    .mb-section {
        margin-bottom: 2rem;
    }

    .mb-field {
        margin-bottom: 1.5rem;
    }

    .contact-item {
        background: #f8f9fa;
        padding: 1rem;
        margin: 0.75rem 0;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        position: relative;
        transition: all 0.2s ease;
        cursor: move;
    }

    .contact-item:hover {
        border-color: #007bff;
        background: #f1f3f4;
    }

    .contact-item.dragging {
        opacity: 0.5;
    }

    .contact-item.drag-over {
        border: 2px dashed #28a745;
        background: #d4edda;
    }

    .contact-item .drag-handle {
        cursor: move;
        color: #6c757d;
        margin-right: 10px;
    }

    .contact-item .badge-principal {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .badge-principal {
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
        border: none;
        color: white;
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .concurrent-item {
        background: #f8f9fa;
        padding: 1rem;
        margin: 0.75rem 0;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        min-height: 80px;
        border-left: 4px solid #28a745;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .concurrent-item:hover {
        background: #f1f3f4;
        border-color: #28a745;
    }

    .concurrent-item .concurrent-info {
        flex-grow: 1;
    }

    .concurrent-item .concurrent-name {
        font-weight: 600;
        font-size: 1.1rem;
        color: #2c3e50;
        margin-bottom: 0.25rem;
    }

    .concurrent-item .concurrent-details {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .concurrent-item .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .concurrent-item .concurrent-meta {
        color: #6c757d;
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }

    .concurrent-item .btn-group {
        flex-shrink: 0;
    }

    .drag-handle {
        cursor: move;
        color: #6c757d;
    }

    .priority-badge {
        font-size: 0.9rem;
        padding: 0.25rem 0.5rem;
    }

    .field-dynamic {
        display: none;
    }

    .field-dynamic.active {
        display: flex !important;
    }

    .contact-principal-section {
        background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
        border-radius: 8px;
        padding: 1.5rem;
        border: 1px solid #bbdefb;
        margin-bottom: 2rem;
    }

    .contact-principal-section h6 {
        color: #1976d2;
        font-weight: 600;
        margin-bottom: 1rem;
    }

    body.dark-mode .card {
        background: #1a1a1a;
        border-color: #4a5568;
    }

    body.dark-mode .card-header {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
    }

    body.dark-mode .card-header h5 {
        color: #e2e8f0;
    }

    body.dark-mode .contact-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    body.dark-mode .contact-item:hover {
        background: #374151;
        border-color: #667eea;
    }

    body.dark-mode .concurrent-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    body.dark-mode .concurrent-item .concurrent-name {
        color: #e2e8f0;
    }

    body.dark-mode .concurrent-item .concurrent-meta {
        color: #a0aec0;
    }

    body.dark-mode .contact-principal-section {
        background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
        border-color: #3b82f6;
    }

    body.dark-mode .contact-principal-section h6 {
        color: #93c5fd;
    }

/* ===========================================
   CLIENT EDIT MODAL
   =========================================== */
#clientEditModal .card {
    border: 1px solid #dee2e6;
}

#clientEditModal .card-header {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

#clientEditModal .form-label {
    font-weight: 500;
    color: #495057;
}

#clientEditModal .text-danger {
    font-weight: bold;
}

/* Dark mode support */
body.dark-mode #clientEditModal .modal-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode #clientEditModal .card {
    background-color: #1a1a2e;
    border-color: #4a5568;
}

body.dark-mode #clientEditModal .card-header {
    background-color: #16213e !important;
    color: #e0e0e0;
    border-color: #4a5568;
}

body.dark-mode #clientEditModal .form-control,
body.dark-mode #clientEditModal .form-select {
    background-color: #0f172a;
    color: #e0e0e0;
    border-color: #4a5568;
}

body.dark-mode #clientEditModal .form-control:focus,
body.dark-mode #clientEditModal .form-select:focus {
    background-color: #1e293b;
    border-color: #667eea;
    color: #e0e0e0;
}

body.dark-mode #clientEditModal .btn-close {
    filter: invert(1);
}

/* ===========================================
   CLIENT EDIT OLD
   =========================================== */
.edit-container { 
        max-width: 1200px; 
        margin: 0 auto; 
        padding: 20px; 
    }
    
    .section-card {
        background: white;
        border-radius: 10px;
        padding: 25px;
        margin-bottom: 20px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .section-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 15px 20px;
        border-radius: 10px 10px 0 0;
        margin: -25px -25px 20px -25px;
    }
    
    .field-dynamic {
        display: none;
    }
    
    .field-dynamic.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    .contact-item { 
        background: #f8f9fa; 
        padding: 15px; 
        margin: 10px 0; 
        border-radius: 8px; 
        position: relative; 
    }
    
    .contact-item.dragging { 
        opacity: 0.5; 
    }
    
    .contact-item .drag-handle { 
        cursor: move; 
        color: #6c757d; 
        margin-right: 10px; 
    }
    
    .contact-item .badge-principal { 
        position: absolute; 
        top: 10px; 
        right: 10px; 
    }
    
    .badge-principal {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        border: none;
        color: white;
        border-radius: 20px;
        font-weight: 600;
    }
    
    .concurrent-item {
        background: #f8f9fa;
        padding: 15px;
        margin: 10px 0;
        border-radius: 8px;
        position: relative;
        border-left: 4px solid #28a745;
    }
    
    .drag-handle {
        cursor: move;
        color: #6c757d;
    }
    
    .priority-badge {
        font-size: 0.9rem;
        padding: 4px 8px;
    }
    
    .btn-add {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .btn-add:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    }
    
    .required-field::after {
        content: " *";
        color: #dc3545;
    }
    
    /* Dark mode support */
    body.dark-mode .section-card {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    body.dark-mode .form-control,
    body.dark-mode .form-select {
        background: #1a1a2e;
        color: #e0e0e0;
        border-color: #4a5568;
    }
    
    body.dark-mode .contact-item {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
    }
    
    body.dark-mode .concurrent-item {
        background: #1a1a2e;
        border-color: #4a5568;
    }

/* ===========================================
   CLIENT WIZARD MODAL
   =========================================== */
#clientWizardModal .wizard-container { max-width: 900px; margin: 0 auto; padding: 20px; position: relative; }
                #clientWizardModal .progress-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px; border-radius: 10px 10px 0 0; margin-bottom: 0; }
                #clientWizardModal .btn-close-custom {
                    position: absolute;
                    top: 25px;
                    right: 25px;
                    width: 40px;
                    height: 40px;
                    border-radius: 50%;
                    background: rgba(255, 255, 255, 0.2);
                    border: 2px solid rgba(255, 255, 255, 0.3);
                    color: white;
                    font-size: 1.2rem;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    cursor: pointer;
                    transition: all 0.3s ease;
                    z-index: 1000;
                }
                #clientWizardModal .btn-close-custom:hover {
                    background: rgba(255, 255, 255, 0.3);
                    border-color: rgba(255, 255, 255, 0.5);
                    transform: rotate(90deg);
                }
                #clientWizardModal .btn-close-custom:active {
                    transform: rotate(90deg) scale(0.9);
                }
                #clientWizardModal .wizard-content { background: white; padding: 30px; border: 1px solid #dee2e6; border-radius: 0 0 10px 10px; min-height: 500px; }
                #clientWizardModal .step-section { display: none; animation: fadeIn 0.3s; }
                #clientWizardModal .step-section.active { display: block; }
                @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
                #clientWizardModal .nav-buttons { margin-top: 30px; padding-top: 20px; border-top: 1px solid #dee2e6; }
                #clientWizardModal .contact-item { background: #f8f9fa; padding: 15px; margin: 10px 0; border-radius: 8px; position: relative; }
                #clientWizardModal .contact-item.dragging { opacity: 0.5; }
                #clientWizardModal .contact-item .drag-handle { cursor: move; color: #6c757d; margin-right: 10px; }
                #clientWizardModal .contact-item .badge-principal { position: absolute; top: 10px; right: 10px; }
                #clientWizardModal .error-message { color: #dc3545; font-size: 0.875rem; margin-top: 0.25rem; }
                #clientWizardModal .required-field::after { content: " *"; color: #dc3545; }
                #clientWizardModal .social-input-group { position: relative; }
                #clientWizardModal .social-input-group .input-group-text { background: #f8f9fa; border-right: 0; }
                #clientWizardModal .recap-section { background: #f8f9fa; padding: 15px; margin: 10px 0; border-radius: 8px; }
                #clientWizardModal .recap-section h6 { color: #667eea; margin-bottom: 10px; }
                #clientWizardModal .autosave-indicator { position: fixed; bottom: 20px; right: 20px; padding: 10px 20px; background: #28a745; color: white; border-radius: 5px; display: none; }
                #clientWizardModal .field-dynamic { display: none; }
                #clientWizardModal .field-dynamic.active { display: block; animation: fadeIn 0.3s ease; }

                #clientWizardModal .btn {
                    border-radius: 8px;
                    padding: 12px 24px;
                    font-weight: 600;
                    transition: all 0.3s ease;
                    border: none;
                }
                #clientWizardModal .btn-primary {
                    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                }
                #clientWizardModal .btn-primary:hover {
                    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
                    transform: translateY(-2px);
                    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
                }
                #clientWizardModal .btn-secondary {
                    background: linear-gradient(135deg, #868e96 0%, #6c757d 100%);
                }
                #clientWizardModal .btn-success {
                    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
                }

                #clientWizardModal .card {
                    border: none;
                    border-radius: 12px;
                    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
                    overflow: hidden;
                }
                #clientWizardModal .card-header {
                    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
                    border: none;
                    padding: 20px;
                }

                #clientWizardModal .alert {
                    border: none;
                    border-radius: 10px;
                    padding: 15px 20px;
                }
                #clientWizardModal .alert-info {
                    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
                    color: #0c5460;
                    border-left: 4px solid #0dcaf0;
                }
                #clientWizardModal .alert-warning {
                    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
                    color: #856404;
                    border-left: 4px solid #ffc107;
                }

                #clientWizardModal .input-group-text {
                    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
                    border: 2px solid #e9ecef;
                    border-right: none;
                    color: #667eea;
                }

                #clientWizardModal .badge {
                    padding: 6px 12px;
                    border-radius: 20px;
                    font-weight: 600;
                }
                #clientWizardModal .badge-principal {
                    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                }

                #clientWizardModal .form-check-input:checked {
                    background-color: #667eea;
                    border-color: #667eea;
                }
                #clientWizardModal .form-check-input:focus {
                    border-color: #667eea;
                    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
                }

                #clientWizardModal .step-dots {
                    display: flex;
                    justify-content: center;
                    margin: 20px 0;
                    gap: 10px;
                }
                #clientWizardModal .step-dot {
                    width: 12px;
                    height: 12px;
                    border-radius: 50%;
                    background: #dee2e6;
                    transition: all 0.3s ease;
                }
                #clientWizardModal .step-dot.active {
                    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                    transform: scale(1.3);
                }
                #clientWizardModal .step-dot.completed {
                    background: #28a745;
                }

                body.dark-mode #clientWizardModal .wizard-content {
                    background: #2d2d2d;
                    color: #e0e0e0;
                }

                body.dark-mode #clientWizardModal .progress-header {
                    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
                }

                body.dark-mode #clientWizardModal .form-control,
                body.dark-mode #clientWizardModal .form-select {
                    background: #1a1a2e;
                    color: #e0e0e0;
                    border-color: #4a5568;
                }

                body.dark-mode #clientWizardModal .form-control:focus,
                body.dark-mode #clientWizardModal .form-select:focus {
                    background: #1a1a2e;
                    color: #e0e0e0;
                    border-color: #667eea;
                }

                body.dark-mode #clientWizardModal .card {
                    background: #2d2d2d;
                    color: #e0e0e0;
                }

                body.dark-mode #clientWizardModal .card-header {
                    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
                }

                body.dark-mode #clientWizardModal .contact-item {
                    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
                    border-color: #4a5568;
                }

                body.dark-mode #clientWizardModal .recap-section {
                    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
                    border-left-color: #4a5568;
                }

                body.dark-mode #clientWizardModal .alert-info {
                    background: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
                    color: #bee3f8;
                    border-left-color: #63b3ed;
                }

                body.dark-mode #clientWizardModal .alert-warning {
                    background: linear-gradient(135deg, #744210 0%, #5a2f0b 100%);
                    color: #fbd38d;
                    border-left-color: #f6ad55;
                }

                body.dark-mode #clientWizardModal .input-group-text {
                    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
                    border-color: #4a5568;
                    color: #667eea;
                }

                body.dark-mode #clientWizardModal .btn-secondary {
                    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
                }

                body.dark-mode #clientWizardModal label {
                    color: #cbd5e0;
                }

                body.dark-mode #clientWizardModal .text-muted {
                    color: #a0aec0 !important;
                }

                body.dark-mode #clientWizardModal .error-message {
                    color: #fc8181;
                }

                body.dark-mode #clientWizardModal .field-dynamic {
                    color: #e0e0e0;
                }

                body.dark-mode #clientWizardModal h4, body.dark-mode #clientWizardModal h5, body.dark-mode #clientWizardModal h6 {
                    color: #e2e8f0;
                }

                @media (max-width: 768px) {
                    #clientWizardModal .wizard-container {
                        margin: 1rem;
                        padding: 0;
                    }
                    #clientWizardModal .wizard-content {
                        padding: 20px;
                    }
                    #clientWizardModal .nav-buttons {
                        flex-direction: column;
                        gap: 10px;
                    }
                    #clientWizardModal .btn {
                        width: 100%;
                    }
                }

/* ===========================================
   INDEX
   =========================================== */
.btn-lg {
    border-radius: 10px;
}

.list-group-item {
    border-radius: 8px !important;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    border-color: var(--bs-primary);
}

/* ===========================================
   LOGIN
   =========================================== */
body {
            min-height: 100vh;
            background: linear-gradient(135deg, #99a9ee 0%, #c69dee 100%);
            padding: 20px 0;
        }
        
        .auth-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .login-container, .client-signup-container {
            background: white;
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: slideIn 0.5s ease-out;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .client-signup-container {
            animation-delay: 0.2s;
        }

        /* Force equal height columns on desktop */
        @media (min-width: 992px) {
            .auth-container .row {
                display: flex !important;
                align-items: stretch !important;
            }

            .auth-container .col-lg-6 {
                display: flex !important;
                flex: 1 1 50% !important;
            }

            .login-container, .client-signup-container {
                width: 100%;
                height: 100% !important;
                min-height: 700px !important;
            }
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .login-header h1 {
            color: #667eea;
            font-size: 2rem;
            font-weight: bold;
            margin-bottom: 10px;
        }
        
        .login-header p {
            color: #6c757d;
            font-size: 0.9rem;
        }
        
        .form-control:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        }
        
        .btn-login {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            color: white;
            padding: 12px;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
            color: white;
        }

        .forgot-password-link {
            color: #6c757d;
            font-size: 0.9rem;
            transition: color 0.3s ease;
        }

        .forgot-password-link:hover {
            color: #667eea;
            text-decoration: underline !important;
        }

        .partner-link {
            display: inline-flex;
            align-items: center;
            padding: 12px 24px;
            background: linear-gradient(135deg, #059669 0%, #10b981 100%);
            color: white;
            text-decoration: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        }

        .partner-link:hover {
            background: linear-gradient(135deg, #047857 0%, #059669 100%);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
            color: white;
        }

        .partner-link i {
            transition: transform 0.3s ease;
        }

        .partner-link:hover i.bi-arrow-right {
            transform: translateX(4px);
        }

        .icon-lock {
            font-size: 3rem;
            color: #667eea;
            margin-bottom: 20px;
        }

        .icon-lock i {
            font-size: inherit;
        }

        .input-group-text i {
            color: #667eea;
            font-size: 1.1rem;
        }
        
        .alert-custom {
            background-color: #f8d7da;
            border-color: #f5c2c7;
            color: #842029;
            border-radius: 10px;
            padding: 12px 16px;
            margin-bottom: 20px;
            animation: shake 0.5s;
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
            20%, 40%, 60%, 80% { transform: translateX(5px); }
        }
        
        .input-group-text {
            background-color: #f8f9fa;
            border-right: none;
        }
        
        .form-control {
            border-left: none;
        }
        
        .remember-me {
            font-size: 0.9rem;
            color: #6c757d;
        }
        
        .security-notice {
            background-color: #f8f9fa;
            border-radius: 10px;
            padding: 15px;
            margin-top: 20px;
            font-size: 0.85rem;
            color: #6c757d;
            text-align: center;
        }
        
        .security-notice i {
            color: #28a745;
            margin-right: 5px;
        }

        body.dark-mode {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        }
        
        .client-signup-header h2 {
            color: #28a745;
            font-size: 1.8rem;
            font-weight: bold;
            margin-bottom: 10px;
        }
        
        .client-signup-header p {
            color: #6c757d;
            font-size: 0.9rem;
            margin-bottom: 20px;
        }
        
        .btn-signup {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
            border: none;
            color: white;
            padding: 12px;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .btn-signup:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
            color: white;
        }
        
        .features-list {
            list-style: none;
            padding: 0;
            margin: 20px 0;
        }
        
        .features-list li {
            padding: 8px 0;
            color: #6c757d;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
        }
        
        .features-list li i {
            color: #28a745;
            margin-right: 10px;
            font-size: 1.1rem;
        }

        body.dark-mode .login-container, 
        body.dark-mode .client-signup-container {
            background: #1a1a1a;
            color: white;
        }
        
        body.dark-mode .login-header h1 {
            color: #9ca3af;
        }
        
        body.dark-mode .form-control {
            background-color: #2d2d2d;
            border-color: #444;
            color: white;
        }
        
        body.dark-mode .input-group-text {
            background-color: #2d2d2d;
            border-color: #444;
            color: #9ca3af;
        }
        
        body.dark-mode .security-notice {
            background-color: #2d2d2d;
            color: #9ca3af;
        }

        /* Client signup styles */
        .client-signup-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .client-signup-header h2 {
            color: #667eea;
            font-size: 1.8rem;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .client-signup-header p {
            color: #6c757d;
            font-size: 0.9rem;
        }

        .signup-icon-wrapper {
            display: inline-block;
            margin-bottom: 20px;
            position: relative;
        }

        .signup-icon-badge {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
            animation: pulse-gold 2s infinite;
            position: relative;
        }

        .signup-icon-badge::before {
            content: '';
            position: absolute;
            width: 90px;
            height: 90px;
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
            border-radius: 50%;
            z-index: -1;
            animation: pulse-ring 2s infinite;
        }

        .signup-icon-badge i {
            font-size: 2.5rem;
            color: white;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }

        @keyframes pulse-gold {
            0% {
                transform: scale(1);
                box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
            }
            50% {
                transform: scale(1.05);
                box-shadow: 0 10px 30px rgba(255, 215, 0, 0.6);
            }
            100% {
                transform: scale(1);
                box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
            }
        }

        @keyframes pulse-ring {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            50% {
                transform: scale(1.1);
                opacity: 0.7;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .features-list {
            list-style: none;
            padding: 0;
            margin: 30px 0;
        }

        .features-list li {
            padding: 12px 0;
            border-bottom: 1px solid #e9ecef;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s ease;
        }

        .features-list li:last-child {
            border-bottom: none;
        }

        .features-list li:hover {
            padding-left: 10px;
            background: linear-gradient(to right, rgba(102, 126, 234, 0.05), transparent);
        }

        .features-list li i {
            color: #28a745;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        .btn-signup {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
            border: none;
            color: white;
            padding: 12px;
            font-weight: 600;
            transition: all 0.3s;
        }

        .btn-signup:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
            color: white;
        }

        .client-signup-container a {
            color: #667eea;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .client-signup-container a:hover {
            color: #764ba2;
            text-decoration: underline !important;
        }

        /* Dark mode for client signup */
        body.dark-mode .client-signup-header h2 {
            color: #9ca3af;
        }

        body.dark-mode .signup-icon-badge {
            background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
            box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
        }

        body.dark-mode .features-list li {
            border-color: #444;
        }

        body.dark-mode .features-list li:hover {
            background: linear-gradient(to right, rgba(102, 126, 234, 0.1), transparent);
        }

        /* Responsive adjustments */
        @media (max-width: 991px) {
            .auth-container {
                padding: 10px;
            }

            .login-container, .client-signup-container {
                height: auto;
                min-height: 500px;
                padding: 30px;
                margin-bottom: 20px;
            }

            .login-header h1, .client-signup-header h2 {
                font-size: 1.5rem;
            }

            .icon-lock {
                font-size: 2.5rem;
            }
        }

        @media (max-width: 576px) {
            .login-container, .client-signup-container {
                height: auto;
                min-height: auto;
                padding: 25px;
                border-radius: 15px;
            }

            .login-header h1, .client-signup-header h2 {
                font-size: 1.3rem;
            }

            .features-list li {
                padding: 10px 0;
                font-size: 0.9rem;
            }

            .btn-login, .btn-signup {
                padding: 10px;
                font-size: 0.95rem;
            }

            .signup-icon-badge {
                width: 60px;
                height: 60px;
            }

            .signup-icon-badge i {
                font-size: 2rem;
            }
        }

/* ===========================================
   NAV
   =========================================== */
.navbar {
        box-shadow: 0 2px 4px rgba(0,0,0,.1);
    }
    
    .navbar-brand {
        font-weight: bold;
        font-size: 1.25rem;
    }
    
    .nav-link {
        transition: all 0.3s;
        padding: 0.5rem 1rem !important;
    }
    
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 0.375rem;
    }
    
    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 0.375rem;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: 0 4px 6px rgba(0,0,0,.1);
        border-radius: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem;
        transition: all 0.2s;
    }
    
    .dropdown-item:hover {
        background-color: #f8f9fa;
        padding-left: 1.25rem;
    }
    
    .dropdown-item i {
        margin-right: 0.5rem;
        width: 20px;
        display: inline-block;
        text-align: center;
    }
    
    body.dark-mode .dropdown-menu {
        background-color: #2d2d2d;
        color: white;
    }
    
    body.dark-mode .dropdown-item {
        color: #e0e0e0;
    }
    
    body.dark-mode .dropdown-item:hover {
        background-color: #3d3d3d;
        color: white;
    }
    
    body.dark-mode .dropdown-divider {
        border-color: #444;
    }
    
    #darkModeToggle {
        border: none;
        background: rgba(255, 255, 255, 0.1);
        color: #ffd700;
        font-size: 1.2rem;
        padding: 0.4rem 0.8rem;
        border-radius: 50px;
        transition: all 0.3s ease;
        margin-right: 10px;
    }
    
    #darkModeToggle:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(20deg);
    }
    
    #darkModeToggle i {
        transition: all 0.3s ease;
    }
    
    body.dark-mode #darkModeToggle {
        background: rgba(255, 255, 255, 0.05);
        color: #fff59d;
    }
    
    body.dark-mode #darkModeToggle:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    @media (max-width: 768px) {
        .navbar-nav {
            padding: 1rem 0;
        }
        
        .dropdown-menu {
            position: static;
            float: none;
            width: auto;
            margin-top: 0;
            background-color: transparent;
            border: 0;
            box-shadow: none;
        }
        
        body.dark-mode .dropdown-menu {
            background-color: transparent;
        }
        
        .dropdown-menu .dropdown-item {
            color: rgba(255, 255, 255, .75);
            padding-left: 2rem;
        }
        
        .dropdown-menu .dropdown-item:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
    }

/* ===========================================
   PROMPTS
   =========================================== */
/* Animations et transitions */
    .btn {
        transition: all 0.3s ease;
    }
    
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    /* Bouton Audit amélioré */
    .btn-warning.btn-lg {
        background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
        border: none;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    
    .btn-warning.btn-lg:hover {
        background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    }
    
    /* Badge animé */
    .badge.rounded-pill {
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.1);
        }
        100% {
            transform: scale(1);
        }
    }
    
    /* Dropdown amélioré */
    .dropdown-menu {
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        padding: 0.5rem 0;
    }
    
    .dropdown-item {
        padding: 0.7rem 1.5rem;
        transition: all 0.2s ease;
    }
    
    .dropdown-item:hover {
        background-color: rgba(13, 110, 253, 0.1);
        padding-left: 2rem;
    }
    
    .dropdown-item i {
        margin-right: 0.5rem;
        font-size: 1.1rem;
    }
    
    /* Statistiques cards effet */
    .card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }
    
    /* Badge vertical tab amélioré */
    .badge[style*="writing-mode"] {
        transition: all 0.3s ease;
    }
    
    .prompt-card:hover .badge[style*="writing-mode"] {
        transform: rotate(180deg) translateX(3px);
        box-shadow: 3px 3px 8px rgba(0,0,0,0.3);
    }
    
    /* Badge catégorie en onglet */
    .category-tab {
        position: absolute;
        top: -12px;
        left: 20px;
        z-index: 10;
        padding: 6px 16px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-radius: 6px 6px 0 0;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
        transition: all 0.3s ease;
    }
    
    .prompt-card:hover .category-tab {
        transform: translateY(-3px);
        box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    }
    
    /* Header responsive */
    @media (max-width: 768px) {
        .d-flex.gap-2 {
            justify-content: center;
        }
    }
    
    /* Ajustement pour l'espace des onglets */
    .row > [class*="col-"] {
        padding-top: 12px;
    }
    
    /* Couleurs personnalisées pour les catégories */
    .bg-purple {
        background-color: #6f42c1 !important;
    }
    
    .text-purple {
        color: #6f42c1 !important;
    }
    
    .badge.bg-purple {
        background-color: #6f42c1 !important;
        color: white;
    }
    
    .alert-purple {
        background-color: rgba(111, 66, 193, 0.1);
        border-color: #6f42c1;
        color: #6f42c1;
    }

/* ===========================================
   PROMPTS LIST
   =========================================== */
/* Animations au survol des cartes */
    .prompt-card {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid rgba(0,0,0,0.125);
    }
    
    .prompt-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-color: #0d6efd;
    }
    
    /* Indicateur visuel pour prompts personnalisés */
    .custom-prompt {
        position: relative;
        border-left: 4px solid #198754 !important;
        background: linear-gradient(to right, rgba(25, 135, 84, 0.05), transparent);
    }
    
    .custom-prompt::before {
        content: '✓ Personnalisé';
        position: absolute;
        top: 10px;
        right: 10px;
        background: #198754;
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    /* Style pour les badges de poids */
    .poids-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 6px 12px !important;
        font-size: 0.9rem !important;
        transition: all 0.3s ease;
    }
    
    .poids-badge:hover {
        transform: scale(1.05);
    }
    
    .poids-badge .stars {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }
    
    /* Mode compact */
    @media (max-width: 768px) {
        .prompt-card {
            margin-bottom: 10px;
        }
        
        .custom-prompt::before {
            font-size: 9px;
            padding: 1px 5px;
        }
    }
    
    /* Amélioration de la lisibilité */
    .badge.bg-success {
        background: linear-gradient(135deg, #28a745, #20c997) !important;
    }
    
    .badge.bg-warning {
        background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    }
    
    .badge.bg-danger {
        background: linear-gradient(135deg, #dc3545, #e74c3c) !important;
    }

/* ===========================================
   USER PROFILE
   =========================================== */
.profile-container {
            max-width: 900px;
            margin: 50px auto;
        }
        
        .profile-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 40px;
            border-radius: 20px 20px 0 0;
            position: relative;
        }
        
        .profile-content {
            background: white;
            padding: 40px;
            border-radius: 0 0 20px 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }
        
        .avatar-container {
            position: relative;
            display: inline-block;
        }
        
        .avatar {
            width: 120px;
            height: 120px;
            border-radius: 60px;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            color: #667eea;
            border: 4px solid white;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }
        
        .edit-avatar-btn {
            position: absolute;
            bottom: 0;
            right: 0;
            background: white;
            border: 2px solid #667eea;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .edit-avatar-btn:hover {
            background: #667eea;
            color: white;
        }
        
        .nav-tabs {
            border-bottom: 2px solid #e0e0e0;
            margin-bottom: 30px;
        }
        
        .nav-tabs .nav-link {
            color: #666;
            border: none;
            padding: 15px 25px;
            font-weight: 500;
            transition: all 0.3s;
        }
        
        .nav-tabs .nav-link.active {
            color: #667eea;
            background: none;
            border-bottom: 3px solid #667eea;
        }
        
        .nav-tabs .nav-link:hover {
            color: #667eea;
        }
        
        .form-floating label {
            color: #999;
        }
        
        .form-control:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        }
        
        .form-control[readonly] {
            background-color: #f8f9fa;
        }
        
        .btn-save {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 40px;
            border-radius: 25px;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .btn-save:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
            color: white;
        }
        
        .btn-edit {
            background: transparent;
            color: #667eea;
            border: 2px solid #667eea;
            padding: 8px 20px;
            border-radius: 20px;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .btn-edit:hover {
            background: #667eea;
            color: white;
        }
        
        .info-badge {
            display: inline-block;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            margin: 5px;
        }
        
        .badge-role-admin {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .badge-role-user {
            background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
            color: #333;
        }
        
        .stats-box {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 15px;
            text-align: center;
            margin-bottom: 20px;
        }
        
        .stats-box h3 {
            color: #667eea;
            margin: 0;
            font-size: 2rem;
        }
        
        .stats-box p {
            color: #999;
            margin: 5px 0 0 0;
            font-size: 0.9rem;
        }
        
        .form-switch {
            padding-left: 2.5rem;
        }
        
        .form-check-input:checked {
            background-color: #667eea;
            border-color: #667eea;
        }
        
        body.dark-mode .profile-content {
            background: #1a1a1a;
            color: white;
        }
        
        body.dark-mode .form-control {
            background-color: #2d2d2d;
            border-color: #444;
            color: white;
        }
        
        body.dark-mode .form-control[readonly] {
            background-color: #222;
        }
        
        body.dark-mode .stats-box {
            background: #2d2d2d;
        }
        
        body.dark-mode .nav-tabs {
            border-color: #444;
        }
        
        body.dark-mode .nav-tabs .nav-link {
            color: #aaa;
        }
        
        body.dark-mode .nav-tabs .nav-link.active {
            color: white;
        }
        
        body.dark-mode .form-check-label {
            color: #e0e0e0;
        }
        
        body.dark-mode .text-muted {
            color: #999 !important;
        }
        
        body.dark-mode .alert-info {
            background-color: #1e3a5f;
            border-color: #2c5282;
            color: #90cdf4;
        }
        
        body.dark-mode .card {
            background-color: #2d2d2d;
            border-color: #444;
        }
        
        body.dark-mode .bg-light {
            background-color: #3d3d3d !important;
        }
        
        body.dark-mode .card-title {
            color: white;
        }
        
        body.dark-mode .form-check-label strong {
            color: white;
        }
        
        /* Amélioration du design des notifications */
        .notification-card {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border: none;
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
            transition: all 0.3s;
        }
        
        .notification-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.12);
        }
        
        .notification-switch {
            background: white;
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 15px;
            transition: all 0.3s;
            border: 2px solid transparent;
        }
        
        .notification-switch:hover {
            border-color: #667eea;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
        }
        
        .notification-switch .form-check-input {
            width: 50px;
            height: 25px;
            margin-top: 0;
        }
        
        .notification-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
            margin-right: 15px;
        }
        
        body.dark-mode .notification-card {
            background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
        }
        
        body.dark-mode .notification-switch {
            background: #2d2d2d;
        }
        
        body.dark-mode .notification-switch:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        }
        
        .alert-float {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            min-width: 300px;
            animation: slideIn 0.3s ease-out;
        }
        
        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

/* ===========================================
   API KEYS
   =========================================== */
.api-key-card {
        border-left: 4px solid #0d6efd;
        transition: all 0.3s ease;
    }
    
    .api-key-card.active {
        border-left-color: #28a745;
        background: rgba(40, 167, 69, 0.05);
    }
    
    .api-key-card.inactive {
        border-left-color: #dc3545;
        background: rgba(220, 53, 69, 0.05);
    }
    
    .masked-key {
        font-family: monospace;
        background: #f8f9fa;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 14px;
    }
    
    .log-entry {
        border-bottom: 1px solid #dee2e6;
        padding: 10px 0;
    }
    
    .log-entry:last-child {
        border-bottom: none;
    }
    
    .status-badge {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 600;
    }
    
    .status-ok {
        background: #d4edda;
        color: #155724;
    }
    
    .status-error {
        background: #f8d7da;
        color: #721c24;
    }

/* ===========================================
   CREDITS MANAGEMENT
   =========================================== */
.user-card {
        border-left: 4px solid #0d6efd;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .user-card:hover {
        transform: translateX(5px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .user-card.premium {
        border-left-color: #ffc107;
    }
    
    .user-card.standard {
        border-left-color: #17a2b8;
    }
    
    .user-card.free {
        border-left-color: #6c757d;
    }
    
    .credits-bar {
        height: 30px;
        background: #f8f9fa;
        border-radius: 15px;
        position: relative;
        overflow: hidden;
    }
    
    .credits-fill {
        height: 100%;
        background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
        border-radius: 15px;
        transition: width 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
    }
    
    .credits-low {
        background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
    }
    
    .credits-critical {
        background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
    }
    
    .stat-card {
        text-align: center;
        padding: 20px;
        border-radius: 10px;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .stat-number {
        font-size: 2.5rem;
        font-weight: bold;
        color: #0d6efd;
    }

/* ===========================================
   DASHBOARD
   =========================================== */
.stat-card {
            border-radius: 15px;
            transition: transform 0.2s;
        }
        .stat-card:hover {
            transform: translateY(-5px);
        }
        .stat-icon {
            font-size: 2.5rem;
            opacity: 0.8;
        }
        .chart-container {
            position: relative;
            height: 300px;
        }
        .activity-item {
            border-left: 3px solid #007bff;
            padding-left: 15px;
            margin-bottom: 15px;
        }
        .activity-time {
            font-size: 0.85rem;
            color: #6c757d;
        }

/* ===========================================
   UNIFIED PROMPT MODAL V2
   =========================================== */
.variable-item {
        padding: 8px 12px;
        margin: 4px 0;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        cursor: move;
        transition: all 0.2s;
        user-select: none;
    }

    .variable-item:hover {
        background: #e9ecef;
        border-color: #adb5bd;
        transform: translateX(5px);
    }

    .variable-item.dragging {
        opacity: 0.5;
        background: #007bff;
        color: white;
    }

    .variable-category {
        margin-bottom: 20px;
    }

    .variable-category-header {
        font-weight: bold;
        color: #495057;
        margin-bottom: 10px;
        padding: 5px 10px;
        background: #e9ecef;
        border-radius: 4px;
        cursor: pointer;
    }

    .variable-category-header:hover {
        background: #dee2e6;
    }

    .variable-category-header i {
        transition: transform 0.2s;
    }
    
    /* Styles pour les sous-catégories (objets comme concurrents) */
    .variable-subcategory {
        margin-bottom: 15px;
        border-left: 3px solid #007bff;
        padding-left: 10px;
    }
    
    .variable-subcategory-header {
        font-weight: 600;
        color: #007bff;
        margin-bottom: 8px;
        padding: 4px 8px;
        background: #e7f3ff;
        border-radius: 4px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .variable-subcategory-header:hover {
        background: #cce5ff;
    }
    
    .variable-subcategory-header i {
        transition: transform 0.2s;
        font-size: 0.9em;
    }
    
    .variable-subcategory.collapsed .variable-subitems {
        display: none;
    }
    
    .variable-subitems {
        transition: all 0.3s ease;
    }
    
    .variable-subitems .variable-item {
        font-size: 0.95em;
        background: #f8f9fa;
    }
    
    .variable-subitems .variable-item:hover {
        background: #e2e6ea;
    }

    .variable-category.collapsed .variable-category-header i {
        transform: rotate(-90deg);
    }

    .variable-category.collapsed .variable-items {
        display: none;
    }

    #promptContent.drag-over {
        border: 2px dashed #007bff;
        background: #f0f8ff;
    }

    .variable-badge {
        display: inline-block;
        padding: 2px 6px;
        background: #007bff;
        color: white;
        border-radius: 3px;
        font-size: 0.75rem;
        margin-left: 5px;
    }

    body.dark-mode .variable-item {
        background: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }

    body.dark-mode .variable-item:hover {
        background: #3d3d3d;
        border-color: #666;
    }

    body.dark-mode .variable-category-header {
        background: #2d2d2d;
        color: #e0e0e0;
    }

    body.dark-mode .card {
        background: #1e1e1e;
        border-color: #444;
    }

    body.dark-mode .card-header {
        background: #2d2d2d;
        border-color: #444;
    }

/* ===========================================
   CREDITS
   =========================================== */
.avatar-sm {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    transition: transform 0.2s ease-in-out;
}

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

.progress {
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* ===========================================
   BTN-OUTLINE-PRIMARY LIGHT MODE FIX
   =========================================== */
.btn-outline-primary {
    color: #ffffff !important;
    border-color: #6f42c1 !important;
    border-width: 2px !important;
    font-weight: 700 !important;
    background-color: #6f42c1 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 3px 6px rgba(111, 66, 193, 0.3) !important;
}

.btn-outline-primary i {
    color: #ffffff !important;
}

.btn-outline-primary:hover {
    color: #ffffff !important;
    background-color: #5a32a3 !important;
    border-color: #5a32a3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.4);
}

.btn-outline-primary:focus,
.btn-outline-primary.focus {
    color: #ffffff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.5);
}

.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active {
    color: #ffffff !important;
    background-color: #0a58ca !important;
    border-color: #0a53be !important;
}

/* ===========================================
   ALL OUTLINE BUTTONS LIGHT MODE FIX
   =========================================== */
.btn-outline-warning {
    color: #ffffff !important;
    border-color: #ffc107 !important;
    border-width: 2px !important;
    font-weight: 700 !important;
    background-color: #ffc107 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.btn-outline-warning:hover {
    color: #ffffff !important;
    background-color: #ffb300 !important;
    border-color: #ffb300 !important;
    transform: translateY(-1px);
}

.btn-outline-warning i {
    color: #ffffff !important;
}

.btn-outline-danger {
    color: #ffffff !important;
    border-color: #dc3545 !important;
    border-width: 2px !important;
    font-weight: 700 !important;
    background-color: #dc3545 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.btn-outline-danger:hover {
    color: #ffffff !important;
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px);
}

.btn-outline-danger i {
    color: #ffffff !important;
}

/* ===========================================
   SUCCESS BUTTON FIX FOR TOGGLE
   =========================================== */
.btn-success i,
.btn.btn-success i {
    color: #ffffff !important;
}

/* Force all button icons to be white in light mode */
.btn i {
    color: inherit !important;
}

.btn-success i,
.btn-warning i, 
.btn-danger i,
.btn-info i,
.btn-primary i {
    color: #ffffff !important;
}

/* ===========================================
   MODAL ACCESSIBILITY FIX
   =========================================== */
.modal[aria-hidden="true"] {
    pointer-events: none;
}

.modal[aria-hidden="true"] * {
    pointer-events: none !important;
}

.modal-body {
    background: linear-gradient(135deg, #99a9ee 0%, #c69dee 100%);
    color: #0a53be !important;
}