/**
 * Premium DataTable Component - CSS NEON REDESIGN
 * ========================================
 * 
 * Estilo premium COMPACTO com tema NEON para tabelas em formato de cards.
 * TODOS OS CARDS COMEÇAM COLAPSADOS para economizar espaço.
 * 
 * FEATURES:
 * - Layout compacto de cards (começam fechados)
 * - Dark theme com gradientes NEON
 * - Hover effects suaves
 * - Expand/collapse otimizado
 * - Badges neon coloridos por status
 * - Responsive design
 * - Altura reduzida (60% menor que antes)
 * 
 * @updated 2025-10-06
 * @author Dashboard Monitoramento Team
 */

/* ================================================================
   🆕 RESET CSS PARA MODO TABELA - FORÇA DISPLAY TABLE
   ================================================================ */
.premium-table-wrapper,
.premium-table-wrapper *,
.table-mode .premium-table-wrapper,
.table-mode .premium-table-wrapper * {
    box-sizing: border-box !important;
}

.premium-table-wrapper table,
.premium-table,
table.premium-table {
    display: table !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
}

.premium-table-wrapper thead,
.premium-table thead,
table.premium-table thead {
    display: table-header-group !important;
}

.premium-table-wrapper tbody,
.premium-table tbody,
table.premium-table tbody {
    display: table-row-group !important;
}

.premium-table-wrapper tr,
.premium-table tr,
table.premium-table tr {
    display: table-row !important;
}

.premium-table-wrapper th,
.premium-table th,
table.premium-table th,
.premium-table-wrapper td,
.premium-table td,
table.premium-table td {
    display: table-cell !important;
    vertical-align: middle !important;
}

/* ========== CONTAINER PRINCIPAL - COMPACTO ========== */
.premium-datatable-container {
    padding: 16px; /* Reduzido de 20px */
    background: linear-gradient(135deg, rgba(17,24,39,0.95) 0%, rgba(31,41,55,0.95) 100%);
    border-radius: 12px; /* Reduzido de 16px */
    min-height: 300px; /* Reduzido de 400px */
}

/* ========== HEADER SECTION - COMPACTO ========== */
.premium-datatable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px; /* Reduzido de 24px */
    padding-bottom: 12px; /* Reduzido de 16px */
    border-bottom: 2px solid rgba(0, 217, 255, 0.2); /* NEON cyan */
    gap: 16px; /* Reduzido de 20px */
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px; /* Reduzido de 16px */
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px; /* Reduzido de 12px */
}

.premium-datatable-header h3 {
    font-size: 20px; /* Reduzido de 24px */
    font-weight: 700;
    color: #00D9FF; /* NEON cyan */
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5); /* NEON glow */
}

.premium-datatable-header .badge-total {
    padding: 4px 12px; /* Reduzido de 6px 16px */
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15) 0%, rgba(0, 217, 255, 0.05) 100%);
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 16px; /* Reduzido de 20px */
    color: #00D9FF;
    font-size: 12px; /* Reduzido de 13px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3); /* NEON glow */
}

/* ========== BUSCA E ORDENAÇÃO - COMPACTO ========== */
.premium-search-input,
.premium-sort-select,
.premium-company-filter {
    padding: 6px 12px; /* 🆕 Reduzido de 8px 14px para ficar mais compacto */
    background: rgba(0, 217, 255, 0.05);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 6px; /* 🆕 Reduzido de 8px */
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 180px;
    height: 36px; /* 🆕 Altura fixa mais compacta */
    line-height: 1.4; /* 🆕 Centralizar texto verticalmente */
}

.premium-search-input:focus,
.premium-sort-select:focus,
.premium-company-filter:focus {
    outline: none;
    border-color: rgba(0, 217, 255, 0.6);
    background: rgba(0, 217, 255, 0.08);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.4); /* NEON glow */
}

/* 🆕 Hover no filtro de empresa */
.premium-company-filter:hover {
    border-color: rgba(0, 217, 255, 0.5);
    background: rgba(0, 217, 255, 0.08);
    cursor: pointer;
}

.premium-search-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.premium-sort-select option,
.premium-company-filter option {
    background: #1f2937;
    color: #ffffff;
}

/* Botão Fullscreen da Tabela - COMPACTO */
.btn-table-fullscreen {
    padding: 6px 14px; /* 🆕 Reduzido de 8px 16px */
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15) 0%, rgba(0, 217, 255, 0.05) 100%);
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 6px; /* 🆕 Reduzido de 8px */
    color: #00D9FF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    height: 36px; /* 🆕 Mesma altura do campo de busca */
}

