﻿/* Estilos para a página de gerenciamento de arquivos */

/* Container principal */
.arquivos-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Cards de estatísticas */
.stats-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

    .stats-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

/* Área de filtros */
.filtros-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
}

/* Lista de arquivos - modo grid */
.arquivos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

/* Cartão de arquivo individual */
.arquivo-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

    .arquivo-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

    .arquivo-card.selecionado {
        border-color: #007bff;
        background: linear-gradient(145deg, #f8f9ff, #ffffff);
    }

/* Header do cartão de arquivo */
.arquivo-card-header {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.arquivo-icone {
    font-size: 2rem;
    margin-right: 0.75rem;
    width: 40px;
    text-align: center;
}

.arquivo-nome {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Corpo do cartão */
.arquivo-card-body {
    padding: 1rem;
}

.arquivo-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.meta-label {
    color: #6c757d;
    font-weight: 500;
}

.meta-value {
    color: #495057;
    font-weight: 600;
}

/* Badges de tipo */
.tipo-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ações do cartão */
.arquivo-acoes {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.btn-acao {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .btn-acao:hover {
        transform: translateY(-1px);
    }

/* Modo lista */
.arquivos-lista {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

    .arquivos-lista .table {
        margin: 0;
    }

        .arquivos-lista .table th {
            background: #f8f9fa;
            border-bottom: 2px solid #e9ecef;
            font-weight: 600;
            color: #495057;
            padding: 1rem 0.75rem;
        }

        .arquivos-lista .table td {
            padding: 0.875rem 0.75rem;
            vertical-align: middle;
            border-top: 1px solid #e9ecef;
        }

        .arquivos-lista .table tr:hover {
            background-color: #f8f9ff;
        }

        .arquivos-lista .table tr.selecionado {
            background-color: #e7f3ff;
        }

/* Checkbox customizado */
.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

/* Botões de ação customizados */
.btn-group-arquivo {
    display: flex;
    gap: 0.25rem;
}

.btn-arquivo {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .btn-arquivo:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid #e9ecef;
    border-top: 0.3rem solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

    .empty-state .icon {
        font-size: 4rem;
        margin-bottom: 1rem;
        opacity: 0.5;
    }

    .empty-state h4 {
        color: #495057;
        margin-bottom: 0.5rem;
    }

/* Seleção múltipla */
.selecao-info {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .selecao-info .info {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .selecao-info .acoes {
        display: flex;
        gap: 0.5rem;
    }

/* Modal de visualização */
.modal-visualizacao .modal-dialog {
    max-width: 90vw;
    max-height: 90vh;
}

.modal-visualizacao .modal-body {
    padding: 0;
    max-height: 80vh;
    overflow: auto;
}

.modal-visualizacao img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-visualizacao iframe {
    width: 100%;
    height: 80vh;
    border: none;
}

/* Progress bar customizada */
.progress-custom {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
}

    .progress-custom .progress-bar {
        border-radius: 10px;
        transition: width 0.3s ease;
    }

/* Filtros responsivos */
@media (max-width: 768px) {
    .arquivos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }

    .stats-row {
        margin-bottom: 1rem;
    }

        .stats-row .col-md-3 {
            margin-bottom: 1rem;
        }

    .filtros-area .row > .col-md-3 {
        margin-bottom: 0.75rem;
    }
}

/* Animações de entrada */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Tooltip customizado */
.tooltip-custom {
    position: relative;
    cursor: pointer;
}

    .tooltip-custom::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }

    .tooltip-custom:hover::after {
        opacity: 1;
    }

/* Scrollbar customizada */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
