:root {
    --primary: #1f5eff;
    --primary-2: #1748c9;
    --primary-soft: #ebf1ff;
    --ok: #16a34a;
    --warn: #d97706;
    --danger: #dc2626;
    --page: #e6ebf3;
    --card-top: #fafbfd;
    --card-bottom: #f4f7fb;
    --well: #edf1f7;
    --line: #dfe6f1;
    --line-soft: #edf1f7;
    --text: #1d2433;
    --text-2: #4b5567;
    --muted: #8a93a6;
    --radius: 12px;
    --raise: 0 1px 0 #fff inset, 0 1px 3px rgba(23, 52, 120, .10), 0 6px 18px rgba(23, 52, 120, .10);
    --raise-hover: 0 1px 0 #fff inset, 0 4px 10px rgba(23, 52, 120, .10), 0 16px 34px rgba(23, 52, 120, .14);
    --sink: inset 0 1px 3px rgba(23, 52, 120, .10), inset 0 0 0 1px #e3e9f4;
    --ui-font: "Source Han Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    --num-font: "DIN Alternate", "Bahnschrift", "Segoe UI", var(--ui-font);

    --ps-font: var(--ui-font);
    --ps-primary: #1f5eff;
    --ps-primary-hover: #3d74ff;
    --ps-primary-dim: #ebf1ff;
    --ps-bg-page: #e6ebf3;
    --ps-bg-sidebar: #ffffff;
    --ps-bg-card: #fafbfd;
    --ps-bg-input: #fcfdfe;
    --ps-border: #dfe6f1;
    --ps-border-hover: #b8c6de;
    --ps-text: #1d2433;
    --ps-text-regular: #4b5567;
    --ps-text-muted: #8a93a6;
    --ps-text-disabled: #b6bdca;
    --ps-btn-text: #4b5567;
    --ps-success: #16a34a;
    --ps-danger: #dc2626;
    --ps-shadow-nav: 0 0 18px rgba(23, 52, 120, .08);
}

