:root {
    --primary: #0e7490;
    --primary-2: #14b8a6;
    --primary-soft: #e8f6f5;
    --ink: #0f172a;
    --text: #334155;
    --muted: #7c8a99;
    --line: #e5edf2;
    --bg: #f2f5f8;
    --card: #ffffff;
    --danger: #dc2626;
    --warn: #d97706;
    --ok: #0f766e;
    --radius: 12px;
    --sidebar-w: 236px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow: 0 10px 30px rgba(15, 23, 42, .07);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; }
.icon { display: inline-block; vertical-align: -3px; }

/* ==================== 后台外壳 ==================== */
.admin-shell { overflow: hidden; }
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); z-index: 30;
    background: linear-gradient(180deg, #0b1220 0%, #101c2e 60%, #0d2b33 100%);
    color: #cbd5e1; display: flex; flex-direction: column;
    transition: transform .22s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06); flex: none;
}
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, #0e7490, #14b8a6);
    color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .5px;
    box-shadow: 0 8px 20px rgba(20, 184, 166, .28);
}
.brand-meta { display: flex; flex-direction: column; line-height: 1.3; }
.brand-meta strong { color: #f1f5f9; font-size: 15px; letter-spacing: .5px; }
.brand-meta small { color: #64748b; font-size: 11px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; scrollbar-width: thin; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 2px; }
.menu-group { margin-bottom: 2px; }
.menu-parent {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px;
    background: transparent; border: none; color: #8194a6; font-size: 12px; letter-spacing: .5px;
    cursor: pointer; border-radius: 8px; text-align: left;
}
.menu-parent:hover { color: #cbd5e1; background: rgba(255, 255, 255, .03); }
.menu-parent .menu-icon { color: #64748b; display: inline-flex; flex: none; }
.menu-parent .menu-text { flex: 1; }
.menu-parent .menu-arrow { transition: .2s; color: #475569; display: inline-flex; }
.menu-group.collapsed .menu-parent .menu-arrow { transform: rotate(-90deg); }
.menu-children { padding-left: 6px; }
.menu-group.collapsed .menu-children { display: none; }
.menu-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 2px 0;
    border-radius: 8px; color: #b9c6d2; font-size: 13px; position: relative;
    transition: .16s;
}
.menu-item .menu-icon { color: #64748b; display: inline-flex; flex: none; }
.menu-item .menu-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item:hover { background: rgba(255, 255, 255, .05); color: #e2e8f0; }
.menu-item:hover .menu-icon { color: #5eead4; }
.menu-item.active {
    background: linear-gradient(90deg, rgba(20, 184, 166, .16), rgba(20, 184, 166, .04));
    color: #fff;
}
.menu-item.active .menu-icon { color: #5eead4; }
.menu-item.active::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
    border-radius: 2px; background: linear-gradient(#14b8a6, #0e7490);
}
.menu-single { margin-left: 6px; }
.sidebar-foot {
    flex: none; padding: 13px 18px; border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; }
.status-dot.on { background: #14b8a6; box-shadow: 0 0 8px rgba(20, 184, 166, .7); }
.status-dot.off { background: #ef4444; }

.shell-main { margin-left: var(--sidebar-w); height: 100vh; display: flex; flex-direction: column; transition: margin .22s; }
body.sidebar-hidden .sidebar { transform: translateX(-100%); }
body.sidebar-hidden .shell-main { margin-left: 0; }

.topbar {
    height: 60px; flex: none; background: #fff; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 14px; padding: 0 18px; position: relative; z-index: 10;
}
.icon-btn {
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent;
    background: transparent; color: #64748b; cursor: pointer; display: grid; place-items: center;
    transition: .16s;
}
.icon-btn:hover { background: #f2f7f9; color: var(--primary); border-color: var(--line); }
.topbar-title { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.topbar-title strong { color: var(--ink); font-size: 14px; }
.topbar-sep { color: #cbd5e1; }
#topbarCurrent { color: var(--text); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-switch { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 4px; font-size: 12px; color: var(--muted); }
.switch { position: relative; display: inline-block; width: 38px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
    position: absolute; inset: 0; border-radius: 999px; background: #cfd8e0; cursor: pointer; transition: .2s;
}
.switch-track::after {
    content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; left: 2px; top: 2px;
    background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(15, 23, 42, .2); cursor: pointer;
}
.switch input:checked + .switch-track { background: linear-gradient(90deg, #0e7490, #14b8a6); }
.switch input:checked + .switch-track::after { left: 20px; }

.user-menu { position: relative; }
.user-trigger {
    display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px;
    border: 1px solid transparent; background: transparent; border-radius: 9px; cursor: pointer;
}
.user-trigger:hover { border-color: var(--line); background: #f8fbfc; }
.avatar {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, #134e4a, #0e7490); color: #fff; font-size: 12px; font-weight: 700;
}
.user-name { font-size: 13px; color: var(--ink); font-weight: 600; }
.user-role { font-size: 11px; color: var(--muted); background: #f1f5f9; border-radius: 999px; padding: 1px 8px; }
.user-trigger .icon { color: #94a3b8; }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); width: 170px; background: #fff;
    border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
    padding: 6px; display: none; z-index: 20;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a {
    display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 7px;
    font-size: 13px; color: var(--text);
}
.user-dropdown a:hover { background: #f2f7f9; color: var(--primary); }
.user-dropdown .icon { color: #94a3b8; }

.tabs-bar {
    height: 42px; flex: none; background: #fff; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 8px; padding: 0 12px; overflow: hidden;
}
.tabs-list {
    flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 4px;
    overflow-x: auto; scrollbar-width: none;
}
.tabs-list::-webkit-scrollbar { display: none; }
.tabs-close-all {
    flex: none; height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px;
    border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted);
    font-size: 12.5px; cursor: pointer; transition: .14s; white-space: nowrap;
}
.tabs-close-all:hover { color: var(--danger); border-color: #fecaca; background: #fff5f5; }
.tabs-close-all:disabled { opacity: .45; cursor: not-allowed; color: var(--muted); border-color: var(--line); background: #fff; }
.tabs-close-all .icon { color: inherit; }
.tab {
    display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 7px;
    border: 1px solid transparent; font-size: 12.5px; color: var(--muted); cursor: pointer;
    white-space: nowrap; flex: none; transition: .14s; background: #f7fafb;
}
.tab:hover { color: var(--text); border-color: var(--line); }
.tab.active { background: var(--primary-soft); color: var(--primary); border-color: #cbe8e3; font-weight: 600; }
.tab-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.tab-close {
    width: 16px; height: 16px; border: none; border-radius: 4px; background: transparent;
    color: #a3b1bd; font-size: 12px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.tab-close:hover { background: rgba(220, 38, 38, .1); color: var(--danger); }

.type-tabs {
    display: flex; align-items: center; gap: 8px; padding: 16px 18px 0; flex-wrap: wrap;
}
.type-tab {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px;
    background: #f5f9fa; border: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.type-tab:hover { color: var(--primary); border-color: #bfe0da; }
.type-tab.active { background: var(--primary-soft); color: var(--primary); border-color: #bfe0da; font-weight: 700; }
.type-tab span {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 600;
}
.type-tab.active span { color: var(--primary); }
.nav-filter { padding-top: 10px; }
.type-form { padding: 14px; margin-bottom: 14px; background: #f8fbfc; border: 1px solid var(--line); border-radius: 12px; }
.type-form-action { display: flex; align-items: flex-end; }
.type-table { border-top: 1px solid var(--line); }

/* 文档 / 插件设置选项卡 */
.doc-card { overflow: hidden; }
.card.doc-card.article-edit-card { overflow: visible; }
.doc-tabs { padding: 12px 18px 0; border-bottom: 1px solid var(--line); background: #fff; }
.doc-tabs .type-tab { margin-bottom: 10px; }
.cat-tabs { margin: -4px 0 16px; padding: 10px 0 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.cat-tabs .type-tab[hidden] { display: none; }
.doc-panel { display: none; }
.doc-panel.active { display: block; }
.model-bound { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 16px; border: 1px solid #dbe7ea; border-radius: 12px; background: linear-gradient(135deg, #f5fbfa, #f8fbfd); }
.model-bound-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.model-kicker { font-size: 12px; color: #70828e; }
.model-bound-title strong { font-size: 17px; color: #0f172a; }
.model-bound .field-tip { max-width: 640px; margin: 0; }
.model-mapped { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px dashed #e2eaee; }
.model-mapped-label { font-size: 12px; color: #7d8f9b; }
.model-chip { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: #eaf4f2; color: #0f6b62; font-size: 12px; }
.model-field-group .form-grid { margin-top: 2px; }
.model-empty { padding: 18px; border: 1px dashed #dbe4e9; border-radius: 10px; color: #7c8d99; font-size: 13px; background: #fbfcfd; }
.doc-actions { position: sticky; bottom: 0; z-index: 5; background: #fff; border-top: 1px solid var(--line); }
.ai-test-result {
    min-height: 74px; max-height: 220px; overflow: auto; margin: 10px 0 0; padding: 12px 14px;
    border: 1px dashed var(--line); border-radius: 10px; background: #f8fbfc;
    color: var(--text); font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}


.settings-body { padding: 6px 18px 18px; }
.toolbar-group { padding: 16px 0; border-bottom: 1px solid var(--line); }
.toolbar-group:last-child { border-bottom: none; }
.toolbar-group h3 { margin: 0 0 12px; font-size: 14px; color: var(--ink); letter-spacing: .5px; }
.toolbar-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.toolbar-check {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 10px; background: #f9fbfc; cursor: pointer; transition: .14s;
}
.toolbar-check:hover { border-color: #bfe0da; background: var(--primary-soft); }
.toolbar-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.toolbar-check span { font-size: 13px; color: var(--text); }
.toolbar-check small { margin-left: auto; color: var(--muted); font-size: 10.5px; }
.card-foot { display: flex; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); background: #fafcfd; }

.field-table-body { padding: 0; }
.model-field-table { min-width: 1080px; }
.model-field-table th { white-space: nowrap; }
.model-field-table td { vertical-align: top; padding: 8px; }
.model-field-table .input, .model-field-table .select { min-width: 100px; }
.model-field-table .input-mini { width: 90px; margin-bottom: 6px; }
.model-field-table .input-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.model-field-table .textarea-mini { min-width: 150px; min-height: 52px; resize: vertical; }
.model-field-table .options-muted { opacity: .45; }
.model-field-table .col-sort { width: 84px; }
.model-field-table .col-center { text-align: center; }
.field-row-index {
    display: inline-grid; place-items: center; width: 20px; height: 20px; margin-bottom: 6px;
    border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700;
}

.attr-chip {
    display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
    background: color-mix(in srgb, var(--attr-color, #0f766e) 12%, #fff);
    color: var(--attr-color, #0f766e); border: 1px solid color-mix(in srgb, var(--attr-color, #0f766e) 28%, #fff);
    font-size: 12px; font-weight: 600;
}
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.tag-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px; background: #eef8f6; color: var(--primary); font-size: 12.5px; font-weight: 600; }
.filter-form { display: flex; align-items: center; gap: 8px; }
.input-sm { height: 32px; min-width: 180px; }

.frame-wrap { flex: 1; min-height: 0; background: var(--bg); position: relative; }
#mainFrame { width: 100%; height: 100%; border: none; display: block; background: var(--bg); }
.sidebar-mask {
    display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 25;
}
body.sidebar-open .sidebar { transform: translateX(0); }
body.sidebar-open .sidebar-mask { display: block; }

/* ==================== 页面通用 ==================== */
.page-body { background: var(--bg); }
.page-wrap { padding: 22px 24px 40px; max-width: 1480px; margin: 0 auto; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-heading h1 { margin: 0; font-size: 20px; color: var(--ink); letter-spacing: .4px; }
.page-heading p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flash {
    border-radius: 9px; padding: 11px 14px; font-size: 13px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.flash-success { background: #e9f9f4; color: #0f766e; border: 1px solid #c9eee2; }
.flash-error { background: #fdecec; color: #b91c1c; border: 1px solid #f6cdcd; }
.flash-info { background: #eef4fb; color: #1d4ed8; border: 1px solid #d3e2f7; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 15px; border-radius: 8px; border: 1px solid var(--line);
    background: #fff; color: var(--text); font-size: 13px; cursor: pointer; transition: .16s;
    white-space: nowrap; -webkit-tap-highlight-color: transparent; text-decoration: none;
    -webkit-text-fill-color: currentColor; line-height: 1;
}
.btn span, .btn strong, .btn i { color: inherit; -webkit-text-fill-color: currentColor; }
.btn:hover { border-color: #bfd9df; color: var(--primary); background: #fbfefe; }
.btn:active { border-color: #9fcdd5; color: var(--primary); background: #eef8f9; transform: translateY(0); -webkit-text-fill-color: currentColor; }
.btn:focus, .btn:focus-visible { color: var(--text); background: #fff; outline: 2px solid rgba(14, 116, 144, .28); outline-offset: 1px; -webkit-text-fill-color: currentColor; }
.btn:visited { color: var(--text); -webkit-text-fill-color: currentColor; }
.btn-primary {
    background: linear-gradient(135deg, #0e7490, #14b8a6); border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px rgba(14, 116, 144, .22); -webkit-text-fill-color: #fff;
}
.btn-primary:hover { color: #fff; background: linear-gradient(135deg, #0f819e, #17c2ae); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(14, 116, 144, .28); -webkit-text-fill-color: #fff; }
.btn-primary:active { color: #fff; background: linear-gradient(135deg, #0b5f76, #0f9c8d); box-shadow: 0 3px 10px rgba(14, 116, 144, .26); transform: translateY(0); -webkit-text-fill-color: #fff; }
.btn-primary:focus, .btn-primary:focus-visible { color: #fff; background: linear-gradient(135deg, #0e7490, #14b8a6); outline: 2px solid rgba(20, 184, 166, .45); outline-offset: 2px; -webkit-text-fill-color: #fff; }
.btn-primary:visited { color: #fff; -webkit-text-fill-color: #fff; }
.btn-danger { color: var(--danger); border-color: #f3cccc; background: #fff; }
.btn-danger:hover { background: #fef2f2; color: #b91c1c; border-color: #efb6b6; }
.btn-danger:active { color: #991b1b; background: #fde8e8; border-color: #e9a5a5; }
.btn-danger:focus, .btn-danger:focus-visible { color: var(--danger); background: #fff; outline-color: rgba(185, 28, 28, .28); }
.btn-warn { color: #b45309; border-color: #f0dcb5; background: #fffbeb; }
.btn-warn:focus, .btn-warn:focus-visible { color: #b45309; background: #fffbeb; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link-btn { border: none; background: transparent; color: var(--primary); font-size: 12.5px; cursor: pointer; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; }
.link-danger { color: var(--danger); }

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); margin-bottom: 18px; overflow: hidden;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 15px 18px; border-bottom: 1px solid var(--line); background: #fcfefef;
}
.card-head h2, .card-title { margin: 0; font-size: 14.5px; color: var(--ink); font-weight: 700; letter-spacing: .3px; }
.card-head .card-tip, .card-tip { font-size: 12px; color: var(--muted); }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
.data-table th {
    background: #f7fafc; color: #5b6b7b; font-weight: 600; text-align: left;
    padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid #eef3f7; vertical-align: middle; color: var(--text); word-break: break-word; }
.data-table tr:hover td { background: #fbfdfe; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .col-id { width: 60px; color: var(--muted); }
.data-table .col-actions { text-align: right; white-space: nowrap; }
.data-table .col-actions .btn { margin-left: 0; }
.data-table .col-actions > .btn:first-child { margin-left: 0; }
.data-table .col-actions .inline-form { margin-left: 6px; }
.data-table .col-actions .btn.btn-sm {
    background: #f7fbfc; border-color: #dce9ee; color: #425866; box-shadow: none;
}
.data-table .col-actions .btn.btn-sm:hover { background: #eaf7f5; border-color: #9fd8d0; color: #0e7490; transform: translateY(-1px); }
.data-table .col-actions .btn.btn-sm.btn-danger { background: #fff8f8; border-color: #f2d3d3; color: #c0392b; }
.data-table .col-actions .btn.btn-sm.btn-danger:hover { background: #fef2f2; border-color: #e9a5a5; color: #b91c1c; }
.data-table .col-actions .btn.btn-sm.btn-primary { background: #eef8f7; border-color: #b7e1db; color: #0e7490; }
.table-empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.table-empty .icon { color: #cbd5e1; margin-bottom: 8px; }

/* 统一非原生确认弹窗 */
.confirm-overlay {
    position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: rgba(15, 23, 42, .46); opacity: 0; transition: opacity .16s ease;
}
.confirm-overlay.show { opacity: 1; }
.confirm-dialog {
    width: min(430px, 100%); background: #fff; border-radius: 14px; padding: 24px 26px 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .24); transform: translateY(8px) scale(.98);
    transition: transform .18s ease;
}
.confirm-overlay.show .confirm-dialog { transform: none; }
.confirm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.confirm-head h3 { margin: 0; font-size: 15px; color: var(--ink); }
.confirm-icon {
    width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: #fff4e5; color: #d97706; font-weight: 800; font-size: 15px; flex: none;
}
.confirm-message { margin: 0 0 20px; color: #526474; font-size: 13.5px; line-height: 1.75; }
.confirm-input { margin: 0 0 18px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 9px; }
.confirm-actions .btn { min-width: 76px; }
.confirm-actions .btn.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; -webkit-text-fill-color: #fff; }
.confirm-actions .btn.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; -webkit-text-fill-color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; }
.badge-on { background: #e7f8f2; color: #0f766e; }
.badge-off { background: #f1f5f9; color: #64748b; }
.badge-warn { background: #fff7e6; color: #b45309; }
.badge-info { background: #eef4fb; color: #1d4ed8; }
.badge-danger { background: #fdecec; color: #b91c1c; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field > span, .field > label { font-size: 12.5px; color: #52637a; font-weight: 500; }
.field .req { color: var(--danger); margin-left: 3px; }
.input, .select, .textarea {
    width: 100%; border: 1px solid #dbe5ec; background: #fcfdfe; border-radius: 8px;
    padding: 9px 11px; font-size: 13.5px; color: var(--ink); outline: none; transition: .16s;
}
.input:focus, .select:focus, .textarea:focus {
    border-color: #6cb8c3; box-shadow: 0 0 0 3px rgba(14, 116, 144, .1); background: #fff;
}
.textarea { min-height: 100px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: #a8b5c1; }
.help { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field-full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin: 6px 0; }
.checkbox-row input[type=checkbox] { accent-color: var(--primary); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fcfdfe; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 140px; height: 34px; padding: 6px 10px; }
.filter-bar .spacer { flex: 1; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box .icon { position: absolute; left: 10px; color: #94a3b8; }
.search-box .input { padding-left: 32px; }

/* 分页 */
.admin-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 18px; border-top: 1px solid var(--line); }
.admin-pager a, .admin-pager .pg-dots {
    min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; background: #fff; color: var(--text);
}
.admin-pager a:hover { border-color: var(--primary); color: var(--primary); }
.admin-pager a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.admin-pager .pg-info { margin-left: auto; font-size: 12px; color: var(--muted); }
.admin-pager .pg-dots { border: none; }

/* 弹窗 */
.modal {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100;
    display: none; align-items: flex-start; justify-content: center; padding: 6vh 20px 20px;
    overflow-y: auto;
}
.modal.show { display: flex; }
.modal-dialog {
    width: min(720px, 100%); background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    animation: modalIn .22s ease; overflow: hidden;
}
.modal-dialog.wide { width: min(980px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.modal-head {
    display: flex; align-items: center; justify-content: space-between; padding: 15px 20px;
    border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink);
}
.modal-head button { border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: 20px; line-height: 1; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: #fcfdfe; }

/* 上传组件文件库 */
.upload-lib-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.upload-lib-toolbar .input { flex: 1; }
.upload-lib-toolbar .muted { color: var(--muted); font-size: 12px; white-space: nowrap; }
.upload-library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; min-height: 160px; }
.upload-library-item { padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; text-align: left; cursor: pointer; }
.upload-library-item:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, .08); }
.upload-library-item img { width: 100%; height: 88px; object-fit: cover; display: block; background: #f1f5f9; }
.upload-library-item span { display: block; padding: 6px 8px 0; font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-library-item small { display: block; padding: 2px 8px 8px; color: var(--muted); font-size: 11px; }
.upload-lib-empty { grid-column: 1 / -1; padding: 50px 0; text-align: center; color: var(--muted); font-size: 13px; }
.upload-lib-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; font-size: 12px; color: var(--muted); }

/* Toast */
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 13px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .25); opacity: 0; transform: translateY(8px); transition: .25s;
    max-width: 360px;
}
.toast.show { opacity: 1; transform: none; }
.toast-error { background: #b91c1c; }
.toast-success { background: #0f766e; }

/* 空白态 */
.blank-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.blank-icon {
    width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; background: #f1f6f8;
    display: grid; place-items: center; font-size: 22px; color: #94a3b8; font-weight: 700;
}
.blank-state h3 { margin: 0 0 6px; color: var(--ink); font-size: 15px; }
.blank-state p { margin: 0 0 18px; font-size: 13px; }

/* 控制台 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
    position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
}
.stat-card::after {
    content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px;
    border-radius: 50%; background: radial-gradient(circle, rgba(20, 184, 166, .12), transparent 70%);
}
.stat-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-icon { color: var(--primary); display: inline-flex; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--ink); margin: 8px 0 2px; letter-spacing: .5px; }
.stat-sub { font-size: 11.5px; color: var(--muted); }
.stat-card.teal { background: linear-gradient(150deg, #0f172a, #134e4a); border: none; }
.stat-card.teal .stat-label, .stat-card.teal .stat-sub { color: #8fb3ad; }
.stat-card.teal .stat-value { color: #fff; }
.stat-card.teal .stat-icon { color: #5eead4; }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick-item {
    display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--line);
    border-radius: 9px; font-size: 13px; color: var(--text); background: #fbfdfe; cursor: pointer;
}
.quick-item:hover { border-color: #b7ded9; background: var(--primary-soft); color: var(--primary); }
.quick-item .icon { color: var(--primary); }
.info-list { display: grid; grid-template-columns: 110px 1fr; gap: 0; font-size: 12.5px; }
.info-list dt { color: var(--muted); padding: 8px 0; }
.info-list dd { margin: 0; padding: 8px 0; color: var(--text); border-bottom: 1px dashed #eff4f7; word-break: break-all; }
.info-list dd:last-child, .info-list dt:last-child { border-bottom: none; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed #eff4f7; font-size: 12.5px; }
.mini-list li:last-child { border-bottom: none; }
.mini-list a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list a:hover { color: var(--primary); }
.mini-list span { color: var(--muted); flex: none; }

/* 主题 */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.theme-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.theme-preview {
    height: 150px; background: linear-gradient(135deg, #0f172a, #155e75); position: relative;
    padding: 18px; color: #fff;
}
.theme-preview img { width: 100%; height: 100%; object-fit: cover; }
.theme-preview .tp-bar { height: 8px; width: 42%; border-radius: 4px; background: rgba(255, 255, 255, .35); margin-bottom: 8px; }
.theme-preview .tp-title { height: 14px; width: 70%; border-radius: 4px; background: rgba(255, 255, 255, .8); margin-bottom: 8px; }
.theme-preview .tp-text { height: 6px; width: 55%; border-radius: 3px; background: rgba(255, 255, 255, .25); margin-bottom: 5px; }
.theme-preview .tp-badge { position: absolute; right: 12px; top: 12px; background: rgba(20, 184, 166, .9); font-size: 11px; padding: 2px 9px; border-radius: 999px; }
.theme-body { padding: 15px 16px; }
.theme-name { font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.theme-desc { font-size: 12px; color: var(--muted); margin: 6px 0 12px; min-height: 34px; }
.theme-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.theme-meta { font-size: 11px; color: var(--muted); }
.theme-card-foot { flex-wrap: wrap; gap: 10px; }

/* 插件/市场 */
.plugin-list { display: flex; flex-direction: column; }
.plugin-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.plugin-item:last-child { border-bottom: none; }
.plugin-icon {
    width: 42px; height: 42px; border-radius: 10px; flex: none; display: grid; place-items: center;
    background: linear-gradient(135deg, #e8f6f5, #d9eeef); color: var(--primary);
}
.plugin-icon.market { background: #fff3e6; color: #b45309; }
.plugin-main { flex: 1; min-width: 0; }
.plugin-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.plugin-desc { font-size: 12.5px; color: var(--muted); margin: 4px 0 6px; }
.plugin-meta { font-size: 11.5px; color: #94a3b8; display: flex; gap: 12px; flex-wrap: wrap; }
.plugin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.market-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.market-card-head { display: flex; gap: 10px; align-items: center; }
.market-card h3 { margin: 0; font-size: 14px; color: var(--ink); }
.market-card p { margin: 0; font-size: 12px; color: var(--muted); flex: 1; }
.market-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.market-tags span { font-size: 11px; background: #f2f7f9; color: #64748b; padding: 2px 8px; border-radius: 999px; }
.market-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }

/* 文件管理 */
.file-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fcfdfe; }
.breadcrumb-path { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb-path a { color: var(--primary); }
.file-table td .file-name { display: flex; align-items: center; gap: 8px; }
.file-icon { color: var(--primary); display: inline-flex; }
.file-icon.dir { color: #b45309; }
.file-op { display: flex; gap: 4px; justify-content: flex-end; }
.file-op form { display: inline; }
.file-op button { border: none; background: transparent; color: var(--primary); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.file-op button.danger { color: var(--danger); }

/* 编辑器 */
.ueditor-shell { min-height: 330px; }
.ueditor-holder { width: 100%; min-height: 320px; overflow: hidden; }
.ueditor-holder .edui-editor { width: 100% !important; max-width: 100%; box-sizing: border-box; border-radius: 8px !important; overflow: hidden; }
.ueditor-holder .edui-editor-toolbarbox { width: 100% !important; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.ueditor-holder .edui-editor-iframeholder { width: 100% !important; max-width: 100%; }
.ueditor-holder .edui-toolbar { white-space: normal; }
.ueditor-holder .edui-toolbar .edui-button { margin: 1px 2px; }
#edui1_iframeholder, #edui1_toolbarbox { max-width: 100%; }
.editor-toolbar {
    display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border: 1px solid #dbe5ec;
    border-bottom: none; border-radius: 8px 8px 0 0; background: #f8fbfc;
}
.editor-toolbar button {
    height: 28px; min-width: 30px; padding: 0 8px; border: 1px solid transparent; background: transparent;
    border-radius: 5px; color: #52637a; font-size: 12.5px; cursor: pointer;
}
.editor-toolbar button:hover { background: #fff; border-color: var(--line); color: var(--primary); }
.editor-area {
    min-height: 380px; max-height: 640px; overflow-y: auto; padding: 18px 20px;
    border: 1px solid #dbe5ec; border-radius: 0 0 8px 8px; background: #fff; outline: none;
    line-height: 1.85; font-size: 14px;
}
.editor-area:focus { border-color: #6cb8c3; box-shadow: 0 0 0 3px rgba(14, 116, 144, .08); }
.editor-area img { max-width: 100%; border-radius: 8px; }
.editor-area h2 { font-size: 19px; margin: 20px 0 10px; }
.editor-area blockquote { border-left: 3px solid var(--primary-2); background: #f5fbfa; margin: 14px 0; padding: 10px 14px; }

/* 分类树行 */
.tree-indent { display: inline-block; color: #cbd5e1; }
.category-name { font-weight: 600; color: var(--ink); }
.slug-code { font-family: Consolas, monospace; font-size: 11.5px; color: #64748b; background: #f4f8fa; padding: 1px 7px; border-radius: 4px; }
.cover-thumb { width: 54px; height: 36px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); background: #f4f8fa; display: block; }
.cover-empty { width: 54px; height: 36px; border-radius: 6px; background: #f4f8fa; border: 1px dashed #dbe5ec; display: grid; place-items: center; color: #b6c4d0; font-size: 10px; }

/* 角色权限 */
.role-perm-box { border: 1px solid var(--line); border-radius: 9px; padding: 14px; background: #fbfdfe; max-height: 320px; overflow-y: auto; }

/* 子标签 */
.sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sub-tab {
    padding: 7px 15px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
    font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.sub-tab.active { background: var(--primary-soft); color: var(--primary); border-color: #c3e6e1; font-weight: 600; }

/* 登录页 */
.login-body {
    min-height: 100vh; margin: 0; background: radial-gradient(1000px 600px at 15% 10%, #0f3d44, transparent 60%),
    radial-gradient(900px 500px at 90% 90%, #12384f, transparent 55%), #0b1220;
    display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
}
.login-bg { position: absolute; inset: 0; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .55; }
.blob-1 { width: 380px; height: 380px; left: -100px; top: -120px; background: radial-gradient(circle, rgba(20, 184, 166, .45), transparent 65%); }
.blob-2 { width: 460px; height: 460px; right: -140px; bottom: -180px; background: radial-gradient(circle, rgba(14, 116, 144, .5), transparent 65%); }
.grid-lines {
    position: absolute; inset: 0; opacity: .16;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 46px 46px;
}
.login-wrap { position: relative; width: min(420px, calc(100% - 36px)); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: #e2e8f0; }
.login-brand .brand-mark { width: 42px; height: 42px; }
.login-brand strong { display: block; font-size: 18px; letter-spacing: 1px; }
.login-brand small { color: #94a3b8; font-size: 11.5px; letter-spacing: .5px; }
.login-card {
    background: rgba(255, 255, 255, .97); border-radius: 16px; padding: 30px 30px 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .4);
}
.login-card h1 { margin: 0 0 6px; font-size: 21px; color: var(--ink); letter-spacing: .5px; }
.login-sub { margin: 0 0 22px; font-size: 12.5px; color: var(--muted); }
.login-form .field { margin-bottom: 17px; }
.login-form .field > span { font-size: 12px; font-weight: 600; color: #47576b; letter-spacing: .2px; }
.auth-control {
    display: flex; align-items: center; height: 48px; padding: 0 10px; border-radius: 11px;
    border: 1px solid #d7e3ea; background: linear-gradient(180deg, #fbfdfe, #f5f9fb);
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.auth-control:hover { border-color: #b8d4dc; background: #fbfefe; }
.auth-control:focus-within {
    border-color: #4fa8b5; background: #fff;
    box-shadow: 0 0 0 4px rgba(14, 116, 144, .1), 0 6px 16px rgba(14, 116, 144, .08);
}
.auth-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; flex: none; color: #7d95a3; }
.auth-control:focus-within .auth-icon { color: var(--primary); }
.auth-input {
    flex: 1 1 auto; min-width: 0; height: 46px !important; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important; padding: 0 8px !important;
    font-size: 14px !important; color: var(--ink);
}
.auth-input:focus { box-shadow: none !important; }
.auth-eye {
    flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 7px; background: transparent; color: #8aa0ae; cursor: pointer; transition: .16s;
}
.auth-eye:hover { background: #eaf5f6; color: var(--primary); }
.auth-eye.is-visible { background: #e6f6f4; color: var(--primary); }
.auth-captcha-row { display: flex; align-items: stretch; gap: 10px; }
.auth-captcha-row .auth-control { flex: 1 1 auto; min-width: 0; }
.auth-captcha {
    width: 122px; height: 48px; border-radius: 11px; border: 1px solid #d7e3ea; cursor: pointer;
    object-fit: cover; background: #f4f7f9; flex: none; transition: border-color .16s;
}
.auth-captcha:hover { border-color: #9cc7cf; }
.login-btn {
    width: 100%; height: 46px; border: none; border-radius: 10px; cursor: pointer; margin-top: 4px;
    background: linear-gradient(135deg, #0e7490, #14b8a6); color: #fff; font-size: 14.5px; font-weight: 600;
    box-shadow: 0 10px 24px rgba(14, 116, 144, .28); transition: .18s;
    -webkit-text-fill-color: #fff;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(14, 116, 144, .34); color: #fff; -webkit-text-fill-color: #fff; }
.login-btn:active { color: #fff; background: linear-gradient(135deg, #0b5f76, #0f9c8d); transform: translateY(0); box-shadow: 0 5px 14px rgba(14, 116, 144, .3); -webkit-text-fill-color: #fff; }
.login-btn:focus, .login-btn:focus-visible { color: #fff; outline: 2px solid rgba(20, 184, 166, .5); outline-offset: 2px; -webkit-text-fill-color: #fff; }
.login-foot { display: flex; justify-content: space-between; margin-top: 18px; font-size: 11px; color: #a8b5c1; }
.login-form .flash { margin-bottom: 16px; }

/* 响应式 */
@media (max-width: 1100px) {
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); }
    .shell-main { margin-left: 0; }
    .page-wrap { padding: 16px 14px 30px; }
    .form-grid { grid-template-columns: 1fr; }
    .filter-bar .input, .filter-bar .select { min-width: 0; flex: 1 1 130px; }
    .user-role { display: none; }
    .site-switch { display: none; }
}
@media (max-width: 640px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 22px; }
    .data-table .col-id, .data-table .col-cover { display: none; }
    .login-card { padding: 24px 20px 18px; }
}

/* 后台业务页面补充 */
.inline-form { display: inline-flex; align-items: center; margin: 0; }
.inline-form button { margin-left: 0; }
.filter-form { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; flex: 1; }
.filter-form .input, .filter-form .select { width: auto; min-width: 130px; height: 34px; padding: 6px 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.info-list { margin: 0; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed #e8eff4; font-size: 12.5px; }
.info-row:last-child { border-bottom: none; }
.info-row dt { color: var(--muted); flex: none; }
.info-row dd { margin: 0; color: var(--ink); text-align: right; word-break: break-all; }

/* 控制台系统信息 */
.system-card { min-width: 0; }
.system-live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: #e9f9f4; color: #0f766e; font-size: 11px; font-weight: 600; }
.system-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #14b88a; box-shadow: 0 0 0 3px rgba(20, 184, 138, .14); }
.system-body { display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, #fff, #fbfdfe); }
.sys-group { border: 1px solid #e5eff3; border-radius: 10px; overflow: hidden; background: #fff; }
.sys-group-head { display: flex; align-items: center; gap: 8px; padding: 8px 11px; background: #f5fafb; border-bottom: 1px solid #eaf1f4; }
.sys-group-icon { width: 24px; height: 24px; border-radius: 6px; background: #e6f5f4; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.sys-group-head h3 { margin: 0; font-size: 12px; color: #405767; letter-spacing: .3px; }
.sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #eff5f7; }
.sys-item { min-width: 0; padding: 8px 10px; background: #fff; display: flex; flex-direction: column; gap: 1px; }
.sys-label { color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.sys-value { color: var(--ink); font-size: 12px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sys-item small { color: #94a6b3; font-size: 9.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-title { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.muted { color: var(--muted); }
.section-title { margin: 20px 0 10px; font-size: 13.5px; color: var(--ink); }
.notice-box { background: #f6fbfc; border: 1px solid #e2eef2; border-radius: 8px; padding: 10px 13px; font-size: 12.5px; color: #4b6472; line-height: 1.7; }
.notice-box.warn { background: #fff8ec; border-color: #f3e0bd; color: #8a5a12; }
.url-rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.url-rule { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; background: #fff; cursor: pointer; transition: border-color .18s, box-shadow .18s, background .18s; }
.url-rule:hover { border-color: #a9d4dc; box-shadow: 0 4px 16px rgba(14,116,144,.06); }
.url-rule:has(input:checked) { border-color: #6cb8c3; background: #f4fbfa; box-shadow: 0 0 0 3px rgba(14,116,144,.07); }
.url-rule input { accent-color: var(--primary); }
.url-rule-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.url-rule-code { display: block; margin-top: 8px; padding: 7px 8px; border-radius: 6px; background: #f6f9fb; color: #0e7490; font-size: 11.5px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.url-rule-note { margin-top: 7px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.check-row { display: flex; gap: 16px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #52637a; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--primary); }
.field-tip { font-size: 11.5px; color: #96a6b4; line-height: 1.6; }
.input-lg { height: 46px; font-size: 16px; font-weight: 600; letter-spacing: .3px; }
.user-cell { display: flex; align-items: center; gap: 9px; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-lg { width: 54px; height: 54px; font-size: 20px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; border: 1px solid var(--line); border-radius: 9px; padding: 12px; background: #fbfdfe; max-height: 340px; overflow-y: auto; }
.perm-item { padding: 7px 9px; border-radius: 7px; background: #fff; border: 1px solid #eef3f7; }
.perm-item small { display: block; color: #9aabbb; font-size: 10.5px; }
.media-field { display: flex; flex-direction: column; gap: 7px; }
.media-field input[type=file] { font-size: 12px; color: var(--muted); }
.media-uploader { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.media-thumb {
    width: 92px; height: 62px; border-radius: 8px; border: 1px dashed #cddfe5; background: #f1f8f9;
    display: grid; place-items: center; overflow: hidden; color: #9fb4be; flex: none;
}
.media-thumb.square { width: 62px; height: 62px; }
.media-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.media-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.media-body .input { height: 32px; font-size: 12px; }
.media-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.config-panel { padding-top: 2px; }
.file-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fcfdfe; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); }
.file-pick { position: relative; overflow: hidden; margin: 0; }
.file-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop {
    display: flex; align-items: center; gap: 12px; margin: 14px 16px; padding: 16px 18px;
    border: 1px dashed #c7dbe2; border-radius: 10px; background: #f8fcfc; color: var(--primary);
    cursor: pointer; transition: .18s;
}
.file-drop:hover, .file-drop:focus-visible, .file-drop.is-dragging { border-color: var(--primary-2); background: #edf9f8; box-shadow: 0 0 0 3px rgba(20, 184, 166, .1); outline: none; }
.file-drop div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.file-drop strong { color: var(--ink); font-size: 13px; }
.file-drop span { color: var(--muted); font-size: 11.5px; }
.file-parent { padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 12px; }
.file-parent a { color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.file-cell { display: flex; align-items: center; gap: 9px; }
.file-cell a { color: var(--ink); }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.version-label { font-size: 11.5px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.version-nums { display: flex; align-items: flex-end; gap: 16px; margin-top: 6px; }
.version-nums small { display: block; color: var(--muted); font-size: 11.5px; }
.version-nums strong { font-size: 22px; color: var(--ink); letter-spacing: .5px; }
.version-arrow { color: #9bb3c1; font-size: 20px; padding-bottom: 3px; }
.version-actions { display: flex; align-items: center; gap: 8px; }
.changelog { background: #0f172a; color: #cbe6e3; border-radius: 10px; padding: 14px 16px; font-size: 12.5px; line-height: 1.8; white-space: pre-wrap; overflow-x: auto; }
.market-panel { min-height: 120px; }
.market-note { font-size: 12px; color: var(--muted); padding: 12px 16px; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.profile-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.profile-head strong { font-size: 16px; color: var(--ink); }
.log-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; padding: 12px 14px; background: #f8fbfc; border: 1px solid #e8eff4; border-radius: 9px; font-size: 12px; }
.log-meta-item { display: flex; flex-direction: column; gap: 3px; }
.log-meta-item span { color: var(--muted); }
.log-meta-item strong { color: var(--ink); word-break: break-all; }
.log-ua { font-size: 11.5px; color: var(--muted); margin: 12px 2px; word-break: break-all; }
.log-params { background: #0f172a; color: #cbe6e3; border-radius: 9px; padding: 12px 14px; font-size: 12px; white-space: pre-wrap; max-height: 320px; overflow: auto; }
.code-hint p { margin: 0 0 8px; font-size: 12.5px; color: #52637a; line-height: 1.8; }
.code-hint code { background: #f1f7f9; color: #0e7490; padding: 1px 6px; border-radius: 4px; font-family: Consolas, monospace; font-size: 11.5px; }
.tree-branch { color: #c3d2dd; margin-right: 4px; }

/* 编辑器布局 */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.editor-main { min-width: 0; }
.editor-side { min-width: 0; }
.editor-source { display: none; margin-top: 8px; font-family: Consolas, monospace; font-size: 12.5px; }
.tb-sep { width: 1px; height: 22px; background: #e2ebf1; margin: 3px 4px; }
.cover-picker { display: flex; flex-direction: column; gap: 7px; }
.cover-preview { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f7fbfc; }
.cover-preview img { width: 100%; max-height: 160px; object-fit: cover; display: block; }
.cover-actions { display: flex; gap: 6px; }

/* 图片上传组件 */
.upload-card { display: flex; flex-direction: column; gap: 9px; }
.upload-drop {
    position: relative; min-height: 150px; border: 1px dashed #c7dbe2; border-radius: 10px;
    background: linear-gradient(180deg, #fbfdfe, #f4fafb); overflow: hidden; cursor: pointer;
    display: flex; align-items: stretch; justify-content: center; transition: border-color .18s, background .18s, box-shadow .18s;
}
.upload-drop:hover, .upload-drop:focus-visible { border-color: #6cb8c3; background: #f2fbfb; box-shadow: 0 0 0 3px rgba(14, 116, 144, .08); outline: none; }
.upload-card.is-dragging .upload-drop, .upload-drop.dragging { border-color: var(--primary); background: #eaf8f7; box-shadow: 0 0 0 4px rgba(20, 184, 166, .14); }
.upload-empty {
    width: 100%; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    text-align: center; color: #6b8290; font-size: 12px;
}
.upload-empty svg { color: var(--primary-2); width: 34px; height: 34px; }
.upload-empty strong { color: var(--ink); font-size: 13.5px; font-weight: 600; }
.upload-empty span { color: #8ba0ad; }
.upload-preview {
    position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 0; max-height: 320px;
    background: #eef5f7; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.upload-preview img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: #fff; display: block; }
.upload-preview > img { margin: 0; }
.upload-mask {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(10, 37, 48, .48); color: #fff; font-size: 12.5px; letter-spacing: .5px;
    opacity: 0; transition: opacity .18s;
}
.upload-preview:hover .upload-mask { opacity: 1; }
.upload-loading {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 9px;
    background: rgba(255, 255, 255, .9); color: var(--primary); font-size: 12.5px; z-index: 3;
}
.upload-spinner { width: 17px; height: 17px; border-radius: 50%; border: 2px solid #cfe8ea; border-top-color: var(--primary); animation: upload-spin .8s linear infinite; }
@keyframes upload-spin { to { transform: rotate(360deg); } }
.upload-url-row { display: flex; align-items: center; gap: 6px; }
.upload-url-row .input { flex: 1 1 auto; min-width: 0; height: 32px; font-size: 12px; }
.upload-hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.upload-hint-success { color: #0f766e; }
.upload-hint-error { color: var(--danger); }

/* 压缩包上传组件：插件 / 主题导入、手动升级共用 */
.package-upload { display: flex; flex-direction: column; gap: 8px; }
.package-upload-box {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 12px 14px;
    border: 1px dashed #c7dbe2; border-radius: 10px;
    background: linear-gradient(180deg, #fbfdfe, #f3faf9);
    cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s;
}
.package-upload-box:hover, .package-upload-box:focus-visible {
    border-color: #6cb8c3; background: #f1fbfa; box-shadow: 0 0 0 3px rgba(14, 116, 144, .08); outline: none;
}
.package-upload-box.dragging, .package-upload.has-file .package-upload-box {
    border-color: var(--primary); border-style: solid; background: #eefaf8; box-shadow: 0 0 0 3px rgba(20, 184, 166, .1);
}
.package-upload-icon {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #0f766e; background: #e3f6f3;
}
.package-upload.has-file .package-upload-icon { color: #fff; background: var(--primary); }
.package-upload-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.package-upload-copy strong { color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.4; }
.package-upload-copy small {
    color: var(--muted); font-size: 11.5px; line-height: 1.5;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.package-upload.has-file .package-upload-copy small { color: #0f766e; }
.package-upload-pick {
    flex: 0 0 auto; padding: 5px 10px; border: 1px solid #b9d8dc; border-radius: 7px;
    color: #0f766e; background: #fff; font-size: 11.5px; font-weight: 500;
}
.package-upload-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    color: var(--muted); font-size: 11.5px; line-height: 1.5;
}
.package-upload-clear {
    border: 0; padding: 0; background: none; color: #b91c1c; font-size: 11.5px; cursor: pointer;
}
.package-upload-clear:hover { color: #7f1d1d; text-decoration: underline; }
.package-upload-clear[hidden], .package-upload-error[hidden] { display: none; }
.package-upload-error { color: var(--danger); font-size: 12px; line-height: 1.5; }
@media (max-width: 560px) {
    .package-upload-box { align-items: flex-start; }
    .package-upload-pick { display: none; }
}

/* 文档属性 */
.attr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.attr-check {
    position: relative; display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px;
    border: 1px solid var(--line); border-radius: 9px; background: #fbfdfe; cursor: pointer;
    transition: border-color .16s, background .16s, box-shadow .16s;
}
.attr-check:hover { border-color: #b8d8df; background: #f7fcfc; }
.attr-check input { position: absolute; opacity: 0; pointer-events: none; }
.attr-dot {
    width: 17px; height: 17px; border-radius: 5px; border: 1px solid #c8d9df; background: #fff;
    flex: none; margin-top: 2px; position: relative; transition: .16s;
}
.attr-check input:checked + .attr-dot { background: var(--attr-color, #0e7490); border-color: var(--attr-color, #0e7490); }
.attr-check input:checked + .attr-dot::after {
    content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
    border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(42deg);
}
.attr-check input:checked ~ span strong { color: var(--primary); }
.attr-check > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.attr-check strong { color: var(--ink); font-size: 12.5px; line-height: 1.5; }
.attr-check small { color: var(--muted); font-size: 10.5px; line-height: 1.45; }

/* 标签输入 */
.tag-editor {
    border: 1px solid #dbe5ec; background: #fcfdfe; border-radius: 9px; padding: 9px;
    transition: border-color .16s, box-shadow .16s;
}
.tag-editor:focus-within { border-color: #6cb8c3; box-shadow: 0 0 0 3px rgba(14, 116, 144, .1); background: #fff; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.tag-chips:not(:empty) { margin-bottom: 8px; }
.tag-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 9px;
    border-radius: 999px; background: #e7f6f5; color: #0f6f80; font-size: 11.5px; line-height: 1.6;
}
.tag-chip-remove {
    border: 0; background: transparent; color: #5f9aa5; cursor: pointer; padding: 0 1px;
    font-size: 14px; line-height: 1; border-radius: 50%;
}
.tag-chip-remove:hover { color: #b91c1c; }
.tag-input-row { display: flex; gap: 7px; }
.tag-input-row .input { flex: 1 1 auto; min-width: 0; }
.tag-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 7px; font-size: 11px; color: var(--muted); }
.tag-suggest {
    border: 1px solid #e2edf1; background: #f7fbfc; color: #59717f; border-radius: 999px;
    padding: 2px 8px; font-size: 11px; cursor: pointer; transition: .16s;
}
.tag-suggest:hover { border-color: #9acbd2; color: var(--primary); background: #ecf8f8; }

/* 模型管理 */
.model-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.model-main, .model-side { min-width: 0; }
.model-field-list { display: flex; flex-direction: column; gap: 13px; }
.model-field-row { border: 1px solid #dfeaf0; border-radius: 11px; background: #fcfefe; overflow: hidden; }
.model-field-head { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: #f4f9fa; border-bottom: 1px solid #e7eff3; }
.field-row-index { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e1f1f2; color: #0e7490; font-size: 11px; font-weight: 700; }
.model-field-head strong { flex: 1; color: #405667; font-size: 12px; }
.model-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 13px 13px 0; }
.model-field-grid .field { margin-bottom: 12px; }
.field-span-2 { grid-column: 1 / -1; }
.model-required { align-self: end; margin: 6px 0 18px; padding: 7px 9px; border-radius: 7px; background: #f8fbfc; border: 1px solid #e9f0f4; width: max-content; }
.field-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 9px; }
.field-type-card { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid #e2edf1; border-radius: 9px; background: #fbfdfe; }
.field-type-icon { width: 29px; height: 29px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: #e8f6f5; color: var(--primary); flex: none; }
.field-type-card strong { display: block; color: var(--ink); font-size: 12.5px; }
.field-type-card code { display: inline-block; margin-left: 6px; color: #8aa0ad; font-size: 10.5px; }
.field-type-card small { display: block; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.field-type-mini { display: flex; flex-direction: column; gap: 8px; max-height: 620px; overflow-y: auto; }
.field-type-mini-item { padding: 8px 9px; border-bottom: 1px dashed #e9f0f4; }
.field-type-mini-item:last-child { border-bottom: 0; }
.field-type-mini-item code { color: var(--primary); font-size: 11px; }
.field-type-mini-item span { margin-left: 6px; color: var(--ink); font-size: 12px; }
.field-type-mini-item small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }

@media (max-width: 1100px) {
    .dashboard-grid, .editor-layout, .profile-layout, .model-layout, .upgrade-hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .version-nums { width: 100%; }
    .version-actions { width: 100%; }
    .log-meta { grid-template-columns: 1fr; }
    .file-toolbar { gap: 6px; }
}

/* 系统升级 */
.upgrade-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr); gap: 18px; padding: 26px 28px; border-radius: 18px; color: #eafcfb; background: radial-gradient(circle at 88% 12%, rgba(86, 220, 200, .32), transparent 34%), linear-gradient(125deg, #083b45, #0d5a63 56%, #11756f); box-shadow: 0 18px 45px rgba(6, 45, 51, .24); overflow: hidden; }
.upgrade-hero-main h2 { margin: 5px 0 8px; font-size: 23px; letter-spacing: .4px; }
.upgrade-hero-main p { margin: 0; max-width: 620px; color: rgba(234, 252, 251, .76); font-size: 13px; line-height: 1.75; }
.upgrade-kicker { color: #7de0d1; font-size: 11px; letter-spacing: .22em; font-weight: 700; }
.upgrade-version-flow { display: flex; align-items: center; gap: 12px; margin-top: 21px; }
.upgrade-version-card { min-width: 150px; padding: 13px 15px; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); }
.upgrade-version-card small { display: block; color: rgba(234,252,251,.7); font-size: 11px; }
.upgrade-version-card strong { display: block; font-size: 20px; margin-top: 3px; }
.upgrade-version-card .badge { margin-top: 7px; }
.upgrade-version-card.latest { background: rgba(255,255,255,.16); }
.upgrade-flow-arrow { color: #89e6d8; font-size: 22px; font-weight: 700; }
.upgrade-hero-side { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 11px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.14); }
.upgrade-hero-side .btn-lg {
    padding: 12px 18px; border-radius: 10px; background: #fff; color: #075e63;
    -webkit-text-fill-color: #075e63; font-weight: 700; box-shadow: 0 8px 20px rgba(0,0,0,.14);
    border: 1px solid rgba(255,255,255,.5);
}
.upgrade-hero-side .btn-lg:hover {
    background: #eafcf8; color: #064e52; -webkit-text-fill-color: #064e52;
    border-color: #fff; transform: translateY(-1px);
}
.upgrade-hero-side .btn-lg:active {
    background: #d9f5ee; color: #043f43; -webkit-text-fill-color: #043f43; transform: translateY(0);
}
.upgrade-hero-side .btn-lg:focus,
.upgrade-hero-side .btn-lg:focus-visible {
    background: #eafcf8; color: #064e52; -webkit-text-fill-color: #064e52;
    outline: 2px solid rgba(156, 247, 225, .7); outline-offset: 2px;
}
.upgrade-hero-side .btn-lg:disabled {
    opacity: .65; color: #075e63; -webkit-text-fill-color: #075e63;
}
.upgrade-ok { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; background: rgba(116, 238, 208, .16); color: #9cf7e1; border: 1px solid rgba(156, 247, 225, .3); }
.upgrade-hero-side .card-tip { color: rgba(234,252,251,.62); }
.upgrade-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 16px; }
.upgrade-step { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid #e1ecef; border-radius: 12px; background: #fff; }
.upgrade-step > span { width: 29px; height: 29px; border-radius: 8px; display: inline-grid; place-items: center; background: #e6f7f4; color: #0e7b78; font-size: 11px; font-weight: 700; flex: none; }
.upgrade-step strong { display: block; color: var(--ink); font-size: 12.5px; }
.upgrade-step small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.upgrade-card { margin-top: 16px; }
.upgrade-progress {
    margin-top: 16px; padding: 15px 18px; border: 1px solid #d8ecea; border-radius: 12px;
    background: linear-gradient(135deg, #f5fdfb, #ffffff); box-shadow: 0 8px 22px rgba(15, 118, 110, .06);
}
.upgrade-progress[hidden] { display: none !important; }
.upgrade-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.upgrade-progress-head strong { color: var(--ink); font-size: 13px; }
.upgrade-progress-head span { color: #0f766e; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.upgrade-progress-track { height: 10px; border-radius: 999px; background: #e6f2f0; overflow: hidden; }
.upgrade-progress-fill {
    width: 0; height: 100%; border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #0f766e); transition: width .28s ease;
}
.upgrade-progress-message { margin-top: 9px; color: var(--muted); font-size: 12px; }
.upgrade-progress.is-error { border-color: #fecaca; background: #fff7f7; }
.upgrade-progress.is-error .upgrade-progress-head span { color: #b91c1c; }
.upgrade-progress.is-error .upgrade-progress-fill { background: #dc2626; }
.upgrade-progress.is-success { border-color: #bbf7d0; background: #f6fffa; }
.upgrade-progress.is-success .upgrade-progress-head span { color: #047857; }
.upgrade-progress.is-success .upgrade-progress-fill { background: linear-gradient(90deg, #34d399, #059669); }
.upgrade-manual-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.upgrade-manual-actions .card-tip { margin: 0; }
.backup-timeline { padding: 8px 18px 14px; }
.backup-item { display: flex; align-items: center; gap: 13px; padding: 14px 0 14px 18px; border-left: 1px dashed #dce8ec; position: relative; }
.backup-item:last-child { border-left-color: transparent; }
.backup-dot { position: absolute; left: -6px; top: 23px; width: 11px; height: 11px; border-radius: 50%; background: #14a39b; box-shadow: 0 0 0 4px #e9f8f6; }
.backup-main { flex: 1; min-width: 0; }
.backup-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.backup-title strong { color: var(--ink); font-size: 14px; }
.backup-sub { display: flex; align-items: center; gap: 12px; margin-top: 5px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.backup-sub .slug-code { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backup-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) { .upgrade-steps { grid-template-columns: repeat(2, 1fr); } .upgrade-version-flow { flex-wrap: wrap; } }

/* 应用市场 */
.market-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; border-radius: 16px; background: linear-gradient(120deg, #0b3c47, #146c6b); color: #effffb; box-shadow: 0 14px 34px rgba(8, 52, 58, .2); }
.market-kicker { color: #83e8d8; font-size: 10.5px; letter-spacing: .2em; font-weight: 700; }
.market-hero h2 { margin: 4px 0 6px; font-size: 22px; }
.market-hero p { margin: 0; color: rgba(239,255,251,.72); font-size: 12.5px; }
.market-hero-stat { display: flex; align-items: center; gap: 22px; }
.market-hero-stat > div { text-align: center; }
.market-hero-stat strong { display: block; font-size: 23px; }
.market-hero-stat small { color: rgba(239,255,251,.68); font-size: 11px; }
.market-core-card { margin-top: 14px; }
.market-filter { margin: 14px 0; padding: 12px 14px; border: 1px solid #e2edf1; border-radius: 12px; background: #fff; }
.market-filter-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.market-filter-row input, .market-filter-row select { height: 34px; border: 1px solid #dce8ec; border-radius: 8px; background: #fbfdfe; color: var(--ink); padding: 0 10px; font-size: 12px; }
.market-filter-row input:focus, .market-filter-row select:focus { outline: none; border-color: var(--primary); background: #fff; }
.market-search { flex: 1; min-width: 220px; }
.market-filter-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 11px; }
.link-btn { border: 0; background: none; color: var(--primary); font-size: 11.5px; cursor: pointer; padding: 0; }
.market-cover {
    position: relative; aspect-ratio: 16 / 9; height: auto; overflow: hidden;
    border: 1px solid #eef4f6; border-radius: 10px; background: #eaf6f4;
}
.market-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.market-cover-fallback { display: grid; place-items: center; height: 100%; color: var(--primary); }
.market-type-badge { position: absolute; left: 11px; top: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(4, 44, 49, .72); color: #fff; font-size: 10.5px; letter-spacing: .06em; }
.market-type-badge.theme { background: rgba(94, 35, 55, .72); }
.plugin-state-badge, .theme-state-badge { position: absolute; right: 10px; top: 10px; border-radius: 999px; }
.market-card { overflow: hidden; }
.market-card[hidden] { display: none !important; }
.market-card-head { padding-top: 12px; }
.market-card > p { min-height: 43px; }
.plugin-market-grid, .theme-market-grid { margin-top: 16px; }
.plugin-card-foot { flex-wrap: wrap; gap: 10px; }
.plugin-sort { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; }
.plugin-sort .sort-control { margin-left: 2px; }
.market-hero-btn { flex: none; color: #effffb; border-color: rgba(239, 255, 251, .38); background: rgba(255, 255, 255, .1); }
.market-hero-btn:hover { color: #fff; border-color: rgba(239, 255, 251, .62); background: rgba(255, 255, 255, .18); }
@media (max-width: 760px) {
    .market-hero { flex-direction: column; align-items: flex-start; }
    .market-hero-stat { width: 100%; flex-wrap: wrap; gap: 14px 22px; }
    .market-hero-stat > a { margin-left: auto; }
}
.market-tags { gap: 6px; }
.price-tag { font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.price-tag.free { color: #0b7a61; background: #e5f8ef; }
.price-tag.paid { color: #a95a16; background: #fff1e2; }
.feature-tag { padding: 2px 7px; border-radius: 6px; background: #eef7f7; color: #3c6d70; font-size: 10.5px; }
.market-meta-row { display: flex; flex-wrap: wrap; gap: 8px 12px; color: #8699a4; font-size: 10.5px; margin: 10px 0 2px; }
.market-note-card .market-note { padding: 3px 2px; }
.market-view-tabs .sub-tab { display: inline-flex; align-items: center; gap: 7px; }
.market-view-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #eef7f7; color: #4a7477; font-size: 10px; line-height: 18px; text-align: center; }
.market-view-tabs .sub-tab.active .market-view-count { background: rgba(255, 255, 255, .18); color: #fff; }
.market-filter-panel { margin: 0 0 14px; padding: 6px 16px; border: 1px solid #e2edf1; border-radius: 12px; background: #fff; }
.market-filter-line { display: flex; align-items: flex-start; gap: 14px; padding: 11px 0; border-bottom: 1px dashed #edf4f6; }
.market-filter-line:last-child { border-bottom: 0; }
.market-filter-label { flex: 0 0 68px; padding-top: 5px; color: #8aa0aa; font-size: 11.5px; }
.market-filter-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.market-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1px solid #dfecef; border-radius: 999px; background: #fbfdfe; color: #55717b; font-size: 11.5px; cursor: pointer; transition: all .16s ease; }
.market-chip:hover { border-color: #a8d8d2; color: #0f766e; background: #f2fbf9; }
.market-chip.active { border-color: #149c92; background: #e8f8f5; color: #08756c; font-weight: 600; box-shadow: 0 0 0 2px rgba(20, 156, 146, .08); }
.market-chip-count { min-width: 16px; padding: 0 4px; border-radius: 999px; background: #edf4f6; color: #7d949e; font-size: 9.5px; line-height: 16px; text-align: center; }
.market-chip.active .market-chip-count { background: #cdeee9; color: #08756c; }
.market-search-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 12px 16px; border: 1px solid #e2edf1; border-radius: 12px; background: #fff; }
.market-search-bar .market-search { flex: 1; min-width: 220px; height: 36px; border: 1px solid #dce8ec; border-radius: 9px; background: #fbfdfe; color: var(--ink); padding: 0 12px; font-size: 12px; }
.market-search-bar .market-search:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(20, 156, 146, .08); }
.market-search-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.market-search-meta select { height: 36px; border: 1px solid #dce8ec; border-radius: 9px; background: #fbfdfe; color: var(--ink); padding: 0 10px; font-size: 12px; }
.market-active-filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: -2px 0 14px; padding: 0 4px; color: var(--muted); font-size: 11px; }
.market-active-filters[hidden] { display: none !important; }
.market-active-filter-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.market-filter-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: #eef7f7; color: #3c6d70; font-size: 10.5px; }
.market-official-badge { position: absolute; right: 10px; top: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(180, 83, 9, .82); color: #fff; font-size: 10px; letter-spacing: .04em; }
@media (max-width: 760px) {
    .market-filter-line { display: block; }
    .market-filter-label { display: block; padding: 0 0 7px; }
    .market-search-bar { align-items: stretch; flex-direction: column; }
    .market-search-meta { justify-content: space-between; }
}

/* 列表排序 */
.sort-th { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; white-space: nowrap; }
.sort-th:hover { color: var(--primary); }
.sort-th.active { color: var(--primary); font-weight: 600; }
.sort-arrows { display: inline-flex; flex-direction: column; line-height: 8px; font-size: 8px; color: #b8c8d0; }
.sort-arrows i { font-style: normal; transition: color .15s; }
.sort-arrows i.on { color: #0e8f86; }
.sort-form { display: inline-flex; align-items: center; margin: 0; }
.sort-control {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px;
    border: 1px solid #e1edf0; border-radius: 8px; background: #fbfdfe;
    transition: border-color .15s, box-shadow .15s;
}
.sort-control:focus-within { border-color: #16a39a; background: #fff; box-shadow: 0 0 0 2px rgba(22,163,154,.12); }
.sort-input {
    width: 44px; height: 24px; padding: 0 2px; border: none; border-radius: 4px;
    background: transparent; color: var(--ink); font-size: 11.5px; font-weight: 600;
    text-align: center; transition: .15s; -moz-appearance: textfield;
}
.sort-input::-webkit-outer-spin-button, .sort-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sort-input:focus { outline: none; background: #fff; }
.sort-input.is-saved { background: #eafaf6; color: #0b7a61; }
.sort-buttons { display: inline-flex; flex-direction: column; gap: 1px; }
.sort-move {
    width: 20px; height: 12px; padding: 0; border: 1px solid #dfeaee; border-radius: 3px;
    background: #fff; color: #7b929c; font-size: 7px; line-height: 10px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.sort-move:hover { border-color: #16a39a; color: #0e8f86; background: #f2fbf9; }
.sort-move:active { background: #e4f6f2; }
.bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; margin-bottom: 10px; border: 1px solid #e1edf0; border-radius: 9px; background: #f8fcfd; }
.bulk-bar .bulk-count { color: #6a8089; font-size: 11.5px; margin-right: 4px; }
.bulk-bar .bulk-move { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.bulk-bar .select-sm { height: 29px; font-size: 11.5px; padding: 0 8px; }
.col-check { width: 34px; text-align: center; }
.col-check input { width: 14px; height: 14px; accent-color: #16a39a; }
.col-cover { width: 92px; }
.table-cover { display: block; width: 74px; height: 44px; object-fit: cover; border-radius: 6px; background: #f3f7f9; border: 1px solid #e5edf0; }
.category-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 7px 10px; padding: 10px 12px; border: 1px solid #dfeaee; border-radius: 8px; background: #fbfdfe; }
.category-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); }
.category-check input { accent-color: #16a39a; }
.multi-select { position: relative; width: 100%; }
.multi-select-trigger {
    width: 100%; min-height: 38px; padding: 7px 11px; border: 1px solid #dfeaee; border-radius: 8px;
    background: #fff; color: var(--ink); display: flex; align-items: center; gap: 8px;
    text-align: left; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.multi-select-trigger:hover, .multi-select.open .multi-select-trigger { border-color: #16a39a; box-shadow: 0 0 0 3px rgba(22, 163, 154, .08); }
.multi-select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #82969e; }
.multi-select.has-value .multi-select-value { color: var(--ink); }
.multi-select-count {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e8f8f4;
    color: #0e8f86; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.multi-select-count[hidden] { display: none; }
.multi-select-chevron { flex: none; color: #8aa0a8; font-size: 15px; line-height: 1; transition: transform .15s; }
.multi-select.open .multi-select-chevron { transform: rotate(180deg); }
.multi-select-panel {
    position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 5px); max-height: 230px;
    overflow: auto; padding: 8px; border: 1px solid #dfeaee; border-radius: 9px; background: #fff;
    box-shadow: 0 12px 30px rgba(23, 54, 64, .12);
}
.multi-select-panel[hidden] { display: none; }
.multi-select-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 8px; }
.multi-select-options .category-check { padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.multi-select-options .category-check:hover { background: #f2fbf9; }




