/**
 * Car Drive Management - Estilos Customizados
 * Correção de contraste e melhorias visuais
 */

/* ===== CORREÇÕES DE CONTRASTE ===== */

/* Texto principal da tabela */
.table tbody td {
    color: #2c3e50 !important;
    font-weight: 500;
}

/* Cabeçalhos da tabela */
.table thead th {
    color: #1a252f !important;
    font-weight: 600;
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6;
}

/* Texto em geral */
.page-content {
    color: #2c3e50;
}

.page-content h1,
.page-content h2,
.page-content h3 {
    color: #1a252f !important;
}

/* Filtros e labels */
.filters-form label {
    color: #495057 !important;
    font-weight: 600;
}

.filters-form input,
.filters-form select {
    color: #495057 !important;
    border: 1px solid #ced4da;
}

.filters-form input::placeholder {
    color: #6c757d !important;
}

/* ===== STATUS BADGES ===== */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-ativo,
.status-ativa {
    background-color: #d4edda;
    color: #155724 !important;
    border: 1px solid #c3e6cb;
}

.status-inativo {
    background-color: #f8d7da;
    color: #721c24 !important;
    border: 1px solid #f5c6cb;
}

.status-pausada,
.status-manutencao {
    background-color: #fff3cd;
    color: #856404 !important;
    border: 1px solid #ffeaa7;
}

.status-concluida,
.status-aprovado {
    background-color: #d1ecf1;
    color: #0c5460 !important;
    border: 1px solid #bee5eb;
}

.status-pendente {
    background-color: #e2e3e5;
    color: #383d41 !important;
    border: 1px solid #d6d8db;
}

.status-rejeitado,
.status-expirado {
    background-color: #f8d7da;
    color: #721c24 !important;
    border: 1px solid #f5c6cb;
}

/* ===== BOTÕES DE AÇÃO ===== */
.btn {
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    margin: 0 2px;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white !important;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529 !important;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white !important;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white !important;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* ===== MELHORIAS VISUAIS ESPECÍFICAS ===== */

/* Parada Inicial → Destino nas rotas */
.table tbody td div[style*="line-height"] {
    color: #2c3e50 !important;
}

.table tbody td div[style*="line-height"] strong {
    color: #1a252f !important;
}

.table tbody td div[style*="line-height"] span[style*="color: #007cba"] {
    color: #007cba !important;
    font-weight: bold;
    font-size: 16px;
}

/* Valores monetários nos orçamentos */
.table tbody td strong[style*="color: #28a745"] {
    color: #28a745 !important;
    font-weight: 700;
}

/* Números e códigos importantes */
.table tbody td strong {
    color: #1a252f !important;
    font-weight: 600;
}

/* Data/hora formatada */
.table tbody td div[style*="font-size: 0.9em"] {
    color: #495057 !important;
}

.table tbody td div[style*="font-size: 0.9em"] strong {
    color: #2c3e50 !important;
}

/* ===== CORREÇÕES ESPECÍFICAS PARA LISTAGEM DE EMPRESAS ===== */

/* Garante cores corretas na tabela de listagem */
.car-drive-empresas .table td,
.car-drive-empresas .table th {
    color: #212529 !important;
}

/* Status INATIVO na listagem */
.car-drive-empresas .table .status-inativo,
.car-drive-empresas .table td:contains("INATIVO") {
    color: #dc3545 !important;
    font-weight: 600 !important;
}

/* Ações na tabela */
.car-drive-empresas .table .btn {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Força visibilidade dos ícones */
.car-drive-empresas .table .btn i,
.car-drive-empresas .table .btn .icon {
    color: inherit !important;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .table {
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .status {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* ===== ESTADOS DE LOADING E EMPTY ===== */
.table tbody td div[style*="color: #6c757d"] {
    color: #6c757d !important;
}

.table tbody td div[style*="color: #6c757d"] h4 {
    color: #495057 !important;
    margin-bottom: 10px;
}

.table tbody td div[style*="color: #6c757d"] p {
    color: #6c757d !important;
    margin-bottom: 15px;
}

/* ===== CARD E CONTAINERS ===== */
.card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header h1 {
    color: #1a252f !important;
    font-weight: 600;
}

/* ===== FILTROS ===== */
.filters-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.btn-filter {
    font-weight: 500;
    border-radius: 4px;
}

.btn-filter-primary {
    background-color: #007cba;
    border-color: #007cba;
    color: white !important;
}

.btn-filter-primary:hover {
    background-color: #005a87;
    border-color: #004c75;
}

.btn-filter-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white !important;
    text-decoration: none;
}

.btn-filter-secondary:hover {
    background-color: #545b62;
    border-color: #4e555b;
    text-decoration: none;
}

/* ===== BOTÕES HEADER ===== */
.btn-new-item,
.btn-import {
    font-weight: 600;
    border-radius: 6px;
    padding: 12px 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-new-item {
    background-color: #28a745;
    color: white !important;
}

.btn-new-item:hover {
    background-color: #218838;
    text-decoration: none;
}

.btn-import {
    background-color: #007cba;
    color: white !important;
    margin-left: 10px;
}

.btn-import:hover {
    background-color: #005a87;
    text-decoration: none;
}
