*,
*::before,
*::after {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 137, 178, .72) rgba(8, 15, 29, .34);
}
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
*::-webkit-scrollbar-track {
    background: rgba(8, 15, 29, .34);
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
    min-width: 36px;
    min-height: 36px;
    background: rgba(109, 137, 178, .72);
    border: 2px solid rgba(8, 15, 29, .34);
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
    background: rgba(125, 164, 216, .9);
}
*::-webkit-scrollbar-thumb:active {
    background: rgba(94, 160, 232, .96);
}
*::-webkit-scrollbar-corner {
    background: rgba(8, 15, 29, .34);
}
:root {
    /* ==================================================================
       1. 语义色 — 沿用原有变量名（52 处 var() 依赖，不可改名）
       ================================================================== */
    --bg-body-1: #0b1120;
    --bg-body-2: #111827;
    --bg-card: rgba(18, 25, 45, 0.78);
    --bg-panel: rgba(15, 23, 42, 0.58);
    --bg-input: rgba(15, 23, 42, 0.86);
    --border: rgba(56, 189, 248, 0.20);
    --border-soft: rgba(148, 163, 184, 0.16);
    --text: #f1f5f9;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.16);
    --success: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;
    --shadow: 0 25px 45px -12px rgba(0,0,0,.48), 0 0 0 1px rgba(71,125,255,.14);

    /* ==================================================================
       2. 外壳尺寸 — 消灭 calc(100vh - 28px) 这类与 padding 耦合的魔法数
       ================================================================== */
    --sidebar-w: 208px;
    --shell-gutter: 14px;          /* .main 内边距；外壳高度 = 100vh - 2*gutter */
    --shell-inset: calc(var(--shell-gutter) * 2);
    --sidebar-pad-x: 12px;

    /* ==================================================================
       3. 间距刻度（4px 基准）— 替代此前 94 种散乱 padding 值
       ================================================================== */
    --sp-1: 2px;
    --sp-2: 4px;
    --sp-3: 6px;
    --sp-4: 8px;
    --sp-5: 10px;
    --sp-6: 12px;
    --sp-7: 14px;
    --sp-8: 16px;
    --sp-9: 20px;
    --sp-10: 24px;
    --sp-11: 32px;
    --sp-12: 40px;

    /* ==================================================================
       4. 圆角刻度 — 替代此前 24 种散乱 border-radius 值
       ================================================================== */
    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 10px;
    --r-xl: 12px;
    --r-2xl: 14px;
    --r-3xl: 18px;
    --r-4xl: 22px;
    --r-pill: 999px;
    --r-control: 12px;   /* 输入框 / 下拉 / 文本域 */
    --r-button: 12px;    /* 按钮 */
    --r-chip: 999px;     /* 徽章 / 状态胶囊 */
    --r-panel: 14px;     /* 卡内面板、日志窗 */
    --r-card: 22px;      /* 外壳内容卡 */

    /* ==================================================================
       5. 字号刻度 — 替代此前 22 种散乱 font-size 值
       ================================================================== */
    --fs-2xs: 10px;
    --fs-xs: 11px;
    --fs-sm: 12px;
    --fs-base: 13px;
    --fs-md: 14px;
    --fs-lg: 16px;
    --fs-xl: 20px;
    --fs-2xl: 24px;

    /* ==================================================================
       6. 语义文本色 — 此前正文文本色有 111 种硬编码十六进制
       ================================================================== */
    --text-strong: #e0f2fe;
    --text-body: #cbd5e1;
    --text-dim: #94a3b8;
    --text-faint: #7f8da3;
    --text-link: #7dd3fc;

    /* ==================================================================
       7. 语义表面色
       ================================================================== */
    --surface-inset: rgba(2, 6, 23, 0.28);
    --surface-1: rgba(15, 23, 42, 0.58);
    --surface-2: rgba(15, 23, 42, 0.72);
    --surface-3: rgba(18, 25, 45, 0.86);
    --surface-sticky: rgba(9, 15, 26, 0.96);
    --hairline: rgba(148, 163, 184, 0.14);

    /* ==================================================================
       8. 交互反馈
       ================================================================== */
    --focus-ring: 0 0 0 3px rgba(56, 189, 248, 0.22);
    --focus-ring-danger: 0 0 0 3px rgba(248, 113, 113, 0.22);
    --dur-fast: .14s;
    --dur: .2s;
    --ease: cubic-bezier(.22, .61, .36, 1);

    /* ==================================================================
       9. 品牌渐变（对齐参考项目 薯龄查询 的标题/数字渐变语言）
       ================================================================== */
    --gradient-brand: linear-gradient(135deg, #e0f2fe, #7aa2f7);
    --gradient-accent: linear-gradient(95deg, #2563eb, #1d4ed8);

    color-scheme: dark;
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, "Segoe UI", "Inter", -apple-system, sans-serif;
    background: linear-gradient(145deg, var(--bg-body-1), var(--bg-body-2));
    color: var(--text);
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 40%, rgba(56,189,248,.08), transparent 70%);
    pointer-events: none;
}
a { color: inherit; }
.center-page { display: grid; place-items: center; padding: 24px; }
.login-card {
    width: min(430px, 100%);
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}
.login-card h1 { margin: 0 0 8px; text-align: center; font-size: 25px; }
.login-card p { margin: 0 0 22px; text-align: center; color: var(--muted); }
.stack-form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #cbd5e1; font-size: 13px; }
.check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}
.check-line input,
td input[type="checkbox"] {
    width: auto;
}
input, textarea, select {
    width: 100%;
    border: 1px solid #2d3a5e;
    border-radius: 14px;
    background: var(--bg-input);
    color: var(--text);
    padding: 11px 13px;
    outline: none;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,189,248,.13); }
.admin-select {
    position: relative;
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    vertical-align: middle;
}
.admin-select.is-compact {
    display: inline-grid;
    width: auto;
}
.admin-select-native {
    grid-area: 1 / 1;
    min-width: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.admin-select-trigger {
    grid-area: 1 / 1;
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: inherit;
    margin: 0;
    padding: 0 38px 0 13px;
    overflow: hidden;
    border: 1px solid #2d4d6f;
    border-radius: 12px;
    background: #0e1930;
    color: var(--text);
    font: inherit;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.admin-select-trigger:hover {
    border-color: rgba(56,189,248,.72);
    background: #10203a;
}
.admin-select.is-open .admin-select-trigger,
.admin-select-trigger:focus-visible {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56,189,248,.18);
    outline: none;
}
.admin-select-value {
    display: block;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-select-arrow {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 9px;
    height: 9px;
    border-right: 2px solid #9bdcf8;
    border-bottom: 2px solid #9bdcf8;
    transform: translateY(-68%) rotate(45deg);
    transition: transform .18s ease, border-color .18s ease;
}
.admin-select.is-open .admin-select-arrow {
    border-color: #67e8f9;
    transform: translateY(-25%) rotate(225deg);
}
.admin-select.is-disabled .admin-select-trigger,
.admin-select-trigger:disabled {
    border-color: rgba(100,116,139,.3);
    background: rgba(15,23,42,.62);
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}
.admin-select-menu {
    position: fixed;
    z-index: 1200;
    padding: 6px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(56,189,248,.55);
    border-radius: 12px;
    background: linear-gradient(160deg,#10213d,#09172d);
    box-shadow: 0 0 26px rgba(56,189,248,.16), 0 18px 38px rgba(0,0,0,.48);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
    transform-origin: top center;
    transition: opacity .18s ease, transform .18s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 137, 178, .72) rgba(8, 15, 29, .34);
}
.admin-select-menu.opens-up {
    transform: translateY(5px);
    transform-origin: bottom center;
}
.admin-select-menu.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.admin-select-menu::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.admin-select-menu::-webkit-scrollbar-track {
    background: rgba(8, 15, 29, .34);
    border-radius: 999px;
}
.admin-select-menu::-webkit-scrollbar-thumb {
    min-height: 36px;
    border: 2px solid rgba(8, 15, 29, .34);
    border-radius: 999px;
    background: rgba(109, 137, 178, .72);
}
.admin-select-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(125, 164, 216, .9);
}
.admin-select-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 8px 34px 8px 10px;
    border-radius: 9px;
    color: #dbe7f5;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}
.admin-select-option:hover,
.admin-select-option.is-active {
    color: #7dd3fc;
    background: rgba(56,189,248,.10);
}
.admin-select-option[aria-selected="true"] {
    color: #dff7ff;
    background: linear-gradient(90deg,rgba(37,99,235,.42),rgba(56,189,248,.18));
}
.admin-select-option[aria-selected="true"]::after {
    content: "";
    position: absolute;
    right: 13px;
    width: 9px;
    height: 5px;
    border-left: 2px solid #67e8f9;
    border-bottom: 2px solid #67e8f9;
    transform: translateY(-1px) rotate(-45deg);
}
.admin-select-option[aria-disabled="true"] {
    color: #59677b;
    background: transparent;
    cursor: not-allowed;
}
.admin-select-native.users-status-select.is-active ~ .admin-select-trigger {
    border-color: rgba(74,222,128,.48);
    color: #bbf7d0;
}
.admin-select-native.users-status-select.is-banned ~ .admin-select-trigger {
    border-color: rgba(248,113,113,.5);
    color: #fecaca;
}
.console-worker-task-stats-head .admin-select,
.realtime-comment-pagination .admin-select,
td .admin-select:has(.users-status-select) {
    width: auto;
}
.realtime-comment-pagination .admin-select-trigger,
.console-worker-task-stats-head .admin-select-trigger {
    min-height: 28px;
    padding-right: 32px;
    border-radius: 9px;
    font-size: 12px;
}
.realtime-task-dispatch-control .admin-select {
    width: auto;
    min-width: 132px;
}
@media (prefers-reduced-motion: reduce) {
    .admin-select-trigger,
    .admin-select-arrow,
    .admin-select-menu,
    .admin-select-option {
        transition: none;
    }
}
.primary-btn, .ghost-btn, .danger-btn {
    border: 1px solid transparent;
    border-radius: 18px;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-weight: 650;
    background: linear-gradient(95deg, #2563eb, #1d4ed8);
}
.primary-btn:disabled,
.ghost-btn:disabled,
.danger-btn:disabled {
    cursor: not-allowed;
    opacity: .42;
    filter: grayscale(.45);
    box-shadow: none;
}
.ghost-btn { background: rgba(15,23,42,.68); border-color: #2d3a5e; color: var(--muted); }
.danger-btn { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.35); color: #fecaca; }
.message { border-radius: 14px; padding: 11px 13px; margin: 12px 0; font-size: 13px; }
.message.success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); color: var(--success); }
.message.error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    z-index: 100000;
    transform: translate(-50%, 14px);
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(187, 247, 208, .82);
    border-radius: 6px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #052e16;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 18px 44px rgba(34, 197, 94, .32), 0 8px 20px rgba(0, 0, 0, .36);
    transition: opacity .16s ease, transform .16s ease;
}
.copy-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 190px;
    background: rgba(15,23,42,.95);
    border-right: 1px solid var(--border-soft);
    padding: 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform .18s ease;
    z-index: 20;
}
.sidebar-toggle {
    position: fixed;
    left: 190px;
    top: 50%;
    z-index: 31;
    width: 18px;
    height: 44px;
    border: 1px solid rgba(56,189,248,.35);
    border-left: 0;
    border-radius: 0 6px 6px 0;
    background: rgba(15,23,42,.94);
    color: #7dd3fc;
    cursor: pointer;
    transition: left .18s ease, background .15s ease, border-color .15s ease;
}
.sidebar-toggle::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 7px solid currentColor;
}
.sidebar-toggle:hover {
    border-color: rgba(125,211,252,.65);
    background: rgba(14,165,233,.16);
}
body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}
body.sidebar-collapsed .sidebar-toggle {
    left: 0;
}
body.sidebar-collapsed .sidebar-toggle::before {
    border-right: 0;
    border-left: 7px solid currentColor;
}
.brand { padding: 8px 8px 18px; border-bottom: 1px solid var(--border-soft); font-weight: 800; }
.user-chip { padding: 11px; border: 1px solid var(--border); border-radius: 15px; background: rgba(56,189,248,.08); font-size: 13px; color: var(--muted); }
.user-chip b { color: var(--text); }
.nav-link {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 11px 10px;
    font-size: 14px;
}
.nav-icon {
    width: 20px;
    text-align: center;
    line-height: 1;
}
.nav-label {
    min-width: 0;
    text-align: left;
}
.nav-link-disabled {
    cursor: not-allowed;
    opacity: .48;
}
.nav-link:hover, .nav-link.active { color: var(--accent); background: rgba(56,189,248,.1); border: 1px solid var(--border); }
.sidebar-subnav {
    display: grid;
    gap: 4px;
    margin: -2px 0 4px 20px;
    padding: 4px 0 4px 10px;
    border-left: 1px solid rgba(56,189,248,.20);
}
.sidebar-subnav a {
    min-height: 30px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 6px 9px;
    color: #7f8da3;
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
}
.sidebar-subnav a:hover,
.sidebar-subnav a.active {
    border-color: rgba(56,189,248,.22);
    background: rgba(56,189,248,.08);
    color: #bae6fd;
}
.sidebar-bottom { margin-top: auto; display: grid; gap: 8px; padding: 0 8px 4px; }
.sidebar-bottom form { margin: 0; }
.sidebar-bottom .ghost-btn {
    width: auto;
    min-height: 22px;
    justify-content: flex-start;
    border: 0;
    border-radius: 0;
    padding: 0;
    gap: 8px;
    background: transparent;
    color: #7f8da3;
    box-shadow: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}
.sidebar-bottom .ghost-btn span {
    font-size: inherit;
    line-height: 1;
}
.sidebar-bottom .ghost-btn:hover,
.sidebar-action.active {
    color: #c7d2e2;
    background: transparent;
}
.main {
    margin-left: 190px;
    width: calc(100% - 190px);
    padding: 14px;
    transition: margin-left .18s ease, width .18s ease;
}
body.sidebar-collapsed .main {
    margin-left: 0;
    width: 100%;
}
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 22px;
    padding: 22px;
}
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.page-header h1 { margin: 0; font-size: 22px; }
.page-header-actions { margin-left: auto; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel, .stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 16px;
}
.password-panel { max-width: 520px; }
.password-form { max-width: 420px; }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat-card .label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.users-admin-card {
    min-height: calc(100vh - 28px);
    padding: 26px 28px;
    border-color: rgba(56,189,248,.18);
    background: linear-gradient(180deg, rgba(15,23,42,.86), rgba(10,16,30,.88));
}
.users-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.users-admin-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    color: #a78bfa;
    font-size: 13px;
    font-weight: 800;
}
.users-admin-head h1 {
    margin: 4px 0 0;
    color: #f8fafc;
    font-size: 26px;
    line-height: 1.2;
}
.users-admin-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}
.users-admin-stats span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(96,165,250,.22);
    border-radius: 999px;
    padding: 5px 11px;
    background: rgba(37,99,235,.10);
    color: #9fb2c8;
    font-size: 12px;
    font-weight: 700;
}
.users-admin-stats b {
    color: #dbeafe;
    font-variant-numeric: tabular-nums;
}
.users-admin-stats .green b { color: #86efac; }
.users-admin-stats .red b { color: #fca5a5; }
.users-create-panel,
.users-list-panel {
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 18px;
    background: rgba(15,23,42,.54);
}
.users-create-panel {
    padding: 20px 22px;
}
.users-section-title h2 {
    margin: 0;
    color: #e5edf7;
    font-size: 17px;
}
.users-section-title p {
    margin: 6px 0 0;
    color: #7f8da3;
    font-size: 12px;
}
.users-create-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 150px 180px 108px 108px 118px;
    align-items: end;
    gap: 10px;
    margin-top: 16px;
}
.users-create-form label {
    min-width: 0;
}
.users-create-form input {
    height: 40px;
    border-radius: 12px;
    background: rgba(2,6,23,.34);
    font-size: 13px;
}
.users-create-form .check-line {
    min-height: 40px;
    justify-content: center;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 12px;
    background: rgba(2,6,23,.18);
    padding: 0 10px;
    color: #a9b7ca;
    font-weight: 700;
}
.users-create-form .primary-btn {
    min-height: 40px;
    border-radius: 12px;
}
.users-list-panel {
    margin-top: 16px;
    overflow: visible;
}
.users-list-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.users-search-input {
    width: min(320px, 100%);
    height: 38px;
    border-radius: 12px;
    background: rgba(2,6,23,.30);
    font-size: 13px;
}
.users-table-wrap {
    border: 0;
    border-radius: 0;
}
.users-admin-table {
    min-width: 1380px;
    font-size: 12px;
}
.users-admin-table th {
    padding: 12px 10px;
    color: #7f8da3;
}
.users-admin-table td {
    padding: 12px 10px;
    color: #c7d2e2;
    vertical-align: middle;
}
.users-time-cell,
.users-ip-cell {
    white-space: nowrap;
    color: #9fb2c8;
    font-variant-numeric: tabular-nums;
}
.users-ip-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.users-name {
    color: #e5edf7;
    font-size: 13px;
}
.users-status-select,
.users-small-input {
    height: 32px;
    border-radius: 9px;
    padding: 6px 9px;
    font-size: 12px;
}
.users-status-select {
    min-width: 78px;
    width: 86px;
}
.users-status-select.is-active {
    border-color: rgba(74,222,128,.24);
    color: #86efac;
}
.users-status-select.is-banned {
    border-color: rgba(248,113,113,.26);
    color: #fca5a5;
}
.users-small-input {
    width: 92px;
}
.users-permission-checks {
    display: flex;
    gap: 10px;
}
.users-permission-checks label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #9fb2c8;
    font-size: 12px;
}
.users-admin-table .actions {
    flex-wrap: nowrap;
}
.users-admin-table .actions .ghost-btn,
.users-admin-table .actions .danger-btn {
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
}
.dashboard-content-card {
    padding: 20px;
    border-color: rgba(56,189,248,.18);
    background: linear-gradient(180deg, rgba(15,23,42,.86), rgba(10,16,30,.88));
}
.dashboard-content-card .page-header {
    min-height: 42px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.dashboard-content-card .page-header h1 {
    font-size: 24px;
}
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-metric-card {
    min-height: 112px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 14px;
    padding: 15px;
    background: rgba(15,23,42,.48);
}
.dashboard-metric-card.primary {
    border-color: rgba(56,189,248,.28);
    background: linear-gradient(180deg, rgba(56,189,248,.12), rgba(37,99,235,.08));
}
.dashboard-metric-card span {
    color: #a9b7ca;
    font-size: 13px;
    font-weight: 750;
}
.dashboard-metric-card strong {
    color: #e0f2fe;
    font-size: 34px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.dashboard-metric-unit {
    color: #ff4d5a;
    font-size: 24px;
    margin-left: 6px;
    font-weight: 800;
}
.dashboard-task-stats {
    margin-top: 14px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 16px;
    background: rgba(15,23,42,.52);
    overflow: hidden;
}
.dashboard-task-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}
.dashboard-task-stat-card {
    min-height: 92px;
    display: grid;
    align-content: space-between;
    gap: 8px;
    border: 1px solid rgba(56,189,248,.14);
    border-radius: 14px;
    padding: 14px;
    background: rgba(8,15,29,.38);
}
.dashboard-task-stat-card span {
    color: #a9b7ca;
    font-size: 13px;
    font-weight: 750;
}
.dashboard-task-stat-card strong {
    color: #e0f2fe;
    font-size: 30px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.dashboard-task-stat-unit {
    margin-left: 2px;
    font-size: 12px;
    font-weight: 750;
    color: #718198;
}
.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr);
    gap: 14px;
    margin-top: 14px;
}
.dashboard-panel {
    min-width: 0;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 16px;
    background: rgba(15,23,42,.52);
    overflow: hidden;
}
.dashboard-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.dashboard-section-head.compact {
    padding-bottom: 12px;
}
.dashboard-section-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 17px;
}
.dashboard-section-head p {
    margin: 4px 0 0;
    color: #7f8da3;
    font-size: 12px;
}
.dashboard-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    white-space: nowrap;
    border: 1px solid rgba(56,189,248,.20);
    border-radius: 999px;
    padding: 4px 10px;
    color: #bae6fd;
    background: rgba(56,189,248,.08);
    font-size: 12px;
    font-weight: 750;
}
.dashboard-chart-panel {
    padding: 20px 22px 16px;
}
.dashboard-trend-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.dashboard-trend-title h2 {
    margin: 0;
    color: #a9b7ca;
    font-size: 16px;
    font-weight: 750;
}
.dashboard-trend-icon {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(125,211,252,.42);
    border-radius: 2px;
    background:
        linear-gradient(135deg, transparent 0 36%, rgba(251,191,36,.95) 37% 45%, transparent 46%),
        linear-gradient(135deg, transparent 0 58%, rgba(96,165,250,.95) 59% 68%, transparent 69%),
        rgba(219,234,254,.88);
}
.dashboard-trend-chart {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    min-height: 178px;
}
.dashboard-trend-axis {
    height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 2px;
    color: #94a3b8;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.dashboard-trend-plot {
    position: relative;
    min-width: 0;
    height: 166px;
    padding-top: 10px;
    padding-bottom: 28px;
}
.dashboard-trend-grid {
    position: absolute;
    inset: 10px 0 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}