.btn-table-fullscreen:hover {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.25) 0%, rgba(0, 217, 255, 0.15) 100%);
    border-color: rgba(0, 217, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5); /* NEON glow */
    transform: translateY(-2px);
    color: #93c5fd;
}

.btn-table-fullscreen:active {
    transform: translateY(0);
}

/* ========== CARDS LIST - COMPACTO ========== */
.premium-datatable-list {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduzido de 12px */
}

/* ========== INDIVIDUAL CARD - COMPACTO E NEON ========== */
.premium-datatable-card {
    border-radius: 10px; /* Reduzido de 12px */
    border-left: 3px solid; /* Reduzido de 4px */
    background: rgba(0, 217, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.premium-datatable-card:hover {
    background: rgba(0, 217, 255, 0.08);
    transform: translateX(6px); /* Reduzido de 8px */
    box-shadow: 0 4px 16px rgba(0, 217, 255, 0.2); /* NEON shadow */
}

/* Cores de borda por status - NEON */
.premium-datatable-card.critical {
    border-left-color: #ef4444;
}

.premium-datatable-card.warning {
    border-left-color: #f59e0b;
}

.premium-datatable-card.info {
    border-left-color: #00D9FF; /* NEON cyan */
}

.premium-datatable-card.success {
    border-left-color: #10b981;
}

/* ========== CARD HEADER (Sempre Visível) - COMPACTO ========== */
.premium-datatable-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px; /* Reduzido de 16px 20px */
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

/* Quando card está COLAPSADO (card-compact), header SUPER compacto */
.premium-datatable-card.card-compact .premium-datatable-card-header {
    padding: 8px 12px; /* AINDA MAIS compacto: 8px (antes era 10px) */
}

.premium-datatable-card-header:hover {
    background: rgba(0, 217, 255, 0.05); /* NEON hover */
}

.card-header-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px; /* Reduzido de 6px */
}

.card-title {
    font-size: 13px; /* Reduzido de 14px */
    font-weight: 600;
    color: #00D9FF; /* NEON cyan */
    line-height: 1.2; /* Reduzido de 1.3 para economizar espaço */
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.3); /* NEON glow sutil */
}

.card-subtitle {
    font-size: 11px; /* Reduzido de 12px */
    color: rgba(255,255,255,0.55);
    line-height: 1.3;
}

.card-header-right {
    display: flex;
    align-items: center;
    gap: 10px; /* Reduzido de 12px */
}

/* ========== BADGES - COMPACTO E NEON ========== */
.card-badge {
    padding: 3px 10px; /* Reduzido de 4px 12px */
    border-radius: 14px; /* Reduzido de 16px */
    font-size: 10px; /* Reduzido de 11px */
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.card-badge.critical {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.4);
    box-shadow: 0 0 8px rgba(239,68,68,0.3); /* NEON glow */
}

.card-badge.warning {
    background: rgba(245,158,11,0.15);
    color: #fcd34d;
    border: 1px solid rgba(245,158,11,0.4);
    box-shadow: 0 0 8px rgba(245,158,11,0.3); /* NEON glow */
}

.card-badge.info {
    background: rgba(0, 217, 255, 0.15);
    color: #00D9FF; /* NEON cyan */
    border: 1px solid rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.3); /* NEON glow */
}

.card-badge.success {
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16,185,129,0.4);
    box-shadow: 0 0 8px rgba(16,185,129,0.3); /* NEON glow */
}

/* ========== CARD HEADER ACTIONS (Botões) - COMPACTO ========== */
.card-header-actions {
    display: flex;
    align-items: center;
    gap: 6px; /* Reduzido de 8px */
}

/* Botão Fullscreen - NEON */
.btn-fullscreen {
    padding: 5px 9px; /* Reduzido de 6px 10px */
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 6px;
    color: #00D9FF; /* NEON cyan */
    font-size: 14px; /* Reduzido de 16px */
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-fullscreen:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.4); /* NEON glow */
    transform: scale(1.05);
}

/* Botão Expandir/Colapsar - COMPACTO E NEON */
.card-expand-btn {
    padding: 5px 10px; /* Reduzido de 6px 12px */
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 6px;
    color: rgba(0, 217, 255, 0.8);
    font-size: 11px; /* Reduzido de 12px */
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px; /* Reduzido de 6px */
}

.card-expand-btn:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.3);
    color: #00D9FF;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3); /* NEON glow */
}

.card-expand-btn .expand-icon {
    font-size: 9px; /* Reduzido de 10px */
}

