/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 20px;
}

.upload-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.upload-card h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.upload-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* File Input Styling */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-display {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f7fafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-input-display:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.file-input-display.dragover {
    border-color: #667eea;
    background: #edf2f7;
    transform: scale(1.02);
}

.file-input-display i {
    font-size: 2rem;
    color: #a0aec0;
    margin-bottom: 10px;
    display: block;
}

.file-input-display span {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 5px;
}

.file-input-display small {
    color: #718096;
    font-size: 0.875rem;
}

/* Upload Button */
.btn-upload {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-upload:active {
    transform: translateY(0);
}

.btn-upload:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Navigation Tabs */
.navigation-section {
    margin-bottom: 20px;
}

.nav-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow-x: auto;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #718096;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

.tab-btn:hover {
    background: #f7fafc;
    color: #4a5568;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Files Section */
.files-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.files-header h2 {
    color: #4a5568;
    font-size: 1.5rem;
}

.search-box {
    position: relative;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

/* Files List */
.files-list {
    display: grid;
    gap: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fafafa;
    animation: slideUp 0.3s ease;
}

.file-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    background: white;
}

.file-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    color: white;
}

.file-icon.pdf {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}

.file-icon.doc,
.file-icon.docx {
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.file-meta {
    display: flex;
    gap: 15px;
    color: #718096;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.file-category {
    background: #edf2f7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.file-category.certificados {
    background: #fed7d7;
    color: #c53030;
}

.file-category.editais {
    background: #bee3f8;
    color: #3182ce;
}

.file-category.transparencia {
    background: #c6f6d5;
    color: #38a169;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.btn-download,
.btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-download {
    background: #48bb78;
    color: white;
}

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

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

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

/* Loading e Empty States */
.loading-spinner,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.loading-spinner i,
.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.loading-spinner i {
    color: #667eea;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #4a5568;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-content i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.modal-content.success i {
    color: #48bb78;
}

.modal-content.error i {
    color: #f56565;
}

.modal-content.confirm i {
    color: #ed8936;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #2d3748;
}

.modal-content p {
    margin-bottom: 25px;
    color: #718096;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-close,
.btn-cancel,
.btn-confirm {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-close {
    background: #4a5568;
    color: white;
}

.btn-close:hover {
    background: #2d3748;
}

.btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-cancel:hover {
    background: #cbd5e0;
}

.btn-confirm {
    background: #f56565;
    color: white;
}

.btn-confirm:hover {
    background: #e53e3e;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .upload-card,
    .files-section {
        padding: 20px;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-btn {
        min-width: auto;
    }
    
    .files-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .file-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .file-icon {
        margin-right: 0;
    }
    
    .file-meta {
        justify-content: center;
    }
    
    .file-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .file-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-download,
    .btn-delete {
        width: 100%;
        justify-content: center;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

