/* ==========================================================================
   管理后台
   ========================================================================== */

body.admin {
    background:
        radial-gradient(900px 500px at 100% -5%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
        var(--bg);
    padding: 24px;
    min-height: 100vh;
}

/* 后台页面内的提示固定在右下角，避免遮挡页头操作 */
body.admin .ui-toast-container {
    top: auto !important;
    bottom: 24px !important;
    right: 24px !important;
}

.admin-page {
    max-width: 1420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ------------------------------ 页头 ---------------------------------- */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.page-head .ph-copy { min-width: 0; }

.page-head .eyebrow-sm {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.page-head h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.page-head p {
    margin-top: 5px;
    font-size: 0.82rem;
    color: var(--text-3);
}

.page-head .ph-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 旧页面 h1 */
.card > h1,
.admin-page > .card > h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    margin-bottom: 22px;
}

.card > h1::before,
.admin-page > .card > h1::before {
    content: "";
    width: 4px;
    height: 17px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

/* ------------------------------ 卡片 ---------------------------------- */

.card {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.card-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.12rem;
}

.card-header h1::before {
    content: "";
    width: 4px;
    height: 17px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

/* 按钮兼容旧类名 */
.btn-secondary {
    background: var(--bg-elevated);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: none;
}

.btn-warning { background: linear-gradient(120deg, #f59e0b, #fbbf24); color: #3b2300; }

.btn {
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-size: 0.84rem;
}

.btn-sm { padding: 6px 11px; font-size: 0.76rem; margin-right: 4px; margin-bottom: 4px; }

/* ------------------------------ 表单 ---------------------------------- */

body.admin .form-group {
    margin-bottom: 18px;
}

body.admin label,
body.admin .field > label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

body.admin input[type="text"],
body.admin input[type="number"],
body.admin input[type="password"],
body.admin input[type="url"],
body.admin input[type="search"],
body.admin input[type="datetime-local"],
body.admin select,
body.admin textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--plate);
    color: var(--text);
    font-size: 0.86rem;
    transition: all 0.2s var(--ease);
}

body.admin input:focus,
body.admin select:focus,
body.admin textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

body.admin textarea { min-height: 96px; resize: vertical; line-height: 1.65; }

body.admin .hint {
    margin-top: 6px;
    font-size: 0.74rem;
    line-height: 1.6;
    color: var(--text-3);
}

body.admin .checkbox-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 0.86rem;
}

body.admin .checkbox-label input[type="checkbox"],
body.admin .checkbox-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

body.admin .readonly-field {
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text-2);
    font-size: 0.86rem;
}

body.admin .section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 24px 0 14px;
    font-size: 0.95rem;
    font-weight: 700;
}

body.admin .section-title::before {
    content: "";
    width: 4px;
    height: 15px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

body.admin .divider { height: 1px; background: var(--border); margin: 20px 0; }

body.admin .alert {
    display: none;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.82rem;
    border: 1px solid transparent;
}

body.admin .alert-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
body.admin .alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
body.admin .alert-info { background: var(--accent-soft); color: var(--accent); }

/* ------------------------------ 表格 ---------------------------------- */

body.admin table { width: 100%; border-collapse: collapse; }

body.admin table th {
    padding: 11px 14px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-3);
    background: var(--plate);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

body.admin table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-2);
    vertical-align: middle;
}

body.admin table tbody tr { transition: background 0.16s var(--ease); }
body.admin table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
body.admin table tbody tr:last-child td { border-bottom: none; }

body.admin code {
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--bg-soft);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text);
}

/* 操作按钮组 */
.ops-cell { min-width: 230px; }
.ops-cell .btn { margin-bottom: 4px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

/* 分页 */
body.admin .pagination { margin-top: 18px; text-align: right; }
body.admin .pagination a,
body.admin .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    margin: 0 3px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text-2);
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

body.admin .pagination a:hover { border-color: var(--accent); color: var(--accent); }
body.admin .pagination .active { background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }

