:root {
    --bg: #f4f7fb;
    --bg-soft: rgba(255, 255, 255, 0.68);
    --card: rgba(255, 255, 255, 0.72);
    --border: rgba(145, 170, 210, 0.25);
    --text: #1f2a44;
    --subtext: #6b7a99;
    --primary: #4f7cff;
    --primary-deep: #355eea;
    --success: #27c093;
    --danger: #e85d75;
    --shadow: 0 18px 50px rgba(80, 112, 180, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%);
    color: var(--text);
    min-height: 100vh;
    position: relative;
}

.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(79, 124, 255, 0.18), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(39, 192, 147, 0.14), transparent 24%),
        radial-gradient(circle at 70% 80%, rgba(124, 87, 255, 0.12), transparent 28%);
    pointer-events: none;
}

.page-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px;
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-bottom: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f7cff, #7c57ff);
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 10px 25px rgba(79, 124, 255, 0.35);
}

.brand h1 {
    margin: 0 0 4px 0;
    font-size: 24px;
}

.brand p {
    margin: 0;
    color: var(--subtext);
    font-size: 14px;
}

.progress-section {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-bottom: 22px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-title h2 {
    margin: 0;
    font-size: 20px;
}

.section-title span {
    color: var(--subtext);
    font-size: 14px;
}

.stepper {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 10px;
}

.step {
    position: relative;
    border: 1px solid rgba(120, 146, 190, 0.2);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.25s ease;
}

.step span {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e9efff;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step label {
    display: block;
    font-size: 13px;
    color: var(--subtext);
}

.step.active {
    border-color: rgba(79, 124, 255, 0.35);
    box-shadow: 0 10px 24px rgba(79, 124, 255, 0.12);
    transform: translateY(-1px);
}

.step.active span {
    background: linear-gradient(135deg, #4f7cff, #7c57ff);
    color: #fff;
}

.step.completed {
    border-color: rgba(39, 192, 147, 0.35);
    background: rgba(39, 192, 147, 0.08);
}

.step.completed span {
    background: linear-gradient(135deg, #27c093, #43d6a8);
    color: #fff;
}

.content-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    padding: 28px;
    min-height: 700px;
}

.step-panel {
    display: none;
    animation: fadeUp 0.3s ease;
}

.step-panel.active {
    display: block;
}

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.panel-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
}

.panel-header p {
    margin: 0;
    color: var(--subtext);
}

.status-badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.12);
    color: var(--primary);
    font-size: 13px;
    white-space: nowrap;
}

.grid-2,
.image-preview-grid,
.textarea-group,
.form-grid {
    display: grid;
    gap: 20px;
}

.grid-2,
.image-preview-grid,
.textarea-group {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 20px;
}

.upload-card,
.img-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(145, 170, 210, 0.2);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.upload-card label,
.form-item label,
.img-card-title {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.upload-dropzone {
    position: relative;
    border: 2px dashed rgba(79, 124, 255, 0.28);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(79, 124, 255, 0.05), rgba(124, 87, 255, 0.03));
    min-height: 200px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.upload-dropzone:hover {
    border-color: rgba(79, 124, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(79, 124, 255, 0.06);
}

.upload-dropzone.dragover {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(79, 124, 255, 0.10), rgba(124, 87, 255, 0.08));
}

.upload-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-inner {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--subtext);
    text-align: center;
    padding: 24px;
}

.upload-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #4f7cff, #7c57ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 14px;
    box-shadow: 0 10px 24px rgba(79, 124, 255, 0.2);
}

.upload-dropzone.locked {
    border-style: solid;
    border-color: rgba(39, 192, 147, 0.35);
    background: linear-gradient(180deg, rgba(39, 192, 147, 0.08), rgba(79, 124, 255, 0.04));
    cursor: not-allowed;
}

.upload-dropzone.locked input[type="file"] {
    pointer-events: none;
}

.upload-empty.hidden,
.upload-success.hidden {
    display: none;
}

.upload-success {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 24px;
}

.upload-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #27c093, #43d6a8);
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 12px 28px rgba(39, 192, 147, 0.22);
}

