/**
 * Styles pour le système d'étiquettes
 * Les Transports Jurassiens
 */

/* Formulaire - Couleurs Express B2B */
.ltj-label-form {
    max-width: 1200px;
    margin: 20px 0;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.15);
}

.ltj-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.ltj-form-section {
    background: linear-gradient(135deg, #F8F9FA 0%, #E3F2FD 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #003366;
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.1);
    transition: all 0.3s ease;
}

.ltj-form-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.ltj-form-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #003366;
    border-bottom: 3px solid #E63946;
    padding-bottom: 0.75rem;
}

.ltj-form-group {
    margin-bottom: 1.25rem;
}

.ltj-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #003366;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ltj-form-group input[type="text"],
.ltj-form-group input[type="tel"],
.ltj-form-group input[type="number"],
.ltj-form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    min-height: 48px;
}

.ltj-form-group input:focus,
.ltj-form-group textarea:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
    transform: translateY(-1px);
}

.ltj-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.ltj-form-actions .button-primary {
    background: linear-gradient(135deg, #E63946 0%, #C52933 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    transition: all 0.3s ease;
}

.ltj-form-actions .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
    background: linear-gradient(135deg, #C52933 0%, #A52229 100%);
}

.ltj-form-actions .button {
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ltj-form-actions .button:hover {
    transform: translateY(-2px);
}

/* Boutons dans le formulaire client */
#ltj-load-client,
#ltj-save-new-client {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#ltj-load-client {
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.3);
}

#ltj-load-client:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 51, 102, 0.5);
}

#ltj-save-new-client {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8800 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.3);
}

#ltj-save-new-client:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 0, 0.5);
}

/* Aperçu */
.ltj-label-preview {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.4s ease-out;
}

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

.ltj-label-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    border-radius: 12px;
}

.ltj-label-preview-header h3 {
    color: white;
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
}