/* 状态徽章（旧类名） */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-published { background: var(--success-soft); color: var(--success); }
.status-unpublished { background: var(--bg-soft); color: var(--text-2); }
.status-gray { background: var(--warning-soft); color: #b45309; }
html[data-theme="dark"] .status-gray { color: var(--warning); }
.status-pending { background: var(--danger-soft); color: var(--danger); }
.status-draft { background: var(--bg-soft); color: var(--text-2); }
.status-scheduled { background: var(--accent-soft); color: var(--accent); }
.status-paused { background: var(--bg-soft); color: var(--text-2); }
.status-archived { background: var(--bg-soft); color: var(--text-3); }
.status-enable { color: var(--success); font-weight: 600; }
.status-disable { color: var(--danger); font-weight: 600; }

/* ------------------------------ 过滤栏 -------------------------------- */

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.toolbar .grow { flex: 1; }

body.admin .toolbar select,
body.admin .toolbar input[type="search"] {
    width: auto;
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-elevated);
    font-size: 0.8rem;
}

body.admin .toolbar input[type="search"] { min-width: 220px; }

.segmented {
    display: inline-flex;
    padding: 4px;
    gap: 3px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.segmented a,
.segmented button {
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.2s var(--ease);
}

.segmented a:hover { color: var(--text); }
.segmented .is-active { background: var(--bg-elevated); color: var(--accent); box-shadow: var(--shadow-sm); }

/* ------------------------------ 概览 ---------------------------------- */

.dash-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 26px 28px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background:
        radial-gradient(600px 200px at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
        linear-gradient(130deg, var(--bg-elevated), color-mix(in srgb, var(--accent) 4%, var(--bg-elevated)));
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    flex-wrap: wrap;
}

.dash-hero h1 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -0.025em; }
.dash-hero p { margin-top: 5px; font-size: 0.84rem; color: var(--text-2); }
.dash-hero .dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.dash-hero .pulse-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric {
    position: relative;
    padding: 19px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.metric:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 22%, var(--border)); }