.upload-success-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.upload-success-name {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 800;
    color: var(--primary-deep);
    background: rgba(79, 124, 255, 0.08);
    border: 1px solid rgba(79, 124, 255, 0.16);
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 12px;
    word-break: break-all;
    max-width: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.upload-success-tip {
    font-size: 13px;
    color: var(--subtext);
}

.file-name {
    margin-top: 12px;
    color: var(--subtext);
    font-size: 13px;
    word-break: break-all;
}

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

input[type="text"],
select,
textarea {
    width: 100%;
    border: 1px solid rgba(145, 170, 210, 0.3);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: rgba(79, 124, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.08);
}

textarea {
    resize: vertical;
    min-height: 180px;
    line-height: 1.65;
}

.img-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(145, 170, 210, 0.2);
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn {
    border: none;
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #4f7cff, #7c57ff);
    color: #fff;
    box-shadow: 0 12px 24px rgba(79, 124, 255, 0.25);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(79, 124, 255, 0.3);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.84);
    color: var(--text);
    border: 1px solid rgba(145, 170, 210, 0.28);
}

.ghost-btn:hover {
    background: #fff;
}

.ghost-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(246, 249, 255, 0.48);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-overlay.hidden {
    display: none;
}

.loading-panel {
    width: 420px;
    max-width: calc(100vw - 40px);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(145, 170, 210, 0.22);
    border-radius: 28px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(80, 112, 180, 0.18);
}

.spinner-wrap {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 20px;
}

.spinner-ring {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 4px solid rgba(79, 124, 255, 0.16);
    border-top-color: #4f7cff;
    animation: rotate 1s linear infinite;
}

.spinner-core {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.18), rgba(124, 87, 255, 0.12));
}

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

.loading-panel h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.loading-panel p {
    margin: 0;
    color: var(--subtext);
    font-size: 15px;
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 240px;
    max-width: 420px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(31, 42, 68, 0.92);
    color: #fff;
    box-shadow: 0 18px 36px rgba(31, 42, 68, 0.22);
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.25s ease;
    font-size: 14px;
    line-height: 1.5;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1100px) {
    .stepper {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-2,
    .image-preview-grid,
    .textarea-group,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-shell {
        padding: 16px;
    }

    .topbar,
    .progress-section,
    .content-card {
        padding: 18px;
        border-radius: 20px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .panel-header {
        flex-direction: column;
    }

    .actions {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .actions button {
        flex: 1;
    }
}

.step {
    position: relative;
    border: 1px solid rgba(180, 191, 214, 0.55);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.28s ease;
    opacity: 1;
}

.step span {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e7ebf5;
    color: #9aa6bf;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.28s ease;
}

.step label {
    display: block;
    font-size: 13px;
    color: #97a3ba;
    transition: all 0.28s ease;
}

/* 当前执行中的步骤 */
.step.active {
    border-color: rgba(79, 124, 255, 0.42);
    background: linear-gradient(180deg, rgba(79, 124, 255, 0.08), rgba(124, 87, 255, 0.04));
    box-shadow: 0 12px 26px rgba(79, 124, 255, 0.14);
    transform: translateY(-1px);
}

.step.active span {
    background: linear-gradient(135deg, #4f7cff, #7c57ff);
    color: #fff;
    box-shadow: 0 8px 18px rgba(79, 124, 255, 0.24);
}

.step.active label {
    color: #35508a;
    font-weight: 700;
}

/* 已执行完成的步骤 */
.step.completed {
    border-color: rgba(39, 192, 147, 0.32);
    background: linear-gradient(180deg, rgba(39, 192, 147, 0.10), rgba(39, 192, 147, 0.04));
    box-shadow: 0 10px 22px rgba(39, 192, 147, 0.10);
}

.step.completed span {
    background: linear-gradient(135deg, #27c093, #43d6a8);
    color: #fff;
    box-shadow: 0 8px 18px rgba(39, 192, 147, 0.18);
}

.step.completed label {
    color: #2f7f68;
    font-weight: 600;
}

/* 未执行步骤：明显置灰 */
.step:not(.active):not(.completed) {
    border-color: rgba(190, 198, 214, 0.55);
    background: rgba(255, 255, 255, 0.52);
}

.step:not(.active):not(.completed) span {
    background: #edf1f7;
    color: #a9b4c8;
}

.step:not(.active):not(.completed) label {
    color: #a7b1c4;
}