.ltj-label-preview-header .button {
    background: #E63946;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ltj-label-preview-header .button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.ltj-label-content {
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.ltj-label-actions {
    text-align: center;
    padding: 1rem;
}

.ltj-label-actions .button-primary {
    background: linear-gradient(135deg, #28A745 0%, #20903a 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
}

.ltj-label-actions .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

/* Étiquette d'impression - Format 112x150mm (élargie de 0.5cm de chaque côté) */
.ltj-label-print {
    width: 112mm;
    height: 150mm;
    max-width: 112mm;
    max-height: 150mm;
    padding: 3mm;
    background: white;
    border: none;
    font-family: Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.3;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ltj-label-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2mm;
    padding-bottom: 1mm;
    border-bottom: 2px solid #000;
    flex-shrink: 0;
}

.ltj-label-logo h2 {
    margin: 0;
    font-size: 10pt;
    font-weight: bold;
    color: #000;
}

.ltj-label-logo p {
    margin: 0;
    font-size: 10pt;
    color: #000;
}

.ltj-label-ref {
    font-size: 10pt;
    font-weight: bold;
}

.ltj-label-body {
    margin-bottom: 1.5mm;
    flex-shrink: 0;
}

.ltj-label-section {
    margin-bottom: 2mm;
    padding: 2mm;
    background: white;
    border: none;
}

.ltj-label-section h3 {
    margin: 0 0 1.5mm 0;
    font-size: 10pt;
    font-weight: bold;
    text-transform: uppercase;
    color: #000;
    border-bottom: 1px solid #000;
    padding-bottom: 1mm;
}

.ltj-label-section p {
    margin: 1mm 0;
    font-size: 10pt;
    line-height: 1.3;
}

/* Section expéditeur */
.ltj-label-section-expediteur {
    margin-bottom: 3mm;
    padding: 2mm;
    background: white;
    border: none;
}

.ltj-section-title {
    margin: 0 0 1.5mm 0 !important;
    font-size: 10pt !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    color: #000 !important;
    border-bottom: 1px solid #000 !important;
    padding-bottom: 1mm !important;
}

.ltj-expediteur-nom {
    margin: 1mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
    font-weight: bold !important;
}

.ltj-expediteur-adresse {
    margin: 1mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
}

.ltj-expediteur-ville {
    margin: 1mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
}

.ltj-expediteur-tel {
    margin: 1mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
}

/* Section destinataire */
.ltj-label-section-destinataire {
    margin-bottom: 2mm;
    padding: 2mm;
    background: white;
    border: none;
}

.ltj-destinataire-nom {
    margin: 1mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
    font-weight: bold !important;
}

.ltj-destinataire-adresse {
    margin: 1mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
}

.ltj-destinataire-ville {
    margin: 1mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

.ltj-destinataire-tel {
    margin: 1mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
}

.ltj-label-footer {
    margin-bottom: 1.5mm;
    padding-top: 1mm;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.ltj-label-info {
    display: flex;
    gap: 3mm;
    margin-bottom: 1mm;
    flex-wrap: wrap;
}

.ltj-label-info p {
    margin: 0;
    font-size: 10pt;
}

.ltj-label-instructions {
    padding: 1mm;
    background: white;
    border: 1px solid #000;
    font-size: 10pt;
    margin-top: 1mm;
}

.ltj-label-barcode {
    text-align: center;
    padding: 2mm 1mm;
    border: none;
    background: white;
    margin-top: auto;
    flex-shrink: 0;
}

.ltj-barcode-svg {
    width: 100%;
    height: auto;
    max-height: 18mm;
    margin-bottom: 1mm;
    display: block;
}

.ltj-barcode-svg svg {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    max-height: 18mm !important;
    display: block;
}

.ltj-barcode-img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 18mm;
    margin: 0 auto 1mm auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.ltj-barcode-text {
    margin: 1mm 0 0 0;
    font-family: 'Courier New', monospace;
    font-size: 10pt;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-align: center;
    color: #000;
}

/* Dashboard Admin - Couleurs Express B2B */
.ltj-admin-dashboard {
    margin-top: 20px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E3F2FD 100%);
    padding: 2rem;
    border-radius: 16px;
}

.ltj-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ltj-stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.ltj-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #003366 0%, #0055AA 100%);
}

.ltj-stat-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.ltj-stat-number {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    color: #003366;
}

.ltj-quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.ltj-quick-actions .button-primary {
    background: linear-gradient(135deg, #E63946 0%, #C52933 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
}

.ltj-quick-actions .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

.ltj-quick-actions .button {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.ltj-quick-actions .button:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    body {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    body * {
        visibility: hidden;
    }
    
    .ltj-label-print,
    .ltj-label-print * {
        visibility: visible;
    }
    
    .ltj-label-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 112mm !important;
        height: 150mm !important;
        max-width: 112mm !important;
        max-height: 150mm !important;
        margin: 0 !important;
        padding: 3mm !important;
        border: none !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        box-sizing: border-box;
        background: white !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .ltj-label-barcode {
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        border: none !important;
        background: white !important;
        margin-top: auto !important;
    }
    
    .ltj-barcode-svg {
        max-height: 18mm !important;
    }
    
    .ltj-barcode-svg svg {
        width: 100% !important;
        height: auto !important;
        max-height: 18mm !important;
    }
    
    .ltj-barcode-img {
        max-height: 18mm !important;
    }
    
    @page {
        size: 112mm 150mm;
        margin: 0;
    }
}

/* Scroll indicator */
.ltj-dashboard-table-wrapper::after {
    content: '← Faites glisser pour voir toutes les colonnes →';
    display: none;
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0 0 16px 16px;
}

@media (max-width: 1500px) {
    .ltj-dashboard-table-wrapper::after {
        display: block;
    }
    
    .ltj-scans-table {
        font-size: 0.85rem;
    }
    
    .ltj-scans-table td {
        padding: 0.75rem 0.5rem;
        font-size: 10pt;
    }
}

@media (max-width: 768px) {
    .ltj-dashboard {
        padding: 1rem;
    }
    
    .ltj-dashboard-table-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        width: calc(100% + 2rem);
    }
    
    .ltj-scans-table {
        min-width: 1100px;
        font-size: 0.8rem;
    }
    
    .ltj-scans-table td,
    .ltj-scans-table th {
        padding: 0.5rem 0.35rem;
        font-size: 0.75rem;
    }
    
    .ltj-cancel-delivery-btn,
    .ltj-reprint-label-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }
    
    .ltj-status-badge {
        padding: 0.35rem 0.7rem;
        font-size: 0.65rem;
    }
    
    .ltj-pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ltj-pagination .button {
        width: 100%;
        padding: 1rem;
    }
    
    #ltj-page-info {
        width: 100%;
        text-align: center;
    }
    
    .ltj-form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .ltj-label-form {
        padding: 1.5rem;
        margin: 15px;
    }
    
    .ltj-form-section {
        padding: 1.5rem;
    }
    
    .ltj-form-section h2 {
        font-size: 1.1rem;
    }
    
    .ltj-form-actions {
        flex-direction: column;
    }
    
    .ltj-form-actions .button {
        width: 100%;
    }
    
    .ltj-label-preview {
        padding: 1.5rem;
        margin: 15px;
    }
    
    .ltj-label-preview-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .ltj-label-preview-header h3 {
        font-size: 1.1rem;
    }
    
    .ltj-label-print {
        width: 100%;
        min-height: auto;
    }
    
    .ltj-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ltj-admin-dashboard {
        padding: 1rem;
        margin: 10px;
    }
    
    .ltj-quick-actions {
        flex-direction: column;
    }
    
    .ltj-quick-actions .button {
        width: 100%;
    }
}

/* Tableau de bord - Couleurs Express B2B */
.ltj-dashboard {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 30px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E3F2FD 100%);
    border-radius: 0;
    box-shadow: none;
}

