/* ═══════════════════════════════════════════════════════════════════ */
/* NOVO DESIGN DO MODAL DE UPLOAD */
/* ═══════════════════════════════════════════════════════════════════ */

.modal-upload {
    max-width: 700px;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-upload .modal-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 2px solid var(--accent);
    margin: 0;
}

.modal-upload .modal-title {
    font-size: 1.125rem;
    color: var(--accent);
}

/* Container scrollável para o conteúdo */
.modal-upload form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.modal-upload .modal-body-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Seções do modal */
.modal-section {
    padding: 1rem 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.section-header i {
    color: var(--accent);
    font-size: 1rem;
}

.section-header span {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Separador visual entre seções */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 0;
}

/* Display de destino */
.destination-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.destination-display:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.1);
}

.dest-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    border-radius: 0.375rem;
    font-size: 1.125rem;
    color: white;
    flex-shrink: 0;
}

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

.dest-info label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.dest-path {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dest-change-btn {
    padding: 0.75rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.dest-change-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* Seletor de pastas */
.folder-selector {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

.folder-selector-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.folder-list {
    display: grid;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.folder-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.folder-option i {
    font-size: 1.125rem;
    color: var(--accent);
    transition: all 0.2s ease;
}

.folder-option span {
    font-weight: 500;
    color: var(--text-primary);
}

.folder-option:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateX(4px);
}

.folder-option.selected {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.folder-option.selected i,
.folder-option.selected span {
    color: white;
}

/* Botões de seleção de arquivos */
.file-selection-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.file-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.2);
}

.file-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1.5rem;
    color: var(--accent);
    transition: all 0.3s ease;
}

.file-btn:hover .file-btn-icon {
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    border-color: var(--accent);
    color: white;
    transform: scale(1.1);
}

.file-btn-text {
    text-align: left;
}

.file-btn-text strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-btn-text small {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Ações do modal - FIXAS NA PARTE INFERIOR */
.modal-actions {
    display: flex;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    margin-top: auto;
}

.btn-action {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-clear {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-clear:hover {
    background: #7f1d1d;
    border-color: var(--error);
    color: var(--error);
}

.btn-submit {
    flex: 1.5;
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    color: white;
    border-color: var(--accent);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0ea5e9, var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════ */
/* PREVIEW DE ARQUIVOS SELECIONADOS */
/* ═══════════════════════════════════════════════════════════════════ */

#file-preview {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

/* Cabeçalho do preview */
/* Container da lista de arquivos - CORRIGE SCROLL DUPLO */
.file-preview-list {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

.files-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.preview-header-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.preview-header-title i {
    color: #10b981;
    font-size: 1.25rem;
}

.preview-header-title span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-header-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-count {
    padding: 0.25rem 0.625rem;
    background: var(--accent);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.file-total-size {
    padding: 0.25rem 0.625rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Lista de arquivos */
.files-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar customizada */
.files-preview-list::-webkit-scrollbar {
    width: 6px;
}

.files-preview-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.files-preview-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* Card de arquivo */
.file-preview-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-preview-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateX(4px);
}

/* Ícone do arquivo */
.file-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.file-preview-card:hover .file-card-icon {
    transform: scale(1.1);
}

/* Cores dos ícones por tipo */
.icon-image {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.icon-video {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.icon-pdf {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
}

.icon-word {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.icon-excel {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.icon-ppt {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
}

.icon-archive {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.icon-code {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.icon-default {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
}

/* Informações do arquivo */
.file-card-info {
    flex: 1;
    min-width: 0;
}

.file-card-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.file-card-size {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Botão de remover */
.file-card-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-card-remove:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    transform: scale(1.1) rotate(90deg);
}

