/* Import de la police */
@import url(https://fonts.googleapis.com/css?family=Nunito);

[data-theme="dark"],
[data-bs-theme="dark"] {
    /* Dark Theme - Teal */
    --primary: #1ABC9C;
    --primary-light: #48C9B0;
    --primary-dark: #16A085;
    --primary-50: #0B5345;
    --primary-100: #0E6655;
    --primary-200: #117864;
    --primary-300: #148F77;
    --primary-400: #1ABC9C;
    --secondary: #a78bfa;
    --success: #34d399;
    --warning: #fbbf24;
    --error: #f87171;
    --info: #60a5fa;
    --dark: #f1f5f9;
    --light: #0f172a;
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
    --border: #334155;
    --sidebar-bg: #1e293b;
    --sidebar-text: #f1f5f9;
    --sidebar-hover: #334155;
    --nav-bg: #1e293b;
    --nav-text: #f1f5f9;
    --main-bg: #0f172a;
    --card-bg: #1e293b;
    --shadow: rgba(0, 0, 0, 0.25);
    --shadow-lg: rgba(0, 0, 0, 0.4);
}

/* Application de la taille de police réduite */
.ticket-dashboard {
    background: var(--main-bg);
    min-height: 100vh;
    padding: 1.5rem;
    /* Réduit de 2rem */
    position: relative;
    font-size: 0.875rem;
    /* Taille de police réduite */
}

.ticket-dashboard::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* RÉDUCTION DES STATISTIQUES */
.stats-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Réduit de 240px */
    gap: 1rem;
    /* Réduit de 1.5rem */
    margin-bottom: 1.5rem;
    /* Réduit de 2rem */
    position: relative;
    z-index: 1;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 14px;
    /* Réduit de 16px */
    padding: 1.25rem;
    /* Réduit de 1.5rem */
    box-shadow: 0 2px 10px var(--shadow);
    /* Utilise la variable shadow */
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

.stat-card:hover {
    transform: translateY(-2px);
    /* Réduit de -3px */
    box-shadow: 0 4px 15px var(--shadow-lg);
    /* Utilise la variable shadow-lg */
    border-color: var(--primary-light);
}

.stat-icon {
    width: 48px;
    /* Réduit de 56px */
    height: 48px;
    /* Réduit de 56px */
    border-radius: 12px;
    /* Réduit de 14px */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    /* Réduit de 1rem */
    font-size: 1.2rem;
    /* Réduit de 1.4rem */
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 3px 10px rgba(6, 182, 212, 0.2);
    /* Réduit de 4px 12px */
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.03);
    /* Réduit de 1.05 */
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success), #10b981);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.2);
    /* Réduit de 4px 12px */
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning), #f59e0b);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.2);
    /* Réduit de 4px 12px */
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--info), #3b82f6);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.2);
    /* Réduit de 4px 12px */
}

.stat-number {
    font-size: 1.8rem;
    /* Réduit de 2.2rem */
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.25rem;
    /* Réduit de 0.5rem */
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gray-900);
    font-size: 0.8rem;
    /* Réduit de 0.9rem */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* RÉDUCTION DU TABLEAU */
