/* ========================================
   CORREÇÃO DE CAMPOS TRANSPARENTES
   ESTILOS GLOBAIS PARA TODOS OS MÓDULOS
   ======================================== */

/* Colunas de Fretes e Manutenções - Círculos coloridos */
table td:has(.badge-circle),
table th:has(+ td .badge-circle) {
    text-align: center;
    vertical-align: middle;
}

/* Badge circular para contadores */
.badge-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 15px;
    color: white !important;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.badge-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* Badge circular verde para OK/Sucesso */
.badge-circle.success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.badge-circle.success:hover {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* Badge circular laranja para Atenção */
.badge-circle.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.badge-circle.warning:hover {
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

/* Badge circular vermelho para Alerta */
.badge-circle.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.badge-circle.danger:hover {
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* Badge para Tipo (CNH, Manutenção, etc) */
.badge-tipo {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    color: white !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge para Status CNH */
.badge-status-cnh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    color: white !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.badge-status-cnh.ok {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.badge-status-cnh.vencida {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.badge-status-cnh.proximo {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

/* Correção de células da tabela */
table td {
    padding: 16px 12px;
    vertical-align: middle;
    color: #333 !important;
    font-size: 14px;
}

table th {
    padding: 16px 12px;
    background: #f5f6fa;
    color: #333 !important;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

/* Hover nas linhas */
table tbody tr:hover {
    background: #f8f9fa;
}

/* Texto forte em células */
table td strong {
    color: #1a1a2e !important;
    font-weight: 600;
}

/* Links em células */
table td a {
    color: #2196f3 !important;
    text-decoration: none;
    font-weight: 500;
}

table td a:hover {
    text-decoration: underline;
}

/* Botões de ação em células */
table .table-actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* Garantir que badges não fiquem transparentes */
.badge,
[class*="badge-"] {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Correção específica para campos de input transparentes */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    background: white !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    opacity: 1 !important;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: #2196f3 !important;
    background: white !important;
}

/* Correção de placeholders */
::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* Garantir visibilidade de todos os textos */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Correção para elementos com baixa opacidade */
[style*="opacity: 0"],
[style*="opacity:0"] {
    opacity: 1 !important;
}

/* Garantir contraste mínimo */
table td,
table th,
.card,
.badge,
button,
input,
select,
textarea {
    color: #333 !important;
}

/* Background branco para garantir contraste */
table,
.table-responsive,
.card {
    background: white !important;
}

/* Correção de sombras muito claras */
.card,
table,
.badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .badge-circle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .badge-tipo,
    .badge-status-cnh {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    table td,
    table th {
        padding: 12px 8px;
        font-size: 13px;
    }
}