.metric .m-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric .m-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.metric .m-icon svg { width: 18px; height: 18px; }
.metric .m-trend { font-size: 0.7rem; font-weight: 600; color: var(--success); }
.metric b { display: block; font-size: 1.85rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.metric span { font-size: 0.76rem; color: var(--text-3); }

.metric.m-green .m-icon { background: var(--success-soft); color: var(--success); }
.metric.m-amber .m-icon { background: var(--warning-soft); color: #b45309; }
.metric.m-blue .m-icon { background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info); }
.metric.m-purple .m-icon { background: color-mix(in srgb, var(--accent-2) 14%, transparent); color: var(--accent-2); }

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.chart-card { padding: 20px 22px; }

.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.chart-head h3 { font-size: 0.98rem; }
.chart-head p { margin-top: 3px; font-size: 0.74rem; color: var(--text-3); }
.chart-total { text-align: right; }
.chart-total b { display: block; font-size: 1.4rem; letter-spacing: -0.02em; }
.chart-total span { font-size: 0.7rem; color: var(--text-3); }

.chart-wrap { position: relative; height: 190px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }

.chart-empty {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    color: var(--text-3);
    pointer-events: none;
}

.chart-grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 5; }
.chart-line { fill: none; stroke: url(#lineGrad); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawLine 1.6s var(--ease-out) forwards; }
.chart-area { fill: url(#areaGrad); opacity: 0; animation: fadeIn 1s 0.4s var(--ease) forwards; }
.chart-dot { fill: var(--bg-elevated); stroke: var(--accent); stroke-width: 2.5; }
.chart-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.68rem; color: var(--text-3); }

@keyframes drawLine { to { stroke-dashoffset: 0; } }

.platform-list { display: flex; flex-direction: column; gap: 13px; }

.platform-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; }

.platform-row .pi {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--accent);
}

.platform-row .pi svg { width: 15px; height: 15px; }
.platform-row .pb { min-width: 0; }
.platform-row .pb b { display: flex; justify-content: space-between; font-size: 0.78rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.platform-row .pb span { font-size: 0.7rem; color: var(--text-3); font-weight: 500; }
.platform-row .pbar { display: block; height: 6px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.platform-row .pbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1s var(--ease); }
.platform-row .pv { font-size: 0.78rem; font-weight: 700; color: var(--text); font-family: var(--font-mono); }

.recent-list { display: flex; flex-direction: column; }
.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.recent-item:last-child { border-bottom: 0; }
.recent-item .ri-icon {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: var(--bg-soft);
    color: var(--accent);
    flex-shrink: 0;
}
.recent-item .ri-copy { flex: 1; min-width: 0; }
.recent-item .ri-copy b { display: block; font-size: 0.82rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item .ri-copy span { font-size: 0.7rem; color: var(--text-3); }
.recent-item time { font-size: 0.7rem; color: var(--text-3); white-space: nowrap; }

/* ------------------------------ 发布向导 ------------------------------ */

.wizard-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.wizard-steps {
    position: sticky;
    top: 18px;
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

.wizard-steps .ws-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin: 0 8px 14px; }

.wstep {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s var(--ease);
    position: relative;
}

.wstep:hover { background: var(--bg-soft); }
.wstep.is-active { background: var(--accent-soft); }
.wstep .ws-num {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-3);
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.25s var(--ease);
}

.wstep.is-active .ws-num { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.wstep.is-done .ws-num { background: var(--success-soft); border-color: transparent; color: var(--success); }
.wstep .ws-copy b { display: block; font-size: 0.82rem; color: var(--text); }
.wstep .ws-copy span { font-size: 0.7rem; color: var(--text-3); }
.wstep.is-active .ws-copy span { color: var(--accent); }

.wizard-body {
    min-width: 0;
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

.wizard-panel { display: none; animation: fadeUp 0.4s var(--ease-out) both; }
.wizard-panel.is-active { display: block; }

.wizard-panel > h2 { font-size: 1.2rem; margin-bottom: 4px; }
.wizard-panel > .sub { font-size: 0.82rem; color: var(--text-3); margin-bottom: 22px; }

.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.wizard-footer .wf-right { display: flex; gap: 8px; margin-left: auto; }

/* 平台卡 */
.platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.platform-card {
    position: relative;
    padding: 16px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--plate);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    user-select: none;
}

.platform-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.platform-card.is-on { border-color: var(--accent); background: var(--accent-soft); }
.platform-card .pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.platform-card .pc-head svg { width: 22px; height: 22px; color: var(--accent); }
.platform-card .pc-head b { font-size: 0.88rem; color: var(--text); }
.platform-card .pc-head .pc-check {
    margin-left: auto;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    display: grid; place-items: center;
    color: transparent;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.platform-card.is-on .pc-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.platform-card .pc-formats { display: flex; flex-wrap: wrap; gap: 4px; }
.platform-card .pc-formats span { padding: 2px 7px; border-radius: 5px; background: var(--bg-elevated); border: 1px solid var(--border); font-size: 0.66rem; font-family: var(--font-mono); color: var(--text-3); }
.platform-card .pc-archs { margin-top: 9px; font-size: 0.68rem; color: var(--text-3); }

/* 产物上传 */
.dropzone {
    position: relative;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 34px 20px;
    border-radius: var(--radius);
    border: 2px dashed var(--border-strong);
    background: var(--plate);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s var(--ease);
}

.dropzone:hover,
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 30px; height: 30px; color: var(--accent); }
.dropzone b { font-size: 0.88rem; color: var(--text); }
.dropzone span { font-size: 0.74rem; color: var(--text-3); }
.dropzone input[type="file"] { display: none; }

.asset-list { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }

.asset-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.asset-row:hover { border-color: color-mix(in srgb, var(--accent) 26%, var(--border)); box-shadow: var(--shadow-sm); }
.asset-row .ar-format { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; background: var(--bg-soft); color: var(--accent); font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; }
.asset-row .ar-copy { min-width: 0; }
.asset-row .ar-copy b { display: block; font-size: 0.83rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-row .ar-copy .ar-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; align-items: center; }
.asset-row .ar-copy code { font-size: 0.66rem; padding: 1px 5px; }
.asset-row .ar-actions { display: flex; gap: 5px; align-items: center; }

.asset-row.is-uploading { opacity: 0.7; }
.asset-row .ar-progress { height: 4px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin-top: 7px; }
.asset-row .ar-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width 0.2s; }

/* 预检 */
.check-list { display: flex; flex-direction: column; gap: 7px; }
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--plate);
    font-size: 0.82rem;
}
.check-item .ci {
    width: 20px; height: 20px;
    display: grid; place-items: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 0.66rem;
    font-weight: 700;
}
.check-item.pass .ci { background: var(--success-soft); color: var(--success); }
.check-item.warn .ci { background: var(--warning-soft); color: #b45309; }
.check-item.fail .ci { background: var(--danger-soft); color: var(--danger); }
.check-item b { display: block; font-size: 0.8rem; color: var(--text); margin-bottom: 1px; }
.check-item span { font-size: 0.74rem; color: var(--text-3); }
.check-item .ci-hint { margin-top: 4px; font-size: 0.72rem; color: var(--text-3); }

.summary-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* 发布完成 */
.release-done {
    text-align: center;
    padding: 30px 20px;
}
.release-done .done-ring {
    width: 76px; height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--success-soft);
    color: var(--success);
    font-size: 2rem;
    animation: pulseRing 1.8s ease-out;
}

