/**
 * Estilos para Relatório de Utilização da Biblioteca de Planilhas
 * @author Jonas Oliveira + Claude Code
 * Data: 14/10/2025
 */

/* Cards de Estatísticas */
.small-box {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.small-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.small-box .inner h3 {
    font-size: 2.5rem;
    font-weight: 700;
}

.small-box .icon {
    font-size: 70px;
    opacity: 0.4;
}

/* Cards */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border-radius: 0.5rem;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.125);
    background-color: #f8f9fa;
}

.card-title {
    font-weight: 600;
    margin: 0;
}

/* Gráficos */
.chart canvas {
    max-height: 250px !important;
}

/* Filtros */
.card-outline.card-primary {
    border-top: 3px solid #007bff;
}

/* DataTable Customizações */
#tabelaRanking,
#tabelaAlunos {
    font-size: 0.95rem;
}

#tabelaRanking thead th,
#tabelaAlunos thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

#tabelaRanking tbody tr:hover,
#tabelaAlunos tbody tr:hover {
    background-color: #f5f5f5;
}

/* Badges de Status e Taxa */
.badge {
    font-size: 0.85rem;
    padding: 0.4em 0.6em;
    font-weight: 500;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-info {
    background-color: #17a2b8;
}

/* Botões de Ação */
.btn-ver-alunos {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn-ver-alunos:hover {
    opacity: 0.8;
}

/* Modal */
.modal-header.bg-primary {
    color: #fff;
}

.modal-lg {
    max-width: 900px;
}

/* Select2 Customização */
.select2-container--bootstrap4 .select2-selection {
    height: calc(2.25rem + 2px);
}

/* DateRangePicker */
.daterangepicker {
    z-index: 3000;
}

/* Responsividade */
@media (max-width: 768px) {
    .small-box .inner h3 {
        font-size: 2rem;
    }

    .small-box .icon {
        font-size: 50px;
    }

    #tabelaRanking,
    #tabelaAlunos {
        font-size: 0.85rem;
    }

    .badge {
        font-size: 0.75rem;
    }

    .card-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .small-box .inner h3 {
        font-size: 1.5rem;
    }

    .small-box .inner p {
        font-size: 0.9rem;
    }

    .small-box .icon {
        font-size: 40px;
    }
}

/* Loading States */
.dataTables_processing {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 0.5rem;
    padding: 1rem !important;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-in-out;
}

.row .col-lg-3,
.row .col-lg-6 {
    animation: fadeIn 0.4s ease-in-out;
}

/* Texto Centralizado */
.text-center {
    text-align: center !important;
}

/* Melhorias de Acessibilidade */
.btn-ver-alunos:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* DataTables Responsive */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background-color: #007bff;
}

/* Ajustes para impressão */
@media print {
    .card-tools,
    .btn-ver-alunos,
    .breadcrumb,
    #formFiltros,
    .card-outline.card-primary {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }

    .small-box {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .chart canvas {
        max-height: none !important;
    }
}

/* Cores dos Cards */
.small-box.bg-info {
    background-color: #17a2b8 !important;
}

.small-box.bg-primary {
    background-color: #007bff !important;
}

.small-box.bg-success {
    background-color: #28a745 !important;
}

.small-box.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

/* Tooltips */
[data-toggle="tooltip"] {
    cursor: pointer;
}
