.analyze-calls-table tbody tr td {
    vertical-align: top;
}

.analyze-calls-table tbody td:first-child {
    white-space: nowrap;
    font-weight: 600;
    color: #3a5dba;
}

.timeline-time-cell {
    text-align: center;
    vertical-align: middle;
}

.timeline-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 4px;
}

.timeline-time-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2f4bb7;
}

.timeline-date {
    order: -1;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
}

.log-line {
    background-color: #ffffff;
    border: 1px solid #dee3f7;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 6px rgba(58, 93, 186, 0.08);
}

.log-line:last-child {
    margin-bottom: 0;
}

.log-line + .log-line {
    margin-top: 6px;
}

/* --- Transcript : horodatage + lecture de l'enregistrement --- */
.transcript-entry {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.transcript-entry-active {
    background-color: #eef3ff;
    border-color: #3a5dba !important;
    box-shadow: 0 2px 8px rgba(58, 93, 186, 0.15);
}

.transcript-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    line-height: 1.2;
    color: #6c757d;
}

.transcript-ts {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.transcript-offset {
    font-family: 'Courier New', monospace;
    background-color: #eef1f8;
    border-radius: 10px;
    padding: 1px 7px;
    color: #3a5dba;
}

.transcript-play-btn {
    --bs-btn-padding-y: 0;
    --bs-btn-padding-x: 6px;
    --bs-btn-font-size: 0.75rem;
    line-height: 1.4;
}

/* `.btn` force display:inline-block et l'emporterait sur l'attribut hidden. */
.transcript-play-btn[hidden] {
    display: none !important;
}

.transcript-audio-player {
    height: 38px;
}
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(180deg, #1e3a5f 0%, #2d4a6f 100%);
    color: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, width 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) rgba(0, 0, 0, 0.15);
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-title-text,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .sidebar-nav-link span,
.sidebar.collapsed .sidebar-user-details,
.sidebar.collapsed .sidebar-logout-btn span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.sidebar-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.sidebar-title:hover {
    opacity: 0.8;
}

.sidebar-title-text {
    transition: opacity 0.3s ease;
}

.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle-btn i {
    transition: transform 0.3s ease;
}

.sidebar-content {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    transition: opacity 0.3s ease;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin: 0.25rem 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav-link i {
    font-size: 1.2rem;
    width: 24px;
    flex-shrink: 0;
    margin-right: 0.75rem;
    text-align: center;
}

.sidebar-nav-link span {
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sidebar-nav-link i.sidebar-nav-external {
    font-size: 0.75rem;
    width: auto;
    margin-right: 0;
    margin-left: auto;
    padding-left: 0.5rem;
    opacity: 0.5;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-nav-link i.sidebar-nav-external {
    display: none;
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left-color: rgba(255, 255, 255, 0.3);
}

.sidebar-nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left-color: #4a9eff;
    font-weight: 500;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
}

.sidebar-user-info i {
    font-size: 2rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
    transition: opacity 0.3s ease;
}

.sidebar-username {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(220, 53, 69, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.sidebar-logout-btn i {
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.sidebar-logout-btn span {
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sidebar-logout-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
    color: #fff;
}

/* Main Content Wrapper */
.main-content-wrapper {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    background-color: #f8f9fa;
}

.main-content-wrapper.sidebar-collapsed {
    margin-left: 70px;
}

/* Top Bar */
.top-bar {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle-btn-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #495057;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.sidebar-toggle-btn-mobile:hover {
    background: #f8f9fa;
}

.page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    flex: 1;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Page Content */
.page-content {
    padding: 2rem;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 280px;
    }

    .sidebar.collapsed .sidebar-title-text,
    .sidebar.collapsed .sidebar-section-title,
    .sidebar.collapsed .sidebar-nav-link span,
    .sidebar.collapsed .sidebar-user-details,
    .sidebar.collapsed .sidebar-logout-btn span {
        opacity: 1;
        width: auto;
        overflow: visible;
    }

    .main-content-wrapper {
        margin-left: 0;
    }

    .main-content-wrapper.sidebar-collapsed {
        margin-left: 0;
    }

    .sidebar-toggle-btn-mobile {
        display: block;
    }

    .top-bar {
        padding: 1rem;
    }

    .page-content {
        padding: 1rem;
    }

    .top-bar-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .toggle-stats,
    .refresh-counter {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 10px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.25);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.25));
    border-radius: 999px;
    border: 2px solid rgba(30, 58, 95, 0.65);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.45));
    border-color: rgba(30, 58, 95, 0.9);
}

.card {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;  /* Assure que les cartes ont la même hauteur */
}

.card-header {
    background-color: #4a6fdc;
    color: white;
    font-weight: bold;
    padding: 15px 20px;
}

.table {
    margin-bottom: 0;
}

.btn-primary {
    background-color: #4a6fdc;
    border-color: #4a6fdc;
}

.btn-primary:hover {
    background-color: #3a5dba;
    border-color: #3a5dba;
}

.badge {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 500;
    color: #fff;
    background-color: #4a6fdc;
    transition: background-color 0.2s;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
}

.badge-danger {
    background-color: #dc3545;
}

.datepicker {
    background-color: #fff;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

#refresh-data-btn {
    height: 38px;
}

/* Styles pour les infobulles SQL */
.sql-info {
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.8em;
    vertical-align: super;
}

/* Style pour le modal SQL */
pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    max-height: 300px;
    overflow: auto;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Correction de la zone blanche */
#exit-code-chart {
    width: 100%;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* Style des tooltips */
.tooltip {
    position: absolute;
    z-index: 1070;
    display: block;
    margin: 0;
    font-style: normal;
    font-weight: normal;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}

/* Style pour l'icône du graphique de distribution */
.bi-bar-chart-fill {
    font-size: 0.85rem;
    vertical-align: middle;
    margin-left: 5px;
    transition: color 0.2s;
}

.bi-bar-chart-fill:hover {
    color: #0d6efd !important;
}

/* Style pour l'infobulle de distribution */
.tooltip-inner ul {
    padding-left: 1rem;
    text-align: left;
}

.tooltip-inner li {
    margin-bottom: 3px;
}

/* Style amélioré pour l'affichage des transcriptions */
.conversation-transcript {
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.conversation-transcript p {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
}

.conversation-transcript .AGENT {
    background-color: #f0f4ff;
}

.conversation-transcript .USER {
    background-color: #f9f9f9;
}

.conversation-transcript strong {
    display: inline-block;
    min-width: 60px;
    font-weight: bold;
}

.conversation-transcript strong:contains('AGENT') {
    color: #4a6fdc;
}

.conversation-transcript strong:contains('USER') {
    color: #4aac7f;
}

.toggle-stats{
    background: linear-gradient(90deg, #5f9ea0 60%, #6bbdc0 100%);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(80,110,180,0.10);
}

.refresh-counter {
    background: linear-gradient(90deg, #4a6fdc 60%, #6a82fb 100%);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(80,110,180,0.10);
}

/* État du flux temps réel dans .refresh-counter (displayLiveStatus) */
.live-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.live-status-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.live-status[data-state="live"] .live-status-dot {
    background: #2fb344;
    animation: live-status-pulse 2s ease-in-out infinite;
}

.live-status[data-state="error"] .live-status-dot {
    background: #dc3545;
}

.live-status[data-state="paused"] .live-status-dot {
    background: #adb5bd;
}

@keyframes live-status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* Bouton "Refresh config" du header (opt-in via displayRefreshConfigBtn) */
.refresh-config-launch {
    background: linear-gradient(90deg, #e08e3c 60%, #f0a95a 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(80,110,180,0.10);
    transition: filter 0.15s ease, transform 0.15s ease;
}
.refresh-config-launch:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    color: white;
}
.refresh-config-launch:active {
    transform: translateY(0);
}

/* Modal refresh config : compteur vide + cartes de groupe */
.rc-counter-badge.rc-counter-empty {
    background-color: #f8d7da !important;
    color: #842029 !important;
    border-color: #f5c2c7 !important;
}

/* Barre des switches d'action (config / gpus) du modal refresh */
.rc-actions-bar {
    background-color: #f1f3f5;
    border: 1px solid #e0e4ea;
}
.rc-actions-bar .form-check-label {
    cursor: pointer;
    user-select: none;
}

#countdown {
    font-weight: bold;
    min-width: 2rem;
    text-align: center;
}

/* Style pour les boutons d'action dans la table */
.action-buttons {
    white-space: nowrap;
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

.action-buttons .btn i {
    margin-right: 3px;
}

/* Style pour le lecteur audio */
audio {
    width: 100%;
    margin: 10px 0;
}

/* Styles spécifiques pour les différents types d'appels */
#ineligible-table .btn-primary {
    background-color: #28a745;
    border-color: #28a745;
}

#ineligible-table .btn-primary:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Couleurs pour différencier les sections */
.card-header.ineligible {
    background-color: #ffc107;
}

/* Mise en évidence des appels longs (plus de 30 secondes) */
.long-duration-call {
    background-color: rgba(74, 111, 220, 0.2) !important;
}

.long-duration-call:hover {
    background-color: rgba(74, 111, 220, 0.3) !important;
}

/* Style pour le conteneur de logs */
.log-container {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin: 0;
    border: 1px solid #ddd;
    color: #333;
}

/* Mettre en surbrillance les lignes d'erreur */
.log-container .error {
    color: #dc3545;
    font-weight: bold;
}

/* Mettre en surbrillance les lignes d'avertissement */
.log-container .warning {
    color: #ffc107;
    font-weight: bold;
}

/* Mettre en surbrillance les lignes de succès */
.log-container .success {
    color: #28a745;
    font-weight: bold;
}

/* Styles pour les onglets */
.nav-tabs .nav-link {
    color: #4a6fdc;
    background-color: #f8f9fa;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 700;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    isolation: isolate;
}

/* Style pour l'onglet Logs */
#logs-tab-pane .card {
    margin-bottom: 1.5rem;
}

#logs-tab-pane .log-container {
    max-height: 300px;
}

/* Style pour la dernière ligne de log dans l'onglet principal */
#latest-bot-log {
    font-family: 'Courier New', monospace;
    font-weight: normal;
    white-space: pre-wrap; /* Permet les retours à la ligne et préserve les espaces */
    overflow: visible; /* Ne cache pas le texte qui déborde */
    display: block; /* Affiche en bloc pour occuper toute la largeur */
    width: 100%; /* Utilise toute la largeur disponible */
    padding: 5px 0; /* Ajoute un peu d'espace au-dessus et en-dessous */
    line-height: 1.4; /* Améliore la lisibilité des lignes */
}