.release-done h2 { margin-bottom: 6px; }
.release-done p { color: var(--text-3); font-size: 0.84rem; margin-bottom: 18px; }

/* ------------------------------ 密钥中心 ------------------------------ */

.key-panel { display: none; }
.key-panel.is-active { display: block; animation: fadeIn 0.3s var(--ease) both; }

.key-soft-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
    background: linear-gradient(120deg, var(--accent-soft), transparent);
    flex-wrap: wrap;
}

.key-soft-banner b { display: block; font-size: 0.86rem; }
.key-soft-banner span { font-size: 0.76rem; color: var(--text-2); }

.key-code {
    position: relative;
    padding: 13px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--plate);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.65;
    color: var(--text-2);
    word-break: break-all;
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
}

.key-dropdown { position: relative; }
.key-dropdown > summary { list-style: none; cursor: pointer; }
.key-dropdown[open] > .key-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    width: min(560px, 86vw);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
}

/* ------------------------------ 上传旧组件 ---------------------------- */

.upload-area {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 26px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    background: var(--plate);
    position: relative;
}

.upload-area:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-area input { display: none; }
.upload-area p { color: var(--text-2); font-size: 0.82rem; }
.upload-preview { max-width: 110px; max-height: 110px; margin-top: 8px; border-radius: 10px; object-fit: cover; }

