/* Estilos para os filtros e cards de estatísticas */

/* Cards de estatísticas - Reduzir altura */
.stat-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    min-height: 90px; /* Reduzido de 120px */
}

.stat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.clickable-card {
    position: relative;
    overflow: hidden;
}

.clickable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.clickable-card:hover::before {
    left: 100%;
}

.clickable-card:active {
    transform: scale(0.98);
}

/* Indicador visual para card ativo */
.clickable-card.active {
    border: 2px solid rgba(255,255,255,0.8); /* Reduzido de 3px */
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
    position: relative;
}

.clickable-card.active::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.stat-card .card-body {
    padding: 0.75rem 0.5rem; /* Reduzido de 1.5rem 1rem */
}

.stat-card i {
    opacity: 0.9;
    font-size: 1.5rem !important; /* Reduzido de 2rem */
    margin-bottom: 0.25rem !important; /* Reduzido de 0.5rem */
}

.stat-card h4 {
    font-size: 1.25rem !important; /* Reduzido de 1.5rem */
    margin-bottom: 0.15rem !important; /* Reduzido de 0.25rem */
}

.stat-card small {
    font-size: 0.75rem !important; /* Reduzido de 0.875rem */
}

/* Filtros - Layout mais compacto */
.filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px; /* Reduzido de 10px */
    padding: 1rem; /* Reduzido de 1.5rem */
    margin-bottom: 1.5rem; /* Reduzido de 2rem */
}

