.pr-downgrade {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 36px 48px;
}

.pd-stage {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.pd-hidden {
    display: none !important;
}

/* 上传区域 */
.pd-upload-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.pd-upload-zone {
    width: 100%;
    max-width: 520px;
    padding: 56px 40px;
    text-align: center;
    background: var(--bg-card);
    border: 2px dashed var(--border-hover);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.pd-upload-zone:hover,
.pd-upload-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-light);
}

.pd-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pd-upload-icon {
    margin-bottom: 20px;
}

.pd-upload-icon img {
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.pd-upload-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-primary);
}

.pd-upload-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.pd-upload-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
}

/* 卡片 */
.pd-card {
    width: 100%;
    max-width: 560px;
    margin: auto;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
}

.pd-card-center {
    text-align: center;
}

/* 文件信息 */
.pd-file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.pd-file-icon {
    flex-shrink: 0;
}

.pd-file-icon img {
    display: block;
    object-fit: contain;
}

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

.pd-file-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.pd-file-size {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 表单 */
.pd-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pd-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 版本下拉样式统一由 components.css 的 .cb-select 组件提供 */

.pd-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.pd-btn-primary {
    min-width: 120px;
}

.pd-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* 处理中 */
.pd-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: pd-spin 1s linear infinite;
}

@keyframes pd-spin {
    to {
        transform: rotate(360deg);
    }
}

.pd-status-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.pd-status-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.pd-progress {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin: 20px 0 12px;
    overflow: hidden;
}

.pd-progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* 完成 / 错误 */
.pd-done-icon,
.pd-error-icon {
    margin-bottom: 16px;
}

.pd-done-icon img {
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.pd-icon-success {
    color: var(--color-success);
}

.pd-icon-danger {
    color: var(--color-danger);
}

.pd-expiry-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 8px 0 0;
}

.pd-expiry-warning {
    color: var(--color-danger);
    font-weight: 600;
}

/* 图标尺寸 */
.pd-icon-xl {
    width: 56px;
    height: 56px;
}

.pd-icon-lg {
    width: 40px;
    height: 40px;
}

/* 响应式 */
@media (max-width: 640px) {
    .pr-downgrade {
        padding: 20px;
    }

    .pd-card {
        padding: 24px;
    }

    .pd-upload-zone {
        padding: 40px 24px;
    }

    .pd-actions {
        flex-direction: column;
        width: 100%;
    }

    .pd-btn-primary,
    .pd-btn-ghost {
        width: 100%;
    }
}