/* Style pour la dernière ligne de log AMD dans l'onglet principal */
#latest-amd-bot-log {
    font-family: 'Courier New', monospace;
    font-weight: normal;
    white-space: pre-wrap; /* Permet les retours à la ligne et préserve les espaces */
    overflow: visible; /* Ne cache pas le texte qui déborde */
    display: block; /* Affiche en bloc pour occuper toute la largeur */
    width: 100%; /* Utilise toute la largeur disponible */
    padding: 5px 0; /* Ajoute un peu d'espace au-dessus et en-dessous */
    line-height: 1.4; /* Améliore la lisibilité des lignes */
}

/* Style pour l'alerte contenant le log */
.alert-info.mb-4 {
    overflow-wrap: break-word; /* Assure que les mots longs sont coupés si nécessaire */
    word-break: break-word; /* Pour les navigateurs qui supportent cette propriété */
}

/* Style pour l'alerte success contenant le log AMD */
.alert-success.mb-4 {
    overflow-wrap: break-word; /* Assure que les mots longs sont coupés si nécessaire */
    word-break: break-word; /* Pour les navigateurs qui supportent cette propriété */
}

/* Styles pour les graphiques de monitoring */
.monitor-container {
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    text-transform: capitalize;
}

/* Style pour le sélecteur de période */
#monitor-period-selector {
    width: auto;
    display: inline-block;
    margin-right: 10px;
}

