/* =========================================================
   航康客服部管理系统 · 统一 UI 设计系统
   主色不变：青绿 #14b8a6 / #0d9488，底色 #f7f9fc，语义色沿用红/橙/绿
   ========================================================= */

/* ---------- 设计变量 ---------- */
:root {
    --brand-50: #f0fdfa;
    --brand-100: #ccfbf1;
    --brand-200: #99f6e4;
    --brand-400: #2dd4bf;
    --brand-500: #14b8a6;
    --brand-600: #0d9488;
    --brand-700: #0f766e;

    --bg: #f7f9fc;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e8eef5;
    --border-soft: #f1f5f9;

    --text-1: #0f172a;
    --text-2: #334155;
    --text-3: #5b6b80;
    --text-4: #8494a8;

    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --warn: #d97706;
    --warn-soft: #fffbeb;
    --success: #16a34a;
    --success-soft: #f0fdf4;
    --info: #0369a1;
    --info-soft: #e0f2fe;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 18px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-md: 0 10px 26px rgba(15, 23, 42, .07);
    --shadow-brand: 0 8px 22px rgba(20, 184, 166, .22);

    --ring: 0 0 0 3px rgba(20, 184, 166, .16);
    --sidebar-w: 232px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(20, 184, 166, .18); }

a { color: var(--brand-600); }
a:hover { color: var(--brand-700); }

/* 键盘可见焦点 */
:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
    border-radius: 6px;
}

/* 细滚动条 */
.nav::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.modal::-webkit-scrollbar { width: 8px; height: 8px; }
.nav::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
    background: #d5dee9; border-radius: 99px;
}
.nav::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover { background: #b9c6d6; }

/* ---------- 整体布局 ---------- */
.app { display: flex; min-height: 100vh; margin: 0; padding: 0; }

/* ---------- 左侧边栏 ---------- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border-soft);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    color: var(--text-2);
    padding-top: 0;
    position: relative;
    z-index: 20;
}
.sidebar-brand {
    padding: 18px 18px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid #f4f7fb;
}
.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(20, 184, 166, .28);
}
.brand-icon svg { width: 21px; height: 21px; }
.sidebar-brand h2 {
    font-size: 15.5px; font-weight: 650; color: var(--text-1);
    letter-spacing: -.01em; line-height: 1.3;
}
.sidebar-brand p {
    font-size: 11.5px; color: var(--text-4); margin-top: 1px;
    letter-spacing: .02em;
}

.nav { padding: 12px 10px 8px; flex: 1; overflow-y: auto; }
.nav-label {
    display: block;
    padding: 14px 10px 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    color: #a4b2c4;
    text-transform: uppercase;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--text-3);
    text-decoration: none;
    margin-bottom: 2px;
    font-size: 13.5px;
    line-height: 1.35;
    transition: background .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
    position: relative;
}
.nav-item:hover { background: #f6f9fc; color: var(--text-1); }
.nav-item.active {
    background: linear-gradient(90deg, rgba(20, 184, 166, .12), rgba(20, 184, 166, .04));
    color: var(--brand-700);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--brand-500);
}
.nav-item.active .nav-icon { color: var(--brand-600); }
.nav-icon {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #8b9bb0;
    transition: color .16s var(--ease);
    font-size: 16px;
}
.nav-icon svg { width: 18px; height: 18px; display: block; }
.nav-item:hover .nav-icon { color: var(--brand-600); }

.sidebar-footer {
    padding: 12px 14px 16px;
    border-top: 1px solid #f4f7fb;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.side-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-3);
    text-decoration: none;
    font-size: 12.5px;
    transition: all .16s var(--ease);
}
.side-action:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.side-action.primary {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(20, 184, 166, .26);
}
.side-action.primary:hover { filter: brightness(1.04); color: #fff; box-shadow: 0 6px 16px rgba(20, 184, 166, .34); }

/* 旧主题切换（兼容保留） */
.theme-switcher { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; color: var(--text-4); font-size: 11px; }
.theme-switcher a { text-decoration: none; font-weight: 600; }
.logout { color: var(--text-4); text-decoration: none; font-size: 12px; }
.logout:hover { color: var(--brand-500); }

/* ---------- 主内容区 ---------- */
.main {
    flex: 1;
    padding: 22px 28px 44px;
    overflow-x: auto;
    min-width: 0;
    background: var(--bg);
}

/* 顶栏 */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.topbar h1 {
    font-size: 24px; font-weight: 700; color: var(--text-1);
    margin-top: 4px; letter-spacing: -.02em; line-height: 1.25;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
    color: var(--brand-600); text-transform: uppercase;
}
.page-subtitle { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.date-hint { color: var(--text-3); font-size: 12.5px; margin-top: 5px; }
.date-hint strong { color: var(--text-2); font-weight: 600; }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- 表单控件 ---------- */
.date-input, .filter-select, .input, .select, .search-box input {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text-2);
    font-family: inherit;
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
    min-height: 38px;
}
.date-input:hover, .filter-select:hover, .input:hover, .select:hover { border-color: #d3deea; }
.date-input:focus, .filter-select:focus, .input:focus, .select:focus, .search-box input:focus {
    outline: none;
    border-color: var(--brand-400);
    box-shadow: var(--ring);
}
.filter-select { cursor: pointer; appearance: none; padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238494a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.search-box { position: relative; display: flex; align-items: center; }
.search-box svg {
    position: absolute; left: 12px; width: 16px; height: 16px;
    color: var(--text-4); pointer-events: none;
}
.search-box input { padding-left: 36px; width: 100%; }

.btn-outline, .btn-primary, .btn-ghost, .btn-danger, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    font-family: inherit;
    transition: all .16s var(--ease);
    white-space: nowrap;
    border: 1px solid transparent;
}
.btn-outline {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-3);
}
.btn-outline:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(20, 184, 166, .24);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(20, 184, 166, .32); color: #fff; }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text-3); }
.btn-ghost:hover { background: #f1f5f9; color: var(--text-1); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #ffe4e4; color: #b91c1c; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn-icon {
    width: 34px; height: 34px; padding: 0;
    border-radius: 9px; background: var(--surface);
    border: 1px solid var(--border); color: var(--text-3);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-icon:hover { color: var(--brand-600); border-color: var(--brand-200); background: var(--brand-50); }
.btn:disabled, .btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- 顶部横幅 ---------- */
.welcome-banner {
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .22), transparent 42%),
        radial-gradient(circle at 72% 105%, rgba(13, 148, 136, .55), transparent 52%),
        linear-gradient(135deg, #17c3b0, #0d9488 55%, #0b7f75);
    border-radius: var(--radius-xl);
    padding: 30px 32px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(13, 148, 136, .2);
}
.welcome-banner::after {
    content: "";
    position: absolute;
    right: -60px; top: -80px;
    width: 260px; height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    pointer-events: none;
}
.welcome-banner h2 {
    font-size: 22px; font-weight: 700; margin: 8px 0 10px;
    letter-spacing: -.02em; line-height: 1.32; max-width: 620px;
}
.welcome-banner p { font-size: 13.5px; opacity: .92; margin-bottom: 18px; line-height: 1.6; }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 17px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(6px);
    transition: all .16s var(--ease);
}
.welcome-btn:hover { background: rgba(255, 255, 255, .3); color: #fff; transform: translateY(-1px); }

/* 横幅内日期胶囊 */
.hero-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .16);
    font-size: 12px;
    letter-spacing: .01em;
}
.hero-layout { display: flex; align-items: center; gap: 28px; justify-content: space-between; flex-wrap: wrap; }
.hero-copy { flex: 1 1 420px; min-width: 0; }
.hero-panel {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(8px);
}
.hero-ring {
    --pct: 0;
    width: 86px; height: 86px;
    border-radius: 50%;
    background: conic-gradient(#ffffff calc(var(--pct) * 1%), rgba(255, 255, 255, .22) 0);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.hero-ring::before {
    content: "";
    position: absolute; inset: 8px;
    border-radius: 50%;
    background: #0f887d;
}
.hero-ring strong {
    position: relative; z-index: 1;
    font-size: 20px; font-weight: 700; letter-spacing: -.02em;
}
.hero-ring small { position: relative; z-index: 1; font-size: 10px; opacity: .8; display: block; text-align: center; }
.hero-mini { display: grid; gap: 7px; font-size: 12px; }
.hero-mini span { display: flex; justify-content: space-between; gap: 18px; opacity: .9; }
.hero-mini b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 统计卡片 ---------- */
.stats-row, .kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card, .kpi-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
    overflow: hidden;
}
.stat-card[onclick], .kpi-card[onclick] { cursor: pointer; }
.stat-card[onclick]:hover, .kpi-card[onclick]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #dfe9f3;
}
.stat-card::before, .kpi-card::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--brand-500);
    opacity: 0;
    transition: opacity .18s var(--ease);
}
.stat-card:hover::before, .kpi-card:hover::before { opacity: 1; }
.kpi-card.accent-red::before { background: var(--danger); opacity: 1; }
.kpi-card.accent-orange::before { background: var(--warn); opacity: 1; }
.kpi-card.accent-green::before { background: var(--success); opacity: 1; }
.kpi-card.accent-teal::before { background: var(--brand-500); opacity: 1; }

