/* 通用样式 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
}
#app { height: 100%; }

/* 登录页 */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
    width: 380px;
    padding: 40px 35px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.login-title {
    text-align: center;
    font-size: 22px;
    color: #303133;
    margin: 0 0 8px;
    font-weight: 600;
}
.login-logo {
    text-align: center;
    margin-bottom: 16px;
}
.login-subtitle {
    text-align: center;
    color: #909399;
    font-size: 13px;
    margin-bottom: 30px;
}
.login-captcha {
    display: flex;
    gap: 10px;
}
.login-captcha img {
    height: 40px;
    width: 130px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
}

/* 主框架 */
.layout-header {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
}
.layout-header .logo {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
}
.layout-aside {
    background: #001529;
    transition: width 0.3s;
}
.layout-aside .el-menu {
    border-right: none;
}
.layout-content {
    padding: 16px;
    background: #f0f2f5;
    min-height: calc(100vh - 60px);
}
.page-card {
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.toolbar {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.pagination-wrap {
    margin-top: 16px;
    text-align: right;
}
.config-section {
    margin-bottom: 20px;
}
.config-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    border-left: 3px solid #409eff;
    padding-left: 10px;
    margin-bottom: 16px;
}
.user-info-dropdown {
    cursor: pointer;
    color: #606266;
}

/* 页面容器 */
.page-container {
    padding: 0;
}
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-form {
    margin-bottom: 15px;
}
.form-tip {
    font-size: 12px;
    color: #909399;
    line-height: 1.4;
    margin-top: 4px;
}

/* 文件上传组件 */
.file-upload-wrap {
    display: inline-block;
}
.file-upload-wrap .upload-trigger {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: #fafafa;
    transition: border-color 0.3s;
    color: #999;
}
.file-upload-wrap .upload-trigger:hover {
    border-color: #409eff;
    color: #409eff;
}
.file-upload-wrap .upload-trigger i {
    font-size: 28px;
}
.file-upload-wrap .upload-text {
    font-size: 12px;
    margin-top: 8px;
}
.file-upload-wrap .upload-progress {
    width: 120px;
    padding: 10px;
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    background: #fafafa;
    text-align: center;
}
.file-upload-wrap .upload-tip {
    font-size: 12px;
    color: #909399;
    display: block;
    margin-top: 6px;
}
.file-upload-wrap .preview-image-box {
    position: relative;
    height: 120px;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    overflow: hidden;
}
.file-upload-wrap .preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
.file-upload-wrap .preview-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 6px 0;
    opacity: 0;
    transition: opacity 0.3s;
}
.file-upload-wrap .preview-image-box:hover .preview-actions {
    opacity: 1;
}
.file-upload-wrap .preview-actions i {
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
.file-upload-wrap .preview-actions i:hover {
    color: #409eff;
}
.file-upload-wrap .preview-media {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.file-upload-wrap .preview-video {
    max-width: 300px;
    max-height: 150px;
    border-radius: 4px;
}
.file-upload-wrap .preview-audio {
    width: 300px;
}
.file-upload-wrap .preview-file {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #606266;
    font-size: 13px;
}
.file-upload-wrap .preview-actions-row {
    display: flex;
    gap: 8px;
}

/* 统计卡片样式 */
.stats-card {
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.stats-label {
    font-size: 13px;
    color: #909399;
    margin-bottom: 8px;
}
.stats-value {
    font-size: 28px;
    font-weight: 600;
    color: #303133;
}
.stats-item {
    padding: 10px 15px;
    background: #f5f7fa;
    border-radius: 4px;
    margin-bottom: 8px;
}
.stats-item-label {
    color: #909399;
    font-size: 13px;
    margin-right: 8px;
}

/* ==================== 在线更新页面样式 ==================== */
.update-page {
    padding: 0;
    background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 65%);
    min-height: 100%;
}
.update-page .update-card,
.log-page .update-card {
    margin-top: 20px;
    border-radius: 14px;
    border: 1px solid rgba(220, 224, 240, 0.7);
    box-shadow: 0 8px 24px rgba(31, 45, 65, 0.05);
    background: #ffffff;
    overflow: hidden;
}
.update-page .update-card::before,
.log-page .update-card::before {
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(90deg, #4f46e5 0%, #c026d3 50%, #f59e0b 100%);
    opacity: 0.85;
}

/* Hero 区（深色玻璃拟态） */
.update-hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(1200px 500px at -10% -30%, rgba(99, 102, 241, 0.55) 0%, transparent 60%),
        radial-gradient(900px 500px at 110% 130%, rgba(236, 72, 153, 0.45) 0%, transparent 60%),
        linear-gradient(135deg, #0b1024 0%, #1e1b4b 45%, #4c1d95 100%);
    color: #fff;
    padding: 36px 40px;
    box-shadow: 0 18px 40px rgba(76, 29, 149, 0.28);
    isolation: isolate;
}
.update-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.18) 0, transparent 60%),
        radial-gradient(1.5px 1.5px at 70% 60%, rgba(255,255,255,0.15) 0, transparent 60%),
        radial-gradient(2px 2px at 40% 80%, rgba(255,255,255,0.12) 0, transparent 60%),
        radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,0.18) 0, transparent 60%);
    background-size: 240px 240px, 200px 200px, 320px 320px, 180px 180px;
    pointer-events: none;
    opacity: 0.7;
    z-index: 0;
}
.update-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(11, 16, 36, 0.45) 100%);
    pointer-events: none;
    z-index: 0;
}
.update-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.update-hero-text { flex: 1; min-width: 260px; }
.update-hero-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.update-hero-title i {
    font-size: 26px;
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    color: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.45);
}
.update-hero-sub {
    margin: 10px 0 0;
    color: rgba(226, 232, 240, 0.86);
    font-size: 13px;
    letter-spacing: 0.4px;
    max-width: 540px;
    line-height: 1.7;
}
.update-hero-status { display: flex; align-items: center; gap: 10px; }
.update-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 0.4px;
}
.update-status-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #67c23a;
    box-shadow: 0 0 0 4px rgba(103, 194, 58, 0.35);
    animation: pulse 1.6s ease-in-out infinite;
}
.update-status-indicator.is-uptodate .dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35);
}
.update-status-indicator.is-update .dot {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35);
}
.update-status-indicator.is-offline .dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.35);
    animation: none;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.3); }
}