/* Ajuster la taille des tooltips de Chart.js */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 3px;
    padding: 6px;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

/* Style pour le conteneur du graphique global */
.global-chart-container {
    position: relative;
    height: 400px;  /* Plus grand que les graphiques individuels */
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.global-chart-container .chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

/* Style pour l'indicateur de chargement flottant */
.floating-loading-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #333;
    animation: fadeIn 0.3s ease-in-out;
}

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

.floating-loading-indicator .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.lead_sent_to_sheet{
    background-color: #3ee966;
}

/* Dans style.css */
.log-item {
    /* margin-bottom: 8px;
    padding-bottom: 8px; */
    border-bottom: 1px solid #eee;
    padding:2px;
}

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

.log-card {
    font-size: small;
}

.log-card .card-header {
    padding: 2px;
    padding-left: 15px;
    padding-right: 15px;
}

.log-card .card-body {
    padding: 5px;
}

.log-type {
    font-weight: bold;
    color: #666;
    margin-right: 8px;
}

.log-content {
    /* text-overflow: ellipsis; */
    max-width: 100%;
}

.terminal {
    background-color: #1e1e1e;
    color: #f0f0f0;
    font-family: 'Courier New', monospace;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #333;
}

.terminal-header {
    background-color: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-content {
    padding: 10px;
    max-height: 350px;
    overflow-y: auto;
}

.terminal-success {
    color: #4caf50;
}

.terminal-error {
    color: #f44336;
}

.server-checkbox-container {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background-color: #f9f9f9;
}

.server-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.command-input {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
}

/* Styles pour l'historique des commandes */
.command-history {
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f8f9fa;
    padding: 10px;
    margin-bottom: 10px;
}

.command-history-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #666;
    margin-bottom: 8px;
}