/* Forcer la largeur complète même si dans un conteneur WordPress */
.site-content .container .ltj-dashboard,
.site-content .ltj-dashboard,
body .ltj-dashboard,
.entry-content .ltj-dashboard,
article .ltj-dashboard {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
}

/* S'assurer que le conteneur parent ne limite pas */
.entry-content {
    max-width: 100% !important;
}

/* Pour la page tableau de bord spécifiquement */
body.page-template-default .entry-content .ltj-dashboard,
body.single-page .entry-content .ltj-dashboard {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

.ltj-dashboard-header {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.4);
    position: relative;
    overflow: hidden;
}

.ltj-dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.ltj-dashboard-header h2 {
    margin: 0 0 1.5rem 0;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.ltj-dashboard-header h2::before {
    content: "📦";
    margin-right: 15px;
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.ltj-scan-form {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.ltj-scan-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border: none;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ltj-scan-form input:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4);
    transform: translateY(-2px);
}

.ltj-scan-form input#ltj-reception-client {
    font-family: Arial, sans-serif;
    letter-spacing: normal;
}

.ltj-scan-form input:required {
    border-left: 3px solid #E63946;
}

.ltj-scan-form button {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #E63946 0%, #C52933 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ltj-scan-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

.ltj-scan-form button:active {
    transform: translateY(0);
}

.ltj-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ltj-search-filters {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.ltj-search-filters h3 {
    margin: 0 0 1.5rem 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 700;
}

.ltj-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.ltj-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ltj-filter-group label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ltj-filter-input {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: white;
}

.ltj-filter-input:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

.ltj-filters-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.ltj-filters-actions .button-primary {
    background: linear-gradient(135deg, #E63946 0%, #C52933 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    transition: all 0.3s ease;
}

.ltj-filters-actions .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

.ltj-filters-actions .button {
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
}

.ltj-filters-actions .button:hover {
    transform: translateY(-2px);
    background: #e5e7eb;
}

.ltj-stat-item {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ltj-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.ltj-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #003366 0%, #0055AA 100%);
}

.ltj-stat-item:nth-child(1)::before {
    background: linear-gradient(180deg, #E63946 0%, #C52933 100%);
}

.ltj-stat-item:nth-child(2)::before {
    background: linear-gradient(180deg, #FF6B00 0%, #FF8800 100%);
}

.ltj-stat-item:nth-child(3)::before {
    background: linear-gradient(180deg, #28A745 0%, #20903a 100%);
}

.ltj-stat-item::after {
    content: attr(data-icon);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    opacity: 0.1;
}

.ltj-stat-item:nth-child(1)::after {
    content: "📅";
}

.ltj-stat-item:nth-child(2)::after {
    content: "📊";
}

.ltj-stat-item:nth-child(3)::after {
    content: "🏷️";
}

.ltj-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.ltj-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #003366;
}

.ltj-scans-table-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.ltj-dashboard-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
    background: white;
}

.ltj-scans-table {
    width: 100%;
    min-width: 1500px;
    border-collapse: collapse;
}

.ltj-scans-table thead {
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    color: white;
}

.ltj-scans-table thead th {
    white-space: nowrap;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.ltj-scans-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.ltj-scans-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.ltj-scans-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(0, 51, 102, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%);
    transform: scale(1.01);
}

.ltj-scans-table tbody tr:last-child {
    border-bottom: none;
}

.ltj-scans-table td {
    padding: 1rem 0.75rem;
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Largeurs optimisées pour chaque colonne - Nouvel ordre */
.ltj-scans-table td:nth-child(1),
.ltj-scans-table th:nth-child(1) { width: 8%; min-width: 110px; } /* Date */
.ltj-scans-table td:nth-child(2),
.ltj-scans-table th:nth-child(2) { width: 9%; min-width: 110px; } /* Mode */
.ltj-scans-table td:nth-child(3),
.ltj-scans-table th:nth-child(3) { width: 9%; min-width: 110px; } /* Statut */
.ltj-scans-table td:nth-child(4),
.ltj-scans-table th:nth-child(4) { width: 10%; min-width: 130px; } /* N° BL */
.ltj-scans-table td:nth-child(5),
.ltj-scans-table th:nth-child(5) { width: 6%; min-width: 90px; }  /* ID Client */
.ltj-scans-table td:nth-child(6),
.ltj-scans-table th:nth-child(6) { width: 12%; min-width: 150px; } /* Client */
.ltj-scans-table td:nth-child(7),
.ltj-scans-table th:nth-child(7) { width: 10%; min-width: 120px; } /* Ville */
.ltj-scans-table td:nth-child(8),
.ltj-scans-table th:nth-child(8) { width: 12%; min-width: 140px; } /* Client réceptionnaire */
.ltj-scans-table td:nth-child(9),
.ltj-scans-table th:nth-child(9) { width: 8%; min-width: 100px; } /* Colis/Poids */
.ltj-scans-table td:nth-child(10),
.ltj-scans-table th:nth-child(10) { width: 6%; min-width: 80px; text-align: center; }  /* Document */
.ltj-scans-table td:nth-child(11),
.ltj-scans-table th:nth-child(11) { width: 10%; min-width: 140px; text-align: center; } /* Actions */

.ltj-scans-table td:first-child {
    font-weight: 600;
    color: #374151;
}

.ltj-scans-table td:nth-child(2) {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #003366;
    font-size: 1rem;
}

.ltj-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.ltj-status-badge:hover {
    transform: scale(1.05);
}

.ltj-status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ltj-status-scanned {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.ltj-status-scanned::before {
    background: white;
}

.ltj-status-delivered {
    background: linear-gradient(135deg, #28A745 0%, #20903a 100%);
    color: white;
    font-weight: 700;
}

.ltj-status-delivered::before {
    background: white;
}

.ltj-status-pending {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8800 100%);
    color: white;
    font-weight: 700;
}

.ltj-status-pending::before {
    background: white;
}

.ltj-status-cancelled {
    background: linear-gradient(135deg, #DC3545 0%, #C52933 100%);
    color: white;
    font-weight: 700;
}

.ltj-status-cancelled::before {
    background: white;
}

.ltj-cancel-delivery-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: #DC3545;
    color: white;
}

.ltj-cancel-delivery-btn:hover {
    transform: translateY(-2px);
    background: #C52933;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.ltj-reprint-label-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: #003366;
    color: white;
}

.ltj-reprint-label-btn:hover {
    transform: translateY(-2px);
    background: #0055AA;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.4);
}

/* Pagination */
.ltj-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ltj-pagination .button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    background: linear-gradient(135deg, #003366 0%, #0055AA 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.ltj-pagination .button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4);
    background: linear-gradient(135deg, #0055AA 0%, #0077CC 100%);
}

.ltj-pagination .button:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

#ltj-page-info {
    font-weight: 700;
    color: #003366;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border: 2px solid #003366;
}

#ltj-current-page {
    color: #E63946;
    font-size: 1.3rem;
}

#ltj-total-pages {
    color: #003366;
}

/* Styles pour les numéros de BL */
#ltj-bl-container {
    margin-bottom: 0.75rem;
}

.ltj-bl-item {
    display: flex !important;
    gap: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    align-items: center !important;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ltj-bl-input {
    flex: 1 !important;
    padding: 1rem 1.25rem !important;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    font-family: 'Courier New', monospace !important;
    font-weight: 600 !important;
    width: auto !important;
    min-height: 48px !important;
}

.ltj-bl-input:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
    transform: translateY(-1px);
}

.ltj-remove-bl {
    padding: 0.75rem !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    background: #fee2e2 !important;
    color: #ef4444 !important;
    flex-shrink: 0 !important;
    min-width: 44px !important;
    min-height: 44px !important;
}

.ltj-remove-bl:hover {
    transform: scale(1.1);
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

#ltj-add-bl {
    margin-top: 0.5rem !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: inline-block !important;
}

#ltj-add-bl:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Badges de BL dans les tableaux */
.ltj-bl-badge {
    background: #0ea5e9;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
    margin: 2px;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
}

/* BL sur l'étiquette */
.ltj-label-bl {
    margin-top: 2mm;
    padding: 2mm;
    background: #e0f2fe;
    border: 2px solid #0ea5e9;
    border-radius: 4px;
}

.ltj-label-bl p {
    margin: 0 0 1mm 0;
    font-size: 10pt;
    font-weight: bold;
    color: #000;
}

.ltj-label-bl-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 1mm;
}

.ltj-label-bl-badge {
    background: white;
    color: #000;
    border: 1px solid #000;
    padding: 1mm 2mm;
    border-radius: 3px;
    font-size: 10pt;
    font-weight: bold;
    white-space: nowrap;
}

.ltj-delete-delivery-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #dc2626;
    background: white;
    color: #dc2626;
    font-weight: 600;
}

.ltj-delete-delivery-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

@media (max-width: 768px) {
    .ltj-dashboard {
        padding: 20px 15px;
        margin: 0;
    }
    
    /* Ajuster pour mobile */
    .site-content .container .ltj-dashboard,
    .site-content .ltj-dashboard,
    body .ltj-dashboard,
    .entry-content .ltj-dashboard,
    article .ltj-dashboard,
    body.page-template-default .entry-content .ltj-dashboard,
    body.single-page .entry-content .ltj-dashboard {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .ltj-dashboard-header {
        padding: 1.5rem;
    }
    
    .ltj-dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .ltj-scan-form {
        flex-direction: column;
    }
    
    .ltj-scan-form input,
    .ltj-scan-form button {
        width: 100%;
        min-width: 100%;
    }
    
    .ltj-scans-table-container {
        overflow-x: auto;
        border-radius: 12px;
    }
    
    .ltj-scans-table {
        min-width: 800px;
    }
    
    .ltj-scans-table th,
    .ltj-scans-table td {
        padding: 0.875rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .ltj-dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ltj-stat-item {
        padding: 1.5rem;
    }
    
    .ltj-stat-value {
        font-size: 2rem;
    }
    
    .ltj-search-filters {
        padding: 1.5rem;
    }
    
    .ltj-search-filters h3 {
        font-size: 1.1rem;
    }
    
    .ltj-filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ltj-filters-actions {
        flex-direction: column;
    }
    
    .ltj-filters-actions .button {
        width: 100%;
    }
    
    .ltj-bl-item {
        flex-direction: row;
    }
    
    .ltj-form-group input[type="text"],
    .ltj-form-group input[type="tel"],
    .ltj-form-group input[type="number"],
    .ltj-form-group input[type="date"],
    .ltj-form-group textarea,
    .ltj-bl-input,
    .ltj-filter-input,
    .ltj-scan-form input {
        font-size: 16px !important;
        padding: 1rem !important;
        min-height: 48px !important;
    }
    
    .ltj-form-group textarea {
        min-height: 120px !important;
    }
    
    .button,
    .ltj-remove-bl,
    #ltj-add-bl,
    #ltj-load-client,
    #ltj-save-new-client,
    .ltj-scan-form button,
    .ltj-filters-actions .button {
        min-height: 48px !important;
        min-width: 48px !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .ltj-bl-item {
        flex-direction: row;
        gap: 0.75rem !important;
    }
    
    #ltj-add-bl {
        width: 100%;
    }
}