/* 思源黑体随系统发布，不依赖服务器是否安装该字体。文件为 Noto Sans SC（与思源黑体同一套字形）的常用汉字子集。 */
@font-face {
    font-family: "Source Han Sans SC";
    src: url("/fonts/source-han-sans-sc-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Han Sans SC";
    src: url("/fonts/source-han-sans-sc-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Han Sans SC";
    src: url("/fonts/source-han-sans-sc-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Han Sans SC";
    src: url("/fonts/source-han-sans-sc-600.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* 侧栏：深蓝底，与浅色内容区分开 */
.ps-sidebar {
    position: relative;
    --ps-menu-font: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    --ps-bg-sidebar: #1b2f57;
    --ps-border: rgba(255, 255, 255, .07);
    --ps-border-hover: rgba(255, 255, 255, .18);
    --ps-text: #ffffff;
    --ps-text-regular: #c2d1eb;
    --ps-text-muted: #7f90b3;
    --ps-primary: #7fb2ff;
    --ps-primary-dim: rgba(127, 178, 255, .16);
    --ps-shadow-nav: none;
    font-family: var(--ps-menu-font);
    background: linear-gradient(180deg, #213a69 0%, #1a2d54 55%, #16264a 100%);
    border-right: 0;
    box-shadow: 2px 0 14px rgba(16, 32, 70, .18);
}
.ps-sidebar .ps-menu-item, .ps-sidebar .ps-menu-group > .ps-menu-toggle { border-color: transparent; }
.ps-sidebar .ps-menu-item:hover, .ps-sidebar .ps-menu-toggle:hover { background: rgba(255, 255, 255, .07); }
.ps-sidebar .ps-menu-item.is-active, .ps-sidebar .ps-menu-toggle.is-active,
.ps-sidebar .ps-menu-group.is-open:not(.has-active-child) > .ps-menu-toggle { background: linear-gradient(90deg, rgba(127, 178, 255, .22), rgba(127, 178, 255, .08)); border-color: transparent; box-shadow: none; color: #fff; }
.ps-sidebar .ps-submenu .ps-menu-item.is-active { background: linear-gradient(90deg, #3f7bff, #2a5fe0); color: #fff; font-weight: 500; text-shadow: 0 1px 2px rgba(13, 35, 92, .35); border-color: transparent; box-shadow: 0 4px 12px rgba(31, 94, 255, .35); }
.ps-sidebar .ps-submenu .ps-menu-item.is-active::before { background: #fff; }
.ps-sidebar .ps-menu-group.has-active-child.is-open > .ps-menu-toggle { border-color: transparent; box-shadow: none; color: #fff; }
.ps-sidebar .ps-menu-group.has-active-child.is-open > .ps-menu-toggle .ps-menu-icon { color: var(--ps-primary); }
.ps-sidebar .ps-menu-item,
.ps-sidebar .ps-menu-group > .ps-menu-toggle {
    font-family: var(--ps-menu-font);
    width: calc(100% - 4px);
    margin: 2px 2px;
    padding: 8.5px 5px 8.5px 14px;
    gap: 9px;
    border-radius: 7px;
}
.ps-sidebar .ps-menu-item.is-active::before,
.ps-sidebar .ps-menu-toggle.is-active:not(.has-children-open)::before { left: 4px; }
.ps-sidebar .ps-submenu { background: rgba(0, 0, 0, .14); border-radius: 8px; margin: 2px 2px; padding: 3px 0; }
.ps-sidebar > .ps-menu > .ps-menu-item,
.ps-sidebar > .ps-menu > .ps-menu-group > .ps-menu-toggle {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(238, 244, 255, .92);
}
.ps-sidebar > .ps-menu > .ps-menu-item .ps-menu-icon,
.ps-sidebar > .ps-menu > .ps-menu-group > .ps-menu-toggle .ps-menu-icon {
    color: rgba(186, 206, 242, .84);
}
.ps-sidebar > .ps-menu > .ps-menu-item:hover,
.ps-sidebar > .ps-menu > .ps-menu-group > .ps-menu-toggle:hover {
    color: #fff;
}
.ps-sidebar > .ps-menu > .ps-menu-item:hover .ps-menu-icon,
.ps-sidebar > .ps-menu > .ps-menu-group > .ps-menu-toggle:hover .ps-menu-icon,
.ps-sidebar > .ps-menu > .ps-menu-item.is-active .ps-menu-icon {
    color: #fff;
}
.ps-sidebar > .ps-menu > .ps-menu-item.is-active,
.ps-sidebar > .ps-menu > .ps-menu-group.is-open > .ps-menu-toggle {
    color: #fff;
    font-weight: 600;
}
.ps-sidebar .ps-submenu .ps-menu-item,
.ps-sidebar .ps-submenu .ps-menu-group > .ps-menu-toggle {
    width: calc(100% - 4px);
    margin: 1.5px 2px;
    padding: 7px 5px 7px 32px;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: rgba(202, 217, 242, .86);
}
.ps-sidebar .ps-submenu .ps-menu-icon {
    width: 14px;
    height: 14px;
    opacity: .74;
}
.ps-sidebar .ps-submenu .ps-menu-icon svg {
    width: 14px;
    height: 14px;
}
.ps-sidebar .ps-submenu .ps-menu-item:hover,
.ps-sidebar .ps-submenu .ps-menu-group > .ps-menu-toggle:hover {
    color: #f4f8ff;
}
.ps-sidebar .ps-submenu .ps-menu-item:hover .ps-menu-icon,
.ps-sidebar .ps-submenu .ps-menu-group > .ps-menu-toggle:hover .ps-menu-icon,
.ps-sidebar .ps-submenu .ps-menu-item.is-active .ps-menu-icon {
    opacity: 1;
}
.ps-sidebar .ps-submenu .ps-submenu .ps-menu-item {
    padding-left: 44px;
    align-items: flex-start;
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(188, 206, 236, .8);
}
.ps-sidebar .ps-menu-label { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
.ps-sidebar .ps-menu {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.ps-sidebar .ps-menu:hover { scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.ps-sidebar .ps-menu::-webkit-scrollbar { width: 4px; }
.ps-sidebar .ps-menu::-webkit-scrollbar-track { background: transparent; }
.ps-sidebar .ps-menu::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.ps-sidebar .ps-menu:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); }
.ps-content { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.ps-content:hover { scrollbar-color: rgba(23, 52, 120, .22) transparent; }
.ps-content::-webkit-scrollbar { width: 4px; height: 0; }
.ps-content::-webkit-scrollbar-thumb { background: transparent; }
.ps-content:hover::-webkit-scrollbar-thumb { background: rgba(23, 52, 120, .22); }
.ps-menu-group.is-open > .ps-submenu { max-height: 2000px; }
.ps-sidebar .ps-brand { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ps-sidebar .ps-collapse-btn { color: #b9c6e0; border-color: rgba(255, 255, 255, .18); background: transparent; }
.ps-sidebar .ps-pin-btn,
.ps-app.is-pinned .ps-sidebar .ps-pin-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #93a4c2;
}
.ps-sidebar .ps-pin-btn svg { width: 8px; height: 8px; }
.ps-sidebar .ps-pin-btn:hover,
.ps-app.is-pinned .ps-sidebar .ps-pin-btn:hover {
    color: #d5deee;
    background: transparent;
    border-color: transparent;
}

/* 收起后只留图标。Logo 和箭头同一行贴紧；有下级的图标悬停即弹出二级菜单 */
.ps-app.is-collapsed {
    --ps-sidebar-collapsed-w: 48px;
}
.ps-app.is-collapsed .ps-sidebar,
.ps-app.is-collapsed .ps-menu {
    overflow: visible;
}
.ps-app.is-collapsed .ps-brand {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 8px 2px 4px;
}
.ps-app.is-collapsed .ps-brand-link { justify-content: center; gap: 0; }
.ps-app.is-collapsed .ps-sidebar .ps-logo { width: 22px; height: 22px; }
.ps-app.is-collapsed .ps-sidebar .ps-pin-btn,
.ps-app.is-pinned.is-collapsed .ps-sidebar .ps-pin-btn {
    width: 14px;
    height: 14px;
}
.ps-app.is-collapsed .ps-menu-group { position: relative; }
.ps-app.is-collapsed .ps-menu > .ps-menu-item,
.ps-app.is-collapsed .ps-menu > .ps-menu-group > .ps-menu-toggle {
    width: 36px;
    height: 36px;
    margin: 3px auto;
    padding: 0;
    justify-content: center;
    gap: 0;
}
.ps-app.is-collapsed .ps-menu > .ps-menu-item.is-active::before,
.ps-app.is-collapsed .ps-menu > .ps-menu-group > .ps-menu-toggle::before {
    display: none;
}
.ps-app.is-collapsed .ps-menu > .ps-menu-item[data-label]:hover::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    border-radius: 6px;
    background: #13284f;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 6px 16px rgba(8, 18, 40, .28);
}
.ps-app.is-collapsed .ps-menu-group.is-open > .ps-menu-toggle:hover::after { content: none; }
.ps-app.is-collapsed .ps-menu-group.is-open > .ps-submenu {
    display: block;
    max-height: none;
    opacity: 1;
}
.ps-app.is-collapsed .ps-menu > .ps-menu-group.is-open > .ps-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    width: 168px;
    margin: 0;
    padding: 4px 0;
    background: linear-gradient(180deg, #213a69 0%, #1a2d54 100%);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(8, 18, 40, .35);
    z-index: 40;
}
.ps-app.is-collapsed .ps-menu > .ps-menu-group.is-open > .ps-submenu::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0;
    bottom: 0;
    width: 12px;
}
.ps-app.is-collapsed .ps-submenu .ps-menu-label { display: block; white-space: nowrap; }
.ps-app.is-collapsed .ps-submenu .ps-menu-chevron { display: inline-flex; }
.ps-fly-head { display: none; }
.ps-app.is-collapsed .ps-menu > .ps-menu-group.is-open > .ps-submenu > .ps-fly-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 8px 0;
    padding: 8px 8px 9px;
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: 0.08em;
    line-height: 1.2;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.ps-app.is-collapsed .ps-fly-head .ps-menu-icon {
    width: 16px;
    height: 16px;
    color: #fff;
    opacity: 1;
}
.ps-app.is-collapsed .ps-fly-head .ps-menu-icon svg { width: 16px; height: 16px; }
.ps-app.is-collapsed .ps-menu > .ps-menu-group.is-open > .ps-submenu .ps-menu-item {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.ps-sidebar-resizer {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 6;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
}
.ps-sidebar-resizer::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 2px;
    background: transparent;
}
.ps-sidebar-resizer:hover::after,
.ps-app.is-resizing .ps-sidebar-resizer::after { background: #7fb2ff; }
.ps-app.is-resizing .ps-sidebar,
.ps-app.is-resizing .ps-footer-left { transition: none; }
body.is-sidebar-resizing,
body.is-sidebar-resizing * { cursor: col-resize !important; user-select: none !important; }

/* 内容区：柔和灰蓝，避免大面积纯白刺眼 */
.ps-content { scrollbar-color: transparent transparent; background: linear-gradient(180deg, #e9eef6 0%, #e3e9f2 100%); }
.ps-content::-webkit-scrollbar-thumb { background: transparent; }
.ps-btn-text:hover, .ps-app-btn:hover:not(:disabled), .ps-h-btn:hover { background: var(--primary-soft); }
.ps-footer { background: rgba(244, 247, 251, .94); box-shadow: 0 -2px 12px rgba(23, 52, 120, .05); }
.ps-brand-name { color: #f6f9ff; font-family: var(--ps-menu-font, var(--ui-font)); font-weight: 600; letter-spacing: 0.08em; }
.ps-sidebar .ps-brand-link { gap: 8px; }
.ps-sidebar .ps-logo { width: 25px; height: 25px; background: none; clip-path: none; overflow: visible; }
.ps-sidebar .ps-logo img { filter: none; opacity: 1; }
.ps-footer-popover { box-shadow: 0 12px 32px rgba(23, 52, 120, .18), 0 0 0 1px #e6ecf5 inset; }

* { box-sizing: border-box; }
body { font-family: var(--ui-font); font-size: 14px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; color: var(--text); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
svg[aria-hidden="true"] { width: 16px; height: 16px; flex: none; }
.hidden { display: none !important; }
.domain-card .card-body { display: grid; gap: 18px; max-width: 760px; }
.domain-plate { padding: 18px 20px; border-radius: 12px; background: linear-gradient(180deg, #f8fbff, #eef3fb); border: 1px solid #d5e1f2; box-shadow: inset 0 1px 0 #fff; }
.domain-plate > span { display: block; margin-bottom: 8px; font-size: 12px; letter-spacing: .08em; color: #5c6d8c; }
.domain-now { margin: 0; font-size: 20px; font-weight: 650; line-height: 1.45; color: #14315f; word-break: break-all; }
.domain-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 0; font-size: 13px; color: #5c6d8c; }
.domain-meta b { color: #1f5eff; font-weight: 600; }
.domain-rules { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: domain; }
.domain-rules li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 10px; border: 1px solid #e3eaf4; background: #fff; }
.domain-rules li::before { content: counter(domain); counter-increment: domain; grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 650; color: #5c6d8c; background: #eef3fb; }
.domain-rules b { font-size: 14px; font-weight: 650; color: #16203a; }
.domain-rules span { font-size: 13px; color: #5c6d8c; }
.domain-rules li.is-on { border-color: #b9ccf5; background: #f4f7ff; }
.domain-rules li.is-on::before { color: #fff; background: #1f5eff; }
.domain-rules li.is-on b { color: #1f5eff; }
.num { font-variant-numeric: tabular-nums; }

.ps-content-body { padding: 18px 22px 24px; }
.page-title { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 36px; }
.page-title h1 { font-size: 19px; font-weight: 600; letter-spacing: .5px; color: #16203a; }
.fav-btn {
    width: 28px; height: 28px; margin-left: -4px; border: 0; border-radius: 8px;
    background: transparent; color: #b6bdca; font-size: 18px; line-height: 1; cursor: pointer;
}
.fav-btn:hover { background: var(--primary-soft); color: #d97706; }
.fav-btn.is-on { color: #d97706; }
.page-title .spacer { flex: 1; }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.crumb a { color: var(--text-2); text-decoration: none; }
.crumb a:hover { color: var(--primary); }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 16px; border-radius: 8px; cursor: pointer; white-space: nowrap;
    border: 1px solid #d3dcea; border-bottom-color: #c2cde0; color: #33405a;
    background: linear-gradient(180deg, #fbfcfe 0%, #eef2f8 100%);
    box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(23, 52, 120, .08), 0 2px 6px rgba(23, 52, 120, .06);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, color .12s ease;
    text-decoration: none; font-size: 13px;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); color: var(--primary); border-color: #a9bff0; box-shadow: 0 1px 0 #fff inset, 0 4px 12px rgba(31, 94, 255, .16); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 3px rgba(23, 52, 120, .18); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { border-color: #1a52e0; color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, .12); background: linear-gradient(180deg, #5a8eff 0%, #2b67ff 55%, #1f56e6 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 -2px 0 rgba(0, 0, 0, .1) inset, 0 4px 12px rgba(31, 94, 255, .32); }
.btn-primary:hover:not(:disabled) { color: #fff; border-color: #1a52e0; box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 18px rgba(31, 94, 255, .4); }
.btn-ok { border-color: #14883d; color: #fff; background: linear-gradient(180deg, #3fcf7a 0%, #16a34a 100%); }
.btn-danger { border-color: #b91c1c; color: #fff; background: linear-gradient(180deg, #f26464 0%, #dc2626 100%); }
.btn-danger:hover:not(:disabled) { color: #fff; border-color: #991b1b; }
.btn-warn { border-color: #d97706; color: #9a3412; background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%); }
.btn-warn:hover:not(:disabled) { color: #9a3412; border-color: #f59e0b; }
.btn-ok:hover:not(:disabled) { color: #fff; border-color: #166534; }
.op-row { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 7px; }
.btn-lg { height: 42px; padding: 0 24px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0 4px; font-size: 13px; }
.btn-link:hover { color: #3d74ff; }
.btn-link.danger { color: var(--danger); }
.btn-link:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
a.btn-link { text-decoration: none; }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { color: var(--danger); border-color: #f3b4b4; box-shadow: 0 4px 12px rgba(220, 38, 38, .14); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
form[data-act="ent-register"] > .row { flex-wrap: nowrap; align-items: flex-end; }
form[data-act="ent-register"] > .row > .field { flex: 1 1 0; min-width: 0; }
form[data-act="ent-register"] > .row > .field > span { text-align: center; }
form[data-act="ent-register"] > .row > .field:nth-child(1) { flex: 1.85 1 0; }
form[data-act="ent-register"] > .row > .field:nth-child(3) { flex: 0 0 86px; }
[data-dns-note] { margin: 0 0 2lh; font-size: 13px; line-height: 1.6; }
.spacer { flex: 1; }

/* 卡片 */
.card {
    background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
    border: 1px solid #d6deea; border-radius: var(--radius); box-shadow: var(--raise);
}
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.card-head h2 { font-size: 15px; font-weight: 600; white-space: nowrap; color: #16203a; }
.card-head h2::before { content: ""; display: inline-block; width: 4px; height: 14px; margin-right: 8px; border-radius: 2px; vertical-align: -2px; background: linear-gradient(180deg, #5a8eff, #1f5eff); box-shadow: 0 2px 6px rgba(31, 94, 255, .35); }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.stack { display: grid; gap: 16px; min-width: 0; }

/* 3D 标签页 */
.tabs3d {
    display: inline-flex; gap: 6px; padding: 5px; margin-bottom: 16px; border-radius: 12px;
    background: #e6edf8; box-shadow: var(--sink); max-width: 100%; overflow-x: auto;
}
.tabs3d a, .tabs3d button {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 20px;
    border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text-2);
    cursor: pointer; font-size: 14px; text-decoration: none; white-space: nowrap; transition: all .15s ease;
}
.tabs3d a:hover, .tabs3d button:hover { color: var(--primary); background: rgba(255, 255, 255, .7); }
.tabs3d [aria-selected="true"] {
    color: #fff; font-weight: 600; border-color: #1a52e0;
    background: linear-gradient(180deg, #5a8eff 0%, #2b67ff 60%, #1f56e6 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 -2px 0 rgba(0, 0, 0, .1) inset, 0 6px 14px rgba(31, 94, 255, .35);
    transform: translateY(-1px);
}
.tabs3d .count { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; line-height: 18px; text-align: center; background: rgba(23, 52, 120, .1); }
.tabs3d [aria-selected="true"] .count { background: rgba(255, 255, 255, .28); }
.card > .tabs3d { margin: 14px 18px 0; }

/* 分段选择 */
.segmented { display: inline-flex; padding: 3px; gap: 3px; border-radius: 9px; background: #e6edf8; box-shadow: var(--sink); }
.segmented button { height: 28px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; }
.segmented button:hover:not(:disabled) { color: var(--primary); }
.segmented button[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, #5a8eff, #1f5eff); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 3px 8px rgba(31, 94, 255, .32); }
.segmented button:disabled { opacity: .4; cursor: not-allowed; }
.query-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.stat-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.stat-tools .query-tabs { margin: 0; }
.query-tabs button { height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid #d5e0f0; background: #fff; color: #3d4c68; cursor: pointer; font-size: 13px; }
.query-tabs button[aria-pressed="true"] { color: #fff; border-color: #1f5eff; background: linear-gradient(180deg, #5a8eff, #1f5eff); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 3px 8px rgba(31, 94, 255, .28); }
.query-head { margin-bottom: 12px; }
.query-head h2 { font-size: 16px; font-weight: 650; color: #16203a; }
.query-head .sub { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.query-wide { min-width: min(420px, 100%); flex: 1; }
.q-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin: 4px 0 16px; }
.q-chart { margin: 0; padding: 16px 16px 14px; border-radius: 16px; border: 1px solid #e3eaf6;
    background: radial-gradient(120% 90% at 100% 0%, rgba(31, 94, 255, .08), transparent 52%), linear-gradient(180deg, #fff, #f6f8fc);
    box-shadow: 0 1px 0 #fff inset, 0 10px 28px rgba(23, 52, 120, .06); }
.q-chart figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.q-chart figcaption b { font-size: 14px; font-weight: 650; color: #16203a; }
.q-chart figcaption span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.q-bars li { display: grid; grid-template-columns: 108px minmax(0, 1fr) 68px; gap: 10px; align-items: center; padding: 5px 6px; margin: 0 -6px; border-radius: 8px; transition: background .16s ease; }
.q-bars li:hover { background: rgba(31, 94, 255, .06); }
.q-name { font-size: 13px; color: #3d4c68; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-bars li:hover .q-name { color: #16203a; }
.q-track { height: 10px; border-radius: 999px; background: #e7eef8; overflow: hidden; box-shadow: inset 0 1px 2px rgba(23, 52, 120, .08); }
.q-track i { display: block; height: 100%; width: var(--w); border-radius: inherit; transform-origin: left center;
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 68%, #fff), var(--c));
    box-shadow: 0 0 14px color-mix(in srgb, var(--c) 42%, transparent);
    animation: q-grow .72s cubic-bezier(.16, .84, .32, 1) both; animation-delay: var(--d); }
.q-val { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; }
.q-val b { font-size: 14px; font-weight: 700; color: #16203a; }
.q-val small { font-size: 11px; color: var(--muted); }
.q-cols { display: flex; align-items: flex-end; gap: 8px; height: 148px; }
.q-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.q-col b { font-size: 11px; color: #3d4c68; font-variant-numeric: tabular-nums; }
.q-col i { display: block; width: min(26px, 100%); height: var(--h); border-radius: 8px 8px 3px 3px; transform-origin: center bottom;
    background: linear-gradient(180deg, #9db7ff, #1f5eff); box-shadow: 0 8px 16px rgba(31, 94, 255, .22);
    animation: q-rise .68s cubic-bezier(.16, .84, .32, 1) both; animation-delay: var(--d); }
.q-col span { font-size: 11px; color: var(--muted); }
@keyframes q-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes q-rise { from { transform: scaleY(.08); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
    .q-track i, .q-col i { animation: none; }
}
.query-block { margin: 16px 0 8px; font-size: 14px; font-weight: 650; color: #16203a; }
.query-hint { margin-top: 12px; }

/* 表单 */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { color: var(--text-2); font-size: 13px; }
.stock-entry .field > span { text-align: center; }
em.req { color: var(--danger); font-style: normal; font-weight: 700; margin-left: 2px; }
.input {
    width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; outline: none;
    border: 1px solid #d3dcea; background: #fcfdfe; color: var(--text); box-shadow: inset 0 1px 2px rgba(23, 52, 120, .06);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #a7b0c1; }
.input:hover { border-color: #b8c6de; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, .14); }
.file-box {
    position: relative;
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d3dcea;
    border-radius: 8px;
    background: #fcfdfe;
    box-shadow: inset 0 1px 2px rgba(23, 52, 120, .06);
}
.file-box .input {
    position: absolute;
    inset: 0;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-btn {
    height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #c5d0e0;
    border-radius: 6px;
    background: linear-gradient(180deg, #fff, #eef3fa);
    color: #24324d;
    font-size: 13px;
    box-shadow: 0 1px 0 #fff inset;
}
.file-name { margin-left: 8px; color: var(--muted); font-style: normal; font-size: 13px; }
textarea.input { height: auto; min-height: 120px; padding: 8px 12px; resize: vertical; }
.input[readonly] { color: var(--text-2); background: var(--well); box-shadow: none; border-style: dashed; cursor: default; }
.input[readonly]:focus { border-color: #d3dcea; box-shadow: none; }
.ent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.ent-grid .span-2 { grid-column: 1 / -1; }
.owner-register { display: grid; gap: 8px; margin-top: 8px; }
.owner-register[hidden] { display: none !important; }
select.input { padding-right: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* 标签 */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; white-space: nowrap; background: #eef1f6; color: var(--text-2); }
.tag-green { background: #e8f7ee; color: #15803d; }
.tag-blue { background: var(--primary-soft); color: #1d4ed8; }
.tag-orange { background: #fff4e0; color: #b45309; }
.tag-red { background: #fdecec; color: #b91c1c; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { text-align: center; font-weight: 500; color: var(--text-2); padding: 10px 14px; background: #f3f6fc; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.table th:first-child { border-top-left-radius: 8px; }
.table th:last-child { border-top-right-radius: 8px; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; vertical-align: middle; text-align: center; }
.table td.ops { white-space: normal; min-width: 240px; }
.field[hidden], .btn[hidden] { display: none !important; }
.visit-day { margin-top: 18px; }
.visit-day:first-child { margin-top: 0; }
.visit-day h3 { margin: 0 0 8px; font-size: 15px; font-weight: 650; color: #16203a; }
.visit-day h3 span { margin-left: 8px; color: var(--muted); font-weight: 500; font-size: 13px; }
.visit-day .table td:last-child { text-align: right; }
.table td.live { color: var(--ok); font-weight: 600; }
.table tr:hover td { background: #f7faff; }
.table td.yes { color: var(--ok); font-weight: 600; }
.table td.no { color: var(--muted); }
.table code { font-family: Consolas, monospace; color: #1d4ed8; }
.nowrap { white-space: nowrap; }

/* 角色权限 */
.role-table td { vertical-align: middle; }
.role-table .perm-cell { text-align: center; }
.role-name { display: flex; align-items: center; gap: 8px; }
.role-name .tag { height: 20px; font-size: 11px; }
.role-desc { margin-top: 3px; font-size: 12px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.role-table .tag svg { width: 12px; height: 12px; margin-right: 4px; }
.perm-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; background: #e3e9f3; box-shadow: inset 0 1px 2px rgba(16, 42, 110, .12); }
.perm-dot.on { background: linear-gradient(180deg, #3fcf7a, #16a34a); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 3px 8px rgba(22, 163, 74, .35); }
.perm-switch { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; vertical-align: middle; }
.perm-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.perm-switch i {
    position: absolute; inset: 0; border-radius: 11px;
    background: linear-gradient(180deg, #d6deeb, #e6ecf5);
    box-shadow: inset 0 2px 4px rgba(16, 42, 110, .18), inset 0 0 0 1px rgba(16, 42, 110, .06);
    transition: background .2s ease, box-shadow .2s ease;
}
.perm-switch i::after {
    content: ""; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(180deg, #ffffff, #e9eef6);
    box-shadow: 0 1px 0 #fff inset, 0 2px 5px rgba(16, 42, 110, .3);
    transition: transform .22s cubic-bezier(.3, 1.4, .5, 1);
}
.perm-switch input:checked + i { background: linear-gradient(180deg, #3a78ff, #22a6e8); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 0 10px rgba(34, 199, 238, .35); }
.perm-switch input:checked + i::after { transform: translateX(18px); }
.perm-switch input:focus-visible + i { outline: 2px solid rgba(31, 94, 255, .45); outline-offset: 2px; }
.perm-switch input:disabled + i { opacity: .6; }
.role-list { display: flex; flex-direction: column; gap: 14px; }
.role-card .card-head h2 { display: flex; align-items: center; gap: 8px; }
.role-card .tag svg { width: 12px; height: 12px; margin-right: 4px; }
.perm-group + .perm-group { margin-top: 14px; }
.perm-group h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.perm-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; color: #8b95a8; background: #eef2f8; }
.perm-chip.on { color: #0f7a3a; background: #e5f8ec; }
.perm-chip-switch { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 28px; padding: 0 10px 0 4px; border-radius: 999px; background: #eef2f8; }
.perm-chip-switch i { position: relative; inset: auto; width: 32px; height: 18px; flex: none; }
.perm-chip-switch i::after { width: 14px; height: 14px; }
.perm-chip-switch input:checked + i::after { transform: translateX(14px); }
.perm-chip-switch span { font-size: 12px; color: #24324d; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.perm-option {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 13px;
    background: linear-gradient(180deg, #fbfcff, #f0f4fb); border: 1px solid #d8e1ef;
    box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(16, 42, 110, .07);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.perm-option:hover { border-color: #a9bff0; }
.perm-option:has(input:checked) { border-color: #6f9bff; background: linear-gradient(180deg, #f1f6ff, #e3edff); box-shadow: 0 1px 0 #fff inset, 0 4px 12px rgba(31, 94, 255, .16); color: #1d4ed8; }
.perm-option input { accent-color: var(--primary); width: 16px; height: 16px; }

/* 库卡片：每行 3–4 个 */
.lib-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.lib-card { display: flex; flex-direction: column; padding: 10px; border-radius: 14px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lib-card:hover { transform: translateY(-4px); border-color: #b9cdfb; box-shadow: var(--raise-hover); }
.lib-cover {
    position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer;
    border-radius: 10px; background: var(--well);
    border: 1px solid #c9d3e3; box-shadow: 0 4px 10px rgba(23, 52, 120, .12);
}
.lib-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.lib-card:hover .lib-cover img { transform: scale(1.06); }
.lib-cover .placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 700; letter-spacing: 4px; color: rgba(255, 255, 255, .9); }
.lib-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(23, 52, 120, .06); pointer-events: none; }
.lib-badge { position: absolute; top: 10px; right: 10px; z-index: 1; }
.lib-badge .tag { height: 24px; padding: 0 10px; font-weight: 600; backdrop-filter: blur(6px); background: rgba(255, 255, 255, .88); box-shadow: 0 2px 8px rgba(23, 52, 120, .18); }
.lib-body { padding: 12px 4px 2px; display: grid; gap: 10px; }
.lib-name { font-size: 16px; font-weight: 600; letter-spacing: .5px; color: #16203a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-stats { display: grid; grid-template-columns: 1fr 1fr; border-radius: 10px; background: var(--well); box-shadow: var(--sink); }
.lib-stats div { padding: 8px 12px 9px; display: grid; gap: 2px; min-height: 58px; align-content: space-between; }
.lib-stats b { justify-self: end; }
.lib-stats div + div { border-left: 1px solid #e1e8f3; }
.lib-stats span { font-size: 12px; color: var(--muted); }
.lib-stats b { font: 600 18px/1.1 var(--num-font); font-variant-numeric: tabular-nums; color: #16203a; }
.lib-stats div + div b { color: var(--ok); }
.lib-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lib-doc { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; text-decoration: none; color: #1d4ed8; background: var(--primary-soft); }
.lib-doc svg { width: 13px; height: 13px; }
.lib-ops { margin-left: auto; display: inline-flex; gap: 2px; flex: none; }
.lib-ops + .lib-doc { margin-left: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { color: #1d4ed8; background: var(--primary-soft); }
.icon-btn.danger:hover { color: var(--danger); background: #fdecec; }
.page-title .back-btn { flex: none; gap: 4px; padding-left: 8px; color: #1d4ed8; }
.page-title .back-btn svg { margin: 0; }
.lib-doc:hover { background: #dbe6ff; }
.lib-doc.none { color: var(--muted); background: #f1f4f9; }
.lib-doc.can-upload { border: 1px dashed #b8c8e6; cursor: pointer; font: inherit; font-size: 12px; transition: all .15s ease; }
.lib-doc.can-upload:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.lib-foot { display: flex; gap: 8px; }
.lib-foot .btn { flex: 1; }
.lib-add { display: grid; place-items: center; min-height: 300px; border: 2px dashed #c9d5ea; border-radius: 14px; background: rgba(255, 255, 255, .55); color: var(--text-2); cursor: pointer; transition: all .15s ease; }
.lib-add:hover { border-color: var(--primary); color: var(--primary); background: #f5f8ff; }
.lib-add div { display: grid; justify-items: center; gap: 10px; }
.lib-add svg { width: 34px; height: 34px; }
.ent-info { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; border-radius: 10px; background: var(--card-top); border: 1px solid #e4eaf3; box-shadow: var(--raise); font-size: 13px; }
.ent-info span { color: var(--muted); margin-right: 6px; }
.ent-info { align-items: center; }
.ent-info .ent-edit { margin-left: auto; }
.industry-new { display: flex; align-items: center; gap: 8px; }
.industry-new .btn-link { flex: none; }

/* 统计条 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { padding: 14px 16px; }
.stat span:not(.tag) { display: block; color: var(--muted); font-size: 12px; }
.stat .tag { margin-top: 8px; }
.stat b { display: block; font: 600 24px/1.2 var(--num-font); margin-top: 4px; font-variant-numeric: tabular-nums; color: #16203a; }
.stat b small { font-size: 13px; font-weight: 400; color: var(--muted); }
.stat .stat-label { display: flex; align-items: center; justify-content: space-between; }
.stat .stat-label .tag { margin: 0; height: 20px; font-size: 11px; }
.upload-tile { display: grid; align-content: space-between; gap: 8px; border: 1.5px dashed #b8c8e6; background: linear-gradient(180deg, #f8fbff, #eef4ff); transition: border-color .15s ease, background .15s ease; }
.upload-tile.over { border-color: var(--primary); background: #e4edff; }
.upload-tile em { font-style: normal; color: var(--muted); margin-left: 4px; }
.upload-tile .row { gap: 8px; flex-wrap: nowrap; }
.upload-tile .row .btn { flex: 1; padding: 0 8px; }
.upload-tile .stat-line { margin-bottom: 4px; }

/* 图片列表：每行 4 个 */
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.thumb { position: relative; margin: 0; padding: 8px; border-radius: 12px; background: var(--card-top); border: 1px solid #d3dbe8; box-shadow: var(--raise); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.thumb:hover { transform: translateY(-3px); border-color: #b9cdfb; box-shadow: var(--raise-hover); }
.thumb .img { position: relative; aspect-ratio: 1; border-radius: 8px; background: #fff; overflow: hidden; cursor: zoom-in; border: 1px solid #c9d3e3; box-shadow: 0 2px 6px rgba(23, 52, 120, .10); }
.thumb .img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9), inset 0 0 0 4px rgba(23, 52, 120, .08); pointer-events: none; }
.thumb .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.thumb:hover .img img { transform: scale(1.05); }
.thumb figcaption { padding: 9px 4px 2px; display: grid; gap: 2px; font-size: 13px; }
.thumb figcaption span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb.off { opacity: .4; }
.pick-box { position: absolute; left: 14px; top: 14px; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: rgba(255, 255, 255, .9); box-shadow: 0 1px 4px rgba(23, 52, 120, .25); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; color: var(--text-2); font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0; }

/* 拖放区 */
.dropzone { display: grid; justify-items: center; gap: 12px; padding: 36px 20px; text-align: center; border-radius: 12px; border: 2px dashed #c3d2ee; background: linear-gradient(180deg, #f7faff, #eff4fd); transition: all .15s ease; }
.dropzone.over { border-color: var(--primary); background: #eaf1ff; }
.dropzone > svg { width: 44px; height: 44px; color: var(--primary); filter: drop-shadow(0 4px 8px rgba(31, 94, 255, .3)); }
.dropzone h3 { font-size: 15px; font-weight: 500; }
.dropzone-sm { padding: 22px 20px; gap: 10px; }
.dropzone-sm > svg { width: 34px; height: 34px; }
.manuals { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.manual-sheets { display: grid; gap: 16px; margin-top: 16px; }
.manual-sheet h3 { margin: 0 0 8px; font-size: 14px; color: #16203a; }
.manual-sheet .table-wrap { max-height: 420px; }
.manual-sheet .table th,
.manual-sheet .table td { text-align: left; }
.manual { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--card-top); border: 1px solid #e4eaf3; box-shadow: var(--raise); min-width: 0; }
.manual-icon {
    flex: none; display: grid; place-items: center; width: 44px; height: 52px; border-radius: 6px 14px 6px 6px;
    font-size: 11px; font-weight: 700; color: #fff; letter-spacing: .5px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--kind) 75%, #fff), var(--kind));
    box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 4px 10px color-mix(in srgb, var(--kind) 35%, transparent);
}
.manual-name { flex: 1; min-width: 0; display: grid; gap: 4px; }
.manual-name b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual-name span { font-size: 12px; color: var(--muted); }
.manual-ops { display: flex; gap: 6px; flex: none; }
.progress { height: 8px; border-radius: 4px; background: #e6edf8; box-shadow: inset 0 1px 2px rgba(23, 52, 120, .12); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(180deg, #5a8eff, #1f5eff); transition: width .3s ease; }
.progress.green i { background: linear-gradient(180deg, #3fcf7a, #16a34a); }
.stat-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }

/* 以样找货 */
.scope .card-head .actions { gap: 2px; }
.scope-page .scope-body { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 18px; align-items: start; }
.scope-page .scope-group { padding: 10px 12px; border-radius: 10px; background: var(--well); box-shadow: var(--sink); }
.scope-page .scope-group + .scope-group { border-top: 0; }
.scope-page .scope-group > .check { font-size: 15px; font-weight: 650; color: #1a2744; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #e1e8f3; border-radius: 6px 6px 0 0; }
.scope-page .scope-group ul { padding-left: 28px; }
.scope-page .scope-group li .check { font-size: 13px; font-weight: 400; color: #5c6b86; }
.scope-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.scope-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.scope-label svg { color: var(--primary); }
.scope-tags { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 160px; max-height: 88px; overflow: auto; }
.scope-none { flex: 1; color: var(--warn); }
.scope-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.scope-bar .scope-actions .btn { margin-left: 0; }
.tag-x { margin-left: 4px; border: 0; background: transparent; color: inherit; font: inherit; line-height: 1; cursor: pointer; padding: 0 0 0 2px; }
.tag-x:hover { color: #b91c1c; }
.scope-picker { flex: 1 0 100%; margin: 4px -16px -12px; border-top: 1px solid var(--line-soft); }
.scope-picker .scope-body { max-height: 280px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.scope-body { padding: 8px 12px 14px; max-height: calc(100vh - 220px); overflow-y: auto; }
.scope-group { padding: 6px 0; }
.scope-group + .scope-group { border-top: 1px solid var(--line-soft); }
.scope-group ul { list-style: none; margin: 0; padding: 0 0 0 22px; }
.role-picks { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.role-picks .check { min-width: 148px; }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.check:hover { background: rgba(31, 94, 255, .06); }
.check small { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.check input, .pick-box input { accent-color: var(--primary); width: 15px; height: 15px; }
.scope-group > .check { font-weight: 600; }
.camera { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; }
.camera-view { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #1d2433; box-shadow: var(--raise); }
.camera-view video { width: 100%; height: 100%; object-fit: cover; }
.camera-view .frame { position: absolute; inset: 14%; border: 2px solid rgba(255, 255, 255, .7); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .18); }
.camera-side { display: grid; gap: 10px; align-content: start; }
.camera-side .btn { width: 100%; }
.camera-note { color: var(--muted); font-size: 12px; }
.facets { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--text-2); }
.query-preview { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.query-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; box-shadow: var(--raise); cursor: zoom-in; }
.query-preview .spacer { flex: 1; }
.zoom-img { width: 100%; max-height: 72vh; object-fit: contain; background: #f4f7fb; border-radius: 10px; }
.result-head { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 12px; }
.result-head h2 { font-size: 15px; }
.result-head { flex-wrap: wrap; }
.result-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.attr-filter .card-head { padding: 10px 16px; }
.attr-filter .card-head h2 { display: flex; align-items: center; gap: 6px; }
.attr-filter .card-body { padding: 10px 16px 12px; }
.attr-body { display: grid; gap: 6px; }
.attr-row { display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: start; }
.attr-name { font-size: 12px; font-weight: 600; color: var(--text-2); padding-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attr-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.attr-more { height: 24px; padding: 0 6px; border: 0; background: transparent; color: var(--primary); font-size: 12px; cursor: pointer; }
.attr-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; font-size: 12px; color: var(--text-2);
    background: #f6f8fc; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.attr-chip small { font-size: 11px; color: var(--muted); }
.attr-chip:hover { border-color: #a9c1ff; color: var(--primary); }
.attr-chip[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, #5a8eff, #1f5eff); border-color: transparent; box-shadow: 0 3px 8px rgba(31, 94, 255, .28); }
.attr-chip[aria-pressed="true"] small { color: rgba(255, 255, 255, .8); }
.attr-all { justify-self: start; }
.hit-tags { flex-wrap: wrap; gap: 4px; }
.hit-tags .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hit { overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.hit:hover { transform: translateY(-3px); border-color: #b9cdfb; box-shadow: var(--raise-hover); }
.hit .img { position: relative; aspect-ratio: 1; margin: 8px 8px 0; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid #c9d3e3; cursor: zoom-in; }
.hit .img img { width: 100%; height: 100%; object-fit: cover; }
.sim { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 12px; font-size: 13px; font-weight: 700; color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 3px 8px rgba(0, 0, 0, .25); }
.sim.s-high { background: linear-gradient(180deg, #3fcf7a, #16a34a); }
.sim.s-mid { background: linear-gradient(180deg, #fbbf24, #d97706); }
.sim.s-low { background: linear-gradient(180deg, #a0a8b8, #6b7385); }
.hit .body { padding: 12px 14px 8px; display: grid; gap: 8px; }
.hit h3 { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit .attrs { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars { display: grid; grid-template-columns: 30px 1fr 38px; gap: 5px 8px; align-items: center; font-size: 12px; color: var(--text-2); }
.bars .progress { height: 6px; }
.bars b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.again { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 12px 12px; margin-top: auto; border-top: 1px solid var(--line-soft); }
.again > span { font-size: 12px; color: var(--muted); margin-right: 4px; }
.hit-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }

/* 工作台图表 */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.board-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.board-sec { margin-bottom: 22px; }
.board-sec-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.board-sec-title { margin: 0; font-size: 16px; font-weight: 650; color: #16203a; }
.board-sec-head .sub { color: var(--muted); font-size: 12px; }
.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.todo-card { display: grid; gap: 6px; padding: 14px 16px; text-decoration: none; color: inherit; border-left: 3px solid #f97316; }
.todo-name { font-size: 13px; color: #9a3412; }
.todo-num { font: 700 28px/1 var(--num-font); color: #16203a; }
.todo-num small { margin-left: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.todo-go { font-size: 12px; color: var(--muted); }
.todo-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(234, 88, 12, .16); }
.todo-empty { padding: 18px 16px; border-radius: 12px; background: var(--well, #f4f7fb); color: var(--muted); font-size: 13px; }
.board-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.board-act { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 14px 16px; text-decoration: none; color: inherit; }
.board-act svg { grid-row: span 2; width: 26px; height: 26px; color: var(--primary); }
.board-act b { font-size: 14px; font-weight: 650; }
.board-act span { font-size: 12px; color: var(--muted); }
.board-act:hover { box-shadow: var(--raise-hover); }
button.board-act { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.board-libs { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; padding: 14px 16px 16px; }
.board-lib { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 10px; background: var(--well, #f4f7fb); text-decoration: none; color: inherit; }
.board-lib b { font-size: 14px; }
.board-lib span, .board-lib em { font-size: 12px; font-style: normal; color: var(--muted); }
.kpi { padding: 14px 16px; position: relative; overflow: hidden; }
.kpi::after { content: none; }
.kpi span::before { content: ""; display: inline-block; width: 8px; height: 3px; margin-right: 6px; border-radius: 2px; vertical-align: 2px; background: var(--c, #5b8def); }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi b { display: block; margin-top: 6px; font: 600 26px/1.2 var(--num-font); font-variant-numeric: tabular-nums; color: #16203a; }
.kpi small { font-size: 12px; color: var(--muted); margin-left: 3px; font-weight: 400; }
.kpi, .stat:not(.upload-tile) { display: grid; grid-template-rows: auto 1fr; min-height: 92px; }
.kpi b, .stat:not(.upload-tile) b { align-self: end; justify-self: end; margin-top: 10px; line-height: 1; }
.kpi span, .stat span { position: relative; z-index: 1; }
.charts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.charts > .card { min-width: 0; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.chart { width: 100%; height: 240px; display: block; }
.chart text { fill: var(--text-2); font-size: 11px; }
.chart .grid line { stroke: rgba(23, 52, 120, .08); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 0 0 14px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* 右键菜单 */
.ctx-menu { position: fixed; z-index: 1200; min-width: 150px; padding: 6px; border-radius: 10px; background: var(--card-top); border: 1px solid #e1e8f3; box-shadow: 0 14px 34px rgba(23, 52, 120, .2); }
.ctx-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.ctx-head svg { width: 14px; height: 14px; color: var(--primary); }
.ctx-menu button { display: block; width: 100%; padding: 7px 12px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: 13px; color: var(--text); cursor: pointer; }
.ctx-menu button:hover { background: var(--primary-soft); color: var(--primary); }
.ctx-menu button { display: flex; align-items: center; gap: 8px; }
.ctx-menu button svg { width: 14px; height: 14px; flex: none; }
.ctx-menu button.danger { color: var(--danger); }
.ctx-menu button.danger:hover { background: #fdecec; color: var(--danger); }
.ctx-menu .ctx-sep { height: 1px; margin: 5px 4px; background: #e6ecf5; }

.bars .on { color: #1d4ed8; font-weight: 600; }
.bars .progress.on { height: 8px; }
.tag-sort { background: #e8f7ee; color: #15803d; }
.more-hits { display: flex; justify-content: center; margin: 16px 0 4px; }
.formula { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 8px; background: var(--primary-soft); color: #1d4ed8; font-size: 12px; }
.formula b { font-weight: 600; }
.similar-hint { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 12px; background: var(--well); color: var(--text-2); }
.similar-hint > svg { width: 34px; height: 34px; color: var(--primary); flex: none; }
.similar-hint b { display: block; color: #16203a; margin-bottom: 2px; }
.similar-hint span { font-size: 13px; }
.step-no { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; font-size: 12px; color: #fff; background: linear-gradient(180deg, #5a8eff, #1f5eff); vertical-align: 1px; }
.card-head h2:has(.step-no)::before { display: none; }
.scope-step .scope-body { padding: 14px 18px; }
.catalog-guide ol { margin: 0; padding-left: 1.2em; color: #3d4c68; }
.catalog-guide li { margin: 8px 0; line-height: 1.65; }

.phone-capture { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: center; }
.qr-box { width: 240px; height: 240px; display: grid; place-items: center; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid #d3dbe8; box-shadow: var(--raise); }
.qr-box svg { width: 100%; height: 100%; }
.qr-expired { display: grid; gap: 12px; justify-items: center; text-align: center; font-size: 13px; color: var(--text-2); }
.qr-side h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 8px; }
.qr-side h3 svg { width: 18px; height: 18px; color: var(--primary); }
.qr-side ol { padding-left: 20px; color: var(--text-2); font-size: 13px; line-height: 1.9; }
.qr-status { margin: 10px 0 4px; font-size: 13px; color: var(--text-2); }
.qr-status .ok { color: #15803d; font-weight: 600; }
.qr-status .warn, .invite-info .warn { color: #b45309; }
.invite-info .warn { margin: 8px 0 0; }
.qr-url { font: 12px/1.4 var(--num-font, monospace); color: var(--muted); word-break: break-all; margin-bottom: 10px; }

.pick-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pick-bar [data-count] { color: var(--muted); font-size: 13px; }
.thumb-pick { position: absolute; top: 10px; left: 10px; z-index: 3; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 8px rgba(23, 52, 120, .18); }
.thumb-pick input { width: 16px; height: 16px; margin: 0; accent-color: #1f56e6; cursor: pointer; }
.thumb.is-picked { border-color: #2b67ff; box-shadow: 0 0 0 2px rgba(43, 103, 255, .28), var(--raise); }
.thumb .thumb-del { position: absolute; top: 6px; right: 6px; z-index: 2; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 6px rgba(23, 52, 120, .18); opacity: 0; transition: opacity .15s; }
.thumb:hover .thumb-del, .thumb .thumb-del:focus-visible { opacity: 1; }

.params-card .card-body { display: grid; gap: 14px; max-width: 760px; }
.formula-preview { padding: 14px 16px; border-radius: 10px; background: var(--primary-soft); color: #1d4ed8; font-size: 16px; }
.formula-preview b { font-weight: 700; }
.weight-row { display: grid; grid-template-columns: 80px 140px minmax(0, 1fr); gap: 12px; align-items: center; }
.weight-row label { font-weight: 600; color: #16203a; }
.weight-row p { font-size: 12px; }
.weight-input { display: flex; align-items: center; gap: 6px; }
.weight-input .input { width: 96px; text-align: right; }
.weight-foot { gap: 10px; }
.weight-sum { margin-right: auto; font-weight: 600; color: #15803d; }
.weight-sum.bad { color: var(--danger); }

/* 弹窗、提示 */
.mask { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(22, 32, 58, .35); backdrop-filter: blur(3px); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 14px; background: var(--card-top); border: 1px solid #e4eaf3; box-shadow: 0 24px 60px rgba(23, 52, 120, .25); }
.modal.wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 15px; }
.modal-head .btn-link { margin-left: auto; color: var(--muted); }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line-soft); background: var(--card-bottom); border-radius: 0 0 14px 14px; }
.preview { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.preview img { width: 100%; border-radius: 10px; border: 1px solid #c9d3e3; background: #fff; box-shadow: var(--raise); }
.kv { display: grid; grid-template-columns: 72px 1fr; gap: 8px 10px; margin: 0; font-size: 13px; align-self: start; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.toast { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 1100; padding: 10px 18px; border-radius: 10px; color: #fff; background: linear-gradient(180deg, #4b5567, #33405a); box-shadow: 0 10px 26px rgba(23, 52, 120, .25); font-size: 13px; }
.toast.ok { background: linear-gradient(180deg, #3fcf7a, #16a34a); }
.toast.error { background: linear-gradient(180deg, #f26464, #dc2626); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; color: var(--muted); text-align: center; }
.empty svg { width: 46px; height: 46px; opacity: .45; color: var(--primary); }
.empty h3 { color: var(--text-2); font-size: 15px; font-weight: 500; }
.loading { padding: 60px; text-align: center; color: var(--muted); }
pre.code { margin: 0; padding: 16px; border-radius: 10px; background: #1d2433; box-shadow: var(--raise); color: #d6deef; font: 12.5px/1.7 Consolas, monospace; overflow-x: auto; }

/* 登录 */
.login-copy { position: fixed; left: 0; right: 0; bottom: 14px; text-align: center; color: var(--muted); font-size: 12px; }
.login-note, .login-wait { margin: 4px 0 16px; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px 56px; background: radial-gradient(1100px 600px at 15% 10%, #dbe7ff 0%, transparent 60%), radial-gradient(900px 500px at 90% 90%, #d6f0ff 0%, transparent 60%), #e6ebf3; }
.login-wrap { width: min(400px, 100%); }
.login-help { display: block; margin-top: 14px; text-align: center; color: var(--primary); font-size: 13px; }
.guide-card { width: min(560px, 100%); }
.guide-list { display: grid; gap: 12px; margin-bottom: 18px; }
.guide-role { display: grid; gap: 4px; }
.guide-role b { font-size: 14px; color: #16203a; }
.guide-role span { font-size: 13px; line-height: 1.6; color: #3d4c68; }
.login-card { width: min(400px, 100%); padding: 34px 32px 30px; border-radius: 18px; background: var(--card-top); border: 1px solid #e4eaf3; box-shadow: 0 30px 70px rgba(23, 52, 120, .16), 0 1px 0 #fff inset; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-mark { width: 30px; height: 30px; background: #1b2f57; border-radius: 50%; box-shadow: none; filter: none; }
.login-mark img { width: 100%; height: 100%; }
.login-brand b { display: block; font-size: 20px; letter-spacing: 1px; color: #16203a; }
.login-brand small { color: var(--muted); }

/* 工作台实时动效 */
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes kpi-bump { 0% { transform: translateY(0); } 25% { transform: translateY(-3px); box-shadow: var(--raise-hover), 0 0 0 2px rgba(34, 199, 238, .35), 0 0 24px rgba(34, 199, 238, .35); } 100% { transform: none; } }
@keyframes delta-out { 0% { opacity: 0; transform: translateY(6px); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(4.2); opacity: 0; } }
@keyframes now-glow { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
@keyframes scan { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(888px); opacity: 0; } }

.live-badge {
    display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 15px;
    font-size: 12px; font-weight: 600; color: #047857;
    background: linear-gradient(180deg, #f0fdf7, #d7f8e9);
    box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(16, 185, 129, .28), 0 4px 12px rgba(16, 185, 129, .18);
}
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: live-pulse 1.6s ease-out infinite; }
.live-badge span { font-weight: 500; color: #4b5873; font-family: var(--num-font); font-variant-numeric: tabular-nums; padding-left: 8px; border-left: 1px solid rgba(16, 185, 129, .3); }
.kpi.bump { animation: kpi-bump 1.2s ease; }
.delta {
    display: inline-block; margin-left: 6px; padding: 0 7px; height: 17px; line-height: 17px; border-radius: 9px;
    font-style: normal; font-size: 11px; font-weight: 600; color: #fff; vertical-align: 1px;
    background: linear-gradient(180deg, #34d27f, #129a46); box-shadow: 0 2px 6px rgba(18, 154, 70, .35);
    animation: delta-out 3.2s ease forwards;
}
.delta.down { background: linear-gradient(180deg, #f87171, #d42020); box-shadow: 0 2px 6px rgba(212, 32, 32, .35); }
.chart .pulse-ring { fill: none; stroke: #1f5eff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ring 1.8s ease-out infinite; }
.chart .now-bar { animation: now-glow 1.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(34, 199, 238, .7)); }
.chart .scan { animation: scan 5s linear infinite; pointer-events: none; }
@keyframes kpi-breathe { 0%, 100% { box-shadow: 0 8px 18px rgba(23, 52, 120, .06); } 50% { box-shadow: 0 14px 28px color-mix(in srgb, var(--c, #3d8eff) 28%, transparent); } }
@keyframes kpi-sheen { 0% { transform: translateX(-140%); } 55%, 100% { transform: translateX(260%); } }
@keyframes num-glow { 0%, 100% { text-shadow: none; } 50% { text-shadow: 0 0 14px color-mix(in srgb, var(--c, #3d8eff) 70%, transparent); } }
@keyframes bar-live { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }
@keyframes area-live { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes line-flow { to { stroke-dashoffset: -220; } }
@keyframes arc-live { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes gauge-live { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 6px rgba(47, 191, 113, .55)); } }
#board .live-card { animation: kpi-breathe 3.8s ease-in-out infinite; }
#board .live-card:nth-child(2) { animation-delay: .35s; }
#board .live-card:nth-child(3) { animation-delay: .7s; }
#board .live-card:nth-child(4) { animation-delay: 1.05s; }
#board .live-card:nth-child(5) { animation-delay: 1.4s; }
#board .live-card:nth-child(6) { animation-delay: 1.75s; }
#board .live-card::after { content: ""; position: absolute; inset: 0 auto 0 -30%; width: 28%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); animation: kpi-sheen 5.6s ease-in-out infinite; pointer-events: none; }
#board .live-card b { animation: num-glow 3.2s ease-in-out infinite; }
#board .kpi, #board .live-chart, #board .board-act, #board .board-lib { transition: transform .22s ease, box-shadow .22s ease; }
#board a.kpi { text-decoration: none; color: inherit; cursor: pointer; }
#board [data-go] { cursor: pointer; }
#board .kpi:hover, #board .live-chart:hover, #board .board-act:hover, #board .board-lib:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(23, 52, 120, .16); }
.kpi-more { display: block; max-height: 0; overflow: hidden; opacity: 0; font-style: normal; font-size: 12px; line-height: 1.45; color: var(--muted); transition: max-height .22s ease, opacity .22s ease, margin-top .22s ease; }
.kpi:hover .kpi-more { max-height: 42px; opacity: 1; margin-top: 8px; }
.chart .live-bar { animation: bar-live 2.6s ease-in-out infinite; }
.chart .live-area { animation: area-live 3.4s ease-in-out infinite; }
.chart .live-line { stroke-dasharray: 10 8; animation: line-flow 14s linear infinite; }
.chart .live-arc { animation: arc-live 2.8s ease-in-out infinite; }
.chart .live-gauge { animation: gauge-live 2.4s ease-in-out infinite; }
.chart [data-tip] { cursor: pointer; }
.chart [data-tip]:hover { filter: brightness(1.12) drop-shadow(0 0 5px rgba(61, 142, 255, .55)); }
#board-tip { position: fixed; z-index: 1300; max-width: 240px; padding: 8px 10px; border-radius: 10px; background: rgba(22, 32, 58, .92); color: #fff; font-size: 12px; line-height: 1.5; pointer-events: none; box-shadow: 0 10px 24px rgba(23, 52, 120, .28); }
.stock-picks-wrap { margin-top: 12px; }
.stock-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.stock-pick { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.stock-pick img { width: 100%; height: 96px; object-fit: cover; border-radius: 8px; background: #eef3f8; }
.stock-pick b { font-size: 13px; color: #16203a; }
.stock-pick span { font-size: 12px; color: var(--muted); }
.stock-pick:hover { border-color: #2b67ff; box-shadow: 0 8px 18px rgba(23, 52, 120, .12); }
@media (prefers-reduced-motion: reduce) {
    #board .live-card, #board .live-card::after, #board .live-card b, .chart .live-bar, .chart .live-area, .chart .live-line, .chart .live-arc, .chart .live-gauge, .chart .pulse-ring { animation: none; }
}

@media (max-width: 1440px) {
    .lib-grid, .thumbs, .hits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kpis.board-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
@media (max-width: 1100px) {
    .charts > .card { grid-column: span 12; }
    .camera { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ps-content-body { padding: 16px; }
    .card-head, .page-title { flex-wrap: wrap; }
}
@media (max-width: 760px) {
    .lib-grid, .thumbs, .hits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpis.board-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .preview { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* 边框装饰：按卡片类型使用不同纹样，沿用原有蓝色系；全部为背景层，不占用伪元素 */
:root {
    --edge: #d6deea;
    --edge-low: #c3cee0;
    --ink: #1f5eff;
    --ink-soft: #5a8eff;
    --face: linear-gradient(180deg, var(--card-top), var(--card-bottom));
    --raise: 0 1px 2px rgba(23, 52, 120, .08), 0 4px 10px rgba(23, 52, 120, .06), 0 14px 30px -6px rgba(23, 52, 120, .14);
    --raise-hover: 0 0 0 1px rgba(31, 94, 255, .10), 0 2px 4px rgba(23, 52, 120, .08), 0 10px 22px rgba(23, 52, 120, .10), 0 24px 44px -10px rgba(31, 94, 255, .22);
}

/* 连续卡片顶边各用一种短签，靠左对齐标题，不再用同一条居中蓝条。 */
.card {
    border: 1px solid var(--edge);
    border-bottom-color: var(--edge-low);
    background: var(--face);
    box-shadow: var(--raise);
}
.facet-card .facets:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.attr-filter[hidden] { display: none !important; }
section.card,
.card.query-preview { position: relative; --cap: #6b93e8; }
.stack > section.card:nth-child(3n+2),
.stack > .card:nth-child(3n+2) { --cap: #3aa88a; }
.stack > section.card:nth-child(3n+3),
.stack > .card:nth-child(3n+3) { --cap: #e0a15a; }
section.card::before,
.card.query-preview::before {
    content: "";
    position: absolute;
    z-index: 3;
    left: 16px;
    top: 0;
    width: 22px;
    height: 3px;
    pointer-events: none;
    border-radius: 0 0 3px 3px;
    background: var(--cap);
}
section.card .card-head h2::before { background: var(--cap); box-shadow: none; }

/* 2 企业信息条：左侧渐变立柱 + 右端斜纹 */
.ent-info {
    border: 1px solid var(--edge);
    border-bottom-color: var(--edge-low);
    padding-left: 20px;
    background:
        linear-gradient(180deg, var(--ink-soft), var(--ink)) left top / 4px 100% no-repeat,
        repeating-linear-gradient(135deg, rgba(31, 94, 255, .07) 0 6px, transparent 6px 12px) right top / 180px 100% no-repeat,
        var(--face);
    box-shadow: var(--raise);
}

/* 3 产品库卡片：顶部居中渐隐光带，悬停时展开至整条 */
.lib-card {
    background:
        radial-gradient(closest-side, var(--ink), rgba(31, 94, 255, 0)) center top / 46% 3px no-repeat,
        var(--face);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-size .35s ease;
}
.lib-card:hover {
    border-color: #b9cdfb;
    background-size: 100% 3px, auto;
    box-shadow: var(--raise-hover);
}

/* 4 搜索结果：顶部「短线·圆点·渐隐线」刻度 + 悬停时底部横线自左扫入 */
.hit {
    background:
        linear-gradient(90deg, var(--ink), var(--ink)) left 14px top 3px / 14px 2px no-repeat,
        radial-gradient(circle, var(--ink) 0 2px, transparent 2.5px) left 31px top 1px / 6px 6px no-repeat,
        linear-gradient(90deg, rgba(90, 142, 255, .7), rgba(90, 142, 255, 0)) left 40px top 3.5px / 60px 1px no-repeat,
        linear-gradient(90deg, var(--ink), var(--ink-soft)) left bottom / 0 3px no-repeat,
        var(--face);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-size .3s ease;
}
.hit:hover {
    border-color: #b9cdfb;
    background-size: 14px 2px, 6px 6px, 60px 1px, 100% 3px, auto;
    box-shadow: var(--raise-hover);
}

/* 5 指标卡：左下圆点 + 渐隐刻度线 */
.charts > section.card::before { content: none; }
.stat:not(.upload-tile), .kpi { background: var(--face); }

/* 6 上传格：保留虚线框，四角加实线角标 */
.upload-tile {
    background:
        linear-gradient(var(--ink), var(--ink)) left 5px top 5px / 12px 2px no-repeat,
        linear-gradient(var(--ink), var(--ink)) left 5px top 5px / 2px 12px no-repeat,
        linear-gradient(var(--ink), var(--ink)) right 5px bottom 5px / 12px 2px no-repeat,
        linear-gradient(var(--ink), var(--ink)) right 5px bottom 5px / 2px 12px no-repeat,
        linear-gradient(180deg, #f8fbff, #eef4ff);
}
.upload-tile.over { background-color: #e4edff; background-image: linear-gradient(180deg, #eef4ff, #e4edff); }

/* 7 说明书：左侧缝线（布料针脚） */
.manual {
    border: 1px solid var(--edge);
    border-bottom-color: var(--edge-low);
    padding-left: 22px;
    background:
        repeating-linear-gradient(180deg, var(--ink-soft) 0 5px, transparent 5px 9px) 9px 8px / 2px calc(100% - 16px) no-repeat,
        var(--face);
}

/* 样图卡片边线：左上沿圆角的细线，墨蓝 / 朱橘 / 香槟铜轮换，两端渐隐 */
.thumbs > .thumb {
    --rail: #2f5bd3;
    border: 1px solid #d6deea;
    border-top-color: #cbd5e4;
    border-left-color: #cbd5e4;
}
.thumbs > .thumb:nth-child(3n+2) { --rail: #e0552e; }
.thumbs > .thumb:nth-child(3n+3) { --rail: #a9834f; }
.thumbs > .thumb::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 58%;
    height: 46%;
    border-top: 1.5px solid var(--rail);
    border-left: 1.5px solid var(--rail);
    border-top-left-radius: 12px;
    opacity: .78;
    pointer-events: none;
    z-index: 3;
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 0 0, #000 38%, transparent 100%);
    mask-image: radial-gradient(ellipse 100% 100% at 0 0, #000 38%, transparent 100%);
    transition: opacity .2s ease;
}
.thumbs > .thumb:hover { border-color: #c3cfe2; }
.thumbs > .thumb:hover::before { opacity: 1; }
.thumb.is-focus { outline: 2px solid #5b8def; outline-offset: 2px; }

/* 9 弹窗：渐变描边整圈（蓝→青→蓝，向下淡出） */
.modal {
    border: 2px solid transparent;
    background:
        var(--face) padding-box,
        linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, var(--edge) 100%) border-box,
        linear-gradient(90deg, var(--ink), #22c7ee 50%, var(--ink)) border-box;
    box-shadow: 0 8px 20px rgba(23, 52, 120, .12), 0 30px 70px -10px rgba(23, 52, 120, .32);
}
.modal-foot { background: var(--card-bottom); }

/* 10 登录卡：完整渐变外圈 + 四角角标 */
.login-card {
    border: 1.5px solid transparent;
    background:
        linear-gradient(var(--ink), var(--ink)) left 10px top 10px / 16px 2px no-repeat padding-box,
        linear-gradient(var(--ink), var(--ink)) left 10px top 10px / 2px 16px no-repeat padding-box,
        linear-gradient(var(--ink), var(--ink)) right 10px top 10px / 16px 2px no-repeat padding-box,
        linear-gradient(var(--ink), var(--ink)) right 10px top 10px / 2px 16px no-repeat padding-box,
        linear-gradient(var(--ink), var(--ink)) left 10px bottom 10px / 16px 2px no-repeat padding-box,
        linear-gradient(var(--ink), var(--ink)) left 10px bottom 10px / 2px 16px no-repeat padding-box,
        linear-gradient(var(--ink), var(--ink)) right 10px bottom 10px / 16px 2px no-repeat padding-box,
        linear-gradient(var(--ink), var(--ink)) right 10px bottom 10px / 2px 16px no-repeat padding-box,
        var(--face) padding-box,
        linear-gradient(135deg, var(--ink-soft), #22c7ee, var(--ink)) border-box;
    box-shadow: 0 10px 24px rgba(23, 52, 120, .08), 0 34px 76px -12px rgba(23, 52, 120, .22);
}

.card-head { border-bottom: 1px solid var(--line-soft); }
.modal-head {
    border-bottom: 0;
    background: linear-gradient(90deg, rgba(31, 94, 255, 0), rgba(31, 94, 255, .55) 50%, rgba(31, 94, 255, 0)) center bottom / 80% 1px no-repeat;
}
.modal-foot { border-top: 1px solid var(--line-soft); }
.lib-stats, .well { box-shadow: inset 0 1px 3px rgba(23, 52, 120, .10), inset 0 0 0 1px #e1e8f3; }
.ctx-menu {
    border: 1px solid var(--edge);
    background: linear-gradient(90deg, var(--ink), var(--ink-soft)) left top / 3px 100% no-repeat, #fff;
    box-shadow: 0 6px 14px rgba(23, 52, 120, .10), 0 18px 40px -8px rgba(23, 52, 120, .24);
}

/* 隐藏设置 / 邀请客户 / 游客入口 */
.hide-form { display: grid; gap: 16px; }
.hide-grid { display: grid; gap: 12px; }
.hide-group { display: grid; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #f6f9ff; border: 1px solid #e1e8f3; }
.hide-children { display: flex; flex-wrap: wrap; gap: 8px 14px; padding-left: 24px; }
.hide-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.hide-item small { color: var(--muted); font-size: 12px; }
.hide-item input { width: 15px; height: 15px; accent-color: var(--primary); }
.hide-item input:checked + span { color: #c0392b; text-decoration: line-through; }
.hide-foot { display: flex; justify-content: flex-end; }
.tag-hidden { margin-left: 6px; background: #fff1f0; color: #c0392b; border: 1px solid #f5c6c2; }
.invite-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.invite-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.invite-ent { min-width: 240px; margin: 0; }
.invite-person { width: 160px; margin: 0; }
.invite-contact { width: 220px; margin: 0; }
.invite-days { width: 120px; margin: 0; }
.invite-result { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; width: 100%; }
.invite-result:empty { display: none; }
.invite-info { display: grid; gap: 8px; max-width: 520px; }
.invite-url { font: 12.5px/1.5 Consolas, monospace; word-break: break-all; color: var(--primary); }
.login-guest { margin-top: 10px; }
.remember { margin: -4px 0 16px; }
.menu-sort { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu-sort .menu-sort { margin: 8px 0 0 28px; }
.menu-sort li { padding: 8px 10px; border: 1px solid #d6deea; border-radius: 10px; background: #fff; cursor: grab; user-select: none; touch-action: none; }
.menu-sort li.dragging { opacity: .4; pointer-events: none; }
.menu-row { display: flex; align-items: center; gap: 8px; }
.menu-row .grip { color: #8aa0c4; letter-spacing: -2px; }
.menu-row small { color: var(--muted); }
.menu-row .menu-ops { margin-left: auto; display: inline-flex; gap: 6px; }

/* 动态效果：卡片依次入场、弹窗与提示；尊重系统「减少动态效果」 */
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
.lib-grid:not([data-settled]) > .lib-card,
.thumbs > .thumb,
.hits > .hit { animation: rise-in .42s cubic-bezier(.16, 1, .3, 1) both; }
.lib-grid:not([data-settled]) > .lib-card:nth-child(2),
.thumbs > .thumb:nth-child(2),
.hits > .hit:nth-child(2) { animation-delay: .04s; }
.lib-grid:not([data-settled]) > .lib-card:nth-child(3),
.thumbs > .thumb:nth-child(3),
.hits > .hit:nth-child(3) { animation-delay: .08s; }
.lib-grid:not([data-settled]) > .lib-card:nth-child(4),
.thumbs > .thumb:nth-child(4),
.hits > .hit:nth-child(4) { animation-delay: .12s; }
.lib-grid:not([data-settled]) > .lib-card:nth-child(n+5),
.thumbs > .thumb:nth-child(n+5),
.hits > .hit:nth-child(n+5) { animation-delay: .16s; }
.mask { animation: mask-in .18s ease; }
.modal { animation: modal-in .28s cubic-bezier(.16, 1, .3, 1); }
.toast { animation: toast-in .22s ease; }
.ctx-menu { animation: menu-in .16s ease; transform-origin: top left; }
.btn, .attr-chip, .icon-btn { transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease; }
.btn:active, .attr-chip:active, .icon-btn:active { transform: scale(.96); }

.confirm-copy { margin: 0; font-size: 14px; line-height: 1.7; color: #24304a; }

.card,
section.card,
.card.query-preview {
    position: relative;
    --cap: #5f7aa6;
    border: 1px solid #d3dbe7;
    border-top-color: #e1e7f0;
    border-bottom-color: #c2ccdb;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 55%, #f6f8fc 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        inset 0 -1px 0 rgba(176, 190, 212, .28),
        0 1px 1px rgba(30, 45, 80, .06),
        0 4px 10px -2px rgba(30, 45, 80, .08),
        0 14px 28px -12px rgba(40, 60, 110, .16);
}
.stack > section.card:nth-child(3n+2),
.stack > .card:nth-child(3n+2),
.stack > section.card:nth-child(3n+3),
.stack > .card:nth-child(3n+3) { --cap: #5f7aa6; }
section.card::before,
.card.query-preview::before { content: none; }
.card-head h2::before,
section.card .card-head h2::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 14px;
    margin-right: 8px;
    border-radius: 2px;
    vertical-align: -2px;
    background: linear-gradient(180deg, #8aa3c9 0%, #4f6b99 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(40, 60, 110, .25);
}

.nav-toggle, .ps-nav-mask { display: none; }

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        position: fixed; z-index: 70; top: calc(10px + env(safe-area-inset-top)); left: 10px;
        width: 40px; height: 40px; border: 0; border-radius: 10px; cursor: pointer;
        color: #16203a; background: #fff; box-shadow: 0 4px 14px rgba(23, 52, 120, .18);
    }
    .nav-toggle svg { width: 20px; height: 20px; }
    .ps-nav-mask { position: fixed; inset: 0; z-index: 75; background: rgba(15, 23, 42, .45); }
    .ps-app.is-nav-open .ps-nav-mask { display: block; }
    .ps-sidebar {
        position: fixed; z-index: 80; top: 0; bottom: 0; left: 0;
        width: min(280px, 86vw); min-width: 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
    }
    .ps-app.is-nav-open .ps-sidebar { transform: none; box-shadow: 8px 0 28px rgba(0, 0, 0, .28); }
    .ps-app.is-collapsed .ps-sidebar { width: min(280px, 86vw); min-width: 0; }
    .ps-app.is-collapsed .ps-brand-name { display: inline; opacity: 1; width: auto; overflow: visible; }
    .ps-app.is-collapsed .ps-menu-label,
    .ps-app.is-collapsed .ps-menu-chevron { display: inline; }
    .ps-app.is-collapsed .ps-menu-group.is-open > .ps-submenu { display: block; }
    .ps-app.is-collapsed .ps-sidebar-foot { display: block; }
    .ps-sidebar-resizer { display: none; }
    .ps-content-body { padding: calc(58px + env(safe-area-inset-top)) 12px 16px; }
    .ps-footer { flex-wrap: wrap; height: auto; padding-bottom: env(safe-area-inset-bottom); }
    .ps-footer-left, .ps-app.is-collapsed .ps-footer-left { width: auto; min-width: 0; }
    .modal { width: min(520px, calc(100vw - 24px)); }
}

.grant-line { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 8px 0 12px; }
.grant-line .check small.mod-ver { margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.follow-row { display: grid; grid-template-columns: 1fr 1fr 140px auto; gap: 8px; margin-bottom: 8px; }
.sample-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sample-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--raise); }
.sample-ph { height: 88px; border-radius: 8px; background: var(--well); display: grid; place-items: center; color: var(--muted); margin-bottom: 10px; overflow: hidden; }
img.sample-ph { width: 100%; object-fit: cover; }
.sample-ph svg { width: 28px; height: 28px; }
.request-steps { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.request-steps li { color: var(--muted); }
.request-steps li:not(:last-child)::after { content: "·"; margin: 0 4px; color: var(--line); }
.request-steps li.done { color: #2f9e6b; }
.request-steps li.now { color: var(--text); font-weight: 600; }
.request-steps li.warn { color: #b91c1c; }
.request-alert { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: #fdecec; color: #9f1239; }
.stock-short { color: #b91c1c; }
.notice-card { margin-bottom: 16px; }
.request-list { display: grid; gap: 12px; }
.request-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; }
.request-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.request-card header .muted { margin-left: auto; }
.request-now { margin: 0 0 8px; }
.request-lines { margin: 8px 0; }
.request-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cart { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 14px 16px; }
.cart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cart-lines { list-style: none; margin: 8px 0 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.cart-line img, .cart-ph { width: 72px; height: 72px; border-radius: 8px; background: var(--well); object-fit: cover; }
.cart-ph { display: grid; place-items: center; color: var(--muted); }
.cart-ph svg { width: 28px; height: 28px; }
.cart-name b { display: block; }
.cart-name .muted { display: block; margin-top: 2px; font-size: 12px; }
.cart-name .input { width: min(180px, 100%); height: 32px; margin-top: 6px; }
.cart-qty { display: flex; align-items: center; height: 32px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.cart-qty button { width: 32px; height: 32px; border: 0; background: #f4f7fb; color: var(--text); cursor: pointer; }
.cart-qty button:disabled { color: #c5cad6; cursor: default; }
.cart-num { width: 42px; height: 32px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: inherit; }
.cart-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.cart-foot .field { flex: 1 1 240px; margin: 0; }
.addr-pick { display: grid; gap: 2px; flex: 1 1 240px; min-width: 0; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit; color: inherit; }
.addr-pick b { font-size: 14px; }
.addr-pick em { font-style: normal; color: var(--muted); font-size: 12px; }
.addr-list { display: grid; gap: 8px; }
.addr-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.addr-item.is-on { border-color: #1f5eff; background: #f5f8ff; }
.addr-item span { display: grid; gap: 2px; }
.addr-item em { font-style: normal; color: var(--muted); font-size: 12px; }
.request-detail td { white-space: normal; background: #f8fafc; }
.tl-item { display: grid; grid-template-columns: 108px minmax(0, 1fr); }
.tl-axis { position: relative; padding: 0 22px 16px 0; text-align: right; }
.tl-axis time { display: block; font-size: 12px; line-height: 1.3; color: #64748b; font-variant-numeric: tabular-nums; }
.tl-axis i { position: absolute; right: 0; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
.tl-axis::after { content: ""; position: absolute; right: 5px; top: 18px; bottom: 0; width: 2px; background: #3b82f6; }
.tl-item:last-child .tl-axis { padding-bottom: 0; }
.tl-item:last-child .tl-axis::after { display: none; }
.tl-axis em { display: block; margin-top: 8px; font-style: normal; font-size: 12px; font-weight: 600; color: #2563eb; }
.tl-body { padding: 0 0 16px 12px; }
.tl-body b { display: block; font-size: 14px; font-weight: 600; color: #16203a; }
.tl-body p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.tl-item.now .tl-axis i { box-shadow: 0 0 0 4px #bfdbfe; }
.tl-item.warn .tl-axis i { background: #dc2626; box-shadow: 0 0 0 3px #fecaca; }
.tl-item.warn .tl-axis::after { background: #fca5a5; }
.tl-item.warn .tl-axis em { color: #b91c1c; }
.tl-total { margin: 2px 0 0 130px; font-size: 12px; color: #64748b; }

@media (max-width: 720px) {
    .follow-row { grid-template-columns: 1fr; }
    .tl-item { grid-template-columns: 88px minmax(0, 1fr); }
    .tl-total { margin-left: 100px; }
    .cart-line { grid-template-columns: 64px minmax(0, 1fr); }
    .cart-qty, .cart-line > .btn { grid-column: 2; justify-self: start; }
}

@media (max-width: 420px) {
    .kpis, .lib-grid, .thumbs, .hits { grid-template-columns: 1fr; }
    .page-title h1 { font-size: 17px; }
}

.board-sec { margin-bottom: 24px; }
.board-sec-title { font-size: 15px; font-weight: 600; }
#board .card, #board .kpi, .todo-card { border-radius: 12px; border: 1px solid #e6ebf2; box-shadow: 0 1px 2px rgba(16,32,58,.06); }
#board .kpis, .todo-grid, #board .charts { gap: 12px; }
#board .live-card, #board .live-card b, #board .live-card::after, .chart .live-bar, .chart .live-area, .chart .live-line, .chart .live-arc, .chart .live-gauge, .chart .now-bar, .chart .scan, .kpi.bump { animation: none; filter: none; text-shadow: none; }
#board .live-card::after, .chart .scan { display: none; }
.chart .live-line { stroke-dasharray: none; }
#board a.kpi, .todo-card { transition: transform .15s ease, box-shadow .15s ease; }
#board a.kpi:hover, .todo-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,32,58,.08); }
#board .kpi { border-top: 2px solid var(--c, #3d8eff); }
#board .kpi span, .todo-name { font-size: 12px; color: var(--muted); }
#board .kpi b, .todo-num { font: 600 22px/1.2 var(--num-font); color: #16203a; }
.todo-card { background: #fff; border-left: 3px solid #f97316; }
.todo-go { font-size: 12px; color: #1f56e6; }
.chart { height: 200px; }
#board .card-head { padding: 10px 16px; }
#board .card-body { padding: 12px 16px; }

.ol-table thead th { height: 44px; vertical-align: middle; }
.ol-table tbody td { height: 48px; vertical-align: middle; }
.ol-no { border: 0; background: none; padding: 0; cursor: pointer; font: 600 14px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #0f1f3d; }
.ol-no:hover { color: #2563eb; }
.linkish { border: 0; background: none; padding: 0 10px 0 0; color: #2563eb; cursor: pointer; font: inherit; }
.linkish:hover { text-decoration: underline; }
.ol-ops { text-align: center; }
.status-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.status-btn:hover .st { box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); }
.status-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 6px; }
.table th.ta-left,
.table td.ta-left,
.table td.ol-sample,
.table td.ol-note { text-align: left; }
.ol-sample { max-width: 320px; white-space: normal; line-height: 1.45; vertical-align: middle; }
.ol-note { max-width: 420px; white-space: normal; line-height: 1.45; }
.sample-more { margin-left: 6px; vertical-align: baseline; }
.sample-rest { margin-top: 4px; }
.ol-time { color: #64748b; font-variant-numeric: tabular-nums; }
.ol-row.is-selected { background: #eef4ff; box-shadow: inset 3px 0 0 #2563eb; }
.st { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; background: #f1f5f9; color: #64748b; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-run { color: #1d4ed8; background: #e8f0ff; }
.st-todo { color: #b45309; background: #fff7ed; }
.st-done { color: #15803d; background: #ecfdf3; }
.st-stop { color: #64748b; background: #f1f5f9; }
.st-alert { color: #b91c1c; background: #fef2f2; }
.ship-kv { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px 12px; margin: 0 0 14px; font-size: 13px; }
.ship-kv dt { color: var(--muted); }
.ship-kv dd { margin: 0; }
.ship-lines { margin-bottom: 14px; }
.drawer { width: min(480px, 100vw); height: 100%; display: flex; flex-direction: column; background: #fff; box-shadow: -16px 0 40px rgba(15, 31, 61, .16); animation: drawer-in .18s ease; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .7; } to { transform: none; opacity: 1; } }
.drawer-head, .drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e3e8f0; }
.drawer-foot { border-bottom: 0; border-top: 1px solid #e3e8f0; justify-content: flex-end; }
.drawer-body { overflow: auto; padding: 16px 20px 28px; }
.dr-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; padding: 12px; border-radius: 10px; background: #f4f6fa; }
.dr-summary span { display: block; color: #64748b; font-size: 12px; }
.dr-summary b { color: #0f1f3d; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dr-kv { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 6px 10px; margin: 0 0 16px; font-size: 13px; }
.dr-kv dt { color: #64748b; }
.dr-kv dd { margin: 0; color: #0f1f3d; }
.dr-section-title { display: flex; justify-content: space-between; margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.dr-section-title span { color: #64748b; font-weight: 500; }
.ptl { list-style: none; margin: 0; padding: 0; }
.ptl-item { display: grid; grid-template-columns: 76px 20px minmax(0, 1fr); column-gap: 8px; min-height: 44px; }
.ptl-time { text-align: right; color: #64748b; font-size: 12px; font-variant-numeric: tabular-nums; }
.ptl-time .ms { display: block; font-size: 11px; }
.ptl-node { position: relative; }
.ptl-node::before { content: ""; position: absolute; left: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.ptl-item.is-current .ptl-node::before { left: 4px; top: 4px; width: 12px; height: 12px; background: #2563eb; border: 0; box-shadow: 0 0 0 4px #dbeafe; }
.ptl-item:not(.is-current) .ptl-main { color: #64748b; }
.ptl-item.is-current .ptl-main { color: #0f1f3d; font-size: 15px; }
.ptl-main > p { margin: 0 0 14px; line-height: 1.55; }
.jd-co { margin-left: 4px; color: #64748b; font-size: 12px; font-weight: 600; }
.ptl-time .ptl-dur { display: block; margin-top: 2px; color: #94a3b8; font-size: 11px; }
.ptl-node::after { content: ""; position: absolute; left: 9px; top: 14px; bottom: -6px; width: 1px; background: #e3e8f0; }
.ptl-item:last-child .ptl-node::after { display: none; }
.ptl-item.is-current .ptl-node::before { left: 4px; top: 4px; width: 12px; height: 12px; background: #2563eb; box-shadow: 0 0 0 4px #dbeafe; }
.ptl-title { display: flex; justify-content: space-between; gap: 8px; }
.ptl-title b { font-size: 14px; font-weight: 600; color: #0f1f3d; }
.ptl-dur { color: #64748b; font-size: 12px; font-variant-numeric: tabular-nums; }
.ptl-dur.is-slow { color: #b45309; }
.ptl-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.who { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px 0 4px; border-radius: 12px; font-size: 13px; font-weight: 650; letter-spacing: .01em; }
.who em { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,.72); }
.who b { font-weight: 700; font-size: 12px; }
.who-customer { color: #0f766e; background: #ccfbf1; }
.who-sales { color: #1d4ed8; background: #e8f0ff; }
.who-warehouse { color: #7c3aed; background: #f3e8ff; }
.who-admin { color: #0f1f3d; background: #e2e8f0; }
.who-system { color: #64748b; background: #f1f5f9; }
.ptl-main > p { margin: 0 0 14px; line-height: 1.55; }
.jd-name.who-customer, .jd-name.who-sales, .jd-name.who-warehouse, .jd-name.who-admin, .jd-name.who-system { background: none; padding: 0; }
@media (max-width: 768px) {
    .drawer { width: 100vw; }
    .ptl-item { grid-template-columns: 64px 16px minmax(0, 1fr); }
    .dr-summary { font-size: 12px; }
}