/* 指标卡片 */
.update-stats { margin-top: 20px; }
.metric-card {
    position: relative;
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(220, 224, 240, 0.7);
    box-shadow: 0 6px 20px rgba(31, 45, 65, 0.06);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s;
    overflow: hidden;
}
.metric-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}
.metric-card::after {
    content: "";
    position: absolute;
    right: -30px; top: -30px;
    width: 110px; height: 110px;
    border-radius: 50%;
    opacity: 0.06;
    pointer-events: none;
}
.metric-card-blue::before   { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.metric-card-blue::after    { background: radial-gradient(circle, #3b82f6 0%, transparent 70%); }
.metric-card-purple::before { background: linear-gradient(180deg, #a855f7, #6d28d9); }
.metric-card-purple::after  { background: radial-gradient(circle, #a855f7 0%, transparent 70%); }
.metric-card-orange::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.metric-card-orange::after  { background: radial-gradient(circle, #f59e0b 0%, transparent 70%); }
.metric-card-green::before  { background: linear-gradient(180deg, #22c55e, #15803d); }
.metric-card-green::after   { background: radial-gradient(circle, #22c55e 0%, transparent 70%); }
.metric-card-cyan::before   { background: linear-gradient(180deg, #06b6d4, #0e7490); }
.metric-card-cyan::after    { background: radial-gradient(circle, #06b6d4 0%, transparent 70%); }
.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(31, 45, 65, 0.12);
}
.metric-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
.metric-card-blue .metric-icon   { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.metric-card-purple .metric-icon { background: linear-gradient(135deg, #c084fc, #7e22ce); }
.metric-card-orange .metric-icon { background: linear-gradient(135deg, #fbbf24, #d97706); }
.metric-card-green .metric-icon  { background: linear-gradient(135deg, #4ade80, #15803d); }
.metric-card-cyan .metric-icon   { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.metric-body { flex: 1; min-width: 0; }
.metric-label {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 6px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.metric-value {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.metric-foot {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.metric-foot i { margin-right: 3px; color: #94a3b8; }

/* 操作区 */
.action-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border-radius: 12px;
    border: 1px dashed rgba(99, 102, 241, 0.25);
}
.update-page .card-header-flex > span:first-child {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.update-page .card-header-flex > span:first-child > i {
    color: #4f46e5;
    font-size: 16px;
}
.update-page .header-meta {
    font-family: inherit;
    font-size: 13px;
    color: #94a3b8;
    letter-spacing: 0.2px;
}
.update-page .header-meta.source-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.10) 0%, rgba(168, 85, 247, 0.10) 100%);
    color: #4f46e5;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    border: 1px solid rgba(99, 102, 241, 0.18);
}
.update-page .header-meta.source-meta::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4f46e5;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.update-page .update-card .el-alert .action-target {
    color: #4f46e5;
    font-weight: 600;
    padding: 0 2px;
}
.update-page kbd {
    display: inline-block;
    padding: 1px 6px;
    margin: 0 2px;
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #1e293b;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 4px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    vertical-align: baseline;
}
.update-page .update-card .el-alert__title .alert-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.update-page .update-card .el-alert__title .alert-title-row > span {
    margin-left: 0 !important;
}
.action-bar .el-button {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 10px 18px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.action-bar .el-button + .el-button { margin-left: 0; }
.action-bar .upgrade-btn.is-ready {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55);
    animation: upgradePulse 1.6s ease-in-out infinite;
}
@keyframes upgradePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5), 0 4px 12px rgba(99, 102, 241, 0.2); transform: translateY(0); }
    50%      { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0), 0 8px 20px rgba(99, 102, 241, 0.35); transform: translateY(-1px); }
}
.action-bar.upgrade-ready {
    border-color: rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
}
.header-meta {
    color: #64748b;
    font-size: 12px;
    font-family: Menlo, Consolas, monospace;
}

/* 任务进度卡 */
.task-progress { padding: 12px 0 24px; }
.task-progress-bar { margin-bottom: 20px; }
.task-progress .el-step__head {
    border-radius: 50%;
}
.task-progress .el-step.is-finish .el-step__head,
.task-progress .el-step.is-process .el-step__head {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    border-color: transparent;
}
.task-progress .el-step__title.is-finish,
.task-progress .el-step__title.is-process {
    color: #4338ca;
    font-weight: 600;
}
.task-meta { margin-top: 8px; }
.task-meta .el-descriptions__label {
    color: #64748b !important;
    font-weight: 500;
}

/* 检查结果 Tabs */
.check-tabs .el-tabs__header { margin-bottom: 14px; }
.check-tabs .el-tabs__item.is-active {
    color: #4338ca;
    font-weight: 600;
}
.check-tabs .el-tabs__active-bar {
    background: linear-gradient(90deg, #6366f1, #a855f7);
}
.hash-cell {
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
    color: #475569;
    letter-spacing: 0.3px;
}

/* 空状态 */
.empty-block {
    text-align: center;
    color: #94a3b8;
    padding: 48px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, transparent 100%);
    border-radius: 10px;
}
.empty-block i { display: block; margin-bottom: 8px; }

/* 同步结果 mini 统计 */
.sync-summary { margin-top: 4px; }
.mini-stat {
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(220, 224, 240, 0.7);
    box-shadow: 0 4px 12px rgba(31, 45, 65, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.mini-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 45, 65, 0.1);
}
.mini-stat-num {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.mini-stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
    letter-spacing: 0.4px;
}
.mini-stat-blue   .mini-stat-num { background-image: linear-gradient(135deg, #60a5fa, #2563eb); color: #2563eb; }
.mini-stat-green  .mini-stat-num { background-image: linear-gradient(135deg, #4ade80, #15803d); color: #15803d; }
.mini-stat-orange .mini-stat-num { background-image: linear-gradient(135deg, #fbbf24, #d97706); color: #d97706; }
.mini-stat-grey   .mini-stat-num { background-image: linear-gradient(135deg, #94a3b8, #475569); color: #475569; }

.sync-detail { padding: 6px 4px; }
.sync-detail-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.sync-detail-row:last-child { border-bottom: none; }
.sync-detail-label {
    flex: 0 0 140px;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
}
.sync-detail-tags { flex: 1; }
.sync-detail-empty { color: #94a3b8; font-size: 13px; }

/* 更新日志页 */
.log-page { padding: 0; }
.log-hero-version {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 10px 18px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
}
.log-hero-version .label { color: rgba(226, 232, 240, 0.85); font-size: 12px; letter-spacing: 0.4px; }
.log-hero-version .value { font-size: 20px; font-weight: 700; letter-spacing: 1px; }

/* Timeline 时间线样式 */
.changelog-block {
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid rgba(220, 224, 240, 0.7);
    box-shadow: 0 6px 18px rgba(31, 45, 65, 0.05);
    margin-bottom: 4px;
}
.changelog-version {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.changelog-version .ver-badge {
    background: linear-gradient(135deg, #4f46e5, #c026d3);
    color: #fff;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    font-family: Menlo, Consolas, monospace;
    box-shadow: 0 6px 14px rgba(124, 58, 237, 0.35);
    letter-spacing: 0.5px;
}
.changelog-version .ver-date {
    color: #64748b;
    font-size: 12px;
    letter-spacing: 0.4px;
}
.changelog-items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.changelog-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    color: #1e293b;
    font-size: 13.5px;
    line-height: 1.7;
    border-bottom: 1px dashed #e2e8f0;
}
.changelog-item:last-child { border-bottom: none; }
.changelog-item .change-tag {
    flex-shrink: 0;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.5;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.changelog-item .change-tag.fix    { background: #fee2e2; color: #b91c1c; }
.changelog-item .change-tag.feat   { background: #dbeafe; color: #1d4ed8; }
.changelog-item .change-tag.optimize,
.changelog-item .change-tag.opt    { background: #fef3c7; color: #b45309; }
.changelog-item .change-tag.refactor,
.changelog-item .change-tag.ref    { background: #ede9fe; color: #6d28d9; }
.changelog-item .change-tag.breaking,
.changelog-item .change-tag.break  { background: #fee2e2; color: #b91c1c; box-shadow: inset 0 0 0 1px #fecaca; }
.changelog-item .change-tag.docs   { background: #f1f5f9; color: #475569; }
.changelog-item .change-tag.test   { background: #dcfce7; color: #15803d; }
.changelog-item .change-tag.misc   { background: #f1f5f9; color: #64748b; }
.changelog-item .change-text { flex: 1; }
.changelog-empty {
    text-align: center;
    color: #94a3b8;
    padding: 36px 20px;
    border-radius: 10px;
    background: #f8fafc;
}

/* ==================== 更新日志页面样式 ==================== */
.log-page { padding: 0; }
/* ==================== 升级确认对话框样式 ==================== */
.upgrade-dialog .el-dialog {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}
.upgrade-dialog .el-dialog__header {
    background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 60%, #c026d3 100%);
    padding: 18px 24px;
}
.upgrade-dialog .el-dialog__title {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.4px;
}
.upgrade-dialog .el-dialog__headerbtn .el-dialog__close {
    color: rgba(255,255,255,0.85);
}
.upgrade-dialog .el-dialog__body { padding: 24px 24px 12px; background: linear-gradient(180deg, #f8fafc 0%, #ffffff 60%); }
.upgrade-dialog .el-dialog__footer { padding: 12px 24px 20px; background: #fff; border-top: 1px solid #f1f5f9; }

.upgrade-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    background: #fafbfc;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.upgrade-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}
.upgrade-info-row .label {
    color: #909399;
}
.upgrade-info-row .value {
    color: #303133;
    font-weight: 500;
    font-family: Menlo, Consolas, monospace;
}
.upgrade-info-row .value.highlight {
    color: #c026d3;
    font-weight: 600;
}
.version-path-title {
    font-size: 13px;
    color: #606266;
    margin: 6px 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.version-path-title i { color: #409EFF; }
.version-path {
    background: #fafbfc;
    border-radius: 6px;
    padding: 12px 16px;
    max-height: 280px;
    overflow-y: auto;
}
.path-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    position: relative;
}
.path-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 28px;
    bottom: -4px;
    width: 2px;
    background: linear-gradient(180deg, #409EFF 0%, #c026d3 100%);
    opacity: 0.35;
}
.path-item-start:not(:last-child)::before {
    left: 7px;
    top: 28px;
    bottom: -4px;
    width: 2px;
    background: linear-gradient(180deg, #67c23a 0%, #409EFF 100%);
    opacity: 0.45;
}
.path-dot {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #409EFF;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.12);
}
.path-dot.start {
    border-color: #67c23a;
    box-shadow: 0 0 0 3px rgba(103, 194, 58, 0.15);
}
.path-dot.end {
    border-color: #c026d3;
    box-shadow: 0 0 0 3px rgba(192, 38, 211, 0.15);
    background: linear-gradient(135deg, #c026d3, #7c3aed);
}
.path-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.path-arrow {
    color: #c0c4cc;
    font-family: Menlo, Consolas, monospace;
    font-weight: 600;
}
.path-version {
    font-family: Menlo, Consolas, monospace;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    background: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid #ebeef5;
}
.path-meta {
    color: #909399;
    font-size: 12px;
}
.path-empty {
    margin-left: 26px;
    padding: 6px 0;
    color: #67c23a;
    font-size: 13px;
}
.path-empty i { margin-right: 4px; }

/* ==================== 升级中全屏遮罩 ==================== */
.upgrade-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upgrade-overlay-bg {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 35, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: overlayFadeIn 0.3s ease;
}
.upgrade-overlay-card {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%);
    border-radius: 14px;
    padding: 36px 56px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.25);
    min-width: 420px;
    max-width: 92vw;
    animation: overlayScaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.overlay-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #c026d3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}
.overlay-icon i {
    color: #fff;
    font-size: 38px;
    animation: overlayRotate 1.2s linear infinite;
}
.overlay-title {
    font-size: 20px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 6px;
}
.overlay-subtitle {
    font-size: 14px;
    color: #909399;
    margin-bottom: 22px;
    font-family: Menlo, Consolas, monospace;
    letter-spacing: 0.5px;
}
.overlay-progress-num {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #c026d3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 14px;
    font-family: Menlo, Consolas, monospace;
}
.overlay-progress-bar {
    max-width: 320px;
    margin: 0 auto 18px;
}
.overlay-step {
    font-size: 13px;
    color: #606266;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.overlay-step i { color: #409EFF; }
.overlay-hint {
    font-size: 12px;
    color: #909399;
    margin-top: 4px;
    line-height: 1.5;
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes overlayScaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes overlayRotate {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

/* ==================== AI 模型配置 dialog 样式 ==================== */
.ai-model-dialog .el-dialog__header {
    background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 60%, #7c3aed 100%);
    padding: 18px 24px;
    border-radius: 8px 8px 0 0;
    margin-right: 0;
}
.ai-model-dialog .el-dialog__title {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.ai-model-dialog .el-dialog__headerbtn .el-dialog__close {
    color: rgba(255, 255, 255, 0.85);
}
.ai-model-dialog .el-dialog__body {
    padding: 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 60%);
}
.ai-model-dialog .el-dialog__footer {
    padding: 14px 24px 20px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

.ai-model-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}
.ai-model-section-title i {
    color: #4f46e5;
    font-size: 14px;
}

.ai-model-card {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ai-model-card:hover {
    border-color: #c7d2fe;
    background: #f5f7ff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}
.ai-model-card.is-selected {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.18);
}
.ai-model-card .el-radio {
    margin-right: 0;
}
.ai-model-card-body {
    flex: 1;
    min-width: 0;
}
.ai-model-card-row1 {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ai-model-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}
.ai-model-homepage {
    margin-left: auto;
    font-size: 12px;
    color: #4f46e5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    transition: all 0.2s ease;
}
.ai-model-homepage:hover {
    background: rgba(79, 70, 229, 0.18);
    color: #4338ca;
}
.ai-model-card-row2 {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.ai-model-empty {
    text-align: center;
    color: #f56c6c;
    font-size: 13px;
    padding: 24px 0;
    background: #fef2f2;
    border-radius: 8px;
}
.ai-model-empty i {
    margin-right: 4px;
}

.ai-model-input {
    border-radius: 8px;
}
.ai-model-input .el-input__inner {
    border-radius: 8px;
}

.ai-model-list {
    width: 100%;
}
.ai-model-native-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}
.ai-model-radio {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: border-color 0.2s ease;
    background: #fff;
}
.ai-model-radio-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4f46e5;
    transition: transform 0.18s ease;
}
.ai-model-radio.is-checked {
    border-color: #4f46e5;
}
.ai-model-radio.is-checked .ai-model-radio-dot {
    transform: translate(-50%, -50%) scale(1);
}
.ai-model-card.is-selected .ai-model-radio {
    border-color: #4f46e5;
}

.ai-model-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ==================== 升级遮罩关闭按钮 ==================== */
.overlay-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #909399;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    z-index: 1;
}
.overlay-close:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
}
.overlay-close:active {
    background: rgba(79, 70, 229, 0.15);
}

/* 创建/编辑活动页 ae-card hover 效果 */
.ae-card {
    border: 1px solid #ebeef5 !important;
}
.ae-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}