.card-expand-btn .expand-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ========== CARD DETAILS (Área Expansível) - SEMPRE COMEÇA COLAPSADO ========== */
.premium-datatable-card-details {
    max-height: 0 !important; /* FORÇA começar colapsado */
    overflow: hidden !important;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    background: rgba(0, 217, 255, 0.02);
    border-top: 1px solid rgba(0, 217, 255, 0.1);
    padding: 0 16px; /* Padding compacto */
}

/* Quando expandido (sem card-compact, display: block) */
.premium-datatable-card:not(.card-compact) .premium-datatable-card-details {
    max-height: 2000px !important; /* Altura suficiente para expandir */
    opacity: 1;
    padding: 16px; /* Padding quando expandido */
}

/* Estados de compactação */
.premium-datatable-card.card-compact .premium-datatable-card-details {
    max-height: 0 !important;
    opacity: 0;
    padding: 0 16px;
}

.premium-datatable-card.card-compact .header-field {
    gap: 2px; /* Mais compacto */
}

.premium-datatable-card.card-compact .field-label {
    font-size: 10px; /* Menor */
}

.premium-datatable-card.card-compact .field-value {
    font-size: 13px; /* Menor */
}

.premium-datatable-card.card-compact .card-progress-section {
    margin-top: 8px; /* Menos espaço */
}

.premium-datatable-card.card-compact .progress-bar-container {
    height: 6px; /* Mais fino */
}

/* ========== EXPAND ICON (DEPRECATED - substituído por btn) ========== */
.card-expand-icon {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    transition: transform 0.3s;
    flex-shrink: 0;
}

/* ========== DETAILS GRID - ESTRUTURA INTERNA ========== */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    padding-top: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

/* ========== EMPTY STATE ========== */
.premium-datatable-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.5);
}

.premium-datatable-empty .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.premium-datatable-empty p {
    font-size: 16px;
    margin: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .details-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
    }

    .premium-datatable-card-header {
        padding: 14px 16px;
    }
}

/* ========== CARD HEADER CONTENT (NOVO) - RESPONSIVO E ULTRA COMPACTO ========== */
.card-header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px; /* Reduzido de 10px para 6px */
}

/* Quando colapsado, header MUITO mais compacto */
.premium-datatable-card.card-compact .card-header-content {
    gap: 4px; /* Reduzido de 8px para 4px */
}

.card-header-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Reduzido de 200px */
    gap: 8px; /* Reduzido de 10px para 8px */
}

/* Quando colapsado, campos MUITO mais compactos */
.premium-datatable-card.card-compact .card-header-fields {
    gap: 6px; /* Reduzido de 8px para 6px */
}

.header-field {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Reduzido de 3px para 2px */
}

.header-field.primary .field-label {
    color: rgba(0, 217, 255, 0.9); /* NEON cyan */
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.3); /* NEON glow */
}

.header-field.primary .field-value {
    font-size: 15px; /* Reduzido de 16px */
    font-weight: 700;
    color: #00D9FF; /* NEON cyan */
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.3); /* NEON glow */
}