.dashboard-trend-grid span {
    display: block;
    height: 1px;
    background: rgba(148,163,184,.09);
}
.dashboard-trend-baseline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 4;
    height: 3px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 12px rgba(245,158,11,.20);
}
.dashboard-trend-items {
    position: relative;
    z-index: 5;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 18px;
}
.dashboard-trend-item {
    position: relative;
    min-width: 0;
    height: 128px;
}
.dashboard-trend-value {
    position: absolute;
    left: 50%;
    bottom: calc(var(--bar-height) + 4px);
    transform: translateX(-50%);
    color: #a9b7ca;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.dashboard-trend-bar {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(88px, 78%);
    height: var(--bar-height);
    transform: translateX(-50%);
    border: 1px solid rgba(56,189,248,.82);
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: linear-gradient(180deg, rgba(14,116,144,.70), rgba(8,47,73,.88));
    box-shadow: inset 0 1px 0 rgba(125,211,252,.26), 0 8px 24px rgba(14,165,233,.10);
}
.dashboard-trend-dot {
    position: absolute;
    left: 50%;
    bottom: -5px;
    z-index: 7;
    width: 10px;
    height: 10px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,.10);
}
.dashboard-trend-label {
    position: absolute;
    left: 50%;
    top: 138px;
    transform: translateX(-50%);
    color: #94a3b8;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.dashboard-trend-total {
    display: none;
    color: #7f8da3;
    font-size: 12px;
    font-weight: 700;
}
.dashboard-trend-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #7f8da3;
    font-size: 12px;
}
.dashboard-trend-summary b {
    color: #a9b7ca;
    font-weight: 750;
}
.dashboard-insight-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}
.dashboard-insight-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(148,163,184,.11);
    border-radius: 12px;
    padding: 12px;
    background: rgba(2,6,23,.16);
}
.dashboard-insight-list span {
    color: #8fa2ba;
    font-size: 12px;
}
.dashboard-insight-list b {
    color: #e0f2fe;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}
.realtime-comment-card {
    height: calc(100vh - 28px);
    overflow: hidden;
    padding: 18px 18px 12px;
    border-color: rgba(56,189,248,.16);
    background: linear-gradient(180deg, rgba(15,23,42,.84), rgba(10,16,30,.88));
}
.realtime-comment-card .page-header {
    min-height: 38px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.realtime-comment-card .page-header h1 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.realtime-comment-title-meta {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.realtime-comment-title-number {
    margin: 0 2px;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 800;
}
.realtime-comment-shell {
    height: calc(100% - 44px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.realtime-comment-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 16px;
    padding: 16px;
    background: rgba(15,23,42,.52);
}
.realtime-comment-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid rgba(56,189,248,.22);
    border-radius: 999px;
    padding: 3px 9px;
    color: #7dd3fc;
    background: rgba(56,189,248,.08);
    font-size: 12px;
    font-weight: 750;
}
.realtime-comment-top h2 {
    margin: 10px 0 4px;
    color: #f8fafc;
    font-size: 24px;
    line-height: 1.2;
}
.realtime-comment-top p {
    margin: 0;
    color: #8fa2ba;
    font-size: 13px;
}
.realtime-comment-filter {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    flex: 1 1 auto;
    gap: 9px;
}
.realtime-comment-filter-row {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 9px;
}
.realtime-comment-filter label {
    width: 132px;
}
.realtime-comment-filter input {
    height: 38px;
    border-radius: 10px;
    font-size: 13px;
}
.realtime-comment-filter .primary-btn,
.realtime-comment-filter .ghost-btn {
    min-height: 38px;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
}
.realtime-comment-tabs {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
    margin: 0;
    border-bottom: 1px solid rgba(148,163,184,.16);
    overflow: hidden;
}
.realtime-comment-tab {
    position: relative;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #9cacbf;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.realtime-comment-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 999px;
    background: transparent;
}
.realtime-comment-tab[aria-selected="true"] {
    color: #55c7ff;
}
.realtime-comment-tab[aria-selected="true"]::after {
    background: #3b82f6;
}
.realtime-comment-tab:focus-visible {
    outline: 2px solid rgba(125,211,252,.92);
    outline-offset: -6px;
}
[data-realtime-comment-tab-panel][hidden] {
    display: none!important;
}
.realtime-comment-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.realtime-comment-section-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 17px;
}
.realtime-comment-records {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    gap: 12px;
    overflow: hidden;
}
.realtime-rule-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: 0;
    flex: 1 1 auto;
    gap: 10px;
}
.realtime-rule-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 14px;
    background: rgba(15,23,42,.46);
}
.realtime-rule-card-head {
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}
.realtime-rule-card-head span {
    overflow-wrap: anywhere;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
}
.realtime-rule-card-head b {
    color: #8fa2ba;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}
.realtime-time-range-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 10px 12px 12px;
}
.realtime-time-range-head {
    min-height: 32px;
    display: flex;
    align-items: center;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 750;
}
.realtime-time-range-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.realtime-time-range-actions input,
.realtime-time-range-actions .primary-btn {
    width: 100%;
}
.realtime-rule-editor {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    flex: 1 1 auto;
    gap: 7px;
    padding: 0 12px 12px;
}
.realtime-rule-editor textarea {
    width: 100%;
    height: 100%;
    min-height: 82px;
    resize: vertical;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 10px;
    padding: 9px 10px;
    color: #e5eefb;
    background: rgba(2,6,23,.42);
    font-size: 13px;
    line-height: 1.45;
}
.realtime-rule-editor p {
    margin: 0;
    color: #7f8da3;
    font-size: 12px;
}
.realtime-comment-metrics {
    display: grid;
    grid-template-columns: 180px 180px minmax(240px, 1fr);
    gap: 12px;
}
.realtime-comment-metrics > div {
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 6px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(15,23,42,.46);
}
.realtime-comment-metrics span {
    color: #8fa2ba;
    font-size: 12px;
    font-weight: 700;
}
.realtime-comment-metrics strong {
    overflow: hidden;
    color: #e0f2fe;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.realtime-comment-panel {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 16px;
    background: rgba(15,23,42,.52);
}
.realtime-comment-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.realtime-comment-panel-head .ghost-btn {
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 9px;
    font-size: 12px;
}
.realtime-comment-panel-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}
.realtime-comment-search-input {
    width: min(520px, 42vw);
    min-width: 280px;
    height: 28px;
    padding: 4px 10px;
    border-radius: 9px;
    font-size: 12px;
}
.realtime-comment-panel-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 17px;
}
.realtime-comment-panel-head p,
.realtime-comment-panel-head span {
    margin: 4px 0 0;
    color: #7f8da3;
    font-size: 12px;
}
.realtime-comment-table-wrap {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    border: 0;
    border-radius: 0;
}
.realtime-comment-table-wrap,
.realtime-task-jobs .realtime-task-table-wrap,
.realtime-task-jobs-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 137, 178, .72) rgba(8, 15, 29, .34);
}
.realtime-comment-table-wrap::-webkit-scrollbar,
.realtime-task-jobs .realtime-task-table-wrap::-webkit-scrollbar,
.realtime-task-jobs-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.realtime-comment-table-wrap::-webkit-scrollbar-track,
.realtime-task-jobs .realtime-task-table-wrap::-webkit-scrollbar-track,
.realtime-task-jobs-scroll::-webkit-scrollbar-track {
    background: rgba(8, 15, 29, .34);
    border-radius: 999px;
}
.realtime-comment-table-wrap::-webkit-scrollbar-thumb,
.realtime-task-jobs .realtime-task-table-wrap::-webkit-scrollbar-thumb,
.realtime-task-jobs-scroll::-webkit-scrollbar-thumb {
    min-width: 36px;
    min-height: 36px;
    background: rgba(109, 137, 178, .72);
    border: 2px solid rgba(8, 15, 29, .34);
    border-radius: 999px;
}
.realtime-comment-table-wrap::-webkit-scrollbar-thumb:hover,
.realtime-task-jobs .realtime-task-table-wrap::-webkit-scrollbar-thumb:hover,
.realtime-task-jobs-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(125, 164, 216, .9);
}
.realtime-comment-table-wrap::-webkit-scrollbar-thumb:active,
.realtime-task-jobs .realtime-task-table-wrap::-webkit-scrollbar-thumb:active,
.realtime-task-jobs-scroll::-webkit-scrollbar-thumb:active {
    background: rgba(94, 160, 232, .96);
}
.realtime-comment-table-wrap::-webkit-scrollbar-corner,
.realtime-task-jobs .realtime-task-table-wrap::-webkit-scrollbar-corner,
.realtime-task-jobs-scroll::-webkit-scrollbar-corner {
    background: rgba(8, 15, 29, .34);
}
.realtime-comment-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    width: max-content;
    max-width: 100%;
    margin: -8px 8px 0 auto;
    padding-top: 4px;
    overflow: visible;
    color: #9cacbf;
    font-size: 12px;
}
.realtime-comment-pagination span,
.realtime-comment-pagination label,
.realtime-comment-pagination button {
    flex: 0 0 auto;
    white-space: nowrap;
}
.realtime-comment-pagination select {
    min-height: 28px;
    flex: 0 0 82px;
    min-width: 82px;
    width: auto;
    padding: 0 7px;
    border: 1px solid #2b3b5b;
    border-radius: 8px;
    background: #0e1930;
    color: #e8eef8;
    font: inherit;
    font-size: 12px;
}
.realtime-comment-pagination button {
    min-height: 28px;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 12px;
}
.realtime-comment-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.realtime-comment-table {
    min-width: 1120px;
    font-size: 12px;
}
.realtime-comment-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(10,17,32,.96);
    padding: 8px 8px;
}
.realtime-sort-button {
    margin-left: 3px;
    padding: 0 2px;
    border: 0;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.realtime-sort-button:hover,
.realtime-sort-button.is-active {
    color: #38bdf8;
}
.realtime-comment-table td {
    color: #c7d2e2;
    vertical-align: middle;
    padding: 8px 8px;
}
.realtime-comment-table td:first-child {
    width: 188px;
    max-width: 188px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.realtime-comment-table th:nth-child(3),
.realtime-comment-table td:nth-child(3) {
    width: 150px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.realtime-comment-table th:nth-child(4),
.realtime-comment-table td:nth-child(4) {
    width: 285px;
    max-width: 285px;
    white-space: nowrap;
}
.realtime-comment-table th:nth-child(5),
.realtime-comment-table td:nth-child(5) {
    width: 64px;
    white-space: nowrap;
}
.realtime-comment-table th:nth-child(6),
.realtime-comment-table td:nth-child(6),
.realtime-comment-table th:nth-child(7),
.realtime-comment-table td:nth-child(7),
.realtime-comment-table th:nth-child(8),
.realtime-comment-table td:nth-child(8) {
    width: 132px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.realtime-comment-table th:nth-child(6),
.realtime-comment-table td:nth-child(6) {
    width: 170px;
    max-width: 170px;
    font-variant-numeric: normal;
}
.realtime-comment-table th:nth-child(9),
.realtime-comment-table td:nth-child(9) {
    width: 72px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.realtime-comment-content {
    max-width: 110px;
    min-width: 100px;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.realtime-comment-matched-filter {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.realtime-comment-user-id {
    position: relative;
    padding-right: 64px;
    cursor: copy;
    color: #d7e5ff;
}
.realtime-comment-copy-uid {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 2px 9px;
    border: 1px solid rgba(56, 189, 248, .3);
    border-radius: 999px;
    background: rgba(56, 189, 248, .1);
    color: #93c5fd;
    font-size: 11px;
    line-height: 16px;
    vertical-align: middle;
    cursor: pointer;
}
.realtime-comment-copy-uid:hover {
    background: rgba(56, 189, 248, .2);
    color: #dbeafe;
}
.realtime-comment-copy-uid:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 2px;
}
.realtime-comment-user-id:hover,
.realtime-comment-user-id.copied {
    color: #7dd3fc;
    background: rgba(56, 189, 248, .08);
}
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.badge { padding: 4px 8px; border-radius: 99px; background: rgba(56,189,248,.12); color: var(--accent); font-size: 12px; }
.monitor-notes-table .badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.badge.red { background: rgba(248,113,113,.12); color: var(--danger); }
.badge.green { background: rgba(74,222,128,.12); color: var(--success); }
.badge.note-status-countdown { background: rgba(56,189,248,.12); color: #67e8f9; }
.badge.note-status-waiting { background: rgba(251,191,36,.12); color: #fbbf24; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; }
.actions form { margin: 0; }
.console-content-card {
    padding: 12px;
    border-color: rgba(56,189,248,.18);
    background: linear-gradient(180deg, rgba(15,23,42,.86), rgba(10,16,30,.86));
}
.console-content-card .page-header {
    min-height: 28px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.console-content-card .page-header h1 {
    font-size: 21px;
    letter-spacing: 0;
}
.console-refresh-form {
    margin: 0;
}
.console-refresh-btn {
    border: 0;
    background: transparent;
    color: #ff5b62;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    padding: 0 10px;
}
.console-refresh-btn:hover {
    color: #fecaca;
}
.console-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}
.console-metric-card {
    position: relative;
    min-height: 56px;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 10px;
    padding: 6px 8px;
    background: rgba(15,23,42,.72);
}
.console-metric-card::after {
    content: "";
    position: absolute;
    inset: auto 12px 0 12px;
    height: 2px;
    border-radius: 99px 99px 0 0;
    background: linear-gradient(90deg, rgba(56,189,248,.88), rgba(34,197,94,.62));
}
.console-metric-card.worker-card::after {
    background: linear-gradient(90deg, rgba(251,191,36,.82), rgba(56,189,248,.64));
}
.console-metric-copy {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.console-metric-copy span {
    color: #a9b7ca;
    font-size: 12px;
    font-weight: 700;
}
.console-metric-copy strong {
    color: #e0f2fe;
    font-size: 20px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.console-metric-card p {
    margin: 4px 0 0;
    color: #7f8da3;
    font-size: 10px;
}
.console-today-events .console-section-head > strong {
    color: #e0f2fe;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}
.console-event-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
}
.console-event-card {
    min-width: 0;
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 10px;
    padding: 7px 8px;
    background: rgba(2,6,23,.24);
}
.console-event-card span {
    display: block;
    color: #9fb2c8;
    font-size: 11px;
    font-weight: 700;
}
.console-event-card strong {
    display: block;
    margin-top: 4px;
    color: #e5edf7;
    font-size: 18px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.console-event-card p {
    margin: 4px 0 0;
    min-height: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #7f8da3;
    font-size: 10px;
}
.console-section {
    margin-top: 8px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 12px;
    background: rgba(15,23,42,.54);
}
.console-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.console-section-head h2 {
    margin: 0;
    font-size: 15px;
}
.console-section-head p {
    margin: 3px 0 0;
    font-size: 11px;
}
.console-queue-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
}
.console-queue-card {
    min-width: 0;
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 10px;
    padding: 8px;
    background: rgba(2,6,23,.24);
}
.console-queue-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.console-queue-card-head strong,
.console-queue-card-head b {
    color: #e5edf7;
}
.console-queue-card-head strong {
    display: block;
    font-size: 14px;
}
.console-queue-card-head span {
    display: block;
    margin-top: 2px;
    color: #7f8da3;
    font-size: 11px;
}
.console-queue-card-head b {
    font-size: 18px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.console-status-rail {
    display: flex;
    gap: 2px;
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(15,23,42,.92);
}
.console-status-segment {
    min-width: 4px;
    height: 100%;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.status-scheduled { background: #38bdf8; }
.status-pending { background: #4ade80; }
.status-offered { background: #a78bfa; }
.status-running { background: #fbbf24; }
.status-failed { background: #f87171; }
.console-status-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 6px;
}
.console-status-list span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #9aa8bb;
    font-size: 10px;
    white-space: nowrap;
}
.console-tabs {
    display: inline-flex;
    gap: 4px;
    margin-top: 10px;
    padding: 4px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 12px;
    background: rgba(2,6,23,.32);
}
.console-submenu {
    margin-bottom: 0;
}
.console-subnav {
    display: flex;
    justify-content: flex-start;
    gap: 5px;
    padding: 4px 0 0;
    border-top: 0;
    border-bottom: 0;
    overflow-x: auto;
}
.console-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 6px 11px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}
.console-tab-btn:hover {
    color: #dbeafe;
    background: rgba(56,189,248,.07);
}
.console-tab-btn.active {
    color: #f8fafc;
    border-color: rgba(96,165,250,.26);
    background: rgba(37,99,235,.32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.console-record-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.console-search-input {
    width: min(320px, 100%);
    height: 32px;
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 12px;
}
.console-table-wrap {
    max-height: calc(100vh - 370px);
    border: 0;
    border-radius: 0 0 16px 16px;
}
.console-data-table {
    min-width: 1180px;
    font-size: 12px;
}
.console-data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 10px;
    background: #101827;
    color: #92a0b5;
    text-transform: none;
}
.console-worker-task-stats-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.console-sort-select {
    width: auto;
    min-width: 92px;
    height: 30px;
    padding: 5px 8px;
    font-size: 12px;
}
.console-data-table td {
    padding: 8px 10px;
    color: #c7d2e2;
}
.console-data-table tbody tr:nth-child(even) td {
    background: rgba(15,23,42,.26);
}
.console-data-table tbody tr:hover td {
    background: rgba(56,189,248,.07);
}
.queue-status-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}
.queue-priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 24px;
    border: 1px solid rgba(251, 191, 36, .82);
    border-radius: 5px;
    padding: 0 7px;
    background: rgba(120, 53, 15, .34);
    color: #fde68a;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 247, 237, .06);
}
.console-queue-table td:nth-child(3),
.console-record-table .mono-cell {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.console-event-cell {
    min-width: 118px;
}
.console-event-cell b,
.console-event-cell span {
    display: block;
}
.console-event-cell b {
    color: #e5edf7;
    font-size: 12px;
}
.console-event-cell span {
    max-width: 180px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #7f8da3;
    font-size: 11px;
}
.console-worker-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}
.console-worker-summary article {
    min-width: 0;
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 12px;
    padding: 10px;
    background: rgba(2,6,23,.24);
}
.console-worker-summary span {
    display: block;
    color: #8fa2ba;
    font-size: 12px;
    font-weight: 700;
}
.console-worker-summary strong {
    display: block;
    margin-top: 5px;
    color: #e0f2fe;
    font-size: 21px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.console-worker-table {
    min-width: 980px;
}
.console-worker-table .mono-cell {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.console-worker-id-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.console-worker-id-wrap span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.console-worker-delete-form,
.console-record-delete-form {
    flex: 0 0 auto;
    margin: 0;
}
.console-worker-delete-all-form {
    margin: 0;
}
.console-worker-task-stats {
    display: grid;
    grid-template-columns: 76px 76px 76px minmax(84px, max-content);
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.console-worker-event-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(72px, max-content));
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.console-worker-stat-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 2px 5px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.console-worker-stat-success {
    border-color: rgba(34, 197, 94, .42);
    background: rgba(34, 197, 94, .14);
    color: #86efac;
}
.console-worker-stat-fail {
    border-color: rgba(248, 113, 113, .45);
    background: rgba(239, 68, 68, .14);
    color: #fca5a5;
}
.console-worker-stat-timeout {
    border-color: rgba(234, 179, 8, .48);
    background: rgba(234, 179, 8, .14);
    color: #fde68a;
}
.console-worker-stat-event {
    border-color: rgba(96, 165, 250, .42);
    background: rgba(59, 130, 246, .14);
    color: #bfdbfe;
}
.console-worker-stat-failure-rate {
    border-color: rgba(251, 146, 60, .48);
    background: rgba(249, 115, 22, .14);
    color: #fed7aa;
}
.console-worker-success-rate {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid rgba(34, 197, 94, .42);
    border-radius: 999px;
    background: rgba(34, 197, 94, .14);
    color: #86efac;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.console-worker-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(248,113,113,.42);
    border-radius: 6px;
    background: rgba(239,68,68,.15);
    color: #fecaca;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.console-worker-delete-btn:hover {
    background: rgba(239,68,68,.28);
    border-color: rgba(248,113,113,.72);
    color: #fff1f2;
}
.record-reason-cell {
    min-width: 150px;
    max-width: 220px;
    color: #cbd5e1;
    line-height: 1.45;
}
.console-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
    padding: 12px 16px 15px;
    border-top: 1px solid rgba(148,163,184,.1);
}
.console-page-btn {
    min-width: auto;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 9px;
    padding: 5px 8px;
    background: rgba(15,23,42,.72);
    color: #cbd5e1;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}
.console-page-btn:hover {
    border-color: rgba(56,189,248,.48);
    color: #e0f2fe;
}
.console-page-btn.page-number {
    min-width: 34px;
    padding-left: 9px;
    padding-right: 9px;
}
.console-page-btn.active {
    border-color: rgba(56,189,248,.52);
    background: rgba(37,99,235,.34);
    color: #f8fafc;
}
.console-page-btn.disabled {
    pointer-events: none;
    opacity: .45;
}
.console-page-ellipsis {
    color: #64748b;
    font-size: 12px;
    padding: 0 2px;
}
.script-params-card {
    padding: 20px;
    border-color: rgba(56,189,248,.18);
    background: linear-gradient(180deg, rgba(15,23,42,.86), rgba(10,16,30,.86));
}
.script-params-card .page-header {
    min-height: 42px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.script-params-form {
    display: grid;
    gap: 14px;
}
.script-params-toolbar,
.script-params-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 14px;
    padding: 14px;
    background: rgba(15,23,42,.54);
}
.script-params-toolbar strong {
    color: #f8fafc;
    font-size: 16px;
}
.script-params-toolbar p {
    margin: 5px 0 0;
    font-size: 12px;
}
.script-param-groups {
    display: grid;
    gap: 14px;
}
.script-param-group {
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 16px;
    background: rgba(15,23,42,.54);
}
.script-param-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 15px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.script-param-group-head h2 {
    margin: 0;
    color: #e5edf7;
    font-size: 17px;
}
.script-param-group-head span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(56,189,248,.18);
    border-radius: 999px;
    padding: 2px 9px;
    background: rgba(56,189,248,.07);
    color: #9ed7ef;
    font-size: 12px;
    font-weight: 700;
}
.script-param-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}
.script-param-field {
    min-width: 0;
    gap: 6px;
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 12px;
    padding: 11px;
    background: rgba(2,6,23,.22);
}
.script-param-label {
    color: #dbeafe;
    font-size: 13px;
    font-weight: 750;
}
.script-param-field code {
    overflow: hidden;
    color: #7f8da3;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.script-param-field input,
.script-param-field select {
    height: 38px;
    border-radius: 10px;
    background: rgba(2,6,23,.30);
    font-size: 13px;
}
.record-detail-cell {
    min-width: 260px;
    max-width: 460px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.5;
    color: #cbd5e1;
}
.log-box {
    min-height: 360px;
    max-height: 620px;
    overflow: auto;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(2,6,23,.34);
    padding: 12px;
    color: #cbd5e1;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 12px;
}
.monitor-layout { display: grid; grid-template-columns: 360px 1fr 330px; gap: 14px; align-items: start; }
.compact-form { display: grid; gap: 10px; }
@media (max-width: 1050px) {
    .monitor-layout, .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .sidebar { width: 62px; padding: 12px 7px; }
    .sidebar-toggle { left: 62px; }
    .brand span, .user-chip, .nav-link .nav-label, .sidebar-bottom span { display: none; }
    .nav-link { grid-template-columns: 20px; justify-content: center; column-gap: 0; }
    .sidebar-subnav { display: none; }
    .sidebar-bottom { padding: 0; justify-items: center; }
    .sidebar-bottom .ghost-btn { justify-content: center; }
    .main { margin-left: 62px; width: calc(100% - 62px); padding: 12px; }
    body.sidebar-collapsed .sidebar-toggle { left: 0; }
    body.sidebar-collapsed .main { margin-left: 0; width: 100%; }
    .content-card { padding: 16px; }
}

/* Comment monitor console */
.monitor-content-card {
    height: calc(100vh - 28px);
    min-height: 640px;
    padding: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.console-workbench {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) 236px;
    gap: 8px;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}
.console-workbench.runtime-log-hidden {
    grid-template-columns: minmax(0, 1fr) 236px;
}
.console-workbench.runtime-log-hidden .log-pane {
    display: none;
}
.console-panel {
    min-width: 0;
    background: rgba(248, 250, 252, 0.045);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 4px;
    box-shadow: none;
    overflow: hidden;
}
.console-panel-head {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.62);
}
.console-panel-head.tight {
    min-height: 42px;
    padding: 8px 10px;
}
.console-panel h2 {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 750;
    color: #e5eefb;
}
.note-panel-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.note-monitor-count {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.note-monitor-count-number {
    color: #fbbf24;
    font-size: 11px;
    font-weight: 800;
    margin: 0 2px;
}
.note-monitor-duration {
    color: #8da2bd;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.note-monitor-duration-number {
    margin-left: 3px;
    color: #7dd3fc;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.note-monitor-success,
.note-monitor-average-duration {
    color: #8da2bd;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.note-monitor-success-number,
.note-monitor-average-duration-number {
    margin-left: 3px;
    font-size: 11px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.note-monitor-success-number {
    color: #34d399;
}
.note-monitor-average-duration-number {
    color: #fbbf24;
}
.comment-note-id-count {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 650;
    margin-left: 6px;
    white-space: nowrap;
}
.comment-note-id-count-number {
    color: #fbbf24;
    font-weight: 800;
    margin: 0 2px;
}
.eyebrow {
    display: none;
    color: #67e8f9;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}
.log-pane,
.note-pane,
.control-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.note-pane {
    position: relative;
}
.console-log {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px;
    background:
        linear-gradient(rgba(15,23,42,.35), rgba(15,23,42,.35)),
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(148,163,184,.045) 28px);
    color: #cbd5e1;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    user-select: text;
    outline: none;
}
.runtime-log-line {
    display: block;
    padding: 1px 0;
}
.runtime-log-status {
    display: inline-block;
    margin-right: 6px;
    border-radius: 4px;
    padding: 1px 4px;
    text-align: center;
    font-size: inherit;
    font-weight: 800;
    line-height: inherit;
}
.runtime-log-line.success .runtime-log-status {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}
.runtime-log-line.failed .runtime-log-status {
    background: rgba(248,113,113,.14);
    color: #f87171;
}
.runtime-log-line.failed .runtime-log-text {
    color: #fecaca;
}
.runtime-log-text {
    min-width: 0;
    color: #cbd5e1;
    word-break: break-word;
}
.console-log,
.note-table-wrap,
.control-pane,
.comment-note-items,
.comment-detail-list,
.monitor-link-textarea,
.monitor-config-textarea {
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 137, 178, .72) rgba(8, 15, 29, .34);
}
.console-log::-webkit-scrollbar,
.note-table-wrap::-webkit-scrollbar,
.control-pane::-webkit-scrollbar,
.comment-note-items::-webkit-scrollbar,
.comment-detail-list::-webkit-scrollbar,
.monitor-link-textarea::-webkit-scrollbar,
.monitor-config-textarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.console-log::-webkit-scrollbar-track,
.note-table-wrap::-webkit-scrollbar-track,
.control-pane::-webkit-scrollbar-track,
.comment-note-items::-webkit-scrollbar-track,
.comment-detail-list::-webkit-scrollbar-track,
.monitor-link-textarea::-webkit-scrollbar-track,
.monitor-config-textarea::-webkit-scrollbar-track {
    background: rgba(8, 15, 29, .34);
    border-radius: 999px;
}
.console-log::-webkit-scrollbar-thumb,
.note-table-wrap::-webkit-scrollbar-thumb,
.control-pane::-webkit-scrollbar-thumb,
.comment-note-items::-webkit-scrollbar-thumb,
.comment-detail-list::-webkit-scrollbar-thumb,
.monitor-link-textarea::-webkit-scrollbar-thumb,
.monitor-config-textarea::-webkit-scrollbar-thumb {
    min-width: 36px;
    min-height: 36px;
    background: rgba(109, 137, 178, .72);
    border: 2px solid rgba(8, 15, 29, .34);
    border-radius: 999px;
}
.console-log::-webkit-scrollbar-thumb:hover,
.note-table-wrap::-webkit-scrollbar-thumb:hover,
.control-pane::-webkit-scrollbar-thumb:hover,
.comment-note-items::-webkit-scrollbar-thumb:hover,
.comment-detail-list::-webkit-scrollbar-thumb:hover,
.monitor-link-textarea::-webkit-scrollbar-thumb:hover,
.monitor-config-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(125, 164, 216, .9);
}
.monitor-link-input-stats {
    align-self: flex-start;
    margin-top: -2px;
    color: #93a4ba;
    font-size: 12px;
    line-height: 1.4;
}
.monitor-link-input-stats b {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.monitor-note-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}
.monitor-check-card {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 70px;
    border: 1px solid rgba(148, 163, 184, .20);
    border-radius: 8px;
    padding: 12px;
    background: rgba(15, 23, 42, .66);
    color: #cbd5e1;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.monitor-check-card:hover {
    border-color: rgba(56, 189, 248, .38);
    background: rgba(15, 23, 42, .82);
}
.monitor-check-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.monitor-check-box {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, .46);
    border-radius: 6px;
    background: rgba(2, 6, 23, .54);
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, .62);
}
.monitor-check-box::after {
    content: "";
    width: 6px;
    height: 10px;
    margin-top: -2px;
    border: solid transparent;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(.72);
    opacity: 0;
    transition: opacity .16s ease, transform .16s ease, border-color .16s ease;
}
.monitor-check-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}
.monitor-check-title {
    color: #e5eefb;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}
.monitor-check-desc {
    color: #8da2bd;
    font-size: 12px;
    line-height: 1.35;
}
.monitor-check-card:has(.monitor-check-input:checked) {
    border-color: rgba(56, 189, 248, .66);
    background: linear-gradient(180deg, rgba(14, 165, 233, .16), rgba(37, 99, 235, .08));
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .18);
}
.monitor-check-input:checked + .monitor-check-box {
    border-color: rgba(56, 189, 248, .92);
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .14);
}
.monitor-check-input:checked + .monitor-check-box::after {
    border-color: #fff;
    opacity: 1;
    transform: rotate(45deg) scale(1);
}
.monitor-check-input:checked ~ .monitor-check-copy .monitor-check-title {
    color: #f8fafc;
}
.monitor-check-input:focus-visible + .monitor-check-box {
    outline: 2px solid rgba(125, 211, 252, .92);
    outline-offset: 3px;
}
.note-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.note-tools input {
    width: 280px;
    height: 28px;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 12px;
}
.icon-btn,
.config-btn {
    min-height: 26px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 4px;
    padding: 4px 9px;
    background: rgba(15,23,42,.72);
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 650;
}
.icon-btn:hover,
.config-btn:hover {
    border-color: rgba(56,189,248,.48);
    color: #e0f2fe;
}
.log-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.log-filter-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}
.log-filter-btn {
    min-height: 24px;
    border: 1px solid rgba(148,163,184,.20);
    border-radius: 4px;
    padding: 3px 7px;
    background: rgba(15,23,42,.64);
    color: #94a3b8;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}
.log-filter-btn:hover,
.log-filter-btn.active {
    border-color: rgba(56,189,248,.45);
    color: #e0f2fe;
    background: rgba(56,189,248,.12);
}
.note-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
.note-table-wrap.compact {
    max-height: 260px;
}
.console-table {
    min-width: 860px;
    font-size: 12px;
}
.monitor-notes-table {
    min-width: 920px;
    table-layout: fixed;
}
.monitor-notes-table .note-id-col { width: 178px; }
.monitor-notes-table .note-author-col { width: 96px; }
.monitor-notes-table .note-title-col { width: auto; }
.monitor-notes-table .note-publish-date-col { width: 58px; }
.monitor-notes-table .note-ip-col { width: 58px; }
.monitor-notes-table .note-like-col { width: 62px; }
.monitor-notes-table .note-comment-col { width: 72px; }
.monitor-notes-table .note-status-col { width: 104px; }
.monitor-notes-table .note-result-col { width: 76px; }
.monitor-notes-table .note-action-col { width: 112px; }
.monitor-notes-table .note-publish-date-cell { white-space: nowrap; }
.monitor-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    line-height: inherit;
    white-space: nowrap;
    cursor: pointer;
    vertical-align: baseline;
}
.monitor-sort-label {
    display: inline-block;
}
.monitor-sort-btn:hover,
.monitor-sort-btn.active {
    color: #7dd3fc;
    background: transparent;
}
.monitor-sort-btn:focus-visible {
    outline: 2px solid rgba(125, 211, 252, .82);
    outline-offset: 2px;
}
.monitor-sort-indicator {
    width: 9px;
    min-width: 9px;
    display: inline-block;
    color: #fbbf24;
    font-size: 11px;
    line-height: inherit;
    text-align: center;
}
.console-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(9, 15, 26, .96);
    color: #b6c4d7;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(148,163,184,.18);
    vertical-align: middle;
}
.console-table td {
    padding: 8px 10px;
    color: #dbe6f3;
    border-bottom: 1px solid rgba(148,163,184,.10);
}
.console-table tr:hover td {
    background: rgba(56,189,248,.055);
}
.mono-cell {
    font-family: "Cascadia Code", Consolas, monospace;
    color: #bfdbfe;
    white-space: nowrap;
}
.monitor-notes-table .mono-cell {
    width: 178px;
    max-width: 178px;
    overflow: hidden;
    text-overflow: clip;
}
.note-id-copy-cell {
    cursor: copy;
}
.note-id-copy-cell:hover {
    color: #e0f2fe;
    background: rgba(56,189,248,.08);
}
.title-cell {
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}
.note-text-kind {
    color: #67e8f9;
    font-weight: 750;
}
.monitor-notes-table .title-cell {
    max-width: none;
}
.note-row-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.mini-action-btn {
    min-height: 24px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 4px;
    padding: 3px 0;
    background: rgba(15,23,42,.72);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.mini-action-btn:hover {
    border-color: rgba(56,189,248,.48);
    color: #e0f2fe;
}
.mini-action-btn.note-start-btn {
    background: linear-gradient(95deg, #2563eb, #1d4ed8);
    border-color: rgba(96,165,250,.42);
    color: #fff;
}
.mini-action-btn.danger {
    background: rgba(239,68,68,.16);
    border-color: rgba(248,113,113,.34);
    color: #fecaca;
}
.empty-cell {
    text-align: center;
    color: var(--muted);
    padding: 36px 12px !important;
}
.control-pane {
    gap: 8px;
    overflow: auto;
    padding-bottom: 10px;
}
.link-import-card,
.filter-card,
.control-actions {
    margin: 0 6px;
}
.link-import-card {
    display: grid;
    gap: 8px;
    padding: 6px 0 0;
}
.monitor-frequency-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    align-items: center;
    gap: 6px;
    color: #d8e4f3;
    font-weight: 700;
}
.monitor-frequency-field input {
    height: 30px;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
    text-align: center;
}
.link-import-card label {
    color: #d8e4f3;
    font-weight: 700;
}
.import-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}
.import-row input,
.filter-form textarea,
.inline-input input {
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 12px;
}
.block-btn {
    width: 100%;
    min-height: 32px;
    border-radius: 4px;
}
.control-actions {
    display: grid;
    gap: 7px;
}
.monitor-countdown {
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(56,189,248,.22);
    border-radius: 4px;
    background: rgba(8, 16, 30, .72);
    color: #67e8f9;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
}
.control-actions .primary-btn,
.control-actions .ghost-btn {
    font-size: 14px;
}
.filter-card {
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 4px;
    background: rgba(15,23,42,.34);
}
.filter-form {
    display: grid;
    gap: 5px;
    padding: 7px;
}
.filter-row,
.inline-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    align-items: center;
    gap: 8px;
    color: #d7e2ef;
    font-size: 12px;
}
.filter-row span,
.inline-input span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.filter-config-action {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.filter-config-action .config-btn {
    width: 58px;
    padding-left: 0;
    padding-right: 0;
}
.param-count {
    min-width: 0;
    color: #8da2bd;
    font-style: normal;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.triple-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 32px;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(8px);
}
.modal-backdrop[hidden] {
    display: none;
}
.modal-card {
    width: min(720px, calc(100vw - 64px));
    max-height: calc(100vh - 80px);
    overflow: hidden;
    border: 1px solid rgba(56,189,248,.26);
    border-radius: 10px;
    background: #0b1424;
    box-shadow: 0 30px 70px rgba(0,0,0,.52);
}
.link-modal-card {
    width: min(1120px, calc(100vw - 64px));
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148,163,184,.18);
    background: rgba(15,23,42,.76);
}
.modal-head h2 {
    margin: 0;
    font-size: 16px;
}
.modal-form {
    display: grid;
    gap: 12px;
    padding: 14px;
}
.note-log-modal-card {
    width: min(920px, calc(100vw - 80px));
}
.note-log-modal-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}
.note-log-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-height: 28px;
    color: #9fb0c9;
    font-size: 13px;
}
.note-log-id-text {
    color: #dbeafe;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.note-log-rows {
    max-height: min(620px, calc(100vh - 210px));
    overflow: auto;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 8px;
    background: rgba(2,6,23,.28);
}
.note-log-summary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.note-log-summary-item {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(56,189,248,.22);
    border-radius: 999px;
    background: rgba(14,165,233,.11);
}
button.note-log-summary-item {
    cursor: pointer;
    font: inherit;
    color: inherit;
}
button.note-log-summary-item:hover,
button.note-log-summary-item.active {
    border-color: rgba(56,189,248,.72);
    background: rgba(14,165,233,.24);
}
.note-log-summary-item span {
    color: #93c5fd;
    font-size: 12px;
}
.note-log-summary-item b {
    color: #e5efff;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}
.note-log-row {
    display: grid;
    grid-template-columns: 150px 190px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148,163,184,.12);
    font-size: 12px;
}
.note-log-row:last-child {
    border-bottom: 0;
}
.note-log-time {
    color: #bfdbfe;
    white-space: nowrap;
}
.note-log-event-wrap {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.note-log-event {
    justify-self: start;
    align-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid rgba(103, 232, 249, .32);
    border-radius: 8px;
    padding: 3px 10px;
    background: rgba(14, 165, 233, .14);
    color: #67e8f9;
    font-weight: 750;
    line-height: 1.25;
    white-space: nowrap;
}
.note-log-duration-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 4px;
    background: rgba(15, 23, 42, .42);
    color: #dbeafe;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.note-log-event-monitor-start {
    border-color: rgba(45, 212, 191, .34);
    background: rgba(20, 184, 166, .16);
    color: #5eead4;
}
.note-log-event-monitor-tick {
    border-color: rgba(251, 191, 36, .38);
    background: rgba(245, 158, 11, .15);
    color: #fbbf24;
}
.note-log-event-offer {
    border-color: rgba(56, 189, 248, .36);
    background: rgba(14, 165, 233, .16);
    color: #7dd3fc;
}
.note-log-event-ack {
    border-color: rgba(167, 139, 250, .38);
    background: rgba(124, 58, 237, .16);
    color: #c4b5fd;
}
.note-log-event-complete {
    border-color: rgba(74, 222, 128, .36);
    background: rgba(34, 197, 94, .15);
    color: #86efac;
}
.note-log-event-fail,
.note-log-event-ack-timeout,
.note-log-event-task-timeout {
    border-color: rgba(248, 113, 113, .40);
    background: rgba(239, 68, 68, .15);
    color: #fca5a5;
}
.note-log-event-worker-event {
    border-color: rgba(148, 163, 184, .34);
    background: rgba(100, 116, 139, .18);
    color: #cbd5e1;
}
.note-log-detail {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--muted);
}
.note-log-detail span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.note-log-detail p {
    flex-basis: 100%;
    margin: 4px 0 0;
    color: #dbe6f3;
    word-break: break-word;
}
.note-log-comment-count-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-right: 6px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
    vertical-align: middle;
}
.note-log-comment-count-badge.update {
    color: #86efac;
    background: rgba(34,197,94,.14);
    border: 1px solid rgba(34,197,94,.42);
}
.secondary-comment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-right: 6px;
    padding: 2px 8px;
    border-radius: 6px;
    color: #86efac;
    background: rgba(34,197,94,.14);
    border: 1px solid rgba(34,197,94,.42);
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
    vertical-align: middle;
}
.note-log-comment-count-badge.rollback {
    color: #fca5a5;
    background: rgba(248,113,113,.14);
    border: 1px solid rgba(248,113,113,.45);
}
.link-textarea,
.config-textarea {
    min-height: 260px;
    width: 100%;
    resize: vertical;
    border-radius: 6px;
    font-family: "Cascadia Code", Consolas, monospace;
    white-space: pre;
    overflow-x: auto;
    overflow-wrap: normal;
}
.link-textarea {
    min-height: 340px;
}
.other-feature-panel {
    display: grid;
    gap: 16px;
}
.other-feature-control-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
}
.other-feature-field {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    border: 1px solid rgba(95, 133, 185, .35);
    background: rgba(11, 20, 38, .34);
}
.other-feature-field-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.other-feature-field label {
    align-items: stretch;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
}
.other-feature-cleaning-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(95, 133, 185, .35);
    border-radius: 10px;
    background: rgba(11, 20, 38, .34);
}
.other-feature-cleaning-control p {
    margin: 4px 0 0;
}
.other-feature-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.other-feature-actions-centered {
    justify-content: center;
}
.other-feature-priority-control {
    grid-column: 1 / -1;
    align-items: flex-end;
    flex-direction: row;
}
.other-feature-priority-copy {
    flex: 1 1 auto;
    min-width: 0;
}
.other-feature-priority-help {
    margin: 5px 0 12px;
}
.other-feature-priority-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
}
.ghost-btn.danger {
    border-color: rgba(248, 113, 113, .45);
    color: #fecaca;
}
.ghost-btn:disabled,
.primary-btn:disabled {
    opacity: .48;
    cursor: not-allowed;
}
@media (max-width: 760px) {
    .other-feature-field,
    .other-feature-cleaning-control {
        min-width: 0;
    }
    .other-feature-cleaning-control {
        align-items: flex-start;
        flex-direction: column;
    }
    .other-feature-priority-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .other-feature-field-inputs {
        grid-template-columns: 1fr;
    }
    .other-feature-actions {
        justify-content: flex-start;
    }
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.triple-actions .primary-btn,
.triple-actions .ghost-btn {
    min-height: 32px;
    padding: 6px 7px;
    border-radius: 8px;
    font-size: 12px;
}
.comment-note-list,
.comment-detail-pane {
    min-width: 0;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(15,23,42,.42);
    overflow: hidden;
}
.comment-detail-pane {
    display: flex;
    flex-direction: column;
}
.comment-note-list-title {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}
.comment-detail-head input,
.comment-detail-head select {
    width: min(360px, 42vw);
    height: 34px;
    border-radius: 9px;
    font-size: 12px;
}
.comment-detail-filters input,
.comment-detail-filters select {
    width: 100%;
}
.comment-detail-filters select {
    min-width: 170px;
    padding-left: 11px;
    padding-right: 36px;
    color: #f8fafc;
    font-weight: 750;
    text-shadow: 0 0 0 #f8fafc;
}
.comment-note-item:hover,
.comment-note-item.active {
    border-color: rgba(56,189,248,.34);
    background: rgba(56,189,248,.10);
}
.comment-note-item em {
    min-width: 0;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comment-note-metrics,
.comment-detail-metrics {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}
.comment-detail-main {
    min-width: 0;
}
.comment-image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.comment-image-preview-btn {
    display: block;
    width: 96px;
    height: 96px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(15,23,42,.72);
    padding: 0;
    cursor: zoom-in;
}
.comment-image-preview-btn[hidden] {
    display: none;
}
.comment-image-preview-btn img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.comment-image-preview-btn:hover {
    border-color: rgba(56,189,248,.58);
}
.comment-image-preview-modal {
    background: rgba(2,6,23,.84);
}
.comment-image-preview-card {
    position: relative;
    width: min(92vw, 980px);
    max-height: 90vh;
    display: grid;
    place-items: center;
    padding: 44px 16px 16px;
    background: rgba(15,23,42,.96);
}
.comment-image-preview-card img {
    max-width: 100%;
    max-height: calc(90vh - 72px);
    display: block;
    object-fit: contain;
    border-radius: 6px;
}
.comment-image-preview-close {
    position: absolute;
    top: 10px;
    right: 12px;
}
.comment-copy-red-btn:hover {
    border-color: rgba(125,211,252,.48);
    background: rgba(14,165,233,.16);
    color: #dbeafe;
}
.comment-copy-red-btn:disabled {
    cursor: default;
    opacity: .72;
}
.comment-detail-main p {
    margin: 7px 0 0;
    color: #dbe6f3;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.search-task-card {
    padding: 18px;
    border-color: rgba(56,189,248,.16);
    background: linear-gradient(180deg, rgba(15,23,42,.84), rgba(10,16,30,.88));
}
.search-task-card .page-header {
    min-height: 42px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.search-task-card .page-header h1 {
    font-size: 24px;
}
.search-task-shell {
    display: grid;
    grid-template-columns: minmax(360px, .95fr) minmax(0, 1.25fr);
    gap: 14px;
    align-items: start;
}
.search-task-form {
    display: grid;
    gap: 14px;
}
.search-task-section {
    min-width: 0;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 16px;
    background: rgba(15,23,42,.54);
    overflow: hidden;
}
.keyword-section {
    min-height: 300px;
}
.search-task-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148,163,184,.12);
    background: rgba(10,17,32,.68);
}
.search-task-section-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 17px;
}
.search-task-section-head p {
    margin: 5px 0 0;
    font-size: 12px;
}
.search-keyword-count {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(56,189,248,.20);
    border-radius: 999px;
    padding: 3px 10px;
    background: rgba(56,189,248,.08);
    color: #9fb2c8;
    font-size: 12px;
    white-space: nowrap;
}
.search-keyword-count b {
    margin: 0 3px;
    color: #7dd3fc;
}
.search-keyword-textarea {
    display: block;
    width: calc(100% - 28px);
    min-height: 210px;
    margin: 14px;
    border-color: rgba(96,165,250,.18);
    border-radius: 12px;
    background: rgba(2,6,23,.28);
    font-family: "Cascadia Code", Consolas, monospace;
    line-height: 1.65;
}
.search-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}
.search-filter-grid label {
    min-width: 0;
    color: #b9c7d9;
    font-weight: 700;
}
.search-filter-grid input,
.search-filter-grid select {
    height: 38px;
    border-color: rgba(96,165,250,.18);
    border-radius: 10px;
    background: rgba(2,6,23,.28);
    font-size: 13px;
}
.strategy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.search-task-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 14px 14px;
}
.search-task-actions .primary-btn,
.search-task-actions .ghost-btn {
    min-height: 38px;
    border-radius: 10px;
}
.search-task-message {
    min-height: 22px;
    margin: 0 14px 14px;
    color: #8da2bd;
    font-size: 13px;
}
.search-task-message.success {
    color: #86efac;
}
.search-task-message.error {
    color: #fca5a5;
}
.search-task-message.loading {
    color: #93c5fd;
}
.search-task-history {
    align-self: stretch;
}
.search-task-table-wrap {
    max-height: calc(100vh - 238px);
    border: 0;
    border-radius: 0 0 16px 16px;
}
.search-task-table {
    min-width: 900px;
    font-size: 12px;
}
.search-task-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    background: #101827;
    color: #92a0b5;
}
.search-task-table td {
    padding: 12px;
    color: #c7d2e2;
}
.search-task-table tbody tr:nth-child(even) td {
    background: rgba(15,23,42,.24);
}
.search-task-table tbody tr:hover td {
    background: rgba(56,189,248,.07);
}
.search-filter-summary {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.comment-page-card {
    height: calc(100vh - 28px);
    overflow: hidden;
    padding: 14px;
    border-color: rgba(56,189,248,.16);
    background: linear-gradient(180deg, rgba(15,23,42,.84), rgba(10,16,30,.88));
}
.comment-page-card .page-header {
    min-height: 42px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.comment-page-card .page-header h1 {
    font-size: 24px;
}
.comment-page-card .page-header .muted {
    font-size: 13px;
}
.comment-detail-shell {display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 14px;
    min-height: calc(100vh - 150px);
grid-template-columns: 318px minmax(0, 1fr);
    gap: 16px;
    height: 100%;
    min-height: 0;}
.comment-note-list,
.comment-detail-pane {
    min-height: 0;
    border-color: rgba(148,163,184,.14);
    border-radius: 16px;
    background: rgba(15,23,42,.56);
}
.comment-note-list {
    display: flex;
    flex-direction: column;
}
.comment-detail-head {min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(15,23,42,.58);
min-height: 68px;
    padding: 14px 16px;
    border-bottom-color: rgba(148,163,184,.12);
    background: rgba(10,17,32,.72);}
.comment-detail-head h2 {margin: 0;
    font-size: 17px;
color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;}
.comment-note-list-title h2 {
    margin: 0;
}
.comment-detail-note-count {color: #94a3b8;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
min-height: 22px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(56,189,248,.18);
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(56,189,248,.07);
    color: #9fb2c8;
    font-size: 12px;}
.comment-detail-note-count-number {color: #fbbf24;
    font-size: 11px;
    font-weight: 800;
    margin: 0 2px;
color: #7dd3fc;
    font-size: 13px;}
.comment-detail-title-note {display: inline-block;
    margin-right: 12px;
display: block;
    max-width: min(640px, 50vw);
    overflow: hidden;
    color: #f8fafc;
    text-overflow: ellipsis;
    white-space: nowrap;}
.comment-detail-title-time {display: inline-block;
    color: #dbe6f3;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
display: inline-flex;
    min-height: 22px;
    align-items: center;
    margin-top: 6px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(15,23,42,.66);
    color: #9fb2c8;
    font-size: 12px;
    font-weight: 650;}
.comment-detail-head p {margin: 4px 0 0;
    font-size: 12px;
max-width: 780px;
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.45;}
.comment-detail-note-summary {
    display: block;
    max-width: 760px;
    overflow: hidden;
    color: #a9b7ca;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.comment-detail-filters {display: grid;
    grid-template-columns: minmax(210px, 1.25fr) minmax(150px, .75fr) 160px 126px 126px;
    gap: 8px;
    align-items: center;
    width: min(100%, 1120px);
grid-template-columns: minmax(240px, 1.4fr) minmax(160px, .8fr) 160px 122px 122px;
    gap: 9px;}
.comment-detail-head input,
.comment-detail-head select {
    height: 38px;
    border-color: rgba(96,165,250,.20);
    border-radius: 10px;
    background: rgba(2,6,23,.28);
    font-size: 13px;
}
.comment-export-btn {min-height: 34px;
    border-radius: 9px;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
min-height: 38px;
    border-color: rgba(96,165,250,.22);
    border-radius: 10px;
    color: #c7d2e2;
    font-size: 12px;}
.comment-export-btn:hover {
    border-color: rgba(56,189,248,.44);
    background: rgba(56,189,248,.10);
    color: #e0f2fe;
}
.comment-export-mode-card {
    width: min(460px, calc(100vw - 32px));
}
.comment-export-mode-body {
    display: grid;
    gap: 12px;
    padding: 16px 18px 18px;
}
.comment-export-mode-body > p {
    margin: 0;
    line-height: 1.5;
}
.comment-export-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 10px;
    background: rgba(15,23,42,.54);
    cursor: pointer;
}
.comment-export-option:has(input:checked) {
    border-color: rgba(56,189,248,.52);
    background: rgba(14,116,144,.16);
}
.comment-export-option input {
    margin-top: 3px;
    accent-color: #38bdf8;
}
.comment-export-option span {
    display: grid;
    gap: 3px;
}
.comment-export-option b {
    color: #e5edf7;
    font-size: 13px;
}
.comment-export-option small {
    color: #8fa2ba;
    font-size: 11px;
}
.comment-export-mode-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}
.comment-note-search-wrap {padding: 8px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(15,23,42,.36);
padding: 10px;
    border-bottom-color: rgba(148,163,184,.12);
    background: rgba(2,6,23,.18);}
