@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

.active-link { 
    background-color: #1e293b; 
    border-left: 4px solid #f59e0b !important; 
}

.tab-content { 
    display: none; 
    opacity: 0; 
    transition: opacity 0.3s ease-in-out; 
}

.tab-content.active { 
    display: flex; 
    opacity: 1; 
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Modal Styles */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 500px;
    transform: scale(0.95);
    transition: transform 0.2s ease-in-out;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Table Styles */
#viaturasTable tbody tr {
    transition: background-color 0.15s ease;
}

#viaturasTable tbody tr:hover {
    background-color: #f1f5f9;
}

#viaturasTable tbody tr.editing {
    background-color: #fef3c7 !important;
    box-shadow: inset 0 0 0 2px #f59e0b;
}

#viaturasTable tbody tr.editing td {
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Situação badges */
.badge-disponivel {
    background-color: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
}

.badge-baixada {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
}

/* Possui Radio badges */
.badge-sim {
    background-color: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 10px;
}

.badge-nao {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 10px;
}

/* Marca Radio badges */
.badge-motorola {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 10px;
}

.badge-tait {
    background-color: #fce7f3;
    color: #be185d;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 10px;
}

.badge-marca {
    background-color: #e5e7eb;
    color: #374151;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 10px;
}

/* ============================================
   Pagination
   ============================================ */

.pagination-bar {
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 0.75rem 0.75rem;
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
}

.pagination-info {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0 6px;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination-btn.active {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
    box-shadow: 0 1px 3px rgba(245,158,11,0.3);
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    font-size: 12px;
    color: #94a3b8;
    padding: 0 4px;
    font-weight: 700;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.pagination-per-page select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    background: white;
    color: #334155;
    cursor: pointer;
    outline: none;
}

.pagination-per-page select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,0.2);
}

@media (max-width: 640px) {
    .pagination-container {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* Confirma Situacao */
.confirma-true {
    color: #16a34a;
}

.confirma-false {
    color: #dc2626;
}

/* Inline edit inputs */
.inline-edit-input {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    width: 100%;
    min-width: 60px;
    outline: none;
}

.inline-edit-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.inline-edit-select {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 11px;
    width: 100%;
    min-width: 60px;
    background: white;
    outline: none;
    font-weight: 700;
}

/* Dashboard Styles */
.dash-kpi-card { position: relative; }
.dash-kpi-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: 14px; margin-bottom: 8px;
}
.dash-kpi-accent {
    position: absolute; top: 0; left: 0;
    width: 4px; height: 100%;
    border-radius: 999px 0 0 999px;
}
.dash-chart-container { position: relative; height: 200px; }
.dash-chart-container-lg { position: relative; height: 300px; }

.inline-edit-select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Action buttons */
.btn-action {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.btn-action:hover {
    transform: scale(1.05);
}

.btn-confirmar { background-color: #dcfce7; color: #166534; }
.btn-confirmar:hover { background-color: #bbf7d0; }

.btn-editar { background-color: #fef3c7; color: #92400e; }
.btn-editar:hover { background-color: #fde68a; }

.btn-excluir { background-color: #fee2e2; color: #991b1b; }
.btn-excluir:hover { background-color: #fecaca; }

.btn-salvar { background-color: #dbeafe; color: #1e40af; }
.btn-salvar:hover { background-color: #bfdbfe; }

.btn-cancelar { background-color: #f1f5f9; color: #475569; }
.btn-cancelar:hover { background-color: #e2e8f0; }

/* Sort icons */
.sort-asc::before { content: '\f0de'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }
.sort-desc::before { content: '\f0dd'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }

/* Confirmar Modal Info Grid */
.confirmar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.confirmar-item {
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.confirmar-item .label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 2px;
}

.confirmar-item .value {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

/* Responsive */
@media (max-width: 768px) {
    .confirmar-grid {
        grid-template-columns: 1fr;
    }
}