/* Corrigir filtros no tema escuro */
.theme-dark .filter-section {
    background: linear-gradient(135deg, #27272a 0%, #3f3f46 100%) !important;
    border: 1px solid #52525b !important;
}

/* Layout mais compacto para filtros */
.filter-section .row {
    align-items: center;
}

.filter-section .col-md-4 {
    margin-bottom: 0.5rem; /* Reduzido de 1rem */
}

.filter-section .col-md-8 {
    margin-bottom: 0.5rem; /* Reduzido de 1rem */
}

.filter-dropdown .btn {
    border-radius: 20px; /* Reduzido de 25px */
    padding: 0.3rem 0.6rem; /* Mais compacto */
    font-weight: 500;
    font-size: 0.85rem; /* Menor */
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    flex-shrink: 0;
}

.filter-dropdown .btn:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.filter-dropdown .dropdown-menu {
    border-radius: 8px; /* Reduzido de 10px */
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: none;
    padding: 0.4rem 0; /* Reduzido de 0.5rem 0 */
    z-index: 999 !important;
}

.filter-dropdown .dropdown-item {
    padding: 0.6rem 1.2rem; /* Reduzido de 0.75rem 1.5rem */
    transition: all 0.2s ease;
    font-size: 0.9rem; /* Reduzido */
}

.filter-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Corrigir dropdown items no tema escuro */
.theme-dark .filter-dropdown .dropdown-item:hover {
    background-color: #3f3f46 !important;
    color: #fafafa !important;
}

.filter-dropdown .dropdown-item.active {
    background-color: #007bff;
    color: white;
}

/* Barra de busca - Mais compacta */
.search-form .input-group {
    border-radius: 20px; /* Reduzido de 25px */
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.search-form .form-control {
    border: none;
    padding: 0.6rem 1rem; /* Reduzido de 0.75rem 1.25rem */
    font-size: 0.9rem; /* Reduzido de 0.95rem */
}

/* Corrigir barra de busca no tema escuro */
.theme-dark .search-form .form-control {
    background-color: #27272a !important;
    color: #fafafa !important;
}

.theme-dark .search-form .form-control::placeholder {
    color: #a1a1aa !important;
}

.search-form .form-control:focus {
    box-shadow: none;
    border-color: #007bff;
}

.search-form .btn {
    border: none;
    padding: 0.6rem 1rem; /* Reduzido de 0.75rem 1.25rem */
    background-color: #007bff;
    color: white;
    transition: all 0.3s ease;
}

/* Corrigir botão de busca no tema escuro */
.theme-dark .search-form .btn {
    background-color: #3b82f6 !important;
    color: white !important;
}

.search-form .btn:hover {
    background-color: #0056b3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Corrigir hover do botão de busca no tema escuro */
.theme-dark .search-form .btn:hover {
    background-color: #2563eb !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Badges de prioridade e status */
.priority-badge, .status-badge {
    font-size: 0.7rem; /* Reduzido de 0.75rem */
    padding: 0.3rem 0.6rem; /* Reduzido de 0.35rem 0.75rem */
    border-radius: 12px; /* Reduzido de 15px */
    font-weight: 500;
}

/* Contador de resultados */
.results-counter {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 0.4rem 0.8rem; /* Reduzido de 0.5rem 1rem */
    border-radius: 15px; /* Reduzido de 20px */
    font-size: 0.85rem; /* Reduzido de 0.9rem */
    font-weight: 500;
}

/* Estado vazio */
.empty-state {
    padding: 2rem 1rem; /* Reduzido de 3rem 1rem */
    text-align: center;
}

.empty-state i {
    opacity: 0.3;
    margin-bottom: 0.75rem; /* Reduzido de 1rem */
}

/* Responsividade otimizada */
@media (max-width: 768px) {
    .filter-section {
        padding: 0.75rem; /* Reduzido de 1rem */
    }
    
    .filter-dropdown .btn {
        font-size: 0.85rem; /* Reduzido de 0.9rem */
        padding: 0.35rem 0.7rem; /* Reduzido de 0.4rem 0.8rem */
    }
    
    .stat-card .card-body {
        padding: 0.75rem 0.4rem; /* Reduzido de 1rem 0.5rem */
    }
    
    .stat-card h4 {
        font-size: 1.2rem; /* Reduzido de 1.5rem */
    }
    
    .stat-card i {
        font-size: 1.3rem !important; /* Reduzido de 1.5rem */
    }
    
    .stat-card {
        min-height: 80px; /* Reduzido de 90px */
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px); /* Reduzido de 30px */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeInUp 0.5s ease-out; /* Reduzido de 0.6s */
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; } /* Reduzido de 0.2s */
.stat-card:nth-child(3) { animation-delay: 0.2s; } /* Reduzido de 0.3s */
.stat-card:nth-child(4) { animation-delay: 0.25s; } /* Reduzido de 0.4s */
.stat-card:nth-child(5) { animation-delay: 0.3s; } /* Reduzido de 0.5s */
.stat-card:nth-child(6) { animation-delay: 0.35s; } /* Reduzido de 0.6s */

/* Melhorar espaçamento da tabela */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
    transition: all 0.2s ease;
}

.clickable-row {
    transition: all 0.2s ease;
}

.clickable-row:hover {
    background-color: rgba(0, 123, 255, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Filtros aplicados mais compactos */
.applied-filters {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    padding: 0.5rem 0.75rem; /* Reduzido de 0.75rem 1rem */
    margin-bottom: 1rem; /* Reduzido de 1.5rem */
    border-left: 4px solid #2196f3;
}

.theme-dark .applied-filters {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    border-left-color: #3b82f6 !important;
}

.applied-filters small {
    font-size: 0.85rem; /* Reduzido de 0.9rem */
    color: #1976d2;
    font-weight: 500;
}

.theme-dark .applied-filters small {
    color: #93c5fd !important;
}

/* Melhorar espaçamento geral */
.mb-4 {
    margin-bottom: 1.5rem !important; /* Reduzido de 2rem */
}

.mb-3 {
    margin-bottom: 1rem !important; /* Reduzido de 1.5rem */
}

/* Otimizar espaçamento dos cards de estatísticas */
.row.mb-4:first-of-type {
    margin-bottom: 1rem !important; /* Reduzir espaço após título */
}

/* Reduzir espaçamento entre elementos de filtro */
.filter-section .d-flex.flex-wrap {
    gap: 0.5rem !important; /* Reduzido de 0.75rem */
}

/* Otimizar alerta de dica */
.alert-info {
    padding: 0.75rem 1rem; /* Reduzido de 1rem 1.25rem */
    margin-bottom: 1rem; /* Reduzido de 1.5rem */
    font-size: 0.9rem; /* Reduzido */
}

/* Melhorar densidade da tabela */
.table th,
.table td {
    padding: 0.75rem 0.5rem; /* Reduzido de 1rem 0.75rem */
    vertical-align: middle;
}

.table th {
    font-size: 0.9rem; /* Reduzido */
    font-weight: 600;
}

.table td {
    font-size: 0.9rem; /* Reduzido */
}

/* Otimizar espaçamento do cabeçalho da página */
.h3.mb-0 {
    margin-bottom: 0.25rem !important; /* Reduzido de 0.5rem */
}

.text-muted {
    margin-bottom: 1rem !important; /* Reduzido de 1.5rem */
} 

/* --- OTIMIZAÇÃO AGRESSIVA DA ÁREA DE FILTROS --- */
.filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    padding: 0.4rem 0.7rem 0.2rem 0.7rem; /* Bem mais compacto */
    margin-bottom: 1rem;
    box-shadow: none;
    border: 1px solid #e0e0e0;
}
.theme-dark .filter-section {
    background: linear-gradient(135deg, #232326 0%, #35353a 100%) !important;
    border: 1px solid #35353a !important;
}
.filter-section .card-body {
    padding: 0.2rem 0.2rem 0.1rem 0.2rem !important;
}
.filter-section .row {
    margin-left: 0;
    margin-right: 0;
}
.filter-section .col-md-4,
.filter-section .col-md-8 {
    margin-bottom: 0 !important;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}
.search-form .input-group {
    border-radius: 16px;
    box-shadow: none;
    min-height: 32px;
    height: 32px;
}
.search-form .form-control {
    border: none;
    padding: 0.3rem 0.7rem;
    font-size: 0.92rem;
    min-height: 32px;
    height: 32px;
    background: none;
}
.search-form .btn {
    border: none;
    padding: 0.3rem 0.7rem;
    min-height: 32px;
    height: 32px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    background-color: #3b82f6;
    color: #fff;
    border-radius: 0 16px 16px 0;
}
.theme-dark .search-form .btn {
    background-color: #6366f1 !important;
    color: #fff !important;
}
.filter-dropdown .btn {
    border-radius: 16px;
    padding: 0.25rem 0.7rem;
    font-size: 0.92rem;
    min-height: 32px;
    height: 32px;
    display: flex;
    align-items: center;
}
.filter-dropdown .dropdown-menu {
    border-radius: 8px;
    min-width: 150px;
    font-size: 0.95rem;
}
.filter-dropdown .dropdown-item {
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
}
.filter-section .d-flex.flex-wrap {
    gap: 0.3rem !important;
}
@media (max-width: 768px) {
    .filter-section {
        padding: 0.2rem 0.2rem 0.1rem 0.2rem;
    }
    .search-form .input-group,
    .search-form .form-control,
    .search-form .btn,
    .filter-dropdown .btn {
        min-height: 28px;
        height: 28px;
        font-size: 0.88rem;
        padding: 0.15rem 0.5rem;
    }
} 