.stat-icon {
    width: 42px; height: 42px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.teal { background: var(--brand-50); color: var(--brand-600); }
.stat-icon.green { background: var(--success-soft); color: var(--success); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }
.stat-icon.orange { background: var(--warn-soft); color: var(--warn); }
.stat-icon.blue { background: var(--info-soft); color: var(--info); }
.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; font-weight: 500; }
.stat-value {
    font-size: 26px; font-weight: 700; color: var(--text-1);
    line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.stat-value small { font-size: 13px; font-weight: 600; color: var(--text-4); margin-left: 3px; }
.stat-value.green { color: var(--success); }
.stat-value.red { color: var(--danger); }
.stat-value.orange { color: var(--warn); }
.stat-sub { font-size: 12px; color: var(--text-4); margin-top: 5px; }
.stat-sub .up { color: var(--success); font-weight: 600; }
.stat-sub .down { color: var(--danger); font-weight: 600; }

/* ---------- 图表行 / 卡片 ---------- */
.chart-row { display: flex; gap: 16px; margin-bottom: 20px; }
.chart-row > .table-wrap { flex: 1; min-width: 0; }
.chart-row > .card, .chart-row > .panel { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.chart-box { height: 240px; }
.card, .panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-head, .panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
    flex-wrap: wrap;
}
.card-head h3, .panel-head h3 { font-size: 15px; font-weight: 650; color: var(--text-1); letter-spacing: -.01em; }
.card-head p, .panel-head p { font-size: 12px; color: var(--text-4); margin-top: 2px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 16px; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-link { font-size: 12.5px; color: var(--brand-600); text-decoration: none; font-weight: 500; }
.card-link:hover { text-decoration: underline; }

/* ---------- 工具栏 ---------- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }
.toolbar-meta { font-size: 12.5px; color: var(--text-4); }
.toolbar-label { font-size: 12.5px; color: var(--text-3); font-weight: 500; }

/* ---------- 表格 ---------- */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: auto;
    margin-bottom: 20px;
    position: relative;
}
.store-table, .data-table {
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.store-table th, .data-table th {
    padding: 12px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .03em;
    color: var(--text-4);
    border-bottom: 1px solid var(--border-soft);
    background: #fbfcfe;
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
}
.store-table td, .data-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #f4f7fb;
    font-size: 13.5px;
    color: var(--text-2);
    vertical-align: middle;
}
.store-table tbody tr, .data-table tbody tr { transition: background .13s var(--ease); }
.store-table tbody tr:hover, .data-table tbody tr:hover { background: #f8fbfd; }
.store-table tbody tr:last-child td, .data-table tbody tr:last-child td { border-bottom: none; }
.store-table tbody tr.is-link, .data-table tbody tr.is-link { cursor: pointer; }
.store-table tbody tr.is-link:hover { background: var(--brand-50); }
.num, .cell-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* 紧凑型明细表（列多时使用） */
.store-table.compact { table-layout: fixed; min-width: 1160px; }
.store-table.compact th,
.store-table.compact td { padding: 11px 9px; text-align: center; white-space: nowrap; }
.store-table.compact td:first-child { text-align: left; }
.store-table.compact th:first-child { text-align: left; }
.cell-center { text-align: center; }
/* 卡片内表格横向滚动容器（卡片本身 overflow:hidden，长表需单独滚动） */
.table-scroll { overflow-x: auto; }
.cell-muted { color: var(--text-4); font-size: 12.5px; }
.cell-strong { color: var(--text-1); font-weight: 600; }
.cell-alert { color: var(--danger); font-weight: 600; }
.cell-ok { color: var(--success); }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 表格底部/页脚 */
.table-foot {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 12px 18px;
    border-top: 1px solid var(--border-soft);
    font-size: 12.5px; color: var(--text-4);
    flex-wrap: wrap;
}

/* ---------- 标签 / 徽章 ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.tag-green { background: #dcfce7; color: #166534; }
.tag-gray { background: #eef2f7; color: #5b6b80; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-blue { background: var(--info-soft); color: var(--info); }
.tag-teal { background: var(--brand-100); color: var(--brand-700); }
.tag-amber { background: #fef3c7; color: #92400e; }
.tag-violet { background: #ede9fe; color: #5b21b6; }
.tag-dot::before {
    content: "";
    width: 5px; height: 5px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--brand-50);
    color: var(--brand-700);
    border: 1px solid rgba(20, 184, 166, .14);
    white-space: nowrap;
}
.score { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.score.green { color: var(--success); }
.score.red { color: var(--danger); }
.score.orange { color: var(--warn); }
.dash { color: #cbd5e1; }

/* 排名徽章 */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    padding: 0 8px;
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--text-3);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.rank-badge.top { background: #fef3c7; color: #b45309; }

.score-pill {
    display: inline-block;
    min-width: 52px;
    padding: 2px 9px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: var(--surface-2);
    color: var(--text-2);
}
.score-pill.ok { background: var(--success-soft); color: #15803d; }
.score-pill.bad { background: var(--danger-soft); color: var(--danger); }
.score-pill.warn { background: var(--warn-soft); color: #b45309; }

/* ---------- 分段标签 / 状态筛选 ---------- */
.tabs, .tab-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab, .tab-link {
    padding: 10px 16px;
    font-size: 13.5px;
    color: var(--text-3);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color .15s var(--ease), border-color .15s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tab:hover, .tab-link:hover { color: var(--text-1); }
.tab.active, .tab-link.active { color: var(--brand-700); border-bottom-color: var(--brand-500); font-weight: 600; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-3);
    font-size: 12.5px;
    text-decoration: none;
    transition: all .15s var(--ease);
    white-space: nowrap;
}
.pill:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.pill.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 4px 10px rgba(13, 148, 136, .22); }
.pill b { font-weight: 700; font-variant-numeric: tabular-nums; }
.pill.active b { color: #fff; }
.pill:not(.active) b { color: var(--text-2); }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 12.5px; color: var(--text-2);
    margin-bottom: 6px; font-weight: 600;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text-1);
    background: var(--surface);
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--brand-400);
    box-shadow: var(--ring);
}
.form-group textarea { resize: vertical; min-height: 76px; line-height: 1.6; }
.form-group .hint { font-size: 11.5px; color: var(--text-4); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .46);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    z-index: 100;
}
.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    width: 90%; max-width: 520px;
    max-height: 86vh; overflow-y: auto;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
    animation: modalIn .18s var(--ease);
}
.modal h3 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.modal-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; margin-bottom: 18px;
}
.modal-close {
    width: 30px; height: 30px; flex-shrink: 0;
    border: none; border-radius: 50%;
    background: #f1f5f9; color: var(--text-3);
    cursor: pointer; font-size: 16px; line-height: 1;
    transition: all .15s var(--ease);
}
.modal-close:hover { background: #e2e8f0; color: var(--text-1); }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 空状态 / 通知 ---------- */
.empty-state {
    padding: 56px 24px;
    text-align: center;
    color: var(--text-4);
    font-size: 13.5px;
}
.empty-state .empty-icon {
    width: 54px; height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.empty-state strong { display: block; color: var(--text-2); font-size: 14.5px; margin-bottom: 4px; }
.empty-state a { color: var(--brand-600); text-decoration: none; }

.notice {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.6;
}
.notice.ok { background: var(--success-soft); color: #166534; }
.notice.error { background: var(--danger-soft); color: #991b1b; }
.notice.info { background: var(--brand-50); color: var(--brand-700); }
.notice.warn { background: var(--warn-soft); color: #92400e; }

/* ---------- 详情页指标卡 ---------- */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.metric-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.metric-card.primary {
    background: linear-gradient(140deg, #17c3b0, #0d9488 60%, #0b7f75);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 28px rgba(13, 148, 136, .22);
}
.metric-card.primary::after {
    content: ""; position: absolute; right: -36px; bottom: -52px;
    width: 150px; height: 150px; border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}
.metric-label { font-size: 12.5px; font-weight: 600; color: var(--text-3); letter-spacing: .01em; }
.metric-card.primary .metric-label { color: rgba(255, 255, 255, .88); }
.metric-value {
    font-size: 34px; font-weight: 700; line-height: 1.1;
    letter-spacing: -.03em; margin-top: 8px;
    font-variant-numeric: tabular-nums;
}
.metric-card.primary .metric-value { font-size: 42px; }
.metric-foot { font-size: 11.5px; color: var(--text-4); margin-top: 8px; display: flex; justify-content: space-between; gap: 8px; }
.metric-card.primary .metric-foot { color: rgba(255, 255, 255, .82); }
.metric-bar { height: 5px; border-radius: 99px; background: #eef2f7; margin-top: 12px; overflow: hidden; }
.metric-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); }
.metric-card.primary .metric-bar { background: rgba(255, 255, 255, .25); }
.metric-card.primary .metric-bar i { background: #fff; }
.weight-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text-4);
    font-size: 11px;
    font-weight: 600;
}

/* 子指标网格 */
.sub-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}
.sub-tile {
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 12px 10px;
    text-align: center;
    transition: all .16s var(--ease);
    min-width: 0;
}
.sub-tile:hover { background: #fff; border-color: var(--border); box-shadow: var(--shadow-xs); }
.sub-tile .sub-label { font-size: 11.5px; color: var(--text-3); line-height: 1.4; min-height: 32px; }
.sub-tile .sub-value {
    font-size: 17px; font-weight: 700; color: var(--text-1);
    margin-top: 4px; font-variant-numeric: tabular-nums;
}
.sub-tile.is-empty .sub-value { color: #cbd5e1; }

/* ---------- 概览报告区 ---------- */
.report-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 18px 20px 8px;
}
.report-tile {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--surface);
}
.report-tile .rt-label { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.report-tile .rt-value { font-size: 22px; font-weight: 700; margin-top: 5px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.report-tile .rt-value small { font-size: 12px; font-weight: 600; color: var(--text-4); margin-left: 2px; }
.report-tile.ok { background: var(--success-soft); border-color: #dcfce7; }
.report-tile.ok .rt-value { color: #15803d; }
.report-tile.warn { background: var(--warn-soft); border-color: #fef3c7; }
.report-tile.warn .rt-value { color: #b45309; }
.report-tile.bad { background: var(--danger-soft); border-color: #fee2e2; }
.report-tile.bad .rt-value { color: var(--danger); }
.report-tile.info { background: var(--brand-50); border-color: #ccfbf1; }
.report-tile.info .rt-value { color: var(--brand-700); }

/* 报告区说明行 / 异常表 / 空状态 */
.report-meta {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    padding: 4px 20px 14px;
    font-size: 12.5px; color: var(--text-3);
}
.report-table { min-width: 760px; border-top: 1px solid var(--border-soft); }
.report-empty { padding: 6px 20px 20px; }

.issue-list { display: flex; flex-wrap: wrap; gap: 6px; }
.issue-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--danger-soft);
    color: #b91c1c;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.issue-chip strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.issue-chip.muted { background: var(--surface-2); color: var(--text-4); font-weight: 400; }

/* 折叠说明 */
details.notes {
    border-top: 1px solid var(--border-soft);
    background: #fcfdfe;
}
details.notes summary {
    padding: 13px 20px;
    font-size: 12.5px;
    color: var(--text-3);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
details.notes summary::-webkit-details-marker { display: none; }
details.notes summary::before {
    content: "";
    width: 6px; height: 6px;
    border-right: 2px solid var(--text-4);
    border-bottom: 2px solid var(--text-4);
    transform: rotate(-45deg);
    transition: transform .18s var(--ease);
    margin-right: 2px;
}
details.notes[open] summary::before { transform: rotate(45deg); }
details.notes ul {
    padding: 0 20px 18px 38px;
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.85;
}
details.notes li { margin-bottom: 2px; }

/* ---------- 其他通用 ---------- */
.section-title {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 0 0 12px;
}
.section-title h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.section-title span { font-size: 12.5px; color: var(--text-4); }

.avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--brand-100);
    color: var(--brand-700);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 700;
    flex-shrink: 0;
}
.meta-inline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--border-soft); margin: 16px 0; border: none; }
.text-muted { color: var(--text-4); }
.text-strong { color: var(--text-1); font-weight: 600; }
.text-warn { color: var(--warn); font-weight: 600; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-12 { margin-bottom: 12px !important; }
.mb-20 { margin-bottom: 20px !important; }
.w-100 { width: 100%; }

/* 底部轻提示 */
.footnote {
    padding: 14px 18px;
    border-radius: var(--radius);
    background: #fbfcfe;
    border: 1px dashed var(--border);
    font-size: 12.5px;
    color: var(--text-4);
    line-height: 1.8;
}
.footnote strong { color: var(--text-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
    .chart-box { height: 200px; }
    .stats-row, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .sub-grid { grid-template-columns: repeat(4, 1fr); }
    .report-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
    .sidebar { width: 204px; }
    .main { padding: 20px 22px 40px; }
}
@media (max-width: 900px) {
    .app { flex-direction: column; }
    .chart-row { flex-direction: column; }
    .chart-row > .card, .chart-row > .panel { flex: none; }
    .chart-box { height: 230px; }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
        position: sticky;
        top: 0;
        z-index: 50;
        box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
    }
    .sidebar-brand { padding: 12px 16px 10px; border-bottom: none; }
    .brand-icon { width: 34px; height: 34px; border-radius: 10px; }
    .nav {
        display: flex;
        gap: 6px;
        padding: 4px 12px 10px;
        overflow-x: auto;
        overflow-y: hidden;
        flex: none;
        scrollbar-width: none;
    }
    .nav::-webkit-scrollbar { display: none; }
    .nav-label { display: none; }
    .nav-item {
        flex: 0 0 auto;
        margin-bottom: 0;
        padding: 8px 13px;
        white-space: nowrap;
        border-radius: 99px;
    }
    .nav-item.active { box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .25); }
    .sidebar-footer {
        flex-direction: row;
        padding: 0 16px 12px;
        border-top: none;
        gap: 8px;
    }
    .side-action { flex: 1; padding: 8px; }
    .main { padding: 18px 16px 36px; }
    .topbar { align-items: flex-start; }
    .topbar h1 { font-size: 21px; }
    .welcome-banner { padding: 24px 22px; }
    .welcome-banner h2 { font-size: 19px; }
    .hero-panel { width: 100%; justify-content: flex-start; }
}
@media (max-width: 560px) {
    .stats-row, .kpi-grid, .metric-grid { grid-template-columns: 1fr; }
    .sub-grid { grid-template-columns: repeat(2, 1fr); }
    .report-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 15px 16px; }
    .topbar-actions { width: 100%; }
    .topbar-actions .filter-select, .topbar-actions .date-input { flex: 1; }
    .welcome-banner { padding: 20px 18px; }
    .modal { padding: 22px 18px; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .stat-card[onclick]:hover, .kpi-card[onclick]:hover,
    .btn-primary:hover, .welcome-btn:hover, .metric-card:hover { transform: none; }
}


/* ===================== 2026-10-28 体验优化 ===================== */

/* 侧栏搜索 */
.side-search {
    display: flex; align-items: center; gap: 8px;
    margin: 0 14px 10px; padding: 8px 10px;
    background: var(--surface-2); border: 1px solid var(--border-soft);
    border-radius: 10px;
}
.side-search svg { color: var(--text-4); flex: none; }
.side-search input { border: none; background: none; outline: none; font-size: 13px; width: 100%; color: var(--text-1); }
.side-search input::placeholder { color: var(--text-4); }

/* 侧栏折叠 */
.sidebar-toggle {
    display: none; align-items: center; justify-content: center;
    margin: 0 14px 8px; padding: 6px; border: 1px dashed var(--border);
    border-radius: 8px; background: none; color: var(--text-4); cursor: pointer;
}
.sidebar-toggle:hover { color: var(--brand-600); border-color: var(--brand-500); }

/* 筛选 chips */
.chip-group { display: inline-flex; gap: 6px; }
.chip {
    display: inline-flex; align-items: center; padding: 6px 12px;
    border: 1px solid var(--border-soft); border-radius: 999px;
    background: var(--surface); color: var(--text-2); font-size: 12.5px;
    text-decoration: none; transition: all .15s ease;
}
.chip:hover { border-color: var(--brand-500); color: var(--brand-600); }
.chip.active { background: var(--brand-50, #effcf9); border-color: var(--brand-500); color: var(--brand-700, #0d9488); font-weight: 600; }

/* 字段中文 chip */
.field-chip {
    display: inline-block; padding: 2px 9px; font-size: 12px;
    background: var(--surface-2); border: 1px solid var(--border-soft);
    border-radius: 6px; color: var(--text-2);
}

/* 复制行 */
.copy-line { display: flex; gap: 10px; align-items: stretch; }
.copy-line code { flex: 1; min-width: 0; }
.btn-copy { padding: 0 16px; white-space: nowrap; }

/* 表头吸顶 + 表格纵向滚动 */
.table-wrap { max-height: calc(100vh - 240px); overflow: auto; }
.store-table thead th,
.data-table thead th {
    position: sticky; top: 0; z-index: 3;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 var(--border);
}

/* 按钮 loading 态 */
.btn-primary.is-loading, .btn-outline.is-loading, button.is-loading {
    opacity: .65; cursor: progress;
}

/* 登录页密码显隐 */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 44px !important; }
.pwd-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    border: none; background: none; color: #94a3b8; cursor: pointer; padding: 4px;
    display: flex; align-items: center;
}
.pwd-toggle:hover { color: #0f172a; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
    .main { padding: 18px 18px 40px; }
    .sidebar { width: 200px; }
    body.sb-collapsed .sidebar { width: 68px; }
    body.sb-collapsed .sidebar-brand h2,
    body.sb-collapsed .sidebar-brand p,
    body.sb-collapsed .nav-label,
    body.sb-collapsed .side-search { display: none; }
    body.sb-collapsed .nav-item,
    body.sb-collapsed .side-action { font-size: 0; }
    body.sb-collapsed .nav-item::after,
    body.sb-collapsed .side-action::after { content: ''; }
    body.sb-collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
    body.sb-collapsed .side-action { justify-content: center; }
    .sidebar-toggle { display: flex; }
}

@media (max-width: 980px) {
    .sidebar { width: 64px; }
    .sidebar-brand h2, .sidebar-brand p, .nav-label, .side-search { display: none; }
    .nav-item, .side-action { font-size: 0; }
    .nav-item { justify-content: center; }
    .main { padding: 14px 14px 36px; }
    .topbar { flex-wrap: wrap; gap: 12px; }
    .toolbar { flex-wrap: wrap; }
    .table-wrap { max-height: none; }
    .card, .table-wrap { border-radius: 10px; }
}


/* 表格首列冻结（店铺名） */
.store-table.freeze th:first-child,
.store-table.freeze td:first-child {
    position: sticky; left: 0; z-index: 2;
    background: var(--surface);
    box-shadow: 2px 0 6px -4px rgba(15,23,42,.20);
}
.store-table.freeze thead th:first-child { z-index: 4; }
.scroll-hint { display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--text-4); padding:8px 4px 0; }


/* 工单顶部统计卡（仅 tickets.php 使用；用独立类名，避免覆盖通用 .stat-card） */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.stat-tile{display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:var(--surface);border:1px solid var(--border-soft);border-radius:var(--radius);
  padding:14px 16px;text-decoration:none;transition:border-color .15s var(--ease),background .15s var(--ease),box-shadow .15s var(--ease)}
.stat-tile:hover{border-color:var(--brand-200);background:var(--brand-50)}
.stat-tile.on{border-color:var(--brand-500);box-shadow:0 0 0 3px rgba(20,184,166,.12)}
.stat-tile .stat-label{font-weight:500}
.stat-num{font-size:22px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;color:var(--text-1)}
.stat-num.warn{color:#dc2626}
@media (max-width:900px){.stat-grid{grid-template-columns:repeat(2,1fr)}}



/* ===================== 2026-10-29 全局 UI 打磨层 =====================
   原则：不改变任何功能与既有配色；只做一致性、状态反馈与细节质感提升 */

/* —— 基础排版 —— */
body { text-rendering: optimizeLegibility; }
h1, h2, h3 { overflow-wrap: break-word; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
::placeholder { color: #9aa9bd; opacity: 1; }
hr { border: none; height: 1px; background: var(--border-soft); }

/* Firefox 细滚动条（与 WebKit 细滚动条一致） */
* { scrollbar-width: thin; scrollbar-color: #d5dee9 transparent; }

/* 表格横向滚动不穿透为页面级横向滚动 */
.table-wrap, .table-scroll { overscroll-behavior-x: contain; }

/* —— 控件状态反馈 —— */
.btn:active, .btn-primary:active, .btn-outline:active,
.btn-ghost:active, .btn-danger:active { transform: translateY(0) scale(.985); }
.btn-icon:active { transform: scale(.94); }
input[type="file"] { cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-600); }

/* 统一文件选择控件外观（各页通用） */
.file-input {
    padding: 7px 12px;
    border: 1px dashed var(--border);
    border-radius: 9px;
    font-size: 12.5px;
    color: var(--text-3);
    background: var(--surface-2);
    font-family: inherit;
    transition: border-color .16s var(--ease), background .16s var(--ease), color .16s var(--ease);
}
.file-input:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-700); }

/* 弹窗遮罩与通知条淡入 */
.modal-mask { animation: maskIn .16s var(--ease); }
.notice { animation: maskIn .2s var(--ease); }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

/* 小型控件触控目标高度 */
.tag, .pill, .chip { min-height: 26px; }

/* 危险操作文字链接（表格内删除等） */
.link-danger {
    font-size: 12.5px; color: var(--danger); text-decoration: none;
    border-radius: 6px; padding: 3px 8px; white-space: nowrap;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.link-danger:hover { background: var(--danger-soft); color: #b91c1c; }

/* —— 通用详情块（工单详情等页面） —— */
.detail-block {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.detail-block > h3 { font-size: 15px; font-weight: 650; color: var(--text-1); letter-spacing: -.01em; margin: 0 0 14px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
.info-item { min-width: 0; }
.info-item .k { display: block; font-size: 12px; color: var(--text-4); font-weight: 600; margin-bottom: 2px; }
.info-item .v { font-size: 13.5px; color: var(--text-2); font-weight: 500; overflow-wrap: anywhere; }
.proof-img {
    max-width: 160px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface-2);
    cursor: zoom-in;
    transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.proof-img:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* 返回链接（详情页顶部） */
.back-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; color: var(--brand-600); text-decoration: none; font-weight: 500;
    margin-bottom: 10px;
}
.back-link:hover { color: var(--brand-700); text-decoration: underline; }

/* —— 选择列表（采集需求等双栏页） —— */
.split-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 11px 12px; border-radius: 10px;
    border: 1px solid transparent; background: var(--surface-2);
    transition: background .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.pick-item:hover { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-xs); }
.pick-item.active { background: var(--brand-50); border-color: var(--brand-200); }
.pick-item .pick-main { flex: 1; min-width: 0; text-decoration: none; }
.pick-item .pick-main:hover .pick-name { color: var(--brand-700); }
.pick-item .pick-name {
    display: block; font-size: 13.5px; font-weight: 600; color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick-item .pick-meta { display: block; font-size: 11.5px; color: var(--text-4); margin-top: 1px; }

/* —— 打印（工单详情等需要留档/打印的场景） —— */
@media print {
    .sidebar, .sidebar-toggle, .topbar-actions, .toolbar, .tabs, .tab-nav,
    .pill-row, .modal-mask, .side-search, .card-actions { display: none !important; }
    .app { display: block; }
    .main { padding: 0; overflow: visible; }
    .card, .table-wrap, .detail-block { box-shadow: none; border-color: #e5e7eb; }
    body { background: #fff; }
}

/* —— 移动端细节 —— */
@media (max-width: 900px) {
    .split-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .topbar h1 { font-size: 20px; }
    .info-grid { grid-template-columns: 1fr; }
    .modal { width: 100%; max-width: none; }
    .proof-img { max-width: 130px; }
}

/* 动态视口高度：修正移动端浏览器工具栏导致的 100vh 偏差 */
.app { min-height: 100vh; }
@supports (min-height: 100dvh) { .app { min-height: 100dvh; } }

/* ===================== 通用工具类（收敛各页 inline 样式） ===================== */
.toolbar-search { flex: 1 1 220px; max-width: 320px; min-width: 180px; }
.inline-form { display: inline; }
.btn-block { width: 100%; padding: 12px; }
.tag-lg { font-size: 12.5px; padding: 5px 12px; }
.chart-tall { height: 380px; }
.link-inherit { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.tag .link-inherit { margin-left: 4px; }
.meta-inline.tight { margin-top: 5px; }
.modal-head .page-subtitle { margin-top: 3px; }

/* —— 详情页 / 工单页 —— */
.page-title { margin: 12px 0 20px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.info-item .v.alert { color: var(--danger); font-weight: 600; }
.info-item .v.ok { color: var(--success); font-weight: 600; }
.mt-16 { margin-top: 16px; }
.ml-6 { margin-left: 6px; }
.form-row { display: flex; gap: 12px; }
.action-row { display: flex; gap: 6px; align-items: center; }
.reply-item { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.reply-item:last-child { border-bottom: none; }
.reply-body { margin-top: 6px; color: var(--text-3); line-height: 1.7; }
.reply-time { color: var(--text-4); font-size: 12px; margin-left: 8px; }
.btn-outline.danger { color: var(--danger); border-color: #fecaca; }
.mt-12 { margin-top: 12px; }
.proof-label { font-size: 12.5px; color: var(--text-4); margin-bottom: 8px; }
.proof-row { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.rule-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.w-180 { width: 180px; }
.w-280 { width: 280px; }
.table-compact { min-width: 0; }
.pad-20 { padding: 20px; }
.sup-thumb { width: 56px; height: 56px; margin: 0 auto; cursor: pointer; }
.text-danger-strong { color: var(--danger); font-weight: 600; }

/* —— 筛选栏 / 分页 / 锚点导航（此前只在页面内联，补齐统一定义） —— */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 18px 0; }
.anchor-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* —— 通用排版工具 —— */
.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cell-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex-1 { flex: 1; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.max-w-600 { max-width: 600px; }
.card-form { padding: 28px; }
.text-brand { color: var(--brand-700); }
.vsep { color: var(--border); margin: 0 8px; }
.code-block {
    display: block; background: var(--surface-2); border: 1px solid var(--border-soft);
    color: var(--text-2); padding: 12px; border-radius: 8px; font-size: 13px; word-break: break-all;
}
.code-pre { background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: 10px; font-size: 13px; overflow-x: auto; }
.doc-note { font-size: 12.5px; color: var(--text-3); line-height: 1.9; margin: 12px 0 0; }
.ml-auto { margin-left: auto; }
.link-muted { font-size: 12px; color: var(--text-3); }
.nowrap { white-space: nowrap; }
.card-doc { padding: 24px; max-width: 900px; }
.doc-h3 { margin: 24px 0 12px; }
.doc-h3.first { margin-top: 0; }
.board-range { flex: 1; min-width: 220px; font-size: 13px; color: var(--text-3); }
.btn-md { padding: 9px 16px; }
@media (max-width: 560px) { .page-title { font-size: 20px; } }

/* =========================================================
   V2 视觉层 · 深度重构
   仅覆盖配色 / 边框 / 圆角 / 阴影 / 字重 / 过渡，
   不改任何宽度、内边距、display、grid/flex 布局与断点，
   因此各页面结构与移动端表现与原版完全一致。
   ========================================================= */

/* ---------- 侧边栏：保持原有浅色底（不覆盖配色） ---------- */
.nav-item { border-radius: 10px; }

/* ---------- 页面骨架 ---------- */
body { background: #f4f6fa; }
.eyebrow {
    letter-spacing: .09em;
    text-transform: uppercase;
    font-size: 11px;
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--brand-500);
    margin-right: 7px;
    vertical-align: 2px;
}
.topbar h1 { letter-spacing: -.025em; font-weight: 700; }

/* ---------- 卡片 ---------- */
.card {
    border-color: #e7edf4;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 36px -24px rgba(16, 24, 40, .22);
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover {
    border-color: #dbe6f1;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 20px 46px -24px rgba(16, 24, 40, .28);
}
.card-head { border-bottom-color: #eef3f9; }
.card-head h3 { letter-spacing: -.012em; }

/* ---------- 指标卡 ---------- */
.kpi-card, .stat-card, .report-tile {
    border-color: #e7edf4;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 34px -24px rgba(16, 24, 40, .2);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.kpi-card:hover, .stat-card:hover {
    transform: translateY(-2px);
    border-color: #dbe6f1;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .05), 0 22px 42px -22px rgba(16, 24, 40, .26);
}

/* ---------- 按钮 ---------- */
.btn, .btn-primary, .btn-outline, .btn-danger, .btn-ghost { border-radius: 10px; }
.btn-primary {
    background: linear-gradient(135deg, #17c3b0, var(--brand-600));
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(13, 148, 136, .2), 0 10px 20px -12px rgba(13, 148, 136, .68);
    transition: background .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2dd4bf, var(--brand-600));
    box-shadow: 0 2px 5px rgba(13, 148, 136, .24), 0 14px 26px -12px rgba(13, 148, 136, .72);
}
.btn-primary:active { transform: translateY(1px); }
.btn-outline { border-color: #dfe7f0; }
.btn-outline:hover { border-color: var(--brand-400); background: var(--brand-50); }

/* ---------- 表格 ---------- */
.store-table thead th, .data-table thead th {
    background: #fbfcfe;
    color: #66788d;
    font-weight: 600;
    border-bottom-color: #eef3f9;
}
.store-table tbody tr:hover { background: #f7fbfb; }
.store-table td, .data-table td { border-bottom-color: #f3f7fb; }
.store-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- 分类标签 ---------- */
.tag { border-radius: 999px; font-weight: 500; }

/* ---------- 弹窗 ---------- */
.modal {
    border-radius: var(--radius-xl);
    box-shadow: 0 32px 80px -30px rgba(15, 23, 42, .55), 0 2px 8px rgba(15, 23, 42, .08);
}
.modal-mask { background: rgba(13, 28, 42, .44); backdrop-filter: blur(3px); }

/* ---------- 提示条 ---------- */
.notice { border-radius: 12px; }

/* ---------- 空状态 ---------- */
.empty-state { border-radius: 14px; }

/* ---------- 指标数值：放大字号、收紧字距 ---------- */
.stat-value {
    font-size: 29px;
    font-weight: 700;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.12;
}
.stat-label { font-size: 13px; color: #66788d; letter-spacing: .01em; }
.stat-sub { color: #8b9bad; }
.stat-icon { border-radius: 12px; }

/* ---------- 表格斑马纹（悬停时统一高亮） ---------- */
.store-table tbody tr:nth-child(even) { background: #fcfdff; }
.store-table tbody tr:hover,
.store-table tbody tr:nth-child(even):hover { background: #f5fbfa; }

/* =========================================================
   首页版式（复刻工作台布局：6 指标卡 + 主图/待办 + 三张底卡）
   仅首页使用，类名 dash-* / dk-*，不影响其他页面
   ========================================================= */
.welcome-banner h2 { font-size: 27px; font-weight: 700; letter-spacing: -.022em; }

.dash-kpi {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.dk-card {
    background: #fff;
    border: 1px solid #e7edf4;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 30px -22px rgba(16, 24, 40, .22);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.dk-card[role="link"] { cursor: pointer; }
.dk-card:hover {
    transform: translateY(-2px);
    border-color: #dbe6f1;
    box-shadow: 0 3px 8px rgba(16, 24, 40, .06), 0 22px 40px -22px rgba(16, 24, 40, .28);
}
.dk-icon {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.dk-icon svg { width: 19px; height: 19px; }
.dk-icon.red { background: #fef2f2; color: #dc2626; }
.dk-icon.orange { background: #fff7ed; color: #ea580c; }
.dk-icon.teal { background: #ecfdf8; color: #0d9488; }
.dk-icon.green { background: #f0fdf4; color: #16a34a; }
.dk-icon.blue { background: #eff6ff; color: #2563eb; }
.dk-icon.purple { background: #f5f3ff; color: #7c3aed; }
.dk-label { font-size: 12.5px; color: #7b8ca3; }
.dk-value {
    font-size: 25px; font-weight: 700; letter-spacing: -.03em;
    margin-top: 2px; color: #0f172a;
    font-variant-numeric: tabular-nums;
}
.dk-value small { font-size: 12px; font-weight: 500; color: #94a3b8; margin-left: 3px; letter-spacing: 0; }
.dk-value.red { color: #dc2626; }
.dk-value.orange { color: #ea580c; }
.dk-value.teal { color: #0d9488; }
.dk-value.green { color: #16a34a; }
.dk-value.blue { color: #2563eb; }
.dk-value.purple { color: #7c3aed; }
.dk-foot {
    font-size: 11.5px; color: #9aa8ba;
    margin-top: 10px; padding-top: 9px;
    border-top: 1px solid #f1f5f9;
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.dash-row3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.chart-main { height: 320px; }
.chart-box-sm { height: 218px; }

.dash-todo { padding-top: 6px; padding-bottom: 6px; }
.todo-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #f3f7fb;
    cursor: pointer;
}
.todo-item:last-child { border-bottom: 0; }
.todo-item:hover .todo-title { color: var(--brand-600); }
.todo-main { flex: 1; min-width: 0; }
.todo-title {
    font-size: 13.5px; font-weight: 600; color: #1e293b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.todo-sub { font-size: 11.5px; color: #94a3b8; margin-top: 3px; }
.link-more { font-size: 12px; color: var(--brand-600); }
.dash-empty { padding: 26px 0; text-align: center; font-size: 12.5px; color: #94a3b8; }

.dash-cover { display: flex; align-items: center; gap: 18px; }
.cover-ring {
    width: 108px; height: 108px; border-radius: 50%; flex: 0 0 auto;
    background: conic-gradient(var(--brand-500) calc(var(--pct) * 1%), #eef2f7 0);
    display: flex; align-items: center; justify-content: center;
}
.cover-ring > div {
    width: 84px; height: 84px; border-radius: 50%; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.cover-ring strong { font-size: 22px; font-weight: 700; letter-spacing: -.03em; color: #0f172a; }
.cover-ring small { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.cover-stats { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: #64748b; }
.cover-stats b { color: #0f172a; }

.platform-list { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.pf-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #64748b; }
.pf-name { width: 72px; flex: 0 0 auto; }
.pf-bar { flex: 1; height: 6px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.pf-bar i {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #2dd4bf, var(--brand-600));
}
.pf-num { font-variant-numeric: tabular-nums; color: #0f172a; font-weight: 600; }

@media (max-width: 1280px) {
    .dash-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .dash-grid, .dash-row3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .dash-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .chart-main { height: 260px; }
}

/* =========================================================
   V4 全站版式统一（对应参考图：留白更足、区块卡片化、
   标签改为胶囊分段控件、表头更轻、标题层级更清晰）
   仅调整形状 / 间距 / 阴影，不改任何配色变量
   ========================================================= */

/* 内容区留白 */
.main { padding: 24px 30px 48px; }
.topbar { align-items: center; margin-bottom: 22px; }
.topbar h1 { font-size: 25px; }
.page-subtitle { color: #7b8ca3; }

/* 筛选工具条 → 白色圆角卡片 */
.toolbar {
    background: #fff;
    border: 1px solid #e7edf4;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 26px -22px rgba(16, 24, 40, .2);
    margin-bottom: 16px;
}

/* 数据表格容器 → 卡片 */
.table-wrap {
    background: #fff;
    border: 1px solid #e7edf4;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 34px -26px rgba(16, 24, 40, .2);
}

/* 卡片标题层级 */
.card-head h3, .panel-head h3 { font-size: 15.5px; }
.card-head, .panel-head { padding: 17px 20px; }

/* 表头更轻、行距更舒展 */
.store-table th, .data-table th {
    background: #fbfcfe;
    color: #6b7d92;
    letter-spacing: .02em;
}
.store-table td, .data-table td { padding: 13px 18px; }

/* 子标签 → 胶囊分段控件 */
.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
    background: #eef2f7;
    border: 0;
    border-bottom: 0;
    border-radius: 12px;
    margin-bottom: 18px;
}
.tab-nav .tab, .tab-nav .tab-link {
    padding: 9px 16px;
    border: 0;
    border-bottom: 0;
    border-radius: 9px;
    margin-bottom: 0;
    color: #64748b;
    font-weight: 500;
    transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.tab-nav .tab:hover, .tab-nav .tab-link:hover { background: rgba(255, 255, 255, .7); color: #0f172a; }
.tab-nav .tab.active, .tab-nav .tab-link.active {
    background: #fff;
    border-bottom: 0;
    color: var(--brand-700);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 6px 16px -10px rgba(16, 24, 40, .2);
}

/* 返回链接统一 */
.back-link { color: var(--brand-700); font-weight: 500; }

/* ---------- 统计卡行：与首页 6 卡同一语言（自适应列数） ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.stat-tile {
    background: #fff;
    border: 1px solid #e7edf4;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 30px -22px rgba(16, 24, 40, .22);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.stat-tile:hover {
    transform: translateY(-2px);
    border-color: #dbe6f1;
    box-shadow: 0 3px 8px rgba(16, 24, 40, .06), 0 22px 40px -22px rgba(16, 24, 40, .28);
}
.stat-tile .stat-label { font-size: 12.5px; color: #7b8ca3; }
.stat-tile .stat-num {
    display: block;
    margin-top: 2px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}
.stat-tile.on {
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .12), 0 12px 30px -22px rgba(16, 24, 40, .22);
}

@media (max-width: 1280px) {
    .main { padding: 20px 20px 42px; }
}
@media (max-width: 900px) {
    .main { padding: 18px 16px 36px; }
    .toolbar { padding: 10px 12px; }
}
@media (max-width: 640px) {
    .main { padding: 16px 14px 32px; }
    .topbar h1 { font-size: 22px; }
}

/* ---------- 组别切换（部门本级总览：天猫组 / 综合组 / 拼多多组） ---------- */
.group-switch { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.group-switch .tag { cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.group-switch .tag.tag-gray:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }

/* ---------- 指标卡列数变体（拼多多概览等 4 卡页面） ---------- */
.dash-kpi.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dk-icon { font-size: 17px; line-height: 1; }
.welcome-btn { border: 0; cursor: pointer; }
@media (max-width: 1280px) {
    .dash-kpi.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 概览明细板块：独立的平台切换 ---------- */
.dash-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.group-switch button.tag {
    border: 1px solid transparent;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    line-height: 1.5;
    border-radius: 99px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.group-switch button.tag.tag-gray { border-color: #e3eaf2; }
.group-switch button.tag.is-on { box-shadow: 0 2px 8px rgba(23, 195, 176, .22); }
.group-switch button.tag:focus-visible { outline: 2px solid var(--brand-300, #7ee0d5); outline-offset: 2px; }

/* ---------- 规则表操作列 ---------- */
.rule-ops { display: inline-flex; align-items: center; gap: 6px; }
.rule-ops .inline-form { display: inline-flex; }

/* ---------- 规则判定方向 / 待采集直达链接 ---------- */
.rule-dir { display: block; font-size: 10.5px; color: var(--text-4, #94a3b8); margin-top: 2px; }
.cover-wait-link { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(23, 195, 176, .55); }
.cover-wait-link:hover { color: var(--brand-600, #17c3b0); border-bottom-color: var(--brand-600, #17c3b0); }


/* 列多时表头重叠修复：固定布局改为按内容撑开 + 外层横向滚动 */
.store-table.compact { table-layout: auto; min-width: 1500px; }
.store-table.compact th, .store-table.compact td { white-space: nowrap; }
.table-wrap, .card:has(.store-table) { overflow-x: auto; }

/* ===================== 店铺体验状态卡片（对标拼多多主页，2026-10-31） ===================== */
.pdd-brand { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; background: #f0fdfa; color: #0d9488; font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.pdd-section { margin-bottom: 20px; }
.pdd-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pdd-section-head h2 { font-size: 18px; font-weight: 700; color: #0f172a; }
.pdd-section-head span { font-size: 13px; color: #94a3b8; }
.pdd-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 18px; background: #eef2f7; border-radius: 12px; }
.pdd-tab { padding: 9px 16px; border: 0; border-radius: 9px; background: transparent; color: #64748b; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s cubic-bezier(.2,.8,.2,1), color .15s cubic-bezier(.2,.8,.2,1), box-shadow .15s cubic-bezier(.2,.8,.2,1); }
.pdd-tab b { margin-left: 4px; color: #94a3b8; font-weight: 600; font-size: 13px; }
.pdd-tab:hover { background: rgba(255,255,255,.7); color: #0f172a; }
.pdd-tab.active { background: #fff; color: #0f766e; font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 6px 16px -10px rgba(16,24,40,.2); }
.pdd-tab.active b { color: #0f766e; }
.pdd-store-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sc-store-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1280px) { .pdd-store-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 780px) { .pdd-store-grid { grid-template-columns: 1fr; } }
.pdd-store-card { display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid #e7edf4; border-radius: 14px; padding: 16px 18px 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 30px -22px rgba(16,24,40,.22); transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s cubic-bezier(.2,.8,.2,1), border-color .18s cubic-bezier(.2,.8,.2,1); min-width: 0; }
.pdd-store-card:hover { transform: translateY(-2px); border-color: #dbe6f1; box-shadow: 0 3px 8px rgba(16,24,40,.06), 0 22px 40px -22px rgba(16,24,40,.28); }
.pdd-store-card.is-empty { background: #fcfcfd; }
.pdd-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pdd-card-head h3 { font-size: 16px; font-weight: 600; color: #0f172a; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.pdd-risk { flex-shrink: 0; padding: 4px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pdd-risk.ok { background: #ecfdf5; color: #047857; }
.pdd-risk.bad { background: #fef2f2; color: #dc2626; }
.pdd-risk.none { background: #f1f5f9; color: #94a3b8; }
.pdd-card-star { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: #fafbfc; border-radius: 12px; }
.pdd-card-score { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.pdd-card-score.ok { color: #047857; } .pdd-card-score.warn { color: #b45309; } .pdd-card-score.bad { color: #dc2626; } .pdd-card-score.none { color: #cbd5e1; }
.pdd-card-stars { color: #f59e0b; font-size: 14px; letter-spacing: 2px; }
.pdd-card-rank { margin-top: 4px; font-size: 12.5px; color: #94a3b8; }
.pdd-dim-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.pdd-chip { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 8px; background: #f8fafc; font-size: 13px; color: #475569; min-width: 0; }
.pdd-chip i { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pdd-chip b { margin-left: auto; font-size: 12px; font-weight: 600; white-space: nowrap; color: #94a3b8; }
.pdd-chip.ok b { color: #047857; }
.pdd-chip.bad { background: #fef2f2; }
.pdd-chip.bad b { color: #dc2626; }
.pdd-score-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pdd-mini { padding: 6px 2px; border-radius: 6px; background: #f8fafc; text-align: center; min-width: 0; }
.pdd-mini span { display: block; font-size: 11px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdd-mini b { display: block; margin-top: 2px; font-size: 13.5px; color: #0f172a; font-variant-numeric: tabular-nums; }
.pdd-mini.ok { background: #f0fdf4; } .pdd-mini.ok b { color: #047857; }
.pdd-mini.warn { background: #fffbeb; } .pdd-mini.warn b { color: #b45309; }
.pdd-mini.bad { background: #fef2f2; } .pdd-mini.bad b { color: #dc2626; }
.pdd-mini.none b { color: #cbd5e1; }
.pdd-card-foot { display: flex; justify-content: center; align-items: center; padding-top: 10px; border-top: 1px dashed #f1f5f9; font-size: 13px; color: #94a3b8; }
.pdd-link-btn { padding: 6px 14px; border: 1px solid #99f6e4; background: #fff; color: #0d9488; border-radius: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pdd-link-btn:hover { background: #f0fdfa; }

/* ===================== 异常原因标签（店铺明细筛选视图，2026-10-31） ===================== */
.risk-reason { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.risk-reason .risk-chip { display: inline-block; padding: 2px 7px; border-radius: 6px; background: #fef2f2; color: #b91c1c;
    font-size: 11.5px; font-weight: 500; line-height: 1.6; white-space: nowrap; border: 1px solid #fee2e2; }
.risk-reason .risk-chip:hover { background: #fee2e2; }

/* ===================== 异常分析页（2026-10-31） ===================== */
.rb-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rb-tabs { display: flex; gap: 4px; padding: 5px; background: #eef2f7; border-radius: 12px; flex-wrap: wrap; }
.rb-tab { padding: 8px 14px; border-radius: 9px; color: #64748b; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.rb-tab b { margin-left: 4px; color: #94a3b8; font-size: 12.5px; font-weight: 600; }
.rb-tab:hover { background: rgba(255,255,255,.7); color: #0f172a; }
.rb-tab.active { background: #fff; color: #0f766e; font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 6px 16px -10px rgba(16,24,40,.2); }
.rb-tab.active b { color: #0f766e; }
.rb-card { background: #fff; border: 1px solid #e7edf4; border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 30px -22px rgba(16,24,40,.22); }
.rb-card-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rb-card-head h2 { font-size: 15.5px; font-weight: 700; color: #0f172a; }
.rb-card-head span { font-size: 12.5px; color: #94a3b8; }
.rb-rank-list { display: grid; gap: 8px; }
.rb-rank-row { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; color: #475569; }
.rb-rank-idx { color: #cbd5e1; text-align: right; font-size: 12px; }
.rb-rank-track { height: 10px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.rb-rank-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #fca5a5, #ef4444); }
.rb-rank-num { text-align: right; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }
.rb-group { margin-bottom: 20px; }
.rb-group-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.rb-group-head h2 { font-size: 16.5px; font-weight: 700; color: #0f172a; }
.rb-group-head span { font-size: 12.5px; color: #94a3b8; }
.rb-list { display: grid; gap: 12px; }
.rb-store { background: #fff; border: 1px solid #e7edf4; border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.rb-store-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rb-store-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #0f172a; min-width: 0; }
.rb-store-name a { color: inherit; text-decoration: none; }
.rb-store-name a:hover { color: #0d9488; text-decoration: underline; }
.rb-store-meta { display: flex; gap: 8px; align-items: center; }
.rb-score-pill { font-size: 12.5px; font-weight: 600; color: #0f172a; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 3px 9px; }
.rb-bad-pill { font-size: 12.5px; font-weight: 600; color: #dc2626; background: #fef2f2; border: 1px solid #fee2e2; border-radius: 8px; padding: 3px 9px; }
.rb-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 18px; }
.rb-metric { padding: 8px 10px; border-radius: 10px; background: #fbfcfe; border: 1px solid #f1f5f9; min-width: 0; }
.rb-metric-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.rb-metric-lbl { color: #475569; }
.rb-metric-vals b { color: #dc2626; font-weight: 700; font-variant-numeric: tabular-nums; }
.rb-metric-vals i { font-style: normal; color: #94a3b8; margin-left: 6px; }
.rb-track { height: 6px; border-radius: 99px; background: #eef2f7; margin: 6px 0 4px; overflow: hidden; }
.rb-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #fca5a5, #ef4444); }
.rb-metric-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: #94a3b8; }
.rb-gap { color: #dc2626; font-weight: 600; }
.rb-empty { padding: 20px 0; }
@media (max-width: 640px) {
    .rb-rank-row { grid-template-columns: 18px 110px 1fr 56px; font-size: 12.5px; }
    .rb-metrics { grid-template-columns: 1fr; }
}
/* ---- 构成指标分组（不与分项混排） ---- */
.rb-subgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.rb-subgroup { border: 1px solid #eef2f7; border-radius: 12px; padding: 12px 14px; background: #fbfcfe; }
.rb-subgroup-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.rb-subgroup-head h3 { font-size: 14px; font-weight: 700; color: #0f172a; }
.rb-subgroup-head em { font-style: normal; font-size: 12px; color: #94a3b8; }
.rb-subrow { display: grid; grid-template-columns: 120px 1fr 50px; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; color: #475569; }
.rb-subrow-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-subrow-track { height: 8px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.rb-subrow-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #fdba74, #f59e0b); }
.rb-subrow-num { text-align: right; font-weight: 600; color: #92400e; font-variant-numeric: tabular-nums; }

/* ---- 卡片内：分项 vs 构成指标 ---- */
.rb-metric.lvl-score { background: #fff; border-color: #e7edf4; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.rb-metric.lvl-score .rb-metric-lbl { font-weight: 700; color: #0f172a; }
.rb-metric.lvl-sub { margin-left: 12px; background: #fbfcfe; }
.rb-metric.lvl-sub .rb-metric-lbl { color: #64748b; }
.rb-parent-tag { display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 4px; background: #eef2f7; color: #64748b; font-size: 10.5px; line-height: 1.6; }
/* ---- 异常分析：排行双榜布局 ---- */
.rb-rankwrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; }
.rb-rankcol { min-width: 0; }
.rb-ranktitle { font-size: 12.5px; font-weight: 700; color: #94a3b8; letter-spacing: .04em; margin-bottom: 10px; text-transform: uppercase; }
.rb-muted { font-size: 12.5px; color: #94a3b8; }
@media (max-width: 900px) { .rb-rankwrap { grid-template-columns: 1fr; } }

/* ---- 异常分析：矩阵热力图 ---- */
.rb-legend { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 12px; }
.rb-legend .dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.rb-legend .dot.bad { background: #fee2e2; border: 1px solid #fca5a5; }
.rb-legend .dot.ok { background: #f0fdf4; border: 1px solid #bbf7d0; }
.rb-legend .dot.na { background: #f1f5f9; border: 1px solid #e2e8f0; }
.rb-mx-wrap { background: #fff; border: 1px solid #e7edf4; border-radius: 14px; overflow: auto; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 30px -22px rgba(16,24,40,.22); max-height: 78vh; }
.rb-mx { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.rb-mx th { position: sticky; top: 0; z-index: 3; background: #fbfcfe; color: #6b7d92; font-weight: 600; font-size: 12px;
    padding: 8px 10px; border-bottom: 1px solid #eef3f9; white-space: nowrap; text-align: center; }
.rb-mx thead tr:nth-child(2) th { top: 33px; }
.rb-mx th.rb-mx-ghead { background: #f4f8fc; font-size: 11.5px; color: #475569; letter-spacing: .02em; }
.rb-mx th.rb-mx-col { font-weight: 500; color: #64748b; }
.rb-mx th.rb-mx-col.is-score { color: #0f172a; font-weight: 700; background: #f7fbfa; }
.rb-mx th.rb-mx-name, .rb-mx td.rb-mx-name { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left;
    min-width: 210px; max-width: 300px; border-right: 1px solid #eef3f9; }
.rb-mx th.rb-mx-name { z-index: 4; background: #fbfcfe; }
.rb-mx th.rb-mx-count, .rb-mx td.rb-mx-count { text-align: center; width: 52px; color: #94a3b8; }
.rb-mx td.rb-mx-count b { color: #dc2626; font-variant-numeric: tabular-nums; }
.rb-mx td { padding: 7px 10px; border-bottom: 1px solid #f3f7fb; white-space: nowrap; text-align: center; color: #334155; font-variant-numeric: tabular-nums; }
.rb-mx tbody tr.rb-mx-row { cursor: pointer; }
.rb-mx tbody tr.rb-mx-row:hover td { background: #f8fbfd; }
.rb-mx tbody tr.rb-mx-row.is-open td { background: #f7fbfa; }
.rb-mx td.rb-mx-cell.bad { background: #fef2f2; color: #b91c1c; font-weight: 600; }
.rb-mx td.rb-mx-cell.na { color: #cbd5e1; }
.rb-mx-flag { color: #dc2626; margin-right: 2px; font-size: 10px; }
.rb-mx-store { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #0f172a; }
.rb-mx-detail td { background: #fbfcfe; padding: 14px 16px; text-align: left; }
.rb-mx-detail .rb-metrics { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.rb-mx-foot { margin-top: 8px; text-align: right; }
/* ===================== 黑标徽章：咖啡金渐变（2026-10-31） ===================== */
.tgold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, #2e1b0f 0%, #54331d 48%, #7b4f28 100%);
    border: 1px solid #9a6b34;
    box-shadow: 0 1px 2px rgba(46, 27, 15, .32), inset 0 1px 0 rgba(255, 224, 170, .16);
    line-height: 1.5;
    vertical-align: 1px;
    white-space: nowrap;
}
.tgold > b {
    color: #f5d38a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.45;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .tgold > b {
        background: linear-gradient(180deg, #fff0cc 0%, #f3cd7e 46%, #c9923f 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}
.tgold.sm > b { font-size: 10px; letter-spacing: .05em; }
.tgold.sm { padding: 0 6px; border-radius: 5px; }
/* ===================== 卡片区店铺类型筛选（方案A，2026-10-31） ===================== */
.sc-head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sc-summary { font-size: 12.5px; color: #94a3b8; }
.sc-type-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #e7edf4; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.sc-type { border: 0; background: transparent; color: #64748b; font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.sc-type b { margin-left: 3px; font-size: 11.5px; font-weight: 700; color: #94a3b8; }
.sc-type:hover { background: #f1f5f9; color: #0f172a; }
.sc-type.active { background: #ecfdf8; color: #0f766e; font-weight: 600; box-shadow: inset 0 0 0 1px #99f6e4; }
.sc-type.active b { color: #0f766e; }
@media (max-width: 640px) {
    .sc-head-right { width: 100%; justify-content: space-between; }
}

/* 卡片子指标小格：显示完整指标名（允许两行，居中） */
.pdd-mini span { display: flex; align-items: center; justify-content: center; text-align: center;
    white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25;
    min-height: 26px; font-size: 10.5px; padding: 0 1px; }

/* ===================== 今日采集概况（2026-10-31） ===================== */
.pf-sub { font-size: 11.5px; color: #b45309; margin: -6px 0 10px; }
.pf-num.is-stale { color: #b45309; }
.pf-foot { margin-top: 10px; padding-top: 9px; border-top: 1px dashed #f1f5f9; font-size: 11.5px; color: #94a3b8; }

/* ===================== 店铺类型筛选条（顶部，2026-10-31） ===================== */
.sc-topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px;
    background: #fff; border: 1px solid #e7edf4; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.sc-topbar-label { font-size: 12.5px; font-weight: 600; color: #94a3b8; }
.sc-topbar-hint { font-size: 11.5px; color: #a8b6c8; margin-left: auto; }
@media (max-width: 640px) { .sc-topbar-hint { margin-left: 0; width: 100%; } }

/* 卡片区筛选项：状态 tabs 与类型按钮同一行（左/右） */
.sc-filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sc-filter-row .pdd-tabs { margin-bottom: 0; flex: 1 1 auto; }
.sc-filter-row .sc-type-tabs { margin-left: auto; flex: 0 0 auto; }
@media (max-width: 640px) { .sc-filter-row .sc-type-tabs { margin-left: 0; } }

/* 总分排名卡片头：类型筛选 + 平台切换同一排 */
.rank-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* 异常分析页：全平台分组可折叠 */
.rb-fold { border: 1px solid #e7edf4; border-radius: 14px; background: #fff; padding: 0 14px 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.rb-fold > summary { list-style: none; cursor: pointer; padding: 14px 2px 10px; }
.rb-fold > summary::-webkit-details-marker { display: none; }
.rb-fold > summary::after { content: '⌄'; float: right; color: #94a3b8; font-size: 16px; transition: transform .15s; }
.rb-fold[open] > summary::after { transform: rotate(180deg); }
.rb-fold-hint { font-style: normal; font-size: 11.5px; color: #cbd5e1; margin-left: 8px; }
.rb-fold > .rb-mx-wrap { margin-top: 4px; }

/* KPI 区：四个体验分维度 + 细分指标 + 3 统计卡（4 列两行） */
.dash-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1280px) { .dash-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 980px) { .dash-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dash-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 异常分析页：排行改为上下堆叠（当前只统计一个维度，避免左右高度差留下大片空白） */
.rb-rankwrap { grid-template-columns: 1fr !important; gap: 14px; }
.rb-rankcol .rb-rank-row { grid-template-columns: 150px 1fr 64px; }
.rb-rankcol + .rb-rankcol { border-top: 1px dashed #eef2f7; padding-top: 12px; }
.rb-subgroup { margin-top: 4px; }

/* 工具栏右侧分组：店铺类型 + 平台 */
.rb-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.rb-toolbar-right .rb-tabs { margin-bottom: 0; }

/* 列表区左上角的店铺类型筛选（紧跟表格上方） */
.rb-list-filter { display: inline-flex; gap: 4px; padding: 4px; background: #f1f5f9; border-radius: 10px; margin: 0 0 10px; }
.rb-list-filter .rb-tab { padding: 6px 12px; font-size: 12.5px; }

/* 全部平台：分组标题行内联的店铺类型筛选（与平台名平齐） */
.rb-head-filter { display: inline-flex; align-items: center; gap: 2px; margin-left: 12px; padding: 2px 4px; background: #f1f5f9; border-radius: 8px; vertical-align: middle; }
.rb-head-filter .rb-hf { padding: 4px 10px; border-radius: 6px; font-size: 12px; color: #64748b; text-decoration: none; white-space: nowrap; }
.rb-head-filter .rb-hf:hover { color: #0f766e; }
.rb-head-filter .rb-hf.active { background: #fff; color: #0f766e; font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }

/* 全平台分组标题：类型筛选紧贴平台名（左移），统计与提示保持靠右 */
.rb-head-filter { margin-left: 8px; margin-right: auto; }

/* 分组标题：平台名 + 类型筛选固定靠左，统计/提示靠右 */
.rb-group-head { justify-content: flex-start; gap: 10px; }
.rb-group-head > span:not(.rb-head-filter) { margin-left: auto; }
.rb-group-head > em { margin-left: 12px; }
.rb-head-filter { margin-left: 0; margin-right: 0; }

/* 全平台分组框：标题行在框体内垂直居中（左右不变） */
.rb-fold > summary { padding: 16px 2px; display: flex; align-items: center; }
.rb-group-head { align-items: center; margin-bottom: 0; }
.rb-fold > .rb-mx-wrap { margin-top: 10px; }

/* 分组框标题行整体下移（上留白大于下留白） */
.rb-fold > summary { padding: 22px 2px 12px; }

/* 待跟进列表：手机端改紧凑卡片 */
@media (max-width: 640px) {
    .todo-item { padding: 10px 12px; border-radius: 12px; align-items: flex-start; gap: 8px; }
    .todo-main { min-width: 0; }
    .todo-title { font-size: 13.5px; line-height: 1.4; word-break: break-all; }
    .todo-sub { font-size: 11.5px; line-height: 1.55; color: #94a3b8; display: flex; flex-wrap: wrap; gap: 4px; }
    .todo-item .score-pill { font-size: 12px; padding: 4px 8px; }
    .dash-grid { grid-template-columns: 1fr; }
    .card-head { gap: 8px; }
}
/* 今日异常变化 */
.chg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chg-item { border: 1px solid #f1f5f9; border-radius: 12px; background: #fcfdff; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.chg-num { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chg-label { font-size: 12.5px; color: #334155; font-weight: 600; }
.chg-hint { font-size: 11px; color: #a8b6c8; }
@media (max-width: 640px) { .chg-grid { grid-template-columns: 1fr; } }

/* 桌面端：左侧菜单固定，滚动内容时不跟随；底部账号操作常在视口内 */
@media (min-width: 901px) {
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
    }
    .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
    .sidebar-footer { flex-shrink: 0; margin-top: 0; }
    .sidebar-brand, .side-search { flex-shrink: 0; }
}