.header-field .field-label {
    font-size: 9px; /* Reduzido de 10px */
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.header-field .field-value {
    font-size: 12px; /* Reduzido de 13px */
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    line-height: 1.3;
}

/* ========== PROGRESS BAR (NOVO) - COMPACTO ========== */
.card-progress-section {
    margin-top: 6px; /* Reduzido de 8px */
}

/* Quando colapsado, progress bar MUITO compacta */
.premium-datatable-card.card-compact .card-progress-section {
    margin-top: 4px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px; /* Reduzido de 6px */
    font-size: 11px; /* Reduzido de 12px */
    color: rgba(255,255,255,0.7);
}

/* Quando colapsado, label menor */
.premium-datatable-card.card-compact .progress-label {
    margin-bottom: 3px;
    font-size: 10px;
}

.progress-percent {
    font-weight: 700;
    font-size: 12px; /* Reduzido de 13px */
}

.progress-bar-container {
    width: 100%;
    height: 6px; /* Reduzido de 8px */
    background: rgba(255,255,255,0.1);
    border-radius: 3px; /* Reduzido de 4px */
    overflow: hidden;
    position: relative;
}

/* Quando colapsado, barra MUITO fina */
.premium-datatable-card.card-compact .progress-bar-container {
    height: 4px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-bar-fill.success {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 0 8px rgba(16,185,129,0.4);
}

.progress-bar-fill.info {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    box-shadow: 0 0 8px rgba(59,130,246,0.4);
}

.progress-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    box-shadow: 0 0 8px rgba(245,158,11,0.4);
}

.progress-bar-fill.critical {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    box-shadow: 0 0 8px rgba(239,68,68,0.4);
}

/* ========== CARD HEADER ACTIONS (AJUSTADO) ========== */
.card-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ========== EMPTY STATE (AJUSTADO) ========== */
.premium-datatable-empty .empty-hint {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .details-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
    }

    .premium-datatable-card-header {
        padding: 14px 16px;
    }

    .card-header-fields {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .premium-datatable-container {
        padding: 16px;
    }

    .premium-datatable-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
    }

    .premium-search-input,
    .premium-sort-select {
        width: 100%;
    }

    .premium-datatable-header h3 {
        font-size: 20px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .premium-datatable-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-header-right {
        width: 100%;
        justify-content: space-between;
    }

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

@media (max-width: 480px) {
    .card-title {
        font-size: 14px;
    }

    .card-subtitle {
        font-size: 12px;
    }

    .detail-value {
        font-size: 13px;
    }

    .header-field .field-value {
        font-size: 13px;
    }
}

/* ========== FULLSCREEN MODE ========== */
.fullscreen-table-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

.premium-datatable-container.fullscreen-mode {
    background: transparent !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.premium-datatable-container.fullscreen-mode .premium-datatable-header {
    background: rgba(31, 41, 55, 0.5) !important;
    padding: 16px !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    flex-shrink: 0 !important;
}

.premium-datatable-container.fullscreen-mode .premium-datatable-list {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 0 16px 16px 0 !important;
    display: block !important;
    min-height: 0 !important; /* Importante para flex funcionar */
}

.premium-datatable-container.fullscreen-mode .premium-datatable-card {
    background: rgba(31, 41, 55, 0.8) !important;
    border-left-width: 3px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-bottom: 12px !important;
}

.premium-datatable-container.fullscreen-mode .premium-datatable-card:hover {
    background: rgba(31, 41, 55, 0.95) !important;
    transform: translateX(4px) !important;
}

/* Scrollbar para fullscreen */
.premium-datatable-container.fullscreen-mode .premium-datatable-list::-webkit-scrollbar {
    width: 10px;
}

.premium-datatable-container.fullscreen-mode .premium-datatable-list::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 5px;
}

.premium-datatable-container.fullscreen-mode .premium-datatable-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(59,130,246,0.6) 0%, rgba(139,92,246,0.6) 100%);
    border-radius: 5px;
}

.premium-datatable-container.fullscreen-mode .premium-datatable-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(59,130,246,0.8) 0%, rgba(139,92,246,0.8) 100%);
}

/* ================================================================
   🆕 MODO TABELA (Horizontal Compacta - Estilo DataTable Clássica)
   ================================================================ */

.premium-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 217, 255, 0.15);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

/* ========== TABLE HEADER ========== */
.premium-table thead {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15) 0%, rgba(0, 150, 255, 0.1) 100%);
    border-bottom: 2px solid rgba(0, 217, 255, 0.3);
}

/* 🆕 Headers clicáveis para ordenação */
.premium-table th.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
}

.premium-table th.sortable-header:hover {
    background: rgba(0, 217, 255, 0.15);
    transform: scale(1.02);
    color: #00FFE5 !important;
    text-shadow: 0 0 12px rgba(0, 217, 255, 0.6) !important;
}

.premium-table th.sortable-header:active {
    transform: scale(0.98);
}

.premium-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #00D9FF;
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
    white-space: nowrap;
}

.premium-table thead th.actions-col {
    text-align: right;
    width: 150px;
}

/* ========== TABLE ROWS ========== */
.premium-table tbody tr.table-row {
    border-bottom: 1px solid rgba(0, 217, 255, 0.08);
    transition: all 0.2s;
}

.premium-table tbody tr.table-row:hover {
    background: rgba(0, 217, 255, 0.05);
}

.premium-table tbody tr.table-row td {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    vertical-align: middle;
}

/* Row colors by severity */
.premium-table tbody tr.table-row.critical {
    border-left: 3px solid #ef4444;
}

.premium-table tbody tr.table-row.warning {
    border-left: 3px solid #f59e0b;
}

.premium-table tbody tr.table-row.info {
    border-left: 3px solid #00D9FF;
}

.premium-table tbody tr.table-row.success {
    border-left: 3px solid #10b981;
}

/* ========== TABLE BADGES ========== */
.table-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-right: 8px;
}