.command-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.command-history-item {
    font-family: 'Courier New', monospace;
    padding: 6px 8px;
    margin-bottom: 5px;
    background-color: #eef2f7;
    border-radius: 4px;
    cursor: pointer;
    border-left: 3px solid #4a6fdc;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.command-history-item.useful {
    background-color: #d1e7dd;
    border-left: 3px solid #198754;
}

.command-history-item:hover {
    background-color: #e3e9f0;
}

.command-history-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.command-history-empty {
    font-style: italic;
    color: #888;
    text-align: center;
    padding: 5px;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
}

/* Mega Dropdown Styles */
.dropdown-menu-mega {
    width: 600px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.dropdown-menu-mega .row {
    margin: 0;
}

.dropdown-menu-mega .dropdown-header {
    font-weight: bold;
    color: #0d6efd;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.dropdown-menu-mega .dropdown-item {
    padding: 0.5rem 1rem;
    white-space: normal;
}

.dropdown-menu-mega .btn-group {
    margin-left: 1rem;
}

.dropdown-menu-mega .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Hover effect for dropdown items */
.dropdown-menu-mega .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Server status indicators */
.server-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.server-status.online {
    background-color: #28a745;
}

.server-status.offline {
    background-color: #dc3545;
}

.log-card {
    margin-bottom: 1rem;
}

.conversation-transcript {
    white-space: pre-wrap;
    font-family: monospace;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
}

/* Table styles */
.table-responsive {
    /* margin-bottom: 1rem; */
}

.table th {
    background-color: #f8f9fa;
}

/* Chart container */
#exit-code-chart {
    height: 300px;
    margin-bottom: 1rem;
}

/* Date picker styles */
.datepicker {
    background-color: #fff;
}

/* Button styles */
.btn-group .btn {
    margin: 0 2px;
}

/* Modal styles */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Loading spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* Badge styles */
.badge {
    font-weight: normal;
    padding: 0.35em 0.65em;
}

/* Tooltip styles */
.tooltip {
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dropdown-menu-mega {
        width: 100%;
    }
    
    .navbar-nav {
        margin-bottom: 1rem;
    }
    
    .btn-group {
        margin-left: 0.5rem;
    }
}

/* SSH Styles */
.server-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

.results-container {
    max-height: 500px;
    overflow-y: auto;
}

.server-result pre {
    margin-bottom: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal {
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: #2d2d2d;
    border-radius: 4px;
    color: #ffffff;
}

.terminal-success {
    color: #4CAF50;
}

.terminal-error {
    color: #f44336;
}

.command-history-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #666;
}

.command-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.command-history-item {
    padding: 8px 12px;
    margin-bottom: 5px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.command-history-item:hover {
    background-color: #e9ecef;
}

.command-history-item.useful {
    background-color: #e3f2fd;
    border-color: #90caf9;
}

.command-history-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-history-empty {
    color: #666;
    font-style: italic;
    padding: 8px 12px;
}

.server-checkbox {
    display: block;
    padding: 6px 6px;
    margin-bottom: 5px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.server-checkbox:hover {
    background-color: #e9ecef;
}

.server-checkbox input[type="checkbox"] {
    margin-right: 6px;
}

.global-type-checkbox {
    background-color: #aefaf6;
    border: 1px solid #babdc0;
}

/* En-têtes repliables des cartes de sélection de serveurs */
.collapsible-header {
    cursor: pointer;
    user-select: none;
}

.collapsible-header .collapse-caret {
    display: inline-block;
    transition: transform 0.2s ease;
}

.card.collapsed > .card-body {
    display: none;
}

.card.collapsed > .collapsible-header {
    border-bottom: 0;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.card.collapsed > .collapsible-header .collapse-caret {
    transform: rotate(-90deg);
}


@media (max-width: 1600px) {
  .row-cols-md-3 > * {
    flex: 0 0 auto;
    width: 50%;
  }
}
@media (max-width: 1100px) {
  .row-cols-md-3 > * {
    flex: 0 0 auto;
    width: 100%;
  }
}


.cursor-pointer {
    cursor: pointer;
}

.dropdown-menu .server-list-group {
    margin-bottom: 1rem;
}
.dropdown-menu .server-list-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
}
.dropdown-menu .server-list-type {
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.dropdown-menu .server-list-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0.5rem;
    margin-left: 2rem;
}
.dropdown-menu .form-check {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.logs-container pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}