.table-container {
    background: var(--card-bg);
    border-radius: 14px;
    /* Réduit de 16px */
    box-shadow: 0 2px 10px var(--shadow);
    /* Utilise la variable shadow */
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.table- {
    padding: 1.25rem 1.5rem;
    /* Réduit de 1.5rem 2rem */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    /* Réduit de 1rem */
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.table-title {
    font-size: 1.2rem;
    /* Réduit de 1.4rem */
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Réduit de 0.75rem */
}

.table-title::before {
    content: '';
    width: 3px;
    /* Réduit de 4px */
    height: 20px;
    /* Réduit de 24px */
    background: var(--gradient-primary);
    border-radius: 2px;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    /* Réduit de 0.75rem */
    align-items: center;
    flex-wrap: wrap;
}

.btn-modern {
    background: var(--primary, #5BC4BF);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--primary, #5BC4BF) 35%, transparent);
}

.btn-modern:hover {
    transform: translateY(-1px);
    background: var(--primary-dark, #4aa39e);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--primary, #5BC4BF) 45%, transparent);
}

.btn-modern.secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary-light);
    box-shadow: none;
}

.btn-modern.secondary:hover {
    background: var(--primary-50);
    transform: translateY(-1px);
    /* Réduit de -2px */
}

.search-box {
    position: relative;
    min-width: 220px;
    /* Réduit de 260px */
}

.search-box input {
    width: 100%;
    padding: 0.6rem 2.25rem 0.6rem 0.875rem;
    /* Réduit */
    border: 1px solid var(--border);
    border-radius: 8px;
    /* Réduit de 10px */
    font-size: 0.8rem;
    /* Réduit de 0.9rem */
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--dark);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.1);
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.search-icon {
    position: absolute;
    right: 0.875rem;
    /* Réduit de 1rem */
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.search-box:focus-within .search-icon {
    color: var(--primary);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    /* Réduit de 0.85rem */
    background: var(--card-bg);
}

.modern-table thead {
    background: var(--gradient-primary);
}

.modern-table thead th {
    padding: 0.875rem 0.875rem;
    /* Réduit de 1rem */
    color: white;
    font-weight: 600;
    text-align: left;
    font-size: 0.75rem;
    /* Réduit de 0.8rem */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.modern-table thead th::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    /* Réduit de 20px */
    background: rgba(255, 255, 255, 0.2);
}

.modern-table thead th:last-child::after {
    display: none;
}

/* .modern-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    background: var(--card-bg);
} */
.priorite_0 {
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    background: #ad14568e;
}

.priorite_1 {
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    background: rgba(255, 166, 0, 0.647);
}

.priorite_2 {
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    background: rgba(255, 255, 0, 0.788);
}

.priorite_3 {
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    background: rgba(0, 128, 0, 0.666);
}


.shadow_0 {
    box-shadow: 0 4px 10px #ad14148e,
        0 2px 10px #ad14568e !important;
    border-radius: 8px !important;
    /* arrondir légèrement */
}

.shadow_1 {
    box-shadow: 0 4px 10px rgba(255, 166, 0, 0.647),
        0 2px 10px rgba(255, 166, 0, 0.647) !important;
    border-radius: 8px !important;
    /* arrondir légèrement */
}

.shadow_2 {
    box-shadow: 0 4px 10px rgba(255, 255, 0, 0.788),
        0 2px 10px rgba(255, 255, 0, 0.788) !important;
    border-radius: 8px !important;
    /* arrondir légèrement */
}

.shadow_3 {
    box-shadow: 0 4px 10px rgba(89, 149, 89, 0.666),
        0 2px 10px rgba(91, 172, 91, 0.666) !important;
    border-radius: 8px !important;
    /* arrondir légèrement */
}

.modern-table tbody tr:hover {
    background: var(--sidebar-hover);
}


.modern-table tbody td {
    padding: 0.875rem 0.875rem;
    /* Réduit de 1rem */
    color: var(--dark);
    font-weight: 500;
    transition: all 0.2s ease;
}

.modern-table tbody tr:hover td {
    color: var(--primary-dark);
}

.status-badge {
    padding: 0.3rem 0.6rem;
    /* Réduit de 0.4rem 0.8rem */
    border-radius: 10px;
    /* Réduit de 12px */
    font-size: 0.65rem;
    /* Réduit de 0.7rem */
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    min-width: 70px;
    /* Réduit de 80px */
    transition: all 0.2s ease;
}

.status-open {
    background: rgba(227, 242, 253, 0.7);
    color: #1565c0;
    border: 1px solid rgba(21, 101, 192, 0.2);
}

.status-progress {
    background: rgba(255, 243, 224, 0.7);
    color: #ef6c00;
    border: 1px solid rgba(239, 108, 0, 0.2);
}

.status-resolved {
    background: rgba(232, 245, 233, 0.7);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.status-closed {
    background: rgba(252, 228, 236, 0.7);
    color: #ad1457;
    border: 1px solid rgba(173, 20, 87, 0.2);
}

.priority-high {
    color: #ef4444;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    /* Réduit de 0.4rem */
}

.priority-high::before {
    content: '●';
    font-size: 0.5rem;
    /* Réduit de 0.6rem */
}

.priority-medium {
    color: var(--warning);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    /* Réduit de 0.4rem */
}

.priority-medium::before {
    content: '●';
    font-size: 0.5rem;
    /* Réduit de 0.6rem */
}

.priority-low {
    color: var(--success);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    /* Réduit de 0.4rem */
}

.priority-low::before {
    content: '●';
    font-size: 0.5rem;
    /* Réduit de 0.6rem */
}

.checkbox-modern {
    width: 16px;
    /* Réduit de 18px */
    height: 16px;
    /* Réduit de 18px */
    border: 1.5px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.checkbox-modern:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-modern:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 0.65rem;
    /* Réduit de 0.7rem */
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.action-buttons {
    display: flex;
    gap: 0.3rem;
    /* Réduit de 0.4rem */
}

.btn-action {
    width: 28px;
    /* Réduit de 32px */
    height: 28px;
    /* Réduit de 32px */
    border: none;
    border-radius: 6px;
    /* Réduit de 8px */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    /* Réduit de 0.75rem */
}

.btn-action:hover {
    transform: scale(1.05);
    /* Réduit de 1.1 */
}

.btn-view {
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
}

.btn-view:hover {
    background: rgba(6, 182, 212, 0.2);
}

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

.btn-edit:hover {
    background: rgba(245, 158, 11, 0.2);
}

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

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 1024px) {
    .ticket-dashboard {
        padding: 1.25rem;
        /* Réduit de 1.5rem */
    }

    .stats-header {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        /* Réduit de 220px */
        gap: 0.875rem;
        /* Réduit de 1rem */
    }
}

@media (max-width: 768px) {
    .ticket-dashboard {
        padding: 1rem;
    }

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

    .table-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.875rem;
        /* Réduit de 1rem */
    }

    .table-actions {
        justify-content: space-between;
        width: 100%;
    }

    .search-box {
        min-width: 100%;
        order: -1;
    }

    .modern-table {
        font-size: 0.75rem;
        /* Réduit de 0.75rem */
    }

    .modern-table thead th,
    .modern-table tbody td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .ticket-dashboard {
        padding: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
        /* Réduit de 1.25rem */
    }

    .stat-number {
        font-size: 1.6rem;
        /* Réduit de 1.8rem */
    }

    .table-header {
        padding: 0.75rem;
    }

    .btn-modern {
        padding: 0.5rem 0.875rem;
        /* Réduit de 0.6rem 1rem */
        font-size: 0.75rem;
        /* Réduit de 0.8rem */
    }

    .modern-table {
        font-size: 0.7rem;
    }
}

/* Soft Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.table-wrapper {
    overflow-x: auto;
    max-height: 500px;
    /* Réduit de 600px */
    position: relative;
}

.table-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: var(--sidebar-hover);
    border-radius: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 8px;
    opacity: 0.5;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
    opacity: 0.7;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    /* Réduit de 3rem 2rem */
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 2rem;
    /* Réduit de 2.5rem */
    margin-bottom: 0.875rem;
    /* Réduit de 1rem */
    opacity: 0.4;
}

