/* dashboard.css */

.top-spacing-reduced {
    margin-top: -2rem;
}

.title-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(1, 104, 103, 0.2);
}

.page-title {
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #012e2d;
    position: relative;
    text-align: center;
}

.title-highlight {
    font-size: 1.8rem;
    display: block;
    color: #016867;
}

.page-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.5rem;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #07b4b1, transparent);
    transform: translateX(-50%);
}

/* Card de upload melhorado */
.upload-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: white;
    margin-bottom: 2rem;
}

.upload-card .card-body {
    padding: 2rem;
}

/* Formulário de upload moderno */
.upload-form-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.file-input-wrapper {
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.file-input-btn {
    background: linear-gradient(135deg, #016867, #07b4b1);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.file-input-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 104, 103, 0.3);
}

.file-display {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-weight: 500;
    min-height: 50px;
}

.file-display.has-file {
    background: #e8f5e8;
    border-color: #07b4b1;
    color: #016867;
}

.upload-btn {
    background: linear-gradient(135deg, #0b55c5, #0d6efd);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
}

.upload-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Seção de uploads */
.uploads-section {
    margin-top: 2rem;
}

.section-title {
    color: #012e2d;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(1, 104, 103, 0.1);
}

/* Tabela */
.uploads-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.uploads-table .table {
    margin-bottom: 0;
}

.uploads-table thead th {
    background: linear-gradient(135deg, #016867, #07b4b1);
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
}

/* Controle de largura das colunas da tabela */
.uploads-table thead th:nth-child(1),  /* Arquivo */
.uploads-table tbody td:nth-child(1) {
    width: 40%;
    min-width: 200px;
}

.uploads-table tbody td:nth-child(1) {
    word-wrap: break-word;
    max-width: 300px;
}

.uploads-table thead th:nth-child(2),  /* Status */
.uploads-table tbody td:nth-child(2) {
    width: 15%;
    min-width: 120px;
    text-align: center;
}

.uploads-table thead th:nth-child(3),  /* Data */
.uploads-table tbody td:nth-child(3) {
    width: 20%;
    min-width: 150px;
}

.uploads-table thead th:nth-child(4),  /* Ação */
.uploads-table tbody td:nth-child(4) {
    width: 25%;
    min-width: 180px;
}

.uploads-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f1f3f4;
}

.uploads-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status badges */
.status-badge {
    padding: 0.35rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-block;
    text-align: center;
    min-width: 100px;
    white-space: nowrap;
}

.status-processing {
    background: #e3f2fd;
    color: #1976d2;
}

.status-complete {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-error {
    background: #ffebee;
    color: #c62828;
}

.status-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.status-cancelled {
    background: #f5f5f5;
    color: #757575;
}

.status-deleted {
    background: #fafafa;
    color: #9e9e9e;
}

/* Botões de ação */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

.btn-action {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
}

.btn-download {
    background: #28a745;
    color: white;
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Flash messages */
.flash-messages {
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Responsividade */
@media (max-width: 992px) {
    .uploads-table thead th:nth-child(1),
    .uploads-table tbody td:nth-child(1) {
        width: 35%;
        min-width: 180px;
    }
    
    .uploads-table thead th:nth-child(2),
    .uploads-table tbody td:nth-child(2) {
        width: 15%;
        min-width: 100px;
    }
    
    .uploads-table thead th:nth-child(3),
    .uploads-table tbody td:nth-child(3) {
        width: 20%;
        min-width: 130px;
    }
    
    .uploads-table thead th:nth-child(4),
    .uploads-table tbody td:nth-child(4) {
        width: 30%;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .upload-card .card-body {
        padding: 1.5rem;
    }
    
    .file-input-wrapper {
        flex-direction: column;
    }
    
    .file-display {
        min-height: 45px;
    }
    
    .uploads-table {
        font-size: 0.85rem;
    }

    .uploads-table thead th:nth-child(1),
    .uploads-table tbody td:nth-child(1) {
        width: 30%;
        min-width: 150px;
    }
    
    .uploads-table thead th:nth-child(3),
    .uploads-table tbody td:nth-child(3) {
        width: 25%;
        min-width: 120px;
    }
    
    .uploads-table thead th:nth-child(4),
    .uploads-table tbody td:nth-child(4) {
        width: 35%;
        min-width: 140px;
    }
    
    .status-badge {
        font-size: 0.7rem;
        min-width: 90px;
        padding: 0.3rem 0.4rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }

    .btn-action {
        min-width: 70px;
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .title-highlight {
        font-size: 1.5rem;
    }
    
    .upload-card .card-body {
        padding: 1rem;
    }
    .action-buttons {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
    }
    
    .uploads-table thead th:nth-child(2),
    .uploads-table tbody td:nth-child(2) {
        width: 20%;
        min-width: 80px;
    }
    
    .uploads-table thead th:nth-child(4),
    .uploads-table tbody td:nth-child(4) {
        width: 40%;
        min-width: 120px;
    }
}