.file-manager-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.file-manager-page .page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-header-right {
    display: flex;
    gap: 0.25rem;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group select {
    min-width: 180px;
}

.upload-card {
    margin-bottom: 1rem;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background-color: var(--bg);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.upload-input {
    display: none;
}

.progress-bar {
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
}

.upload-status {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.file-grid-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.file-grid-item:hover {
    box-shadow: var(--shadow-md);
}

.file-grid-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.file-grid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-grid-info {
    padding: 0.5rem;
    font-size: 0.75rem;
    word-break: break-all;
}

.preview-img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: var(--radius);
}

.file-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
}

.file-thumb-placeholder {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 1.25rem;
}

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

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group select {
        min-width: auto;
    }
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
