/* Estilos modernos para DataTables */
.modern-datatable {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    background: #fff;
}

.modern-datatable thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 16px 12px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.modern-datatable thead th:first-child {
    border-top-left-radius: 12px;
}

.modern-datatable thead th:last-child {
    border-top-right-radius: 12px;
}

.modern-datatable thead th:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.modern-datatable tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.modern-datatable tbody tr:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.modern-datatable tbody td {
    padding: 16px 12px;
    border: none;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

.modern-datatable tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

/* Avatares */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-sm i {
    font-size: 12px;
}

/* Botão Detalhar moderno */
.modern-datatable .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.modern-datatable .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modern-datatable .btn-sm {
    padding: 6px 16px;
    font-size: 11px;
}

/* Status badges */
.modern-datatable .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-aberto {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.status-em-andamento {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: white;
}

.status-concluido {
    background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
    color: white;
}

.status-cancelado {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8c0 100%);
    color: white;
}

/* Ícones e elementos visuais */
.modern-datatable .text-muted {
    color: #6c757d !important;
}

.modern-datatable .text-primary {
    color: #667eea !important;
}

.modern-datatable .text-info {
    color: #17a2b8 !important;
}

.modern-datatable .text-warning {
    color: #ffc107 !important;
}

.modern-datatable .text-dark {
    color: #343a40 !important;
}

.modern-datatable .fw-bold {
    font-weight: 600 !important;
}

/* Controles do DataTables */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin: 20px 0;
}

.dataTables_wrapper .dataTables_length select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    background: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 10px 20px;
    background: white;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 250px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    width: 300px;
}

/* Paginação moderna */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: none;
    background: white;
    color: #667eea !important;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 0 2px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: #f5f5f5;
    color: #999 !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* Informações da tabela */
.dataTables_wrapper .dataTables_info {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Melhorias no card container */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: #fff;
    overflow: hidden;
}

.card-body {
    padding: 2rem;
}

/* Tabs modernas */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 12px 12px 0 0;
    padding: 12px 24px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.nav-tabs .nav-link:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    color: #667eea;
    transform: translateY(-2px);
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .modern-datatable {
        font-size: 12px;
    }
    
    .modern-datatable thead th,
    .modern-datatable tbody td {
        padding: 12px 8px;
    }
    
    .avatar-sm {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 200px;
    }
    
    .dataTables_wrapper .dataTables_filter input:focus {
        width: 220px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Loading state */
.dataTables_processing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 20px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

/* Empty state */
.dataTables_empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Scrollbar personalizada */
.modern-datatable::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.modern-datatable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modern-datatable::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.modern-datatable::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
} 