.comment-note-search-wrap input {width: 100%;
    height: 32px;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
height: 36px;
    border-color: rgba(96,165,250,.18);
    border-radius: 10px;
    background: rgba(2,6,23,.30);
    font-size: 13px;}
.comment-note-items {max-height: calc(100vh - 252px);
    overflow: auto;
    padding: 8px;
flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 10px;}
.comment-note-item {width: 100%;
    display: grid;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px;
    background: transparent;
    color: #dbeafe;
    text-align: left;
    cursor: pointer;
gap: 8px;
    border-color: rgba(148,163,184,.10);
    border-radius: 12px;
    padding: 12px;
    background: rgba(2,6,23,.16);
    transition: border-color .16s ease, background .16s ease, transform .16s ease;}
.comment-note-item:hover {
    border-color: rgba(96,165,250,.28);
    background: rgba(56,189,248,.07);
}
.comment-note-item.active {
    border-color: rgba(56,189,248,.48);
    background: linear-gradient(180deg, rgba(56,189,248,.13), rgba(37,99,235,.09));
    box-shadow: inset 3px 0 0 rgba(56,189,248,.78);
}
.comment-note-item-top {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.comment-note-id {
    max-width: 100%;
    overflow: hidden;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
}
.comment-note-published {min-width: 0;
    color: #8da2bd;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
color: #7f8da3;
    font-size: 12px;}
.comment-note-text {
    color: #a9b7ca;
    font-size: 12px;
    line-height: 1.45;
}
.comment-note-metrics,
.comment-detail-metrics {
    gap: 6px;
}
.comment-count-pill {display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 4px;
    padding: 2px 6px;
    background: rgba(15,23,42,.44);
    color: #8da2bd;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
min-height: 23px;
    border-color: rgba(148,163,184,.14);
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(2,6,23,.22);
    color: #9aa8bb;
    font-size: 12px;}
.comment-count-pill b {color: #dbeafe;
    font-weight: 800;
color: #e0f2fe;
    font-size: 12px;}
.comment-count-pill.strong {border-color: rgba(56,189,248,.24);
    background: rgba(56,189,248,.08);
    color: #9ed7ef;
border-color: rgba(34,211,238,.24);
    background: rgba(34,211,238,.08);
    color: #9ed7ef;}
.comment-note-view-btn {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(96,165,250,.28);
    border-radius: 999px;
    padding: 3px 9px;
    background: rgba(37,99,235,.18);
    color: #bfdbfe;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
}
.comment-note-view-btn:hover {
    border-color: rgba(56,189,248,.48);
    background: rgba(56,189,248,.12);
    color: #e0f2fe;
}
.note-qr-modal-card {
    width: min(360px, calc(100vw - 40px));
}
.note-qr-close {
    min-height: 32px;
    border-radius: 9px;
    padding: 6px 11px;
    font-size: 12px;
}
.note-qr-body {
    display: grid;
    gap: 14px;
    padding: 16px;
}
.note-qr-code-wrap {
    display: grid;
    place-items: center;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 14px;
    padding: 14px;
    background: rgba(248,250,252,.05);
}
.note-qr-code-wrap img {
    width: 220px;
    height: 220px;
    display: block;
    border-radius: 8px;
    background: #fff;
}
.note-qr-info {
    display: grid;
    gap: 8px;
}
.note-qr-info span {
    color: #8fa2ba;
    font-size: 12px;
}
.note-qr-info a {
    overflow-wrap: anywhere;
    color: #dbeafe;
    font-size: 12px;
    line-height: 1.45;
    text-decoration: none;
}
.note-qr-copy {
    min-height: 34px;
    border-radius: 10px;
    font-size: 12px;
}
.comment-detail-metrics {margin-top: 7px;
margin-top: 9px;}
.comment-detail-metrics .comment-count-pill {min-height: 24px;
    padding: 4px 8px;
    font-size: 12px;
min-height: 24px;
    padding: 3px 9px;
    font-size: 12px;}
.comment-detail-list {flex: 1;
    min-height: 0;
    max-height: calc(100vh - 210px);
    overflow: auto;
    padding: 10px;
max-height: none;
    padding: 8px;
    background: rgba(2,6,23,.12);}
.comment-detail-row {display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid rgba(148,163,184,.12);
grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 6px;
    border: 1px solid rgba(148,163,184,.10);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(15,23,42,.52);}
.comment-detail-row:last-child {
    margin-bottom: 0;
}
.comment-detail-row:hover {background: rgba(56,189,248,.055);
border-color: rgba(56,189,248,.22);
    background: rgba(15,23,42,.72);}
.comment-detail-identity {display: grid;
    grid-template-columns: auto 40px;
    align-items: start;
    gap: 8px;
display: grid;
    grid-template-columns: auto 34px;
    align-items: start;
    gap: 8px;}
.comment-detail-identity .secondary-comment-badge {min-width: 36px;
    margin-right: 0;
    justify-content: center;
min-width: 36px;
    margin-right: 0;
    justify-content: center;}
.comment-avatar {width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(15,23,42,.82);
width: 34px;
    height: 34px;
    border-color: rgba(96,165,250,.22);}
.comment-avatar.fallback {display: grid;
    place-items: center;
    color: #67e8f9;
    font-weight: 800;
color: #e0f2fe;
    font-size: 13px;}
.comment-user-line {display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
min-height: 18px;
    gap: 6px;}
.comment-user-line strong {color: #f8fafc;
    font-size: 14px;
color: #f8fafc;
    font-size: 13px;
    font-weight: 800;}
.comment-detail-main p.comment-content {
    margin-top: 4px;
    color: #dbe6f3;
    font-size: 13px;
    line-height: 1.5;
}
.comment-meta-line {display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
display: grid;
    grid-template-columns: minmax(110px, 140px) 186px 186px minmax(150px, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    color: #8da2bd;
    font-size: 11px;}
.comment-meta-line > span {
    min-width: 0;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    padding: 0;
}
.comment-meta-cell {
    overflow: hidden;
    white-space: nowrap;
}
.comment-meta-ip,
.comment-meta-time,
.comment-meta-collected-time {
    justify-content: flex-start;
    text-overflow: ellipsis;
}
.comment-meta-red-id {
    justify-content: flex-start;
}
.comment-red-id {display: inline-flex;
    align-items: center;
    gap: 5px;
gap: 6px;}
.comment-red-id b {color: #cbd5e1;
    font-weight: 700;
min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #dbeafe;
    font-weight: 800;}
.comment-copy-red-btn {min-height: 20px;
    padding: 1px 6px;
    border: 1px solid rgba(96,165,250,.28);
    border-radius: 4px;
    background: rgba(37,99,235,.12);
    color: #93c5fd;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
min-height: 18px;
    border-color: rgba(96,165,250,.26);
    border-radius: 999px;
    padding: 1px 7px;
    background: rgba(37,99,235,.18);
    font-size: 11px;}
.xhs-emoji {display: inline-block;
    margin: 0 1px;
    font-size: 1.18em;
    line-height: 1;
    vertical-align: -0.12em;
font-size: 1.12em;
    vertical-align: -0.08em;}
@media (max-width: 1320px) {
    .search-task-shell {
        grid-template-columns: 1fr;
    }
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
    .realtime-comment-top {
        align-items: stretch;
        flex-direction: column;
    }
    .realtime-comment-filter {
        justify-content: flex-start;
    }
    .realtime-rule-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .realtime-comment-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .users-create-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .users-create-username {
        grid-column: 1 / -1;
    }
    .users-create-form .primary-btn {
        grid-column: 1 / -1;
    }
    .console-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .console-worker-summary,
    .script-param-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .console-queue-cards {
        grid-template-columns: 1fr;
    }
    .console-workbench {
        grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) 260px;
        height: auto;
    }
    .control-pane {
        grid-column: auto;
        display: flex;
    }
    .control-pane > .console-panel-head {
        grid-column: auto;
    }
}
@media (max-width: 900px) {
    .dashboard-content-card {
        padding: 16px;
    }
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
    .dashboard-task-stat-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-section-head {
        align-items: stretch;
        flex-direction: column;
    }
    .dashboard-chart-panel {
        padding: 16px 12px 14px;
    }
    .dashboard-trend-chart {
        grid-template-columns: 28px minmax(0, 1fr);
    }
    .dashboard-trend-items {
        gap: 8px;
    }
    .dashboard-trend-bar {
        width: min(58px, 80%);
    }
    .dashboard-trend-value,
    .dashboard-trend-label {
        font-size: 11px;
    }
    .dashboard-trend-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    .realtime-comment-card {
        height: auto;
        min-height: calc(100vh - 24px);
        overflow: visible;
        padding: 16px;
    }
    .realtime-comment-shell {
        height: auto;
    }
    .realtime-comment-filter {
        align-items: stretch;
        flex-direction: column;
    }
    .realtime-comment-filter,
    .realtime-rule-grid {
        flex: 0 0 auto;
    }
    .realtime-rule-editor {
        grid-template-rows: auto auto;
        flex: 0 0 auto;
    }
    .realtime-rule-editor textarea {
        height: auto;
    }
    .realtime-comment-filter label {
        width: 100%;
    }
    .realtime-comment-filter-row {
        align-items: stretch;
        flex-direction: column;
    }
    .realtime-rule-grid {
        grid-template-columns: 1fr;
    }
    .realtime-rule-card-head {
        grid-template-columns: minmax(0, 1fr) 64px;
    }
    .realtime-comment-metrics {
        grid-template-columns: 1fr;
    }
    .realtime-comment-table-wrap {
        max-height: none;
    }
    .users-admin-card {
        padding: 18px 16px;
    }
    .users-admin-head,
    .users-list-head {
        align-items: stretch;
        flex-direction: column;
    }
    .users-admin-stats {
        justify-content: flex-start;
    }
    .users-create-form {
        grid-template-columns: 1fr;
    }
    .users-create-username,
    .users-create-form .primary-btn {
        grid-column: auto;
    }
    .users-search-input {
        width: 100%;
    }
    .search-task-card {
        padding: 16px;
    }
    .search-filter-grid,
    .strategy-grid {
        grid-template-columns: 1fr;
    }
    .search-task-section-head,
    .search-task-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .search-task-table-wrap {
        max-height: none;
    }
    .console-content-card {
        padding: 16px;
    }
    .console-metrics {
        grid-template-columns: 1fr;
    }
    .console-worker-summary,
    .script-param-grid {
        grid-template-columns: 1fr;
    }
    .script-params-toolbar,
    .script-params-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .console-section-head {
        align-items: stretch;
        flex-direction: column;
    }
    .console-record-tools {
        justify-content: flex-start;
    }
    .console-search-input {
        width: 100%;
    }
    .console-table-wrap {
        max-height: none;
    }
    .comment-detail-shell {
        grid-template-columns: 1fr;
    }
    .comment-note-items,
    .comment-detail-list {
        max-height: none;
    }
    .comment-detail-head {
        align-items: stretch;
        flex-direction: column;
    }
    .comment-detail-head input,
    .comment-detail-head select,
    .comment-detail-filters {
        width: 100%;
    }
    .comment-detail-filters {
        grid-template-columns: 1fr;
    }
    .comment-meta-line {
        grid-template-columns: 1fr;
    }
    .comment-meta-time,
    .comment-meta-red-id {
        max-width: 100%;
    }
    .monitor-content-card {
        height: auto;
        min-height: calc(100vh - 24px);
        overflow: visible;
    }
    .console-workbench {
        grid-template-columns: 1fr;
        min-height: 0;
        height: auto;
    }
    .console-log {
        min-height: 260px;
    }
    .control-pane {
        display: flex;
    }
    .note-tools {
        width: 100%;
        flex-wrap: wrap;
    }
    .note-tools input {
        width: 100%;
    }
}
@media (pointer: coarse) {
    .realtime-comment-card {
        height: auto;
        min-height: calc(100vh - 24px);
        overflow: visible;
    }
    .realtime-comment-shell {
        height: auto;
        min-height: 0;
    }
    .realtime-comment-table-wrap {
        height: min(62vh, 720px);
        min-height: 260px;
        max-height: calc(100vh - 280px);
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        overscroll-behavior: contain;
    }
}
@media (max-width: 1200px) {
    .realtime-comment-table-wrap {
        overflow-x: scroll;
    }
}
.realtime-task-shell{display:flex;flex-direction:column;gap:12px}
.realtime-task-form{padding:16px;border:1px solid rgba(148,163,184,.16);border-radius:20px;background:rgba(9,17,35,.45)}
.realtime-task-form-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;min-height:64px;margin-top:16px;padding-top:16px;border-top:1px solid rgba(148,163,184,.14)}
.realtime-task-config-scroll{max-width:100%;overflow:visible}
.realtime-task-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:16px}
.realtime-task-column{display:grid;align-content:start;gap:16px;min-width:0}
.realtime-task-column.is-single{display:flex}
.realtime-task-column.is-single>.realtime-task-panel{width:100%;height:100%}
.realtime-task-panel{min-width:0;padding:20px;border:1px solid rgba(148,163,184,.16);border-radius:18px;background:rgba(9,17,35,.72)}
.realtime-task-panel[data-task-type="text_message"]{display:flex;flex-direction:column}
.realtime-task-panel[data-task-type="text_message"] .realtime-task-text-field{flex:1;grid-template-rows:auto minmax(160px,1fr) auto}
.realtime-task-panel[data-task-type="text_message"] .realtime-task-text-field textarea{height:100%;min-height:160px;resize:vertical}
.realtime-task-panel-head{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:16px}
.realtime-task-panel-head h2{margin:0;white-space:nowrap}
.realtime-task-panel-head>.realtime-task-toggle{margin-left:auto}
.realtime-task-toggle{position:relative;min-height:44px;display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;color:#aebbd0;font-size:13px;cursor:pointer;touch-action:manipulation}
.realtime-task-toggle-input{position:absolute;width:1px;height:1px;margin:0;opacity:0}
.realtime-task-toggle-label{line-height:1}
.realtime-task-toggle-track{position:relative;width:34px;height:20px;flex:0 0 auto;border:1px solid #3a4b68;border-radius:999px;background:#263653;transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
.realtime-task-toggle-thumb{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#d5deeb;box-shadow:0 2px 6px rgba(0,0,0,.35);transition:transform .18s ease,background-color .18s ease}
.realtime-task-toggle:hover .realtime-task-toggle-track{border-color:#6b87ad}
.realtime-task-toggle-input:checked~.realtime-task-toggle-track{border-color:#55c7ff;background:#1687d9;box-shadow:0 0 0 3px rgba(85,199,255,.11)}
.realtime-task-toggle-input:checked~.realtime-task-toggle-track .realtime-task-toggle-thumb{transform:translateX(14px);background:#fff}
.realtime-task-toggle-input:focus-visible~.realtime-task-toggle-track{outline:2px solid rgba(125,211,252,.95);outline-offset:3px}
@media (prefers-reduced-motion:reduce){.realtime-task-toggle-track,.realtime-task-toggle-thumb{transition:none}}
.realtime-task-field,.realtime-task-fields{display:grid;gap:10px}
.realtime-task-fields{gap:14px}
.realtime-task-field+.realtime-task-field{margin-top:14px}
.realtime-task-field-hint{color:var(--muted);font-size:12px}
.realtime-task-weight-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.realtime-task-weight-row label{display:flex;align-items:center;gap:8px;font-size:13px;white-space:nowrap}
.realtime-task-weight-row input[type="number"]{width:100px;min-width:0;padding:8px 10px}
.realtime-card-cover-heading{display:flex;align-items:baseline;gap:12px}
.realtime-card-cover-box{position:relative;display:grid;place-items:center;width:140px;max-width:100%;aspect-ratio:1;overflow:hidden;border:1px dashed var(--muted);border-radius:12px;background:rgba(255,255,255,.025);cursor:pointer;transition:border-color .15s,background .15s}
.realtime-card-cover-box:hover,.realtime-card-cover-box:focus-within{border-color:#38bdf8;background:rgba(56,189,248,.07)}
.realtime-card-cover-box:focus-within{outline:2px solid #38bdf8;outline-offset:3px}
.realtime-card-cover-box input[type="file"]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;z-index:1}
.realtime-card-cover-box input:disabled{cursor:wait}
.realtime-card-cover-plus{font-size:42px;font-weight:300;line-height:1;color:var(--muted);pointer-events:none}
.realtime-card-cover-box img{width:100%;height:100%;position:absolute;inset:0;object-fit:contain;pointer-events:none}
.realtime-card-cover [hidden]{display:none!important}
.realtime-card-cover-remove{justify-self:start;color:#f87171}
.realtime-task-link-row{display:flex;align-items:center;gap:10px;margin-top:16px;min-width:0}
.realtime-task-link-row code{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.realtime-task-link-row .realtime-task-copy{flex:0 0 auto}
@media (max-width:1200px) and (min-width:641px){.realtime-task-config-scroll{overflow-x:auto;padding-bottom:8px}.realtime-task-grid{min-width:1020px}}
@media (max-width:640px){.realtime-task-config-scroll{overflow:visible}.realtime-task-grid{grid-template-columns:1fr;min-width:0;align-items:start}.realtime-task-column.is-single{display:grid}.realtime-task-column.is-single>.realtime-task-panel{height:auto}}
.realtime-task-section-head{display:flex;align-items:center;justify-content:flex-end;gap:16px}
.realtime-task-section-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.realtime-task-dispatch-control{display:flex;align-items:center;grid-auto-flow:column;gap:8px;color:var(--muted);font-size:13px;white-space:nowrap}
.realtime-task-dispatch-control select{min-width:132px;height:36px;padding:0 30px 0 10px;border:1px solid #2b3b5b;border-radius:9px;background:#0e1930;color:#e8eef8;font:inherit}
.realtime-task-dispatch-control select:disabled{opacity:.6;cursor:wait}
.realtime-task-section-head h2{margin:0;color:#f4f7ff}
.realtime-task-eyebrow{color:#55c7ff;font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.realtime-task-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.realtime-task-stat{padding:14px 16px;border:1px solid rgba(148,163,184,.18);border-radius:16px;background:linear-gradient(145deg,rgba(25,39,67,.88),rgba(12,20,39,.88));box-shadow:0 10px 28px rgba(2,8,23,.16)}
.realtime-task-stat span{display:block;color:#93a4bd;font-size:13px}.realtime-task-stat strong{display:block;margin-top:6px;color:#f8fbff;font-size:24px;line-height:1;font-variant-numeric:tabular-nums}.realtime-task-stat.is-active{border-color:rgba(85,199,255,.42)}.realtime-task-stat.is-success{border-color:rgba(52,211,153,.35)}.realtime-task-stat.is-danger{border-color:rgba(248,113,113,.35)}
.realtime-task-tabs{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;column-gap:22px;margin:0;border-bottom:1px solid rgba(148,163,184,.16);overflow:hidden}
.realtime-task-tab{position:relative;min-height:44px;padding:0 4px;border:0;background:transparent;color:#9cacbf;font:inherit;font-weight:700;cursor:pointer;white-space:nowrap}
.realtime-task-tab::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;border-radius:999px;background:transparent}
.realtime-task-tab[aria-selected="true"]{color:#55c7ff}
.realtime-task-tab[aria-selected="true"]::after{background:#3b82f6}
.realtime-task-tab:focus-visible{outline:2px solid rgba(125,211,252,.92);outline-offset:-6px}
[data-realtime-task-tab-panel][hidden]{display:none!important}
.realtime-task-history{padding:20px;border:1px solid rgba(148,163,184,.16);border-radius:20px;background:rgba(9,17,35,.72)}
.realtime-task-count{color:#8fa0b8;font-size:13px}
.realtime-task-filters{display:grid;grid-template-columns:minmax(180px,1.4fr) repeat(2,minmax(150px,1fr)) auto;align-items:end;gap:12px;margin:22px 0 16px}.realtime-task-filters label{display:grid;gap:7px;color:#9cacbf;font-size:12px}.realtime-task-filters input,.realtime-task-filters select{min-height:44px;padding:0 12px;border:1px solid #2b3b5b;border-radius:10px;background:#0e1930;color:#e8eef8;font:inherit}.realtime-task-filters button{min-height:44px}
.realtime-task-history .realtime-task-filters{margin:12px 0}
.realtime-task-table-wrap{overflow-x:auto;border:1px solid rgba(148,163,184,.14);border-radius:14px}.realtime-task-table{width:100%;min-width:850px;border-collapse:collapse;font-size:13px}.realtime-task-table th{padding:13px 14px;text-align:left;color:#8da1bc;background:#101d36;font-weight:600;white-space:nowrap}.realtime-task-table td{padding:14px;border-top:1px solid rgba(148,163,184,.1);color:#dbe5f3;vertical-align:middle}.realtime-task-table code{color:#9edfff;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.realtime-task-event-badge{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border-radius:999px;font-size:12px;font-weight:600}.realtime-task-event-badge.is-pulled{background:rgba(85,199,255,.14);color:#74d4ff}.realtime-task-event-badge.is-reported{background:rgba(167,139,250,.15);color:#c4b5fd}.realtime-task-error-cell{max-width:240px;color:#fda4af!important}.realtime-task-time{white-space:nowrap;color:#9cacbf!important;font-variant-numeric:tabular-nums}.realtime-task-empty-state{padding:36px;text-align:center;color:#8fa0b8;border:1px dashed rgba(148,163,184,.22);border-radius:12px}
@media (max-width:800px){.realtime-task-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.realtime-task-filters{grid-template-columns:1fr 1fr}.realtime-task-filters>label:first-child{grid-column:1/-1}.realtime-task-filters button{width:100%}}
@media (max-width:520px){.realtime-task-history{padding:16px}.realtime-task-section-head{align-items:flex-start;flex-direction:column}.realtime-task-section-actions{width:100%;justify-content:space-between}.realtime-task-dispatch-control{width:auto;justify-content:space-between}.realtime-task-filters{grid-template-columns:1fr}.realtime-task-filters>label:first-child{grid-column:auto}}
.realtime-task-jobs{padding:24px;border:1px solid rgba(148,163,184,.16);border-radius:20px;background:rgba(9,17,35,.72)}
.realtime-task-toolbar{display:flex;align-items:flex-end;gap:16px;flex-shrink:0;margin-bottom:16px}
.realtime-task-toolbar>.realtime-task-section-actions{flex-shrink:0;min-height:44px}
.realtime-task-jobs .realtime-task-filters{flex:1;min-width:0;grid-template-columns:minmax(220px,1.4fr) minmax(160px,.8fr) auto;gap:16px;margin:0}
@media (max-width:1100px){.realtime-task-toolbar{flex-wrap:wrap}.realtime-task-toolbar>.realtime-task-filters{flex-basis:100%}.realtime-task-toolbar>.realtime-task-section-actions{justify-content:flex-start}}
.realtime-task-jobs .realtime-task-filters input,.realtime-task-jobs .realtime-task-filters select,.realtime-task-jobs .realtime-task-filters button{min-height:44px}
.realtime-task-jobs .realtime-task-table-wrap{overflow-x:auto;overflow-y:visible;scrollbar-gutter:stable;border-color:rgba(85,199,255,.2)}
.realtime-task-jobs-scroll{min-width:100%;max-height:480px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
.realtime-task-jobs-scroll:focus-visible{outline:2px solid rgba(125,211,252,.92);outline-offset:3px}
.realtime-task-jobs .realtime-task-table{min-width:1100px;font-variant-numeric:tabular-nums}
.realtime-task-jobs .realtime-task-table th{position:sticky;top:0;z-index:1;background:#101d36}
.realtime-task-jobs .realtime-task-table td{white-space:nowrap}
.realtime-task-jobs .realtime-task-table td:nth-child(7){color:#c4b5fd;font-weight:700}
/* Keep desktop scrolling inside the active panel, as on realtime comments. */
@media (min-width:901px) and (pointer:fine) {
    .realtime-task-card{height:calc(100dvh - 28px);display:flex;flex-direction:column;overflow:hidden}
    .realtime-task-card>.page-header,.realtime-task-card>.message{flex-shrink:0}
    .realtime-task-shell{flex:1;min-height:0;min-width:0;overflow:hidden}
    .realtime-task-stats{flex-shrink:0}
    .realtime-task-shell>[data-realtime-task-tab-panel]{flex:1;min-height:0;min-width:0}
    .realtime-task-form{overflow:auto;overscroll-behavior:contain}
    .realtime-task-history,.realtime-task-jobs{display:flex;flex-direction:column;overflow:hidden}
    .realtime-task-section-head,.realtime-task-filters{flex-shrink:0}
    .realtime-task-history>.realtime-task-table-wrap{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
    .realtime-task-history .realtime-task-table th{position:sticky;top:0;z-index:1;background:#101d36}
    .realtime-task-jobs>.realtime-task-table-wrap{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;scrollbar-gutter:auto}
    .realtime-task-jobs-scroll{flex:1;min-height:0;min-width:0;max-height:none;overflow:auto}
}
.realtime-task-delete-all-btn{height:36px;border:1px solid #dc2626;border-radius:8px;background:#dc2626;color:#fff;padding:0 12px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.realtime-task-delete-all-btn:hover{background:#b91c1c;border-color:#b91c1c}
.realtime-task-delete-all-btn:disabled{opacity:.55;cursor:not-allowed}
.realtime-task-delete-btn{border:1px solid #dc2626;border-radius:8px;background:#dc2626;color:#fff;padding:6px 12px;font-weight:700;cursor:pointer;white-space:nowrap}
.realtime-task-delete-btn:hover{background:#b91c1c;border-color:#b91c1c}
.realtime-task-delete-btn:disabled{opacity:.55;cursor:not-allowed}
.realtime-task-delete-locked{color:var(--muted);font-size:12px;white-space:nowrap}
.realtime-task-history-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}
.realtime-task-history-stop-btn,.realtime-task-history-delete-btn{padding:6px 12px;border-radius:8px;color:#fff;font:inherit;font-weight:700;cursor:pointer;white-space:nowrap}
.realtime-task-history-stop-btn{border:1px solid #d97706;background:#d97706}
.realtime-task-history-stop-btn:hover{border-color:#b45309;background:#b45309}
.realtime-task-history-delete-btn{border:1px solid #dc2626;background:#dc2626}
.realtime-task-history-delete-btn:hover{border-color:#b91c1c;background:#b91c1c}
.realtime-task-history-stop-btn:disabled,.realtime-task-history-delete-btn:disabled{opacity:.55;cursor:not-allowed}
.realtime-task-history-stop-btn:focus-visible,.realtime-task-history-delete-btn:focus-visible{outline:2px solid rgba(125,211,252,.92);outline-offset:2px}
.realtime-task-jobs .realtime-task-empty-state{display:flex;align-items:center;justify-content:center;gap:8px;min-height:64px;margin-top:16px;background:rgba(14,25,48,.68)}
.realtime-task-jobs .realtime-task-empty-state .ghost-btn{min-height:44px;padding:0 16px}
@media (max-width:800px){.realtime-task-jobs .realtime-task-filters{grid-template-columns:1fr 1fr}.realtime-task-jobs .realtime-task-filters>input:first-child{grid-column:1/-1}.realtime-task-jobs .realtime-task-filters button{width:100%}}
@media (max-width:520px){.realtime-task-jobs{padding:16px}.realtime-task-jobs .realtime-task-filters{grid-template-columns:1fr}.realtime-task-jobs .realtime-task-filters>input:first-child{grid-column:auto}}

.user-page-task-card {
    width: 100%;
    min-height: calc(100vh - 28px);
}
.user-page-task-shell {
    display: grid;
    gap: 18px;
}
.user-page-task-panel,
.user-page-task-result {
    border: 1px solid #233858;
    background: #0d1829;
    padding: 22px;
}
.user-page-task-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.user-page-task-heading.compact {
    align-items: center;
}
.user-page-task-heading h2,
.user-page-task-errors h3 {
    margin: 0;
}
.user-page-task-heading p,
.user-page-task-form-foot p {
    margin: 6px 0 0;
    color: #91a4c2;
}
.user-page-task-mode {
    flex: 0 0 auto;
    border: 1px solid #1f6f9b;
    color: #58c8ff;
    background: #0b2940;
    padding: 7px 10px;
    font-size: 13px;
}
.user-page-task-form {
    display: grid;
    gap: 9px;
}
.user-page-task-form label {
    font-weight: 700;
}
.user-page-task-form textarea {
    width: 100%;
    min-height: 300px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    line-height: 1.7;
}
.user-page-task-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.user-page-task-alert {
    border: 1px solid #854151;
    background: #2a1320;
    color: #ff9cab;
    padding: 12px 14px;
}
.user-page-task-result-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.user-page-task-result-grid > div {
    border: 1px solid #233858;
    background: #101e33;
    padding: 14px;
}
.user-page-task-result-grid span {
    display: block;
    color: #91a4c2;
    font-size: 13px;
}
.user-page-task-result-grid strong {
    display: block;
    margin-top: 7px;
    font-size: 24px;
}
.user-page-task-result-grid .has-error strong {
    color: #ff7f92;
}
.user-page-task-errors {
    margin-top: 16px;
    border-top: 1px solid #233858;
    padding-top: 16px;
}
.user-page-task-errors > div {
    display: grid;
    grid-template-columns: 72px 180px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #1c2d48;
}
.user-page-task-errors span {
    color: #ff9cab;
}
.user-page-task-errors code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-page-task-records {
    overflow: hidden;
}
.user-page-task-record-wrap {
    max-height: 460px;
    overflow: auto;
    border: 1px solid #1c2d48;
    background: rgba(2,6,23,.22);
}
.user-page-task-record-table {
    min-width: 1280px;
}
.user-page-task-record-table .mono-cell {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-page-task-conversion-table {
    min-width: 1080px;
}
.user-page-task-conversion-table .mono-cell {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-page-task-action-cell {
    min-width: 180px;
}
.user-page-task-delete-modal[hidden] {
    display: none;
}
.user-page-task-delete-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}
.user-page-task-delete-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .68);
}
.user-page-task-delete-dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    border: 1px solid #2f4365;
    background: #0d1829;
    padding: 20px;
    box-shadow: 0 18px 48px rgba(0,0,0,.42);
}
.user-page-task-delete-dialog h3 {
    margin: 0 0 10px;
}
.user-page-task-delete-dialog p {
    margin: 0 0 12px;
    color: #c4d3ea;
}
.user-page-task-delete-dialog code {
    display: block;
    margin-bottom: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #d6e5ff;
}
.user-page-task-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
@media (max-width: 820px) {
    .user-page-task-heading,
    .user-page-task-form-foot {
        align-items: stretch;
        flex-direction: column;
    }
    .user-page-task-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .user-page-task-errors > div {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   ▼▼▼ UI 精修层 v2 ▼▼▼
   --------------------------------------------------------------------------
   本层是本次界面优化**唯一新增**的样式层，追加在文件末尾，
   通过层叠覆盖前文的历史规则（不删除、不重排原有测试锚点）。

   设计语言参照 `参考/薯龄查询/admin/_header.php`：
     · 令牌驱动的间距 / 圆角 / 字号刻度，取代散落的裸 px
     · 左侧「渐变品牌 + 用户卡片 + 胶囊导航」的信息层级
     · 卡片（外）→ 面板（内）两级圆角与描边层次
     · 跟随系统的明暗双主题 + 可切换强调色
     · 统一的 hover / focus-visible 反馈与过渡

   维护约定（二次开发请遵守）：
     1. 新增样式一律使用本文件的 var(--token)，不要再写裸 px / 裸色值；
     2. 需要改主题时只改「第 1、2 节」的令牌，不要改组件规则；
     3. 本层位于文件末尾，若要推翻历史规则直接在此追加，不要回头改老规则。
   ========================================================================== */


/* ==========================================================================
   1. 浅色主题令牌
   --------------------------------------------------------------------------
   说明：CSS 没有 mixin，因此浅色令牌需要写两份——
         一份给「系统偏好 + 未显式指定深色」，一份给「用户显式选择浅色」。
   ========================================================================== */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg-body-1: #f2f5fa;
        --bg-body-2: #e7edf6;
        --bg-card: rgba(255, 255, 255, 0.92);
        --bg-panel: #ffffff;
        --bg-input: #ffffff;
        --border: rgba(2, 132, 199, 0.22);
        --border-soft: rgba(15, 23, 42, 0.10);
        --text: #0f172a;
        --muted: #52627a;
        --muted-2: #7d8ba1;
        --accent: #0284c7;
        --accent-soft: rgba(2, 132, 199, 0.14);
        --success: #15803d;
        --danger: #dc2626;
        --warning: #b45309;
        --shadow: 0 14px 34px -16px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.05);
        --text-strong: #0b2545;
        --text-body: #33445c;
        --text-dim: #52627a;
        --text-faint: #7d8ba1;
        --text-link: #0369a1;
        --surface-inset: rgba(15, 23, 42, 0.035);
        --surface-1: #ffffff;
        --surface-2: rgba(255, 255, 255, 0.88);
        --surface-3: rgba(255, 255, 255, 0.96);
        --surface-sticky: #eef3fa;
        --hairline: rgba(15, 23, 42, 0.09);
        --focus-ring: 0 0 0 3px rgba(2, 132, 199, 0.20);
        --focus-ring-danger: 0 0 0 3px rgba(220, 38, 38, 0.20);
        --gradient-brand: linear-gradient(135deg, #0ea5e9, #0369a1);
        --gradient-accent: linear-gradient(95deg, #0ea5e9, #0284c7);
        color-scheme: light;
    }
}
:root[data-theme="light"] {
    --bg-body-1: #f2f5fa;
    --bg-body-2: #e7edf6;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-panel: #ffffff;
    --bg-input: #ffffff;
    --border: rgba(2, 132, 199, 0.22);
    --border-soft: rgba(15, 23, 42, 0.10);
    --text: #0f172a;
    --muted: #52627a;
    --muted-2: #7d8ba1;
    --accent: #0284c7;
    --accent-soft: rgba(2, 132, 199, 0.14);
    --success: #15803d;
    --danger: #dc2626;
    --warning: #b45309;
    --shadow: 0 14px 34px -16px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.05);
    --text-strong: #0b2545;
    --text-body: #33445c;
    --text-dim: #52627a;
    --text-faint: #7d8ba1;
    --text-link: #0369a1;
    --surface-inset: rgba(15, 23, 42, 0.035);
    --surface-1: #ffffff;
    --surface-2: rgba(255, 255, 255, 0.88);
    --surface-3: rgba(255, 255, 255, 0.96);
    --surface-sticky: #eef3fa;
    --hairline: rgba(15, 23, 42, 0.09);
    --focus-ring: 0 0 0 3px rgba(2, 132, 199, 0.20);
    --focus-ring-danger: 0 0 0 3px rgba(220, 38, 38, 0.20);
    --gradient-brand: linear-gradient(135deg, #0ea5e9, #0369a1);
    --gradient-accent: linear-gradient(95deg, #0ea5e9, #0284c7);
    color-scheme: light;
}


/* ==========================================================================
   2. 强调色（默认 · 深色）
   ========================================================================== */
:root {
    --accent-hue-blue: #38bdf8;
    --accent-hue-purple: #a78bfa;
    --accent-hue-green: #34d399;
    --accent-hue-orange: #fb923c;
}
:root[data-accent="purple"] {
    --accent: #a78bfa;
    --accent-soft: rgba(167, 139, 250, 0.22);
    --border: rgba(167, 139, 250, 0.24);
    --focus-ring: 0 0 0 3px rgba(167, 139, 250, 0.22);
    --gradient-brand: linear-gradient(135deg, #ede9fe, #a78bfa);
    --gradient-accent: linear-gradient(95deg, #8b5cf6, #7c3aed);
}
:root[data-accent="green"] {
    --accent: #34d399;
    --accent-soft: rgba(52, 211, 153, 0.22);
    --border: rgba(52, 211, 153, 0.24);
    --focus-ring: 0 0 0 3px rgba(52, 211, 153, 0.22);
    --gradient-brand: linear-gradient(135deg, #d1fae5, #34d399);
    --gradient-accent: linear-gradient(95deg, #10b981, #059669);
}
:root[data-accent="orange"] {
    --accent: #fb923c;
    --accent-soft: rgba(251, 146, 60, 0.22);
    --border: rgba(251, 146, 60, 0.24);
    --focus-ring: 0 0 0 3px rgba(251, 146, 60, 0.22);
    --gradient-brand: linear-gradient(135deg, #ffedd5, #fb923c);
    --gradient-accent: linear-gradient(95deg, #f97316, #ea580c);
}
/* 显式浅色下的强调色（specificity 更高，必然覆盖上面的深色值） */
:root[data-theme="light"][data-accent="purple"] {
    --accent: #7c3aed;
    --accent-soft: rgba(124, 58, 237, 0.14);
    --border: rgba(124, 58, 237, 0.22);
    --focus-ring: 0 0 0 3px rgba(124, 58, 237, 0.18);
    --gradient-brand: linear-gradient(135deg, #7c3aed, #5b21b6);
    --gradient-accent: linear-gradient(95deg, #8b5cf6, #6d28d9);
}
:root[data-theme="light"][data-accent="green"] {
    --accent: #047857;
    --accent-soft: rgba(4, 120, 87, 0.14);
    --border: rgba(4, 120, 87, 0.22);
    --focus-ring: 0 0 0 3px rgba(4, 120, 87, 0.18);
    --gradient-brand: linear-gradient(135deg, #059669, #065f46);
    --gradient-accent: linear-gradient(95deg, #10b981, #047857);
}
:root[data-theme="light"][data-accent="orange"] {
    --accent: #c2410c;
    --accent-soft: rgba(194, 65, 12, 0.14);
    --border: rgba(194, 65, 12, 0.22);
    --focus-ring: 0 0 0 3px rgba(194, 65, 12, 0.18);
    --gradient-brand: linear-gradient(135deg, #ea580c, #9a3412);
    --gradient-accent: linear-gradient(95deg, #f97316, #c2410c);
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"])[data-accent="purple"] {
        --accent: #7c3aed;
        --accent-soft: rgba(124, 58, 237, 0.14);
        --border: rgba(124, 58, 237, 0.22);
        --focus-ring: 0 0 0 3px rgba(124, 58, 237, 0.18);
        --gradient-brand: linear-gradient(135deg, #7c3aed, #5b21b6);
        --gradient-accent: linear-gradient(95deg, #8b5cf6, #6d28d9);
    }
    :root:not([data-theme="dark"])[data-accent="green"] {
        --accent: #047857;
        --accent-soft: rgba(4, 120, 87, 0.14);
        --border: rgba(4, 120, 87, 0.22);
        --focus-ring: 0 0 0 3px rgba(4, 120, 87, 0.18);
        --gradient-brand: linear-gradient(135deg, #059669, #065f46);
        --gradient-accent: linear-gradient(95deg, #10b981, #047857);
    }
    :root:not([data-theme="dark"])[data-accent="orange"] {
        --accent: #c2410c;
        --accent-soft: rgba(194, 65, 12, 0.14);
        --border: rgba(194, 65, 12, 0.22);
        --focus-ring: 0 0 0 3px rgba(194, 65, 12, 0.18);
        --gradient-brand: linear-gradient(135deg, #ea580c, #9a3412);
        --gradient-accent: linear-gradient(95deg, #f97316, #c2410c);
    }
}


/* ==========================================================================
   3. 全局排版 / 选区 / 焦点可达性
   ========================================================================== */
html {
    -webkit-text-size-adjust: 100%;
}
body {
    font-size: var(--fs-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection {
    background: var(--accent-soft, rgba(56, 189, 248, 0.28));
    color: var(--text);
}
/* 键盘可达性：统一焦点环（鼠标点击不出现，避免视觉噪音） */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}
h1, h2, h3, h4 {
    letter-spacing: -0.01em;
    text-wrap: balance;
}


/* ==========================================================================
   4. 外壳：侧边栏
   --------------------------------------------------------------------------
   对齐参考项目：渐变品牌名 + 用户卡片 + 胶囊导航 + 激活态描边。
   注意：`.nav-link` 的 grid/图标/标签对齐由既有规则保持，本层只调间距与观感。
   ========================================================================== */
.sidebar {
    width: var(--sidebar-w);
    padding: var(--sp-9) var(--sidebar-pad-x) var(--sp-7);
    gap: var(--sp-1);
    background: var(--surface-3);
    backdrop-filter: blur(14px);
    border-right: 1px solid var(--border-soft);
}
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0 0 var(--sp-8);
    margin-bottom: var(--sp-4);
    border-bottom: 1px solid var(--border-soft);
    font-size: var(--fs-md);
    font-weight: 800;
    letter-spacing: 0.01em;
}
.brand-logo {
    font-size: var(--fs-lg);
    line-height: 1;
}
.brand-text {
    background-image: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.user-chip {
    display: grid;
    gap: var(--sp-1);
    padding: var(--sp-5) var(--sp-6);
    margin-bottom: var(--sp-4);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    background: var(--accent-soft, rgba(56, 189, 248, 0.10));
    font-size: var(--fs-sm);
    line-height: 1.35;
    color: var(--muted);
}
.user-chip-name {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-width: 0;
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text);
}
.user-chip-role {
    justify-self: start;
    padding: 1px var(--sp-4);
    border-radius: var(--r-pill);
    background: var(--accent-soft, rgba(56, 189, 248, 0.16));
    color: var(--accent);
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.nav-link {
    padding: var(--sp-5) var(--sp-6);
    border-radius: var(--r-xl);
    font-size: var(--fs-base);
    font-weight: 500;
    transition: background-color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
}
.nav-link:hover {
    transform: translateX(2px);
}
.nav-link:hover,
.nav-link.active {
    background: var(--accent-soft, rgba(56, 189, 248, 0.12));
    border: 1px solid var(--border);
    color: var(--accent);
}
.nav-link.active {
    font-weight: 650;
}
.nav-icon {
    font-size: var(--fs-md);
    line-height: 1;
    filter: saturate(0.92);
}
.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    filter: none;
}
/* 分隔线由 .sidebar-bottom 的 border-top 提供，未额外引入 .nav-sep 占位元素 */
/* 二级菜单：用左侧引导线表达从属关系，缩进与图标列对齐 */
.sidebar-subnav {
    gap: var(--sp-2);
    margin: calc(-1 * var(--sp-2)) 0 var(--sp-3) var(--sp-9);
    padding: var(--sp-2) 0 var(--sp-2) var(--sp-5);
    border-left: 1px solid var(--border);
    border-radius: 0;
}
.sidebar-subnav a {
    min-height: 30px;
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--r-lg);
    color: var(--text-faint);
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: background-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease);
}
.sidebar-bottom {
    gap: var(--sp-2);
    padding: var(--sp-6) 0 0;
    border-top: 1px solid var(--border-soft);
}
.sidebar-bottom .ghost-btn {
    min-height: 30px;
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--r-lg);
    color: var(--text-faint);
    font-size: var(--fs-base);
    transition: background-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease);
}
.sidebar-bottom .ghost-btn:hover,
.sidebar-action.active {
    color: var(--accent);
    background: var(--accent-soft, rgba(56, 189, 248, 0.10));
}
/* 收起把手：贴齐侧边栏右缘，点击热区加大 */
.sidebar-toggle {
    left: var(--sidebar-w);
    width: 20px;
    height: 52px;
    border-radius: 0 var(--r-md) var(--r-md) 0;
    background: var(--surface-3);
    transition: left var(--dur) var(--ease),
                background-color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease);
}
.sidebar-toggle:hover {
    background: var(--accent-soft, rgba(56, 189, 248, 0.16));
}


/* ==========================================================================
   5. 外壳：主区 / 内容卡 / 页头
   ========================================================================== */
.main {
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    padding: var(--shell-gutter);
    transition: margin-left var(--dur) var(--ease), width var(--dur) var(--ease);
}
.content-card {
    border-radius: var(--r-card);
    padding: var(--sp-10);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}
/* 页头：标题 + 渐变下划线；右侧工具组与时间不再各自为政 */
.page-header {
    align-items: flex-start;
    gap: var(--sp-6);
    margin-bottom: var(--sp-9);
    padding-bottom: var(--sp-6);
    border-bottom: 1px solid var(--border-soft);
}
.page-header h1 {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--sp-4);
    margin: 0;
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}
.page-header h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: calc(-1 * var(--sp-6) - 1px);
    width: 40px;
    height: 2px;
    border-radius: var(--r-pill);
    background-image: var(--gradient-accent);
}
.page-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
}
/* 归一页标题字号：原先 5 个页面各自写死 21/22/24px，破坏字号刻度 */
.dashboard-content-card .page-header h1,
.console-content-card .page-header h1,
.realtime-comment-card .page-header h1,
.search-task-card .page-header h1,
.comment-page-card .page-header h1,
.realtime-task-card .page-header h1 {
    font-size: var(--fs-xl);
    letter-spacing: -0.01em;
}
.page-header .muted {
    align-self: center;
    flex: 0 0 auto;
    padding: 2px var(--sp-5);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-pill);
    background: var(--surface-inset);
    color: var(--muted-2);
    font-size: var(--fs-sm);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* 监控类页面不需要页头下划线 */
.monitor-content-card .page-header,
.realtime-comment-card .page-header,
.console-content-card .page-header {
    padding-bottom: 0;
    border-bottom: 0;
}


/* ==========================================================================
   6. 主题切换器（侧边栏底部）
   ========================================================================== */
.theme-control {
    display: grid;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-5) var(--sp-6);
    margin-bottom: var(--sp-3);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-xl);
    background: var(--surface-inset);
}
.theme-control-label {
    color: var(--text-faint);
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.theme-mode {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-1);
    padding: 2px;
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    background: var(--surface-inset);
}
.theme-mode-btn {
    min-height: 26px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    background: transparent;
    color: var(--text-faint);
    font: inherit;
    font-size: var(--fs-xs);
    font-weight: 650;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease);
}
.theme-mode-btn:hover {
    color: var(--text);
}
.theme-mode-btn[aria-checked="true"] {
    border-color: var(--border);
    background: var(--accent-soft, rgba(56, 189, 248, 0.16));
    color: var(--accent);
}
.theme-accent {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
}
.theme-dot {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease);
}
.theme-dot:hover {
    transform: scale(1.15);
}
.theme-dot[aria-checked="true"] {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--surface-3), 0 0 8px var(--accent-soft, rgba(56, 189, 248, 0.6));
}
.theme-dot.blue { background: #38bdf8; }
.theme-dot.purple { background: #a78bfa; }
.theme-dot.green { background: #34d399; }
.theme-dot.orange { background: #fb923c; }


/* ==========================================================================
   7. 按钮
   --------------------------------------------------------------------------
   原状：三套按钮共用 border-radius:18px / padding:10px 15px，
         与 14px 的输入框、22px 的内容卡互不呼应。
   ========================================================================== */
.primary-btn,
.ghost-btn,
.danger-btn {
    border-radius: var(--r-button);
    padding: var(--sp-5) var(--sp-7);
    font-size: var(--fs-base);
    font-weight: 650;
    line-height: 1.2;
    transition: background-color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
}
.primary-btn {
    background-image: var(--gradient-accent);
    box-shadow: 0 4px 14px -6px var(--accent-soft, rgba(56, 189, 248, 0.6));
}
.primary-btn:hover:not(:disabled) {
    box-shadow: 0 8px 20px -8px var(--accent-soft, rgba(56, 189, 248, 0.8));
    filter: brightness(1.06);
}
.ghost-btn {
    background: var(--surface-2);
    border-color: var(--border-soft);
    color: var(--muted);
}
.ghost-btn:hover:not(:disabled) {
    border-color: var(--border);
    background: var(--accent-soft, rgba(56, 189, 248, 0.10));
    color: var(--text);
}
.danger-btn {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.32);
    color: #fecaca;
}
.danger-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
}
.primary-btn:active:not(:disabled),
.ghost-btn:active:not(:disabled),
.danger-btn:active:not(:disabled) {
    transform: translateY(1px);
}
.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.danger-btn:focus-visible {
    box-shadow: var(--focus-ring);
}
.danger-btn:focus-visible {
    box-shadow: var(--focus-ring-danger);
}
/* 小块按钮：日志筛选 / 图标按钮 / 行内操作，统一为同一圆角与热区 */
.icon-btn,
.config-btn,
.log-filter-btn,
.mini-action-btn,
.comment-note-view-btn {
    border-radius: var(--r-md);
    transition: background-color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease);
}
.mini-action-btn {
    border-radius: var(--r-sm);
}
.comment-export-btn,
.comment-copy-red-btn,
.realtime-comment-copy-uid {
    border-radius: var(--r-chip);
}


/* ==========================================================================
   8. 表单控件
   --------------------------------------------------------------------------
   原状：input/textarea/select 统一 14px 圆角，但 .admin-select-trigger 是 12px、
         .note-tools input 是 4px、.users-small-input 是 9px——同一页三种圆角。
   ========================================================================== */
input,
textarea,
select {
    border-radius: var(--r-control);
    border-color: var(--border-soft);
    background: var(--bg-input);
    color: var(--text);
    font-size: var(--fs-base);
    transition: border-color var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease),
                background-color var(--dur-fast) var(--ease);
}
input:hover:not(:disabled),
textarea:hover:not(:disabled),
select:hover:not(:disabled) {
    border-color: var(--border);
}
input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}
input::placeholder,
textarea::placeholder {
    color: var(--muted-2);
}
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}
label {
    color: var(--text-body);
}
.admin-select-trigger {
    border-radius: var(--r-control);
    border-color: var(--border-soft);
    transition: border-color var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease),
                background-color var(--dur-fast) var(--ease);
}
.admin-select-menu {
    border-radius: var(--r-xl);
    border-color: var(--border);
}
.note-tools input {
    border-radius: var(--r-control);
}
.users-small-input {
    border-radius: var(--r-md);
}
.realtime-task-dispatch-control select {
    border-radius: var(--r-md);
}
/* 搜索型输入：右侧留出图标位，视觉上更像「搜索框」而非普通输入框 */
.comment-note-search-wrap input,
.note-tools input,
.realtime-comment-search-input,
.console-search-input {
    padding-left: var(--sp-7);
}


/* ==========================================================================
   9. 面板与卡片：统一「外卡 22px / 内板 14px」两级层次
   --------------------------------------------------------------------------
   原状：.console-panel 圆角 4px 嵌在 22px 的内容卡里，是整个界面最刺眼的一处。
   ========================================================================== */
.panel,
.stat-card {
    border-radius: var(--r-panel);
    border-color: var(--border-soft);
    background: var(--surface-1);
}
.console-panel {
    border-radius: var(--r-panel);
    border-color: var(--border-soft);
    background: var(--surface-inset);
}
.console-panel-head {
    min-height: 34px;
    padding: var(--sp-4) var(--sp-5);
    border-bottom-color: var(--border-soft);
    background: var(--surface-2);
}
.console-panel-head.tight {
    padding: var(--sp-5) var(--sp-6);
}
.console-section,
.console-metric-card,
.console-event-card,
.console-queue-card,
.script-param-group,
.script-params-toolbar,
.script-params-footer,
.dashboard-panel,
.dashboard-task-stats,
.realtime-comment-panel,
.search-task-section,
.comment-export-option,
.users-create-panel,
.users-list-panel {
    border-radius: var(--r-panel);
}
.console-metric-card,
.console-event-card,
.console-queue-card,
.dashboard-panel {
    transition: border-color var(--dur-fast) var(--ease),
                background-color var(--dur-fast) var(--ease);
}
.console-metric-card:hover,
.console-event-card:hover,
.console-queue-card:hover,
.dashboard-panel:hover {
    border-color: var(--border);
}
/* 卡内面板之间的间距：原 8px 过挤，统一到 12px */
.console-workbench {
    gap: var(--sp-6);
}
.realtime-comment-panel,
.console-section {
    padding: var(--sp-8);
}
.console-section {
    border-radius: var(--r-panel);
}
/* 指标数字沿用参考项目的渐变数字语言（仅作用于纯数字叶子节点） */
.console-metric-copy strong,
.console-event-card strong,
.stat-card .num {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}


/* ==========================================================================
   10. 表格
   ========================================================================== */
.table-wrap {
    border-radius: var(--r-panel);
    border-color: var(--border-soft);
}
th {
    color: var(--muted);
    font-weight: 650;
    font-size: var(--fs-sm);
    letter-spacing: 0.02em;
}
td {
    border-bottom-color: var(--hairline);
}
.console-table th,
.console-data-table th,
.realtime-comment-table th {
    letter-spacing: 0.03em;
}
.console-data-table tbody tr:nth-child(even) td {
    background: var(--surface-inset);
}
.console-table tr:hover td,
.console-data-table tbody tr:hover td,
.realtime-comment-table tr:hover td {
    background: var(--accent-soft, rgba(56, 189, 248, 0.08));
}
.table-wrap,
.console-table-wrap,
.note-table-wrap,
.realtime-comment-table-wrap,
.search-task-table-wrap,
.user-page-task-record-wrap {
    border-radius: var(--r-panel);
}


/* ==========================================================================
   11. 徽章 / 状态胶囊 / 标签页 / 分页
   ========================================================================== */
.badge,
.stat-card .badge,
.queue-priority-badge,
.note-log-comment-count-badge,
.secondary-comment-badge,
.comment-count-pill,
.dashboard-chip {
    border-radius: var(--r-chip);
    font-weight: 650;
    line-height: 1.4;
}
.comment-count-pill {
    border-color: var(--border-soft);
}
.realtime-comment-tab {
    transition: color var(--dur-fast) var(--ease);
}
.realtime-comment-tab::after,
.console-tab-btn::after,
.realtime-task-tab::after {
    transition: background-color var(--dur-fast) var(--ease);
}
.console-tab-btn,
.realtime-task-tab {
    transition: color var(--dur-fast) var(--ease),
                background-color var(--dur-fast) var(--ease);
}
.console-page-btn,
.realtime-comment-pagination button {
    border-radius: var(--r-md);
    transition: background-color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease);
}
.console-page-btn:hover,
.realtime-comment-pagination button:hover:not(:disabled) {
    border-color: var(--border);
    background: var(--accent-soft, rgba(56, 189, 248, 0.10));
    color: var(--text);
}


/* ==========================================================================
   12. 模态与浮层
   ========================================================================== */
.modal-backdrop {
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(6px);
}
.modal-card,
.link-modal-card,
.note-log-modal-card,
.note-qr-modal-card,
.comment-image-preview-card,
.user-page-task-delete-dialog {
    border-radius: var(--r-3xl);
    border-color: var(--border);
    background: var(--surface-3);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.55);
}
.modal-head {
    padding: var(--sp-8) var(--sp-9);
    border-bottom: 1px solid var(--border-soft);
}
.modal-actions {
    gap: var(--sp-5);
}
/* monitor.php 的内联样式在文档中更靠后，因此这里用更高 specificity 覆盖 */
.sidebar ~ .main .monitor-modal-card {
    border-radius: var(--r-3xl);
    border-color: var(--border);
    background: var(--surface-3);
    color: var(--text);
}
.sidebar ~ .main .monitor-modal-head {
    padding: var(--sp-8) var(--sp-9);
    border-bottom-color: var(--border-soft);
    background: var(--surface-2);
}
.sidebar ~ .main .monitor-modal-form {
    padding: var(--sp-9);
    gap: var(--sp-6);
}
.sidebar ~ .main .monitor-modal-actions {
    gap: var(--sp-5);
}
.sidebar ~ .main .note-delete-modal-body {
    padding: var(--sp-9);
}
.sidebar ~ .main .note-delete-modal-field {
    border-radius: var(--r-lg);
    border-color: var(--border-soft);
    background: var(--surface-inset);
}
.sidebar ~ .main .monitor-link-textarea,
.sidebar ~ .main .monitor-config-textarea {
    border-radius: var(--r-control);
    border-color: var(--border-soft);
    background: var(--bg-input);
    color: var(--text-body);
}
.sidebar ~ .main .monitor-note-checks .monitor-check-card {
    border-radius: var(--r-xl);
}


/* ==========================================================================
   13. 提示 / 空态 / 日志 / 页脚工具条
   ========================================================================== */
.message {
    border-radius: var(--r-xl);
}
.msg-info,
.msg-success,
.msg-error,
.search-task-message {
    border-radius: var(--r-xl);
}
.log-box,
.console-log {
    border-radius: var(--r-lg);
}
.empty-cell,
.empty-state {
    color: var(--muted-2);
    padding: var(--sp-9);
    text-align: center;
    font-size: var(--fs-base);
}
.copy-toast {
    border-radius: var(--r-pill);
    padding: var(--sp-5) var(--sp-9);
    font-weight: 700;
    letter-spacing: 0.01em;
}
.script-params-footer,
.other-feature-actions {
    gap: var(--sp-6);
}


/* ==========================================================================
   14. 补齐「有类名、无样式」的钩子
   --------------------------------------------------------------------------
   审计发现 16 个类名在标记里被使用但 CSS 从未定义。
   其中 4 个是 JS 钩子（.user-manage-form / .user-row / .note-result-cell /
   .note-status-cell，分别被 users.php 与 monitor.php 的 querySelector/closest
   使用），语义上应保留；其余 12 个为纯 CSS 钩子，此处补上有意义的样式，
   使其不再是「死类名」。详见调整报告第 5 节。
   ========================================================================== */
.console-tab-panel {
    min-width: 0;
}
.console-queue-overview {
    display: grid;
    gap: var(--sp-7);
}
.console-problem-table {
    min-width: 1040px;
}
.console-record-type-form {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    flex-wrap: wrap;
}
.console-task-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
}
.console-worker-id-cell {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.console-global-success-card {
    border-color: rgba(74, 222, 128, 0.32);
}
.console-global-success-card::after {
    background: linear-gradient(180deg, rgba(74, 222, 128, 0.55), rgba(34, 197, 94, 0.18));
}
.dashboard-insight-panel {
    align-content: start;
}
.user-manage-form {
    min-width: 0;
}
.user-row {
    transition: background-color var(--dur-fast) var(--ease);
}
.user-row:hover td {
    background: var(--accent-soft, rgba(56, 189, 248, 0.07));
}
.modal-close {
    flex: 0 0 auto;
}
.note-result-cell,
.note-status-cell {
    white-space: nowrap;
    text-align: center;
}
.user-page-task-conversions {
    min-width: 0;
}
.user-page-task-delete-form {
    margin: 0;
}
.delete-all-workers-btn {
    white-space: nowrap;
}


/* ==========================================================================
   15. 浅色主题下的组件级修正
   --------------------------------------------------------------------------
   深色规则里有大量硬编码 rgba(15,23,42,*) / rgba(148,163,184,*) 表面与描边，
   令牌化无法覆盖它们，因此在浅色上下文里按「同类选择器分组」统一改写。
   ========================================================================== */

/* 注意：浅色主题的**组件级**覆盖只写一份，放在下面 :root[data-theme="light"] 里。
   之所以不再复制一份 @media (prefers-color-scheme: light) 版本，是因为
   _header.php 的主题引导脚本会把「跟随系统」解析成具体的 light/dark 并写到
   <html data-theme>，因此两种进入浅色的路径最终都命中同一个选择器。
   上面的 @media 令牌块仍然保留，作为「JS 未执行」时的降级方案。 */

/* 与上面同构：显式选择浅色时 */
:root[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.95);
}
:root[data-theme="light"] .content-card,
:root[data-theme="light"] .users-admin-card,
:root[data-theme="light"] .dashboard-content-card,
:root[data-theme="light"] .console-content-card,
:root[data-theme="light"] .script-params-card,
:root[data-theme="light"] .realtime-comment-card,
:root[data-theme="light"] .realtime-task-card,
:root[data-theme="light"] .search-task-card,
:root[data-theme="light"] .comment-page-card,
:root[data-theme="light"] .monitor-content-card,
:root[data-theme="light"] .user-page-task-card {
    background: var(--bg-card);
    color: var(--text);
}
:root[data-theme="light"] .console-panel,
:root[data-theme="light"] .console-section,
:root[data-theme="light"] .console-metric-card,
:root[data-theme="light"] .console-event-card,
:root[data-theme="light"] .console-queue-card,
:root[data-theme="light"] .dashboard-panel,
:root[data-theme="light"] .dashboard-task-stats,
:root[data-theme="light"] .script-param-group,
:root[data-theme="light"] .script-params-toolbar,
:root[data-theme="light"] .script-params-footer,
:root[data-theme="light"] .realtime-comment-panel,
:root[data-theme="light"] .realtime-comment-top,
:root[data-theme="light"] .realtime-rule-card,
:root[data-theme="light"] .realtime-time-range-card,
:root[data-theme="light"] .search-task-section,
:root[data-theme="light"] .comment-export-option,
:root[data-theme="light"] .users-create-panel,
:root[data-theme="light"] .users-list-panel,
:root[data-theme="light"] .comment-note-list,
:root[data-theme="light"] .comment-detail-pane,
:root[data-theme="light"] .comment-detail-row,
:root[data-theme="light"] .note-log-rows {
    background: var(--surface-1);
    border-color: var(--border-soft);
}
:root[data-theme="light"] .console-panel-head,
:root[data-theme="light"] .comment-detail-head,
:root[data-theme="light"] .comment-detail-head input,
:root[data-theme="light"] .comment-detail-head select,
:root[data-theme="light"] .search-keyword-textarea,
:root[data-theme="light"] .search-filter-grid input,
:root[data-theme="light"] .search-filter-grid select {
    background: var(--surface-sticky);
    border-color: var(--border-soft);
}
:root[data-theme="light"] .console-table th,
:root[data-theme="light"] .console-data-table th,
:root[data-theme="light"] .realtime-comment-table th {
    background: var(--surface-sticky);
    color: var(--text-dim);
}
:root[data-theme="light"] .console-table td,
:root[data-theme="light"] .console-data-table td,
:root[data-theme="light"] .realtime-comment-table td,
:root[data-theme="light"] .note-log-detail p,
:root[data-theme="light"] .comment-detail-main p,
:root[data-theme="light"] .comment-detail-main p.comment-content,
:root[data-theme="light"] .console-log,
:root[data-theme="light"] .runtime-log-text,
:root[data-theme="light"] .log-box,
:root[data-theme="light"] label,
:root[data-theme="light"] .record-reason-cell,
:root[data-theme="light"] .record-detail-cell,
:root[data-theme="light"] .icon-btn,
:root[data-theme="light"] .config-btn,
:root[data-theme="light"] .mini-action-btn,
:root[data-theme="light"] .users-admin-table td,
:root[data-theme="light"] .search-task-table td {
    color: var(--text-body);
}
:root[data-theme="light"] .console-log {
    background:
        linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(15, 23, 42, 0.05) 28px);
}
:root[data-theme="light"] .comment-red-id b,
:root[data-theme="light"] .comment-user-line strong,
:root[data-theme="light"] .comment-detail-head h2,
:root[data-theme="light"] .comment-detail-title-note,
:root[data-theme="light"] .comment-note-id,
:root[data-theme="light"] .comment-count-pill b,
:root[data-theme="light"] .users-admin-head h1,
:root[data-theme="light"] .users-section-title h2,
:root[data-theme="light"] .users-name,
:root[data-theme="light"] .dashboard-section-head h2,
:root[data-theme="light"] .realtime-comment-section-head h2,
:root[data-theme="light"] .realtime-comment-panel-head h2,
:root[data-theme="light"] .console-panel h2,
:root[data-theme="light"] .console-event-card strong,
:root[data-theme="light"] .console-queue-card-head strong,
:root[data-theme="light"] .script-param-group-head h2,
:root[data-theme="light"] .search-task-section-head h2,
:root[data-theme="light"] .realtime-task-stat strong,
:root[data-theme="light"] .realtime-task-section-head h2,
:root[data-theme="light"] .realtime-task-panel-head h2 {
    color: var(--text-strong);
}
:root[data-theme="light"] .sidebar-subnav a,
:root[data-theme="light"] .sidebar-bottom .ghost-btn,
:root[data-theme="light"] .users-section-title p,
:root[data-theme="light"] .dashboard-section-head p,
:root[data-theme="light"] .console-metric-card p,
:root[data-theme="light"] .console-event-card p,
:root[data-theme="light"] .console-event-cell span,
:root[data-theme="light"] .comment-note-published,
:root[data-theme="light"] .realtime-rule-editor p,
:root[data-theme="light"] .realtime-comment-panel-head span,
:root[data-theme="light"] .monitor-check-desc,
:root[data-theme="light"] .comment-meta-line,
:root[data-theme="light"] .comment-count-pill,
:root[data-theme="light"] .note-monitor-duration,
:root[data-theme="light"] .note-monitor-success,
:root[data-theme="light"] .note-monitor-average-duration,
:root[data-theme="light"] .search-keyword-count,
:root[data-theme="light"] .comment-detail-note-count,
:root[data-theme="light"] .comment-detail-title-time,
:root[data-theme="light"] .users-admin-stats span,
:root[data-theme="light"] .users-permission-checks label {
    color: var(--text-dim);
}
:root[data-theme="light"] .icon-btn,
:root[data-theme="light"] .config-btn,
:root[data-theme="light"] .mini-action-btn,
:root[data-theme="light"] .log-filter-btn,
:root[data-theme="light"] .console-page-btn,
:root[data-theme="light"] .comment-image-preview-btn,
:root[data-theme="light"] .ghost-btn {
    background: var(--surface-2);
    border-color: var(--border-soft);
}
:root[data-theme="light"] .monitor-modal-card {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text);
}
:root[data-theme="light"] .monitor-modal-head {
    background: var(--surface-2);
    border-bottom-color: var(--border-soft);
}
:root[data-theme="light"] .note-delete-modal-field {
    background: var(--surface-inset);
    border-color: var(--border-soft);
}
:root[data-theme="light"] .note-delete-modal-field-label,
:root[data-theme="light"] .note-delete-modal-field-value {
    color: var(--text-body);
}
:root[data-theme="light"] .monitor-link-textarea,
:root[data-theme="light"] .monitor-config-textarea,
:root[data-theme="light"] .config-textarea,
:root[data-theme="light"] .link-textarea {
    background: var(--bg-input);
    border-color: var(--border-soft);
    color: var(--text-body);
}
:root[data-theme="light"] .user-page-task-delete-dialog {
    background: var(--surface-3);
    border-color: var(--border);
}
:root[data-theme="light"] .user-page-task-delete-dialog p,
:root[data-theme="light"] .user-page-task-delete-dialog code {
    color: var(--text-body);
}
:root[data-theme="light"] .user-page-task-record-wrap {
    background: var(--surface-inset);
    border-color: var(--border-soft);
}
:root[data-theme="light"] .realtime-task-form,
:root[data-theme="light"] .realtime-task-panel,
:root[data-theme="light"] .realtime-task-jobs,
:root[data-theme="light"] .realtime-task-history,
:root[data-theme="light"] .realtime-task-stat {
    background: var(--surface-1);
    border-color: var(--border-soft);
}
:root[data-theme="light"] .realtime-task-jobs .realtime-task-table th {
    background: var(--surface-sticky);
    color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   15b. 浅色主题补齐：由 css-dark-surface-audit.mjs 扫出的「写死深色背景」清单
   --------------------------------------------------------------------------
   这些规则在深色主题下把表面写成了 rgba(15,23,42,*) / #0e1930 之类的字面量，
   令牌化覆盖不到，若不处理就会出现「浅色下白字白底」。下面逐组改写。
   预留的深色浮层（.modal-backdrop 等）保持深色，它们本就该压暗背景。
   -------------------------------------------------------------------------- */
:root[data-theme="light"] .sidebar-toggle {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--accent);
}
/* 指标卡：primary 变体原本是半透明强调渐变 + #e0f2fe 文字，浅色下会完全看不见 */
:root[data-theme="light"] .dashboard-metric-card,
:root[data-theme="light"] .dashboard-task-stat-card {
    background: var(--surface-1);
    border-color: var(--border-soft);
    color: var(--muted);
}
:root[data-theme="light"] .dashboard-metric-card.primary {
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.10), rgba(14, 165, 233, 0.04));
    border-color: rgba(2, 132, 199, 0.28);
}
:root[data-theme="light"] .dashboard-metric-card span,
:root[data-theme="light"] .dashboard-task-stat-card span,
:root[data-theme="light"] .dashboard-trend-title,
:root[data-theme="light"] .dashboard-trend-title h2,
:root[data-theme="light"] .dashboard-trend-value,
:root[data-theme="light"] .dashboard-trend-summary b,
:root[data-theme="light"] .dashboard-trend-total,
:root[data-theme="light"] .dashboard-trend-summary,
:root[data-theme="light"] .dashboard-trend-label,
:root[data-theme="light"] .dashboard-trend-chart,
:root[data-theme="light"] .dashboard-trend-axis,
:root[data-theme="light"] .dashboard-insight-list span,
:root[data-theme="light"] .dashboard-task-stat-unit {
    color: var(--text-dim);
}
:root[data-theme="light"] .dashboard-metric-card strong,
:root[data-theme="light"] .dashboard-task-stat-card strong,
:root[data-theme="light"] .dashboard-insight-list b {
    color: var(--text-strong);
}
:root[data-theme="light"] .dashboard-insight-list div,
:root[data-theme="light"] .realtime-comment-metrics > div,
:root[data-theme="light"] .console-worker-summary article,
:root[data-theme="light"] .script-param-field,
:root[data-theme="light"] .filter-card,
:root[data-theme="light"] .note-log-duration-badge,
:root[data-theme="light"] .comment-detail-list,
:root[data-theme="light"] .comment-note-item,
:root[data-theme="light"] .comment-note-search-wrap,
:root[data-theme="light"] .user-page-task-panel,
:root[data-theme="light"] .user-page-task-result,
:root[data-theme="light"] .user-page-task-result-grid > div,
:root[data-theme="light"] .console-tabs {
    background: var(--surface-inset);
    border-color: var(--border-soft);
}
:root[data-theme="light"] .console-status-rail {
    background: var(--surface-2);
    border-color: var(--border-soft);
}
:root[data-theme="light"] .monitor-check-card {
    background: var(--surface-1);
    border-color: var(--border-soft);
    color: var(--text-body);
}
:root[data-theme="light"] .monitor-check-card:hover {
    background: var(--surface-2);
}
:root[data-theme="light"] .monitor-check-box {
    background: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.06);
}
:root[data-theme="light"] .comment-avatar {
    background: var(--surface-inset);
}
/* 表单：这些控件此前把底色写死成 #0e1930 / rgba(2,6,23,*) */
:root[data-theme="light"] .admin-select-trigger {
    background: var(--bg-input);
    border-color: var(--border-soft);
    color: var(--text);
}
:root[data-theme="light"] .admin-select-trigger:hover {
    background: var(--surface-2);
    border-color: var(--border);
}
:root[data-theme="light"] .admin-select.is-disabled .admin-select-trigger,
:root[data-theme="light"] .admin-select-trigger:disabled {
    background: var(--surface-inset);
}
:root[data-theme="light"] .admin-select-menu {
    background: #ffffff;
    border-color: var(--border);
    box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.35);
}
:root[data-theme="light"] .users-create-form input,
:root[data-theme="light"] .users-search-input,
:root[data-theme="light"] .script-param-field input,
:root[data-theme="light"] .script-param-field select,
:root[data-theme="light"] .comment-note-search-wrap input,
:root[data-theme="light"] .realtime-comment-pagination select,
:root[data-theme="light"] .realtime-task-dispatch-control select,
:root[data-theme="light"] .realtime-task-filters input,
:root[data-theme="light"] .realtime-task-filters select {
    background: var(--bg-input);
    border-color: var(--border-soft);
    color: var(--text);
}
:root[data-theme="light"] .users-create-form .check-line {
    background: var(--surface-inset);
}
/* 通用模态 */
:root[data-theme="light"] .modal-card {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text);
}
:root[data-theme="light"] .modal-head {
    background: var(--surface-2);
    border-bottom-color: var(--border-soft);
}
:root[data-theme="light"] .comment-image-preview-card {
    background: var(--surface-3);
    border-color: var(--border);
}


/* ==========================================================================
   16. 响应式收口
   --------------------------------------------------------------------------
   原先有 13 个各不相同的断点（1320/1200/1100/1050/900/820/800/768/640/520…）。
   本层统一补一层「外壳级」断点，只调外壳节奏，不动各页面内部的栅格规则。
   ========================================================================== */
@media (max-width: 1440px) {
    .content-card {
        padding: var(--sp-9);
    }
}
@media (max-width: 1100px) {
    .main {
        padding: var(--sp-6);
    }
    .content-card {
        padding: var(--sp-8);
    }
    .page-header {
        margin-bottom: var(--sp-8);
        padding-bottom: var(--sp-5);
    }
}
@media (max-width: 760px) {
    :root {
        --sidebar-w-rail: 64px;
    }
    .sidebar {
        width: var(--sidebar-w-rail);
        padding: var(--sp-6) var(--sp-3);
    }
    .sidebar-toggle {
        left: var(--sidebar-w-rail);
    }
    .main {
        margin-left: var(--sidebar-w-rail);
        width: calc(100% - var(--sidebar-w-rail));
        padding: var(--sp-5);
    }
    .content-card {
        padding: var(--sp-6);
        border-radius: var(--r-3xl);
    }
    .page-header {
        gap: var(--sp-4);
    }
    .page-header h1 {
        font-size: var(--fs-lg);
    }
    .page-header h1::after {
        display: none;
    }
    .user-chip {
        /* 窄屏图标栏沿用既有的 display:none（本层的基础规则是 display:grid，
           若不在此显式收回，会以「后出现者胜」把窄屏隐藏规则推翻） */
        display: none;
    }
    .sidebar-bottom {
        padding: var(--sp-5) 0 0;
    }
    /* 64px 图标栏放不下外观控件，收起以免挤破导航 */
    .theme-control {
        display: none;
    }
    body.sidebar-collapsed .main {
        margin-left: 0;
        width: 100%;
    }
}


/* ==========================================================================
   17. 降低动效偏好
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .primary-btn,
    .ghost-btn,
    .danger-btn,
    .theme-mode-btn,
    .theme-dot,
    .sidebar-toggle,
    .sidebar-subnav a,
    .sidebar-bottom .ghost-btn,
    .console-metric-card,
    .console-event-card,
    .console-queue-card,
    .dashboard-panel,
    .console-page-btn,
    .realtime-comment-pagination button,
    .realtime-comment-tab,
    .realtime-comment-tab::after,
    .console-tab-btn,
    .console-tab-btn::after,
    .realtime-task-tab,
    .realtime-task-tab::after,
    .user-row {
        transition: none !important;
    }
    .nav-link:hover,
    .theme-dot:hover,
    .primary-btn:active,
    .ghost-btn:active,
    .danger-btn:active {
        transform: none;
    }
}