.screenshot-upload-area { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 16px; background: var(--plate); }
.screenshot-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.screenshot-item { position: relative; width: 132px; height: 94px; border-radius: 9px; overflow: hidden; background: var(--bg-soft); box-shadow: var(--shadow-sm); cursor: move; }
.screenshot-item img { width: 100%; height: 100%; object-fit: cover; }
.screenshot-item .delete-btn,
.icon-delete-btn { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(239, 68, 68, 0.92); color: #fff; border: 0; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.screenshot-item:hover .delete-btn, .icon-delete-btn { opacity: 1; }
.upload-btn { text-align: center; padding: 18px; border-radius: 9px; cursor: pointer; transition: background 0.2s; }
.upload-btn:hover { background: var(--accent-soft); }
.upload-btn p { font-size: 0.8rem; color: var(--text-2); }

/* 旧 tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: 10px 16px; border: 0; background: none; font-size: 0.84rem; font-weight: 600; color: var(--text-2); cursor: pointer; position: relative; white-space: nowrap; }
.tab.active { color: var(--accent); }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 旧信息条 */
.info-row { display: flex; flex-wrap: wrap; gap: 12px; padding: 13px 15px; margin-bottom: 18px; border-radius: var(--radius); background: var(--plate); border: 1px solid var(--border); font-size: 0.78rem; color: var(--text-2); }
.info-row b { color: var(--text); font-weight: 600; }

/* 旧工作流提示 */
.workflow { padding: 13px 16px; border-radius: var(--radius); background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); color: #92400e; font-size: 0.8rem; line-height: 1.7; margin-bottom: 18px; }
html[data-theme="dark"] .workflow { color: var(--warning); }
.workflow ol { margin: 5px 0 0 18px; list-style: decimal; }

.code-block { padding: 14px 16px; border-radius: 10px; background: var(--plate); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.65; word-break: break-all; white-space: pre-wrap; max-height: 200px; overflow: auto; }

/* 旧统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { position: relative; padding: 20px; border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.stat h3 { font-size: 1.9rem; letter-spacing: -0.03em; }
.stat p { font-size: 0.78rem; color: var(--text-3); margin-top: 3px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ------------------------------ 登录页 -------------------------------- */

body.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(900px 600px at 15% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
        radial-gradient(700px 500px at 90% 90%, color-mix(in srgb, var(--accent-3) 12%, transparent), transparent 60%),
        var(--bg);
    overflow: hidden;
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
    width: 100%;
    max-width: 980px;
}

.login-brand h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.035em; margin: 22px 0 14px; }
.login-brand p { max-width: 420px; font-size: 0.95rem; line-height: 1.75; color: var(--text-2); }

.login-points { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.login-point { display: flex; align-items: flex-start; gap: 11px; font-size: 0.82rem; color: var(--text-2); }
.login-point .lp-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.login-point .lp-ico svg { width: 15px; height: 15px; }
.login-point b { display: block; color: var(--text); font-size: 0.84rem; }

.login-card {
    padding: 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
}

.login-card h2 { font-size: 1.35rem; margin-bottom: 4px; }
.login-card .subtitle { font-size: 0.82rem; color: var(--text-3); margin-bottom: 24px; }

.input-wrapper { position: relative; }
.input-wrapper svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.input-wrapper input { padding-left: 42px !important; }

body.login input[type="text"],
body.login input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--plate);
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s var(--ease);
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

body.login .form-group { margin-bottom: 18px; }
body.login label { display: block; margin-bottom: 8px; font-size: 0.82rem; font-weight: 600; color: var(--text); }
body.login .alert { display: none; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.82rem; }
body.login .alert-error { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }

.login-card .btn { width: 100%; padding: 12px; margin-top: 4px; }

.security-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 0.72rem; color: var(--text-3); }
.security-note svg { width: 13px; height: 13px; color: var(--success); }

/* 移动端 */
@media (max-width: 1100px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-grid { grid-template-columns: 1fr; }
    .wizard-shell { grid-template-columns: 210px minmax(0, 1fr); }
}

@media (max-width: 860px) {
    body.admin { padding: 16px; }
    .wizard-shell { grid-template-columns: 1fr; }
    .wizard-steps { position: static; }
    .wizard-steps .wstep { display: inline-flex; margin-right: 4px; }
    .wizard-steps .ws-title { display: none; }
    .platform-grid { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; gap: 28px; }
    .login-brand { text-align: center; }
    .login-brand p { margin: 0 auto; }
    .login-points { max-width: 420px; margin: 22px auto 0; text-align: left; }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    body.admin { padding: 12px; }
    .card { padding: 18px; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric { padding: 14px; }
    .metric b { font-size: 1.45rem; }
    .page-head h1 { font-size: 1.2rem; }
    .dash-hero { padding: 20px; }
    .wizard-body { padding: 18px; }
    .wizard-footer .wf-right { width: 100%; }
    .wizard-footer .wf-right .btn { flex: 1; }
    .asset-row { grid-template-columns: 38px minmax(0, 1fr); }
    .asset-row .ar-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .toolbar input[type="search"] { min-width: 0; width: 100%; }
}