/* Focus States for Accessibility */
.btn-modern:focus,
.search-box input:focus,
.btn-action:focus,
.checkbox-modern:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

/* Dark theme adjustments */
[data-theme="dark"],
[data-bs-theme="dark"] .stat-card {
    box-shadow: 0 2px 12px var(--shadow);
}

[data-theme="dark"],
[data-bs-theme="dark"] .table-container {
    box-shadow: 0 2px 12px var(--shadow);
}

[data-theme="dark"],
[data-bs-theme="dark"] .btn-modern.secondary {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"],
[data-bs-theme="dark"] .search-box input {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"],
[data-bs-theme="dark"] .status-open,
[data-theme="dark"],
[data-bs-theme="dark"] .status-progress,
[data-theme="dark"],
[data-bs-theme="dark"] .status-resolved,
[data-theme="dark"],
[data-bs-theme="dark"] .status-closed {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

:root:not([data-bs-theme="dark"]):not([data-theme="dark"]) {
    --dark: #2d3748;
    --border: #e2e8f0;
    --primary: #3b82f6;
    --sidebar-hover: #f7fafc;
    --gradient-light: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

[data-bs-theme="dark"],
[data-theme="dark"] {
    --dark: #f1f5f9;
    --border: #334155;
    --primary: #5BC4BF;
    --sidebar-hover: #334155;
    --gradient-light: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Styles pour le mode compact */
.compact-mode .table {
    color: var(--dark);
    font-size: 0.8rem;
    margin-bottom: 0;
}

.compact-mode .table thead {
    background: var(--gradient-light);
    border-bottom: 2px solid var(--border);
}

.compact-mode .table th {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 0.5rem;
    border-bottom: 2px solid var(--border);
}

.compact-mode .table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.compact-mode .table tbody tr {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.compact-mode .table tbody tr:hover {
    background: var(--sidebar-hover);
    border-left-color: var(--primary);
    transform: translateX(2px);
}

/* Adaptation des badges de statut pour le mode compact */
.compact-mode .status-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Adaptation des boutons d'action pour le mode compact */
.compact-mode .action-buttons {
    display: flex;
    gap: 0.25rem;
}

.compact-mode .btn-action {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* Adaptation des checkboxes pour le mode compact */
.compact-mode .checkbox-modern {
    width: 16px;
    height: 16px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* optionnel : pour les petits écrans */
    gap: 1rem;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-modern {
    background: linear-gradient(45deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, #1e40af, #1e3a8a);
}

/* GPI list modules (tickets, checkout, incidents) */
.gpi-accent {
    color: var(--primary, #5BC4BF);
}

.gpi-btn-primary {
    background: var(--primary, #5BC4BF);
    border-color: var(--primary, #5BC4BF);
}

.gpi-btn-primary:hover {
    background: #4aada8;
    border-color: #4aada8;
}

#statsCards.hidden {
    display: none !important;
}

.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08) !important;
}

.hover-row:hover,
.gpi-row-open:hover {
    background-color: rgba(91, 196, 191, 0.06);
}

.gpi-row-open {
    cursor: pointer;
}

.gpi-row-open:focus-visible {
    outline: 2px solid rgba(142, 206, 202, 0.45);
    outline-offset: -2px;
}

[data-gpi-list-module] tbody tr.gpi-row-open td,
.table-container tbody tr.gpi-row-open td {
    transition: background-color 0.15s ease;
}

.table-container .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f9fa;
}

.table-container .table-wrapper {
    max-height: min(65vh, 560px);
    overflow: auto;
}

.checkbox-modern {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

[data-bs-theme="dark"] .table-container.bg-white,
[data-theme="dark"] .table-container.bg-white {
    background: var(--card-bg, #1e293b) !important;
    color: var(--dark, #f1f5f9) !important;
}

[data-bs-theme="dark"] .table-container .table thead th,
[data-theme="dark"] .table-container .table thead th {
    background: var(--surface-2, #334155) !important;
    color: #f8fafc !important;
    border-color: var(--border) !important;
}

.table-container .table thead th {
    color: #475569;
    background: #f8fafc;
}

[data-bs-theme="dark"] .table-container .table tbody td,
[data-bs-theme="dark"] .modern-table tbody td,
[data-bs-theme="dark"] .compact-mode .table,
[data-bs-theme="dark"] .compact-mode .table th,
[data-bs-theme="dark"] .compact-mode .table td,
[data-theme="dark"] .table-container .table tbody td,
[data-theme="dark"] .modern-table tbody td,
[data-theme="dark"] .compact-mode .table,
[data-theme="dark"] .compact-mode .table th,
[data-theme="dark"] .compact-mode .table td {
    color: var(--dark, #f1f5f9) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .compact-mode .table thead,
[data-theme="dark"] .compact-mode .table thead {
    background: var(--gradient-light) !important;
}

[data-bs-theme="dark"] .stat-label,
[data-theme="dark"] .stat-label {
    color: var(--gray-500, #94a3b8) !important;
}

[data-bs-theme="dark"] .search-box input,
[data-theme="dark"] .search-box input {
    background: var(--surface-2, #334155) !important;
    color: var(--dark, #f1f5f9) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .ticket-pagination-footer,
[data-theme="dark"] .ticket-pagination-footer {
    background: var(--card-bg, #1e293b) !important;
    color: var(--dark, #f1f5f9) !important;
    border-color: var(--border) !important;
}

.print-only-header {
    display: none;
}

@media print {
    body {
        background: white !important;
        color: black !important;
        font-family: 'Times New Roman', serif;
        padding: 10mm;
    }

    body * {
        visibility: hidden;
    }

    #printableIncidents,
    #printableIncidents *,
    .print-only-header,
    .print-only-header * {
        visibility: visible;
    }

    .print-only-header {
        display: block !important;
        width: 100%;
    }

    #printableIncidents {
        position: static !important;
        left: 0;
        top: 0;
        width: 100% !important;
    }

    .no-print {
        display: none !important;
    }

    .form-logo {
        text-align: center;
        margin-bottom: 10px;
    }

    .form-logo img {
        height: 60px;
        object-fit: contain;
    }

    .form-title-box {
        border: 2px solid #000;
        text-align: center;
        padding: 10px;
        margin-bottom: 20px;
    }

    .form-title-box h1 {
        margin: 0;
        font-size: 1.8rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

    .form-header-blocks {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        border: 1px solid #000;
        margin-bottom: 20px;
    }

    .header-block {
        padding: 5px 10px;
        border: 0.5px solid #000;
        font-size: 0.85rem;
        min-height: 80px;
    }

    .block-title {
        text-decoration: underline;
        font-weight: 700;
        display: block;
        margin-bottom: 5px;
    }

    .dotted-line {
        border-bottom: 1px dotted #000;
        display: inline-block;
        min-width: 100px;
    }

    #printableIncidents .table {
        width: 100% !important;
        border-collapse: collapse !important;
        border: 2px solid #000 !important;
    }

    #printableIncidents .table th,
    #printableIncidents .table td {
        border: 1px solid #000 !important;
        font-size: 0.8rem !important;
    }
}

/* Pages détail (ticket, checkout, incident) : btn-secondary + bg-white */
.btn.btn-secondary.bg-white,
.btn.btn-secondary.border-0.bg-white {
    color: #475569 !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn.btn-secondary.bg-white:hover,
.btn.btn-secondary.border-0.bg-white:hover,
.btn.btn-secondary.bg-white:focus,
.btn.btn-secondary.border-0.bg-white:focus {
    color: #1e293b !important;
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .btn.btn-secondary.bg-white,
[data-bs-theme="dark"] .btn.btn-secondary.border-0.bg-white,
[data-theme="dark"] .btn.btn-secondary.bg-white,
[data-theme="dark"] .btn.btn-secondary.border-0.bg-white {
    color: #e2e8f0 !important;
    background-color: #1e293b !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    box-shadow: none;
}

[data-bs-theme="dark"] .btn.btn-secondary.bg-white:hover,
[data-bs-theme="dark"] .btn.btn-secondary.border-0.bg-white:hover,
[data-theme="dark"] .btn.btn-secondary.bg-white:hover,
[data-theme="dark"] .btn.btn-secondary.border-0.bg-white:hover {
    color: #f8fafc !important;
    background-color: #334155 !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
}