.table-badge.critical {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.4);
    box-shadow: 0 0 8px rgba(239,68,68,0.3);
}

.table-badge.warning {
    background: rgba(245,158,11,0.15);
    color: #fcd34d;
    border: 1px solid rgba(245,158,11,0.4);
    box-shadow: 0 0 8px rgba(245,158,11,0.3);
}

.table-badge.info {
    background: rgba(0, 217, 255, 0.15);
    color: #00D9FF;
    border: 1px solid rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.3);
}

.table-badge.success {
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16,185,129,0.4);
    box-shadow: 0 0 8px rgba(16,185,129,0.3);
}

/* ========== DETALHAR BUTTON ========== */
.btn-detalhar {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15) 0%, rgba(0, 150, 255, 0.1) 100%);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 6px;
    color: #00D9FF;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-detalhar:hover {
    background: rgba(0, 217, 255, 0.25);
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.4);
    transform: translateY(-1px);
}

.btn-detalhar.active {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.3) 0%, rgba(0, 150, 255, 0.2) 100%);
    border-color: rgba(0, 217, 255, 0.6);
    color: #ffffff;
}

/* ========== TABLE ROW DETAILS (Expandido) ========== */
.premium-table tbody tr.table-row-details {
    background: rgba(0, 217, 255, 0.03);
    border-bottom: 2px solid rgba(0, 217, 255, 0.15);
}

.premium-table tbody tr.table-row-details td {
    padding: 20px;
}

.premium-table tbody tr.table-row-details .details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.premium-table tbody tr.table-row-details .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.premium-table tbody tr.table-row-details .detail-label {
    font-size: 10px;
    color: rgba(0, 217, 255, 0.7);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.premium-table tbody tr.table-row-details .detail-value {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ========== ACTIONS COLUMN ========== */
.premium-table tbody td.actions-col {
    text-align: right;
    white-space: nowrap;
}

/* ========== DETAIL ICON (▼/▲) ========== */
.btn-detalhar .detail-icon {
    display: inline-block;
    margin-right: 4px;
    font-size: 10px;
    transition: transform 0.3s;
}

.btn-detalhar.active .detail-icon {
    transform: rotate(180deg);
}

/* ⚡ FORÇA CENTRALIZAÇÃO ABSOLUTA - ID usado pelo DataTable.js */
#pagination-info {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

#pagination-info > div {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    margin: 0 auto !important;
}

/* ================================================================
   🚀 PAGINAÇÃO - PERFORMANCE OPTIMIZATION
   ================================================================ */
.pagination-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 16px 20px !important;
    margin: 0 auto !important;
    background: rgba(15, 23, 42, 0.60) !important;
    backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(0, 217, 255, 0.15) !important;
    border-radius: 0 0 8px 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.pagination-info {
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-align: center !important;
    width: 100% !important;
}

.pagination-info strong {
    color: #00D9FF !important;
    font-weight: 700 !important;
}

.pagination-buttons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

/* ⚡ FORÇA CENTRALIZAÇÃO ABSOLUTA DOS BOTÕES */
.pagination-controls .pagination-buttons {
    justify-content: center !important;
    align-items: center !important;
    display: flex !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.pagination-buttons span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 8px;
}

.pagination-buttons strong {
    color: #00D9FF;
    font-weight: 700;
}

.pagination-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.05);
    color: #00D9FF;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(0, 217, 255, 0.15);
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.4);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

/* ========== LIGHT THEME (Paginação) ========== */
body.light-theme .pagination-controls {
    background: rgba(248, 250, 252, 0.95);
    border-top-color: rgba(148, 163, 184, 0.2);
}

body.light-theme .pagination-info {
    color: rgba(15, 23, 42, 0.7);
}

body.light-theme .pagination-info strong {
    color: #0ea5e9;
}

body.light-theme .pagination-buttons span {
    color: rgba(15, 23, 42, 0.7);
}

body.light-theme .pagination-buttons strong {
    color: #0ea5e9;
}

body.light-theme .pagination-btn {
    border-color: #cbd5e1;
    background: white;
    color: #0f172a;
}

body.light-theme .pagination-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

body.light-theme .pagination-btn:disabled {
    opacity: 0.4;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* ========== RESPONSIVIDADE (Paginação) ========== */
@media (max-width: 768px) {
    .pagination-controls {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .pagination-buttons {
        gap: 6px;
        font-size: 11px;
    }
    
    .pagination-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .pagination-info {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .pagination-buttons span {
        display: none; /* Oculta "Página X de Y" em telas pequenas */
    }
    
    .pagination-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}


