.upload-manager {
    margin-top: 16px;
}

.upload-box {
    padding: 30px 20px;
    border: 2px dashed #94a3b8;
    border-radius: 10px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.upload-box:hover,
.upload-box:focus,
.upload-box.dragover {
    border-color: #2563eb;
    background: #eff6ff;
    outline: none;
}

.upload-icon {
    margin-bottom: 8px;
    font-size: 40px;
}

.upload-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: bold;
}

.upload-help {
    max-width: 600px;
    margin: 0 auto 16px;
    color: #64748b;
    line-height: 1.5;
}

.upload-file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.upload-preview {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

.upload-preview-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #e5e7eb;
    color: #475569;
    font-size: 38px;
}

.upload-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.upload-preview-info {
    padding: 8px;
}

.upload-preview-name {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: bold;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-preview-size {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.upload-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    color: white;
    background: rgba(17, 24, 39, 0.88);
    font-size: 20px;
    line-height: 30px;
    cursor: pointer;
}

.upload-submit {
    margin-top: 10px;
}

@media (max-width: 700px) {
    .upload-box {
        padding: 24px 14px;
    }

    .upload-file-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .upload-file-list {
        grid-template-columns: 1fr;
    }

    .upload-submit {
        width: 100%;
    }
}
.existing-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.existing-file-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: white;
}

.existing-file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f1f5f9;
    text-decoration: none;
}

.existing-file-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.existing-file-icon {
    font-size: 46px;
}

.existing-file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
}

.existing-file-name {
    overflow: hidden;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.existing-file-name:hover {
    text-decoration: underline;
}

.existing-file-comment {
    margin-top: 4px;
    color: #374151;
    font-size: 13px;
    line-height: 1.35;
}

@media (max-width: 700px) {
    .existing-file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .existing-file-grid {
        grid-template-columns: 1fr;
    }
}
.upload-status {
    min-height: 20px;
    margin: 8px 0 16px;
    font-weight: bold;
}