/* 方寸客堂SCRM — 企微 SCRM 设计系统 v3 · 科技感全局主题 */
:root {
    --primary: #07c160;
    --primary-hover: #06ad56;
    --primary-light: rgba(7,193,96,.12);
    --primary-soft: rgba(7,193,96,.08);
    --accent-blue: #0082ef;
    --accent-purple: #6366f1;
    /* 对齐公众号后台：浅灰侧栏 + 绿字选中 */
    --sidebar-bg: #f4f5f9;
    --sidebar-bg-2: #f4f5f9;
    --sidebar-border: #e7e7eb;
    --sidebar-text: #353535;
    --sidebar-text-hover: #07c160;
    --sidebar-active-bg: transparent;
    --sidebar-active-border: transparent;
    --bg: #f0f2f5;
    --card: #ffffff;
    --card-solid: #ffffff;
    --border: #e7e7e7;
    --border-strong: #d9d9d9;
    --text: #353535;
    --text-secondary: #595959;
    --muted: #888888;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 2px 8px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
    --radius: 4px;
    --radius-sm: 4px;
    --glass-blur: blur(0px);
    --gradient-brand: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    --gradient-hero: linear-gradient(135deg, #2e2e2e 0%, #1f1f1f 100%);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: none;
}
.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; background: var(--bg); }
.main-wrap::before {
    content: none;
}
.content-area { padding: 20px 24px 32px; flex: 1; position: relative; z-index: 1; }

/* Brand — 浅色侧栏标题区 */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--sidebar-border);
}
.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: #fff;
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.brand-text strong { display: block; font-size: 15px; color: #1a1a1a; letter-spacing: 0; font-weight: 600; }
.brand-text span { font-size: 11px; color: #888; }
.sidebar-footer { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--sidebar-border); }
.version { font-size: 11px; color: #999; letter-spacing: 0; }

/*
 * 侧栏导航对齐微信公众号后台：
 * - 一级：图标 + 文案，行高约 42px
 * - 二级：无图标、左缩进与一级文案对齐，选中仅变绿字
 */
.nav { padding: 8px 0 16px; flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 0; padding: 8px 0; border-bottom: 1px solid var(--sidebar-border); }
.nav-group:last-child { border-bottom: none; }
.nav-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #353535;
    padding: 11px 16px 11px 16px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    line-height: 20px;
    min-height: 42px;
    box-sizing: border-box;
}
.nav-label::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #b2b2b2;
    margin-left: 8px;
    flex-shrink: 0;
}
.nav-channel { padding-top: 4px; border-top: 1px solid var(--sidebar-border); margin-top: 4px; }
.nav-channel:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.nav-channel-title { color: #353535; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.nav-sub-label {
    font-size: 12px;
    color: #999;
    padding: 10px 16px 4px 48px;
    font-weight: 400;
}
.nav-item--soon { opacity: .45; cursor: default; pointer-events: none; }
.nav-soon { margin-left: auto; font-size: 10px; color: #999; background: #eee; padding: 2px 6px; border-radius: 10px; font-weight: 500; }
.nav-channel--soon .nav-channel-title { color: #999; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    margin: 0;
    border-radius: 0;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    min-height: 42px;
    box-sizing: border-box;
    transition: color .15s, background .15s;
    border: none;
    border-left: none;
    position: relative;
}
.nav-item:hover { background: rgba(7,193,96,.06); color: #07c160; }
.nav-item.active {
    background: rgba(7,193,96,.12);
    color: #07c160;
    font-weight: 600;
    border-left: none;
    box-shadow: none;
}
.nav-item-l1 {
    padding-left: 16px;
    padding-right: 16px;
}
.nav-item-l1 .nav-icon {
    width: 18px;
    height: 18px;
    color: #576b95;
    opacity: 1;
}
.nav-item-l1.active .nav-icon,
.nav-item-l1:hover .nav-icon {
    color: #07c160;
}
/* 二级：缩进对齐一级文字起点（16 图标区 + 10 gap ≈ 44），无图标 */
.nav-item-l2 {
    padding: 10px 16px 10px 48px;
    font-size: 14px;
    min-height: 40px;
    color: #353535;
}
.nav-item-l2 .nav-icon {
    display: none;
}
.nav-item-l2.active {
    color: #07c160;
    background: rgba(7,193,96,.12);
    font-weight: 600;
    /* 选中更显眼：左侧绿条 + 浅绿底 */
    box-shadow: inset 3px 0 0 #07c160;
}
.nav-item-l2:hover {
    color: #07c160;
    background: rgba(7,193,96,.06);
}
.nav-item-l1.active {
    background: rgba(7,193,96,.12);
    box-shadow: inset 3px 0 0 #07c160;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 1; }
.nav-item.active .nav-icon { opacity: 1; color: #07c160; }
.nav-badge {
    margin-left: auto;
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 10px;
    background: #fa5151;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}
.icon { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -0.2em; }
.btn-icon { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.metric-icon .icon { width: 22px; height: 22px; }

/* Topbar */
.topbar {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 56px;
    position: relative;
    z-index: 2;
    box-shadow: none;
}
.page-title { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: 0; }
.page-desc { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-titles { min-width: 0; }
.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.sidebar-toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: #595959;
    border-radius: 1px;
}
.sidebar-backdrop[hidden] { display: none !important; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-work-account {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px 0 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.topbar-work-account-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--gradient-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(7, 193, 96, .25);
}
.topbar-work-account-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.topbar-work-account-select {
    box-sizing: border-box;
    height: 32px;
    min-width: 108px;
    max-width: 200px;
    padding: 0 28px 0 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #f8fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23595959' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    appearance: none;
}
.topbar-work-account-select:hover {
    border-color: #b7eb8f;
    background-color: #fff;
}
.topbar-work-account-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, .18);
}
.topbar-work-account-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    padding: 4px 10px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 4px;
}
.topbar-mp-account {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px 0 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.topbar-mp-account-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #fa8c16 0%, #ffa940 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(250, 140, 22, .25);
}
.topbar-mp-account-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.topbar-mp-account-select {
    box-sizing: border-box;
    height: 32px;
    min-width: 108px;
    max-width: 200px;
    padding: 0 28px 0 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fffaf5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23595959' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    appearance: none;
}
.topbar-mp-account-select:hover {
    border-color: #ffd591;
    background-color: #fff;
}
.topbar-mp-account-select:focus {
    outline: none;
    border-color: #fa8c16;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(250, 140, 22, .18);
}
.topbar-mp-account-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    padding: 4px 10px;
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: 4px;
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: none;
}
.user-menu { position: relative; }
.user-menu-trigger {
    cursor: pointer;
    font: inherit;
    color: inherit;
    width: 100%;
}
.user-menu-trigger:hover { background: rgba(255,255,255,.95); }
.user-menu-label { text-align: left; min-width: 0; }
.user-menu-caret {
    font-size: 10px;
    color: var(--muted);
    margin-left: 2px;
    flex-shrink: 0;
}
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 168px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 200;
}
.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}
.user-menu-item:hover { background: var(--bg-soft); color: var(--primary); }
.user-menu-item-danger { color: #dc2626; }
.user-menu-item-danger:hover { background: #fef2f2; color: #b91c1c; }
.user-menu-logout { margin: 0; padding: 0; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.user-menu-logout .user-menu-item { border-radius: 8px; }
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(7,193,96,.3);
}
.user-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-role { font-size: 11px; color: var(--muted); }
.logout-form { margin: 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--card-solid);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, background .15s, color .15s;
    white-space: nowrap;
    box-shadow: none;
}
.btn:hover {
    border-color: var(--primary);
    background: #fff;
    transform: none;
    box-shadow: none;
    color: var(--primary);
}
.btn:active {
    transform: none;
    box-shadow: none;
}
.btn:focus-visible {
    outline: 2px solid rgba(7,193,96,.45);
    outline-offset: 2px;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: none;
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus-visible {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    filter: none;
}
.btn-primary:hover {
    filter: none;
    box-shadow: none;
}
.btn-primary:active {
    filter: none;
    transform: none;
}
.btn-outline { background: #fff; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover,
.btn-outline:active,
.btn-outline:focus-visible {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-secondary); box-shadow: none; }
.btn-ghost:hover,
.btn-ghost:active,
.btn-ghost:focus-visible {
    background: var(--bg);
    border-color: transparent;
    color: var(--text);
    transform: none;
    box-shadow: none;
}
.btn-ghost:active { background: #ebebeb; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn.is-loading,
.btn:disabled {
    opacity: 0.72;
    cursor: wait;
    pointer-events: none;
}
.btn-primary.is-loading,
.btn-primary:disabled {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-outline.is-loading,
.btn-outline:disabled {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-hover);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    backdrop-filter: var(--glass-blur);
    border: 1px solid transparent;
}
.alert-success { background: rgba(7,193,96,.10); color: #06ad56; border-color: rgba(7,193,96,.25); }
.alert-error { background: rgba(239,68,68,.08); color: #b91c1c; border-color: rgba(239,68,68,.2); }
.alert-warning { background: rgba(245,158,11,.10); color: #b45309; border-color: rgba(245,158,11,.25); }

/* Dashboard — 浅色扁平，对齐公众号后台 KPI */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #fff;
    color: var(--text);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: none;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.welcome-banner::after { content: none; }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: 0; color: var(--text); }
.welcome-banner p { margin: 0; opacity: 1; font-size: 13px; color: var(--muted); }
.welcome-banner strong { font-weight: 600; color: var(--primary); }
.quick-actions { display: flex; gap: 8px; flex-shrink: 0; }
.welcome-banner .btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: none; }
.welcome-banner .btn-primary:hover { background: var(--primary-hover); color: #fff; }
.welcome-banner .btn-outline { border-color: var(--border-strong); color: var(--text); background: #fff; backdrop-filter: none; box-shadow: none; }
.welcome-banner .btn-outline:hover { background: #fafafa; border-color: var(--primary); color: var(--primary); transform: none; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.metric-card {
    background: #fff;
    backdrop-filter: none;
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: none;
    border: 1px solid var(--border);
    transition: none;
}
.metric-card:hover { transform: none; box-shadow: none; }
.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}
.metric-green .metric-icon { background: rgba(7,193,96,.14); color: #07c160; }
.metric-blue .metric-icon { background: rgba(0,130,239,.12); color: #0082ef; }
.metric-orange .metric-icon { background: rgba(245,158,11,.12); color: #f59e0b; }
.metric-purple .metric-icon { background: rgba(99,102,241,.12); color: #6366f1; }
.metric-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
    letter-spacing: -.03em;
}
.metric-label { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 500; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.work-new-trend-panel {
    margin-bottom: 20px;
    overflow: visible;
    border: 1px solid rgba(14,165,233,.12);
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(14,165,233,.06), transparent 55%),
        radial-gradient(90% 70% at 0% 100%, rgba(16,185,129,.05), transparent 50%),
        var(--card);
}
.work-new-trend-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 14px;
}
.work-new-trend-head-main h3 { margin: 0; }
.work-new-trend-head-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.work-new-trend-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
.work-new-trend-sub {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}
/* 日/周/月 与 近90/180/365 共用同一套 segmented 样式 */
.work-new-trend-range,
.work-new-trend-granularity {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    padding: 3px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid var(--border);
}
.work-new-trend-range-btn,
.work-new-trend-granularity-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.work-new-trend-range-btn:hover,
.work-new-trend-granularity-btn:hover { color: var(--text); }
.work-new-trend-range-btn.is-active,
.work-new-trend-granularity-btn.is-active {
    color: #06ad56;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.work-new-trend-summary {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--muted);
}
.work-new-trend-summary strong {
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
}
.work-new-trend-body { padding-top: 0; padding-inline: 0; }
.work-new-trend-chart {
    position: relative;
    width: 100%;
    height: 260px;
    padding-right: 12px;
    box-sizing: border-box;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, rgba(248,250,252,.5), rgba(255,255,255,.2));
    border-top: 1px solid rgba(148,163,184,.1);
    overflow: visible;
    cursor: crosshair;
}
.work-new-trend-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.work-new-trend-plot-bg {
    fill: rgba(255,255,255,.35);
    stroke: none;
}
.work-new-trend-grid {
    stroke: rgba(148,163,184,.18);
    stroke-width: 1;
}
.work-new-trend-y,
.work-new-trend-x {
    fill: #94a3b8;
    font-size: 11px;
    font-weight: 500;
}
.work-new-trend-line-glow {
    fill: none;
    stroke: rgba(16,185,129,.28);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .65;
}
.work-new-trend-line {
    fill: none;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.work-new-trend-crosshair {
    stroke: rgba(14,165,233,.55);
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
    pointer-events: none;
}
.work-new-trend-active-dot {
    fill: #fff;
    stroke: #0ea5e9;
    stroke-width: 3;
    filter: drop-shadow(0 2px 8px rgba(14,165,233,.35));
    pointer-events: none;
}
.work-new-trend-tooltip {
    position: absolute;
    top: 10px;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(15,23,42,.92);
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(15,23,42,.22);
    backdrop-filter: blur(8px);
    transition: left .08s ease-out;
}
.work-new-trend-tooltip-date {
    color: rgba(226,232,240,.82);
    font-size: 11px;
}
.work-new-trend-tooltip-value strong {
    color: #07c160;
    font-size: 15px;
    margin: 0 2px;
}
@media (max-width: 900px) {
    .work-new-trend-head-side {
        width: 100%;
        align-items: stretch;
    }
    .work-new-trend-controls {
        width: 100%;
        justify-content: flex-start;
    }
    .work-new-trend-granularity,
    .work-new-trend-range {
        flex: 1 1 auto;
    }
    .work-new-trend-range-btn,
    .work-new-trend-granularity-btn {
        flex: 1;
        min-width: 0;
        padding-inline: 6px;
        font-size: 11px;
    }
    .work-new-trend-summary { justify-content: space-between; }
}

/* Panels */
.panel {
    background: #fff;
    backdrop-filter: none;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: none;
    margin-bottom: 12px;
    overflow: hidden;
    transition: none;
}
.panel:hover { box-shadow: none; }
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0; }
.panel-body { padding: 12px 16px; }
.panel-body .form > label:last-child { margin-bottom: 0; }
.panel-compact .panel-body { padding: 12px 16px; }
.panel-body .form > .form-grid-2:last-child,
.panel-body .form > .form-grid-3:last-child { margin-bottom: 0; }
.link-more { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 500; }
.link-more:hover { color: var(--primary-hover); text-decoration: underline; }

/* Bar chart rows */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { width: 80px; font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.bar-track { flex: 1; height: 9px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #34d399); border-radius: 999px; min-width: 2px; transition: width .35s ease; box-shadow: 0 0 8px rgba(7,193,96,.22); }
/* 渠道条与标签条同系，略偏深绿，避免橙渐变「另一套皮肤」 */
.bar-fill-orange { background: linear-gradient(90deg, #059669, var(--primary)); box-shadow: 0 0 8px rgba(5,150,105,.2); }
.bar-num { width: 36px; text-align: right; font-size: 13px; font-weight: 700; color: var(--text); flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted);
    background: #fafafa;
    border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fafafa; }
.data-table tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.table-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.table-link:hover { color: var(--primary-hover); }
.text-muted { color: var(--muted); }
.empty-cell, .empty-state { text-align: center; color: var(--muted); padding: 28px 14px; font-size: 13px; }

/* Legacy table (inside content) */
table:not(.data-table):not(.info-table) { width: 100%; background: var(--card); border-collapse: collapse; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
table:not(.data-table):not(.info-table) th { padding: 12px 16px; background: #fafbfc; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); }
table:not(.data-table):not(.info-table) td { padding: 14px 16px; border-bottom: 1px solid var(--border); }
table:not(.data-table):not(.info-table) tr:hover td { background: #fafbfc; }

/* Cards & forms */
.card {
    background: var(--card);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }
.card h3 { margin: 0 0 16px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.form label { display: block; margin-bottom: 12px; font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.form label.checkbox { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--text); font-weight: 400; }
.form-compact label { margin-bottom: 10px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-bottom: 12px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.form-grid-2 > label, .form-grid-3 > label { margin-bottom: 0; }
.form-section { min-width: 0; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin: 0 0 8px; letter-spacing: -.01em; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-row-end { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.form-row-end label { margin-bottom: 0; flex: 1; min-width: 140px; }
.form-row-end .btn { flex-shrink: 0; margin-bottom: 0; }
.toolbar-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.toolbar-form label { margin: 0; flex: 1; min-width: 160px; max-width: 280px; }
.toolbar-form .btn { flex-shrink: 0; }
.page-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.form input, .form textarea, .form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color .18s, box-shadow .18s;
    background: rgba(255,255,255,.9);
}
.form input:focus, .form textarea:focus, .form select:focus {
    outline: none;
    border-color: rgba(7,193,96,.55);
    box-shadow: 0 0 0 3px rgba(7,193,96,.12);
    background: #fff;
}
.checkbox input { width: auto; display: inline-block; margin: 0; }
.form input[type="radio"],
.form input[type="checkbox"] {
    display: inline-block;
    width: auto;
    min-width: 0;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.form input[type="radio"]:focus,
.form input[type="checkbox"]:focus {
    outline: 2px solid rgba(7, 193, 96, .35);
    outline-offset: 2px;
    border: 0;
    box-shadow: none;
}

/* Toolbar & filters */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }

/*
 * 列表页操作条：左说明 / 右操作，全站统一。
 * 约定：同步、管理、导出 = btn-outline；新建 = btn-primary（放最右）。
 */
.page-toolbar,
.mp-page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.page-toolbar-meta,
.mp-page-toolbar-meta {
    min-width: 0;
    flex: 1;
}
.page-toolbar-hint,
.mp-page-hint {
    font-size: 13px;
    color: var(--muted);
}
.page-toolbar-actions,
.mp-page-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}
.page-toolbar-actions .btn,
.mp-page-toolbar-actions .btn {
    min-height: 32px;
}
/* 内联「添加标签/分类」提交钮统一宽度，避免长短不一 */
.tag-create-form > .btn,
.tag-create-form > button.btn {
    min-width: 96px;
    height: 32px;
    box-sizing: border-box;
    align-self: end;
}
.filter-bar { margin-bottom: 16px; }
.filter-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; align-items: end; }
.filter-form label { margin-bottom: 0; }
.filter-form .btn { align-self: end; }

/* Tags & badges */
.tag-pill { display: inline-block; background: var(--primary-light); color: #06ad56; padding: 3px 11px; border-radius: 999px; font-size: 12px; margin: 2px 4px 2px 0; border: 1px solid rgba(7,193,96,.2); font-weight: 500; }
.tag-pill-lg { padding: 5px 14px; font-size: 13px; font-weight: 600; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--primary-light); color: #06ad56; border: 1px solid rgba(7,193,96,.2); }
.badge-returned { background: rgba(59,130,246,.10); color: #1d4ed8; border: 1px solid rgba(59,130,246,.18); }
.badge-lost { background: rgba(100,116,139,.10); color: var(--muted); border: 1px solid rgba(100,116,139,.15); }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.status-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-sent::before, .status-done::before { background: #07c160; }
.status-sending::before, .status-pending::before, .status-scheduled::before { background: #3370ff; }
.status-failed::before { background: #f54a45; }

/* Customer */
.customer-cell { display: flex; gap: 10px; align-items: center; }
.customer-header { display: flex; gap: 16px; align-items: flex-start; }
.customer-header-text { min-width: 0; flex: 1; }
.customer-detail-toolbar { margin-bottom: 12px; }
.customer-detail-name {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.customer-detail-id {
    margin: 0;
    font-size: 12px;
    word-break: break-all;
}
/* 宽屏双栏：左资料 / 右编辑，减少竖向空卡片浪费 */
.customer-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
    gap: 16px;
    align-items: start;
}
.customer-detail-main,
.customer-detail-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.customer-detail-aside { position: sticky; top: 16px; }
.customer-detail-profile .panel-body { padding-top: 16px; }
.customer-detail-grid {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 20px;
    font-size: 13px;
}
.customer-detail-grid .detail-label { margin-bottom: 4px; }
.avatar-lg-fallback {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    font-size: 22px;
    flex-shrink: 0;
}
@media (max-width: 1100px) {
    .customer-detail-layout { grid-template-columns: 1fr; }
    .customer-detail-aside { position: static; }
}
@media (max-width: 720px) {
    .customer-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .customer-detail-grid { grid-template-columns: 1fr; }
}

/* 企微客户详情：顶栏 hero + 全域交集三栏，紧凑不浪费竖向空间 */
.customer-detail-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: flex-start;
    padding: 14px 16px;
}
.customer-detail-hero-body { flex: 1; min-width: 200px; }
.customer-detail-person-meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}
.customer-detail-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.tag-pill-sm {
    padding: 2px 8px;
    font-size: 11px;
    margin: 0;
}
.customer-detail-quick {
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, auto));
    gap: 6px 14px;
    margin: 0;
    font-size: 12px;
    flex-shrink: 0;
    align-self: center;
}
.customer-detail-quick dt {
    color: var(--muted);
    font-weight: 500;
    margin: 0 0 2px;
}
.customer-detail-quick dd {
    margin: 0;
    font-weight: 600;
    font-size: 13px;
    word-break: break-all;
}
.customer-detail-touch-panel .panel-head span.text-muted { font-size: 12px; }
.customer-touch-grid.person-expand-grid {
    padding: 0;
    gap: 10px;
}
.customer-touch-grid .person-expand-col { padding: 8px 10px; }
.customer-touch-grid .person-expand-head { margin-bottom: 8px; font-size: 12px; }
.customer-touch-grid .person-touch-item {
    padding: 7px 9px;
    margin-bottom: 6px;
}
.customer-touch-grid .person-touch-item:last-child { margin-bottom: 0; }
.customer-touch-grid .person-touch-title { font-size: 13px; margin-bottom: 2px; }
.customer-touch-grid .person-touch-item.is-current {
    border-color: rgba(7, 193, 96, .45);
    background: var(--primary-light);
}
.customer-touch-meta { font-size: 12px; line-height: 1.4; }
.customer-touch-staff {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.customer-touch-empty.empty-state {
    padding: 10px 6px;
    font-size: 12px;
}
.customer-detail-grid--compact {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    gap: 10px 16px;
}
.customer-detail-grid-span { grid-column: 1 / -1; }
.panel-body-compact { padding: 12px 16px 14px; }
.panel-head-compact h3 { font-size: 15px; margin: 0; }
.panel-head.panel-head-compact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.data-table-compact th,
.data-table-compact td {
    padding: 7px 12px;
    font-size: 13px;
}
.data-table-compact th { font-size: 12px; }
.customer-detail-edit-body {
    display: flex;
    flex-direction: column;
}
.customer-edit-section {
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.customer-edit-section:first-child {
    border-top: none;
    padding-top: 0;
}
.customer-edit-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
}
.customer-edit-field {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}
.customer-edit-check { font-size: 12px; margin: 0 0 8px; }
@media (max-width: 720px) {
    .customer-detail-quick {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-self: stretch;
    }
}

.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.avatar-lg { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.info-table { width: 100%; box-shadow: none; margin: 0; border: none; }
.info-table th { width: 120px; background: transparent; font-weight: 500; color: var(--muted); border: none; padding: 10px 0; }
.info-table td { border: none; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.tag-checkboxes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.tag-checkboxes .checkbox { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

/* 标签选择器 */
.tag-picker-wrap { margin-bottom: 12px; }
.tag-picker-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tag-picker-toolbar--meta-only { justify-content: flex-end; }
.tag-picker-search { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: #fff; min-width: 0; }
.tag-picker-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.tag-picker-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tag-picker-body { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fafbfc; padding: 12px; }
.tag-picker-group { margin-bottom: 12px; }
.tag-picker-group:last-child { margin-bottom: 0; }
.tag-picker-group.is-empty { display: none; }
.tag-picker-group-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; }
.tag-picker-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 220px; overflow-y: auto; }
.tag-picker-wrap--compact .tag-picker-body { padding: 8px; }
.tag-picker-wrap--compact .tag-picker-list { max-height: 120px; }
.tag-picker-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 20px; border: 1px solid #dce3ea; background: #fff; font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s, color .15s, box-shadow .15s; user-select: none; margin: 0; line-height: 1.3; }
.tag-picker-chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.tag-picker-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: #c5cdd6; flex-shrink: 0; transition: background .15s, transform .15s; }
.tag-picker-chip:hover { border-color: #b7ebd0; background: #f6fffb; }
.tag-picker-chip.is-active { background: var(--primary-light); border-color: #7dd4a8; color: #0d7a42; font-weight: 500; box-shadow: 0 1px 2px rgba(13,122,66,.08); }
.tag-picker-chip.is-active .tag-picker-chip-dot { background: var(--primary); transform: scale(1.2); }
.tag-picker-wrap--exclude .tag-picker-chip.is-active { background: #fff2f0; border-color: #ffccc7; color: #cf1322; box-shadow: none; }
.tag-picker-wrap--exclude .tag-picker-chip.is-active .tag-picker-chip-dot { background: #ff4d4f; }
.tag-picker-wrap--exclude .tag-picker-chip:hover { border-color: #ffccc7; background: #fffafa; }
.tag-picker-chip.is-hidden { display: none !important; }
.tag-picker-empty { padding: 20px 16px; text-align: center; font-size: 13px; color: var(--muted); background: #fafbfc; border: 1px dashed var(--border); border-radius: var(--radius-sm); }

/* 标签管理 */
.tag-manage-grid { display: flex; flex-direction: column; gap: 8px; }
.tag-manage-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .15s; }
.tag-manage-row:hover { border-color: #b7ebd0; }
.tag-manage-row .tag-pill-lg { flex-shrink: 0; min-width: 72px; text-align: center; }
/* 不要 flex:1，否则保存按钮与右侧统计之间会出现大块空白 */
.tag-manage-fields { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; flex-wrap: wrap; min-width: 0; }
.tag-manage-fields input[type="text"],
.tag-manage-fields input[type="number"] { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: #fafbfc; transition: border-color .15s, background .15s; height: 32px; box-sizing: border-box; }
.tag-manage-fields input[type="text"]:focus,
.tag-manage-fields input[type="number"]:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 2px var(--primary-soft); }
.tag-manage-fields input[name="name"] { min-width: 140px; flex: 1; max-width: 240px; font-weight: 500; }
.tag-manage-fields input[name="sort"] { width: 72px; }
.tag-manage-fields .btn { opacity: 1; }
.tag-manage-meta { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.tag-manage-stat { font-size: 13px; color: var(--muted); white-space: nowrap; }
.tag-create-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.tag-create-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; margin: 0; }
.tag-create-form input { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-weight: 400; }
.tag-create-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.tag-create-form--single { grid-template-columns: 1fr auto; }
.tag-group-table .tag-inline-edit { display: flex; align-items: center; gap: 8px; }
.tag-group-table .tag-inline-edit input[name="name"] { min-width: 160px; max-width: 280px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.tag-group-table .tag-inline-edit .btn { opacity: 0.35; transition: opacity .15s; }
.tag-group-table .tag-inline-edit:focus-within .btn,
.tag-group-table .tag-inline-edit:hover .btn { opacity: 1; }
.contact-way-stats { margin-bottom: 16px; }
.contact-way-detail-split { align-items: stretch; }
.contact-way-qr-panel { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.contact-way-qr-frame { padding: 16px; background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.contact-way-qr-frame img { display: block; width: 200px; max-width: 100%; height: auto; border-radius: 8px; background: #fff; }
.contact-way-qr-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.contact-way-meta { width: 100%; margin: 0; font-size: 13px; }
.contact-way-meta div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.contact-way-meta div:last-child { border-bottom: none; }
.contact-way-meta dt { margin: 0; color: var(--muted); font-weight: 500; }
.contact-way-meta dd { margin: 0; word-break: break-all; }
.contact-way-meta-code { font-size: 11px; }
.contact-way-detail-grid { grid-template-columns: 1fr 1fr; }
.contact-way-detail-grid .detail-grid-span-2 { grid-column: 1 / -1; }
.contact-way-staff-chip { cursor: default; }
.contact-way-staff-chip .staff-chip-remove { display: none; }
.tag-pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.contact-way-welcome-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.welcome-preview { margin-top: 8px; margin-bottom: 0; max-height: 200px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; line-height: 1.65; font-size: 13px; }
.contact-way-trend-table .effect-bar-wrap { margin: 0; }
@media (max-width: 900px) {
    .contact-way-detail-grid { grid-template-columns: 1fr; }
}
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input { margin: 0; width: auto; }
.content-box { white-space: pre-wrap; background: #fafbfc; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.muted, .text-muted { color: var(--muted); }
.text-danger { color: #f54a45; }
code { background: #f5f6f8; padding: 2px 8px; border-radius: 4px; font-size: 13px; color: #e83e8c; }

.tip-banner {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 12px;
}
/* 避免 tip 内链接掉回浏览器默认蓝链 */
.tip-banner a {
    color: #389e0d;
    font-weight: 600;
    text-decoration: none;
}
.tip-banner a:hover {
    text-decoration: underline;
}
.tip-banner.tip-danger a,
.tip-banner-danger a {
    color: #a8071a;
}
.tip-banner.tip-danger,
.tip-banner-danger {
    background: #fff2f0;
    border-color: #ffccc7;
    color: #a8071a;
}
.text-danger-strong { color: #f54a45; font-weight: 600; }

/* Compose layout + WeChat preview */
.compose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.compose-layout-wide { grid-template-columns: minmax(0, 1fr) 280px; }
.compose-main { min-width: 0; }
.compose-aside { position: relative; }
.compose-preview-panel { position: sticky; top: 20px; }
.compose-preview-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.compose-preview-icon { width: 18px; height: 18px; color: var(--primary); }
.compose-preview-hint { font-size: 12px; margin-top: 10px; text-align: center; color: var(--muted); }

/* WeChat / 企微 device mockup */
.wx-phone { width: 100%; }
.wx-device { background: #111; border-radius: 28px; padding: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.08); }
.wx-status-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 16px 4px; font-size: 11px; font-weight: 600; color: #fff; background: #1a1a1a; border-radius: 20px 20px 0 0; }
.wx-status-icons { font-size: 10px; letter-spacing: 1px; opacity: .85; }
.wx-nav { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #ededed; border-bottom: 1px solid #d9d9d9; }
.wx-nav-moment { background: #fff; border-bottom: 1px solid #eee; }
.wx-nav-back { font-size: 22px; line-height: 1; color: #333; width: 24px; }
.wx-nav-center { flex: 1; text-align: center; min-width: 0; }
.wx-nav-title { font-size: 14px; font-weight: 600; color: #111; }
.wx-nav-sub { font-size: 10px; color: #07c160; margin-top: 1px; }
.wx-nav-more, .wx-nav-camera { font-size: 16px; color: #333; width: 28px; text-align: right; }
.wx-chat-screen { background: #ededed; min-height: 320px; max-height: 420px; overflow-y: auto; padding: 14px 10px 18px; }
.wx-moment-screen { background: #fff; min-height: 360px; max-height: 440px; overflow-y: auto; }
.wx-chat-empty, .wx-chat-placeholder, .wx-moment-placeholder { text-align: center; color: #b2b2b2; font-size: 13px; padding: 48px 16px; }
.wx-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f7f7f7; border-top: 1px solid #dcdcdc; border-radius: 0 0 20px 20px; }
.wx-tool-input { flex: 1; height: 32px; background: #fff; border: 1px solid #ddd; border-radius: 4px; }
.wx-tool-icon { font-size: 18px; opacity: .7; flex-shrink: 0; }

.wx-msg-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.wx-avatar { width: 38px; height: 38px; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #fff; }
.wx-avatar-corp { background: linear-gradient(135deg, #2f7deb, #1e5bb8); }
.wx-msg-col { max-width: calc(100% - 50px); min-width: 0; }
.wx-bubble { position: relative; border-radius: 4px; font-size: 14px; line-height: 1.55; word-break: break-word; }
.wx-bubble-text { background: #fff; padding: 9px 12px; color: #111; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.wx-bubble-text::before { content: ''; position: absolute; left: -5px; top: 12px; border: 5px solid transparent; border-right-color: #fff; }
.wx-bubble-card, .wx-bubble-media { background: #fff; padding: 0; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.wx-bubble-card::before, .wx-bubble-media::before { content: ''; position: absolute; left: -5px; top: 12px; border: 5px solid transparent; border-right-color: #fff; }
.wx-bubble-empty { padding: 20px; color: #bbb; font-size: 12px; text-align: center; }

.wx-link-card { display: flex; gap: 10px; padding: 10px 12px; min-width: 200px; max-width: 240px; }
.wx-link-body { flex: 1; min-width: 0; }
.wx-link-title { font-size: 14px; font-weight: 500; color: #111; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wx-link-desc { font-size: 11px; color: #999; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-link-thumb { width: 48px; height: 48px; border-radius: 2px; object-fit: cover; flex-shrink: 0; background: #eee; }
.wx-thumb-fallback { background: linear-gradient(135deg, #e8e8e8, #d0d0d0); }

.wx-img { display: block; max-width: 200px; border-radius: 4px; }
.wx-media-ph { padding: 24px 32px; color: #bbb; font-size: 12px; background: #f5f5f5; }
.wx-video-wrap { position: relative; max-width: 200px; }
.wx-video { display: block; width: 100%; border-radius: 4px; background: #000; }
.wx-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 36px; height: 36px; background: rgba(0,0,0,.45); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }

.wx-file-card { display: flex; align-items: center; gap: 10px; padding: 12px; min-width: 180px; }
.wx-file-icon { width: 40px; height: 40px; background: #4a90e2; color: #fff; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.wx-file-name { font-size: 13px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }

.wx-mini-card { width: 200px; }
.wx-mini-hd { display: flex; align-items: center; gap: 4px; padding: 8px 10px 4px; font-size: 11px; color: #888; }
.wx-mini-dot { width: 14px; height: 14px; border-radius: 50%; background: #07c160; display: inline-block; }
.wx-mini-cover { width: 100%; height: 120px; object-fit: cover; display: block; background: #eee; }
.wx-mini-title { padding: 8px 10px 10px; font-size: 13px; color: #111; }

/* Moments feed preview */
.wx-moment-item { padding: 14px 12px; border-bottom: 8px solid #f5f5f5; }
.wx-moment-hd { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.wx-moment-name { font-size: 14px; font-weight: 600; color: #576b95; }
.wx-moment-text { font-size: 14px; line-height: 1.55; color: #111; margin: 0 0 10px 48px; word-break: break-word; }
.wx-moment-images { margin: 0 0 8px 48px; display: grid; gap: 4px; width: 168px; max-width: 100%; }
.wx-moment-grid-1 { grid-template-columns: minmax(0, 1fr); width: 120px; }
.wx-moment-grid-2, .wx-moment-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wx-moment-grid-3, .wx-moment-grid-5, .wx-moment-grid-6, .wx-moment-grid-7, .wx-moment-grid-8, .wx-moment-grid-9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wx-moment-img-cell { position: relative; overflow: hidden; border-radius: 2px; aspect-ratio: 1; min-width: 0; min-height: 0; background: #eee; }
.wx-moment-img-cell .wx-moment-img,
.wx-moment-img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; background-color: #eee; border-radius: 2px; display: block; min-width: 0; min-height: 0; }
.wx-moment-img-cell .wx-moment-img { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.wx-moment-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 12px; }
.wx-moment-video { margin: 0 0 8px 48px; position: relative; max-width: 180px; }
.wx-moment-video video { width: 100%; border-radius: 4px; background: #000; }
.wx-moment-video span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #fff; background: rgba(0,0,0,.4); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.wx-moment-link { margin: 0 0 8px 48px; max-width: 220px; }
.wx-moment-ft { margin-left: 48px; font-size: 11px; color: #b2b2b2; display: flex; justify-content: space-between; }
.wx-moment-like { font-size: 14px; }

.form-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Compose form helpers */
.form-subsection { margin-top: 12px; padding: 14px; background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.form-inline-options { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.form-inline-options .checkbox { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); }
.form-meta { font-size: 13px; color: var(--text-secondary); margin: 12px 0 0; }
.form-toolbar { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.form-dropdown { position: relative; display: inline-block; }
.form-dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 10; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); min-width: 180px; max-height: 200px; overflow-y: auto; }
.form-dropdown-item { display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: none; font-size: 13px; cursor: pointer; color: var(--text); }
.form-dropdown-item:hover { background: var(--bg); }
.emoji-picker { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.emoji-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 4px; line-height: 1; }
.emoji-btn:hover { background: var(--bg); }
.char-counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }
.attachment-summary { margin: 12px 0; padding: 12px 14px; background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.attachment-summary-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.attachment-summary-head .btn:first-of-type { margin-left: auto; }
.attachment-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.attachment-chip-type { background: var(--primary-soft); color: var(--primary); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }

.msg-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.msg-type-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all .15s; background: #fff; }
.msg-type-card input { display: none; }
.msg-type-card.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.msg-type-icon { width: 22px; height: 22px; }
.msg-type-name { font-size: 13px; }
.msg-panel.hidden, .msg-type-panel.hidden, .hidden { display: none !important; }
.msg-compose { display: flex; flex-direction: column; gap: 16px; }
.msg-compose-step { display: flex; flex-direction: column; gap: 10px; }
.msg-compose-step-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.msg-compose-panels { background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.msg-field-label { display: block; margin-bottom: 12px; font-size: 14px; }
.msg-field-label:last-child { margin-bottom: 0; }
.msg-field-hint { margin: -8px 0 12px; font-size: 12px; }
.msg-field-label + .msg-field-hint { margin-top: -8px; }
.msg-library-picker { margin: 10px 0 4px; clear: both; }
.msg-library-picker + .msg-field-hint,
.msg-cover-footnote { margin: 12px 0 0; font-size: 12px; line-height: 1.5; }
.msg-field-label .required { color: #e53935; margin-left: 2px; }
.msg-caption-zone { margin-top: 10px; }
.msg-caption-panel { margin-top: 10px; padding: 12px; background: #fff; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.msg-add-caption { margin-top: 4px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 24px; font-size: 14px; }
.detail-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.attachment-preview { display: flex; gap: 14px; padding: 14px; background: #fafbfc; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.attachment-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.section-title { margin: 20px 0 8px; font-size: 14px; }

/* Mass message effect records */
.effect-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.effect-stat { text-align: center; padding: 18px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card); backdrop-filter: var(--glass-blur); transition: transform .2s; }
.effect-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.effect-value { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.effect-label { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.effect-pending .effect-value { color: #f59e0b; }
.effect-sent .effect-value { color: var(--primary); }
.effect-failed .effect-value { color: #ef4444; }
.effect-rejected .effect-value { color: #94a3b8; }
.effect-bar-wrap { display: flex; align-items: center; gap: 12px; }
.effect-bar { flex: 1; height: 9px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.effect-bar-sent { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent-blue)); border-radius: 999px; transition: width .35s; box-shadow: 0 0 10px rgba(7,193,96,.3); }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .18s;
    font-weight: 500;
}
.filter-tab:hover { background: rgba(255,255,255,.8); color: var(--text); border-color: var(--border); }
.filter-tab.active {
    background: var(--primary-light);
    color: #06ad56;
    font-weight: 700;
    border-color: rgba(7,193,96,.3);
    box-shadow: 0 0 16px rgba(7,193,96,.15);
}
.status-recipient-0::before { background: #faad14; }
.status-recipient-1::before { background: #07c160; }
.status-recipient-2::before { background: #f54a45; }
.status-recipient-3::before { background: #8c8c8c; }

/* Webhook status */
.webhook-status-panel { margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; }
.webhook-status-panel.webhook-healthy { border-left: 4px solid var(--primary); }
.webhook-status-panel.webhook-warning { border-left: 4px solid #f59e0b; }
.webhook-status-panel.webhook-error { border-left: 4px solid #ef4444; }
.webhook-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.webhook-metric { text-align: center; padding: 14px; background: rgba(248,250,252,.8); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.webhook-metric-value { font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.webhook-metric-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.webhook-hint { margin: 0 0 6px; font-size: 14px; color: var(--text-secondary); }
.webhook-config-block { background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin: 16px 0; }
.webhook-config-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.webhook-config-row:last-child { margin-bottom: 0; }
.webhook-url { flex: 1; min-width: 200px; word-break: break-all; font-size: 13px; }
.webhook-guide { margin-top: 12px; font-size: 14px; }
.webhook-guide summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.webhook-guide-list { margin: 10px 0 0 18px; padding: 0; line-height: 1.8; color: var(--text-secondary); }
@media (max-width: 768px) {
    .webhook-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* Pagination */
nav[role="navigation"] { margin-top: 20px; }
nav[role="navigation"] svg { width: 16px; height: 16px; }
nav[role="navigation"] a, nav[role="navigation"] span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.8);
    color: var(--text-secondary);
    margin: 0 2px;
    transition: all .15s;
}
nav[role="navigation"] a:hover { border-color: rgba(7,193,96,.4); color: #06ad56; background: #fff; }
nav[role="navigation"] span[aria-current="page"] {
    background: var(--gradient-brand);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

/* Install / Auth pages */
.install-body {
    background: var(--gradient-hero);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}
.install-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 20%, rgba(7,193,96,.2), transparent 55%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0,130,239,.15), transparent 50%);
    pointer-events: none;
}
.install-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; position: relative; z-index: 1; }
.install-card {
    background: rgba(255,255,255,.95);
    backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,.6);
}
.install-card h1 { margin: 0 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.install-brand-logo {
    width: 88px;
    height: 88px;
    margin: 0 auto 16px;
    display: block;
}
.check-list { list-style: none; padding: 0; margin: 16px 0; }
.check-list li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.check-list .ok { color: #07c160; font-weight: 600; }
.check-list .fail { color: #ef4444; font-weight: 600; }

/* Responsive */
@media (max-width: 1100px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .compose-layout:not(.compose-layout-mass), .page-split { grid-template-columns: 1fr; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .compose-layout:not(.compose-layout-mass) .compose-aside { order: -1; }
    .compose-preview-panel, .preview-sticky { position: static; }
    .effect-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar {
        display: flex;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1200;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,.12);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1100;
        background: rgba(0,0,0,.35);
    }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .sidebar-toggle { display: inline-flex; }
    .main-wrap::before { left: 0; }
    .welcome-banner { flex-direction: column; align-items: flex-start; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .content-area { padding: 12px 14px 24px; }
    .topbar { padding: 10px 14px; }
}

/* Modal */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; background: rgba(11,18,32,.55); backdrop-filter: blur(4px); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.hidden { display: none; }
.modal-dialog { background: rgba(255,255,255,.98); backdrop-filter: var(--glass-blur); border-radius: var(--radius); width: min(680px, calc(100vw - 48px)); max-width: 680px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal-dialog.modal-lg { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close { background: none; border: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.modal-tip { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: var(--primary-light); border-radius: var(--radius-sm); font-size: 13px; color: #0d7a42; margin-bottom: 14px; border: 1px solid #b7ebd0; }
.modal-tip-warn { background: #fffbe6; color: #ad6800; border-color: #ffe58f; }
.modal-tip-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.sync-progress-track { height: 12px; background: #eef2f7; border-radius: 999px; overflow: hidden; margin: 16px 0 8px; box-shadow: inset 0 1px 2px rgba(15,23,42,.08); }
.sync-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #12b76a, #0d9f5a); border-radius: 999px; transition: width .35s ease; min-width: 8%; }
.sync-progress-bar-indeterminate { animation: sync-progress-pulse 1.4s ease-in-out infinite; }
.sync-progress-message { margin: 0; font-size: 15px; font-weight: 600; }
.sync-progress-percent { margin: 0; font-size: 24px; font-weight: 700; color: var(--primary, #0d9f5a); text-align: center; }
.sync-progress-detail { margin: 6px 0 0; font-size: 13px; text-align: center; }
.sync-progress-modal { width: min(420px, calc(100vw - 48px)); }
.sync-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sync-progress-head h3 { margin: 0; flex: 1; }
.sync-progress-floating {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 148px;
    padding: 12px 14px;
    border: 1px solid #b7ebd0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
    cursor: pointer;
    text-align: left;
}
.sync-progress-floating-title {
    font-size: 12px;
    color: #667085;
    line-height: 1.3;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mp-template-nav .workbench-tab { text-decoration: none; }
.tag-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; background: #fff; }
.tag-chip-exclude { border-color: #ffd6d6; background: #fffafa; }
.sync-progress-floating-percent {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary, #0d9f5a);
}
@keyframes sync-progress-pulse {
    0% { transform: translateX(-60%); opacity: .55; }
    50% { transform: translateX(40%); opacity: 1; }
    100% { transform: translateX(120%); opacity: .55; }
}

[data-mass-modal] .msg-type-grid, [data-moment-modal] .msg-type-grid { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 0; }
[data-mass-modal] .msg-type-card, [data-moment-modal] .msg-type-card { flex: 1; min-width: 72px; border: none; border-radius: 0; border-bottom: 2px solid transparent; background: none; padding: 10px 8px; box-shadow: none; }
[data-mass-modal] .msg-type-card.active, [data-moment-modal] .msg-type-card.active { border-bottom-color: var(--primary); background: none; color: var(--primary); }
[data-mass-modal] .msg-type-card input, [data-moment-modal] .msg-type-card input { display: none; }
[data-mass-modal] .msg-compose-step-label, [data-moment-modal] .msg-compose-step-label { display: none; }
[data-mass-modal] .msg-compose-panels, [data-moment-modal] .msg-compose-panels { border: none; background: none; padding: 14px 0 0; }
[data-mass-modal] .msg-caption-zone, [data-moment-modal] .msg-caption-zone { display: none !important; }

/* Moment profile preview */
.wx-moment-profile-screen { background: #fff; min-height: 380px; max-height: 460px; overflow-y: auto; }
.wx-moment-cover { height: 140px; background: linear-gradient(135deg, #4a5568, #2d3748); }
.wx-moment-profile-bar { position: relative; height: 36px; margin-bottom: 8px; }
.wx-moment-profile-name { position: absolute; right: 78px; bottom: 8px; font-size: 15px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.wx-avatar-profile { position: absolute; right: 12px; top: -28px; width: 56px; height: 56px; border-radius: 6px; border: 2px solid #fff; font-size: 18px; }
.wx-moment-profile-body { padding: 12px 12px 20px; display: flex; gap: 12px; align-items: flex-start; }
.wx-moment-today-label { width: 56px; flex-shrink: 0; text-align: right; font-size: 14px; font-weight: 600; color: #111; padding-top: 2px; }
.wx-moment-today-content { flex: 1; min-width: 0; }
.wx-moment-inline-text { font-size: 14px; line-height: 1.55; color: #111; word-break: break-word; margin-bottom: 8px; }
.wx-moment-empty-ph { color: #b2b2b2; font-size: 13px; }
.wx-moment-video-inline { position: relative; max-width: 120px; }
.wx-moment-video-inline video { width: 100%; border-radius: 4px; background: #000; }
.wx-moment-video-inline span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #fff; background: rgba(0,0,0,.4); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.wx-moment-link-inline .wx-link-card { min-width: 0; max-width: 160px; }
.wx-moment-profile-body .wx-moment-images { margin: 0; width: 168px; max-width: 100%; }

/* 成员/客户选择器弹窗 */
.modal-dialog.modal-staff-picker { width: min(720px, calc(100vw - 48px)); max-width: 720px; }
.modal-dialog.modal-staff-picker .modal-body { overflow: hidden; display: flex; flex-direction: column; }
.staff-picker-split { display: grid; grid-template-columns: minmax(0, 1fr) 220px; min-height: 360px; border-top: 1px solid var(--border); margin-top: 12px; flex: 1; min-height: 0; }
.staff-picker-pane { display: flex; flex-direction: column; min-height: 0; background: #fff; }
.staff-picker-pane-selected { border-left: 1px solid var(--border); background: #fafbfc; }
.staff-picker-search { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.staff-picker-search input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.staff-picker-list-head, .staff-picker-selected-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.staff-picker-list, .staff-picker-selected-list { flex: 1; overflow-y: auto; min-height: 0; }
.staff-picker-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6; transition: background .15s; min-width: 0; }
.staff-picker-item .staff-picker-item-check { flex-shrink: 0; }
.staff-picker-item:hover { background: var(--bg); }
.staff-picker-item.is-checked { background: var(--primary-light); }
.staff-picker-item.disabled { opacity: .55; cursor: not-allowed; }
.staff-picker-item-check { flex-shrink: 0; }
.staff-picker-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.staff-picker-avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.staff-picker-meta { flex: 1; min-width: 0; margin-right: auto; }
.staff-picker-name { display: block; font-weight: 500; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-picker-role { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-picker-selected { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; margin-bottom: 8px; padding: 8px; background: #fafbfc; border: 1px dashed var(--border); border-radius: var(--radius-sm); align-items: center; }
.staff-selected-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; background: #fff; border: 1px solid var(--border); border-radius: 20px; font-size: 13px; }
.staff-picker-selected-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #eef0f2; min-width: 0; }
.staff-picker-selected-row .staff-picker-meta { flex: 1; min-width: 0; }
.staff-picker-selected-row .staff-chip-remove { margin-left: auto; flex-shrink: 0; }
.staff-chip-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.staff-chip-remove:hover { color: var(--danger, #c0392b); }
.staff-picker-empty-list { padding: 24px 12px; text-align: center; font-size: 13px; }
.staff-picker-open-btn { margin-top: 4px; }

@media (max-width: 768px) {
    .modal-dialog { max-height: 95vh; }
    .staff-picker-split { grid-template-columns: 1fr; }
    .staff-picker-pane-selected { border-left: none; border-top: 1px solid var(--border); max-height: 180px; }
}

/* Topbar wechat config */
.topbar-config-btn { color: var(--text-secondary); text-decoration: none; }
.topbar-config-btn:hover { color: var(--primary); background: var(--primary-soft); }
.topbar-config-btn.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.topbar-bi-btn { color: var(--text-secondary); text-decoration: none; }
.topbar-bi-btn:hover { color: var(--primary); background: var(--primary-soft); }
.topbar-bi-btn.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.btn-icon-only { width: 18px; height: 18px; margin: 0; }
.topbar-config-label { font-size: 13px; }
.topbar-bi-label { font-size: 13px; }
@media (max-width: 900px) {
    .topbar-config-label { display: none; }
    .topbar-bi-label { display: none; }
}

/* Channel icon tabs */
.channel-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.channel-tab {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: #fff; color: var(--text-secondary);
    cursor: pointer; transition: all .15s; text-decoration: none; padding: 0;
}
.channel-tab .icon { width: 22px; height: 22px; }
.channel-tab:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.channel-tab.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 1px rgba(7,193,96,.15); }
.config-tabs .channel-tab { width: 40px; height: 40px; }

.channel-panel { display: none; }
.channel-panel.active { display: block; }

.quick-actions-bar { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* Wechat account inline edit */
.account-edit-row { padding: 12px 16px !important; background: #fafbfc; }
.account-inline-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 8px; }
.account-inline-form label { font-size: 12px; margin: 0; }
.account-inline-form input { margin-top: 4px; padding: 6px 8px; font-size: 13px; }
.account-inline-actions { display: flex; align-items: flex-end; }
.account-delete-form { margin-top: 4px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13px; padding-bottom: 6px; }
.checkbox-label input { width: auto; margin: 0; }

/* Sidebar channel switcher — 浅色分段，保留三渠道路径 */
.sidebar-channel-switch {
    display: flex;
    gap: 6px;
    padding: 10px 12px 12px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-channel-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--sidebar-border);
    background: #fff;
    transition: background .15s, border-color .15s;
    text-decoration: none;
    box-shadow: none;
}
.sidebar-channel-btn:hover { background: #fafafa; border-color: #d0d0d0; }
.sidebar-channel-btn.active { box-shadow: none; border-color: #07c160; background: rgba(7,193,96,.08); }
.sidebar-channel-btn[data-channel="mp"].active,
.sidebar-channel-btn[data-channel="work"].active,
.sidebar-channel-btn[data-channel="mini"].active {
    border-color: #07c160;
    background: rgba(7,193,96,.08);
}

.sidebar-channel-panel { display: none; }
.sidebar-channel-panel.active { display: block; }
.sidebar-channel-panel .nav-group {
    border-bottom: none;
    padding-top: 0;
}

.nav-group-primary {
    margin-bottom: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sidebar-border);
}
.nav-item-top { font-weight: 500; }
.nav-group-system {
    border-bottom: none;
}

.workbench-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.workbench-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all .18s;
}
.workbench-tab:hover { border-color: var(--primary); }
.workbench-tab.active { border-color: var(--primary); background: rgba(37,99,235,.06); color: var(--primary); }
.workbench-tab[data-channel="mp"].active { border-color: rgba(7,193,96,.6); background: rgba(7,193,96,.08); color: #06ad56; }
.workbench-tab[data-channel="work"].active { border-color: rgba(0,130,239,.6); background: rgba(0,130,239,.08); color: #0284c7; }
.workbench-tab[data-channel="mini"].active { border-color: rgba(96,90,176,.6); background: rgba(96,90,176,.08); color: #5b21b6; }
.workbench-tab .channel-brand-icon { width: 20px; height: 20px; }

.account-add-panel { display: none; margin-top: 16px; }
.account-add-panel.active { display: block; }
button.workbench-tab { cursor: pointer; font-family: inherit; }

.person-depth-dots { letter-spacing: 2px; color: var(--primary); font-size: 12px; }
.person-channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.person-touch-list { display: flex; flex-direction: column; gap: 12px; }
.person-touch-item {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.person-touch-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.person-hero-body { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.person-hero-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.person-hero-avatar--placeholder {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--primary-light); color: #06ad56;
    display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600;
}

.person-scene-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.person-scene-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: inherit;
    text-decoration: none;
    min-width: 108px;
    transition: border-color .15s, box-shadow .15s;
}
.person-scene-tab:hover { border-color: var(--primary); text-decoration: none; }
.person-scene-tab.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px rgba(13, 159, 90, .15);
}
.person-scene-tab-label { font-size: 13px; font-weight: 600; }
.person-scene-tab-count { font-size: 18px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.person-scene-tab-count--loading { opacity: 0.45; font-size: 14px; font-weight: 600; }
.list-stat-loading { opacity: 0.45; }

/* 全域用户 BI 版图 */
.person-bi {
    margin-bottom: 20px;
    padding: 20px 22px 18px;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fafc 0%, #fff 42%, #f0fdf9 100%);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(15, 23, 42, .06);
}
.person-bi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.person-bi-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.person-bi-subtitle { margin: 0; font-size: 13px; color: var(--muted); max-width: 520px; }
.person-bi-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 280px;
}
.person-bi-search input {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
}
.person-bi-kpi-row {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.person-bi-kpi {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,.85);
    border: 1px solid var(--border);
}
.person-bi-kpi--hero {
    background: linear-gradient(135deg, #0d9488 0%, #06ad56 100%);
    border-color: transparent;
    color: #fff;
}
.person-bi-kpi--hero .person-bi-kpi-label,
.person-bi-kpi--hero .person-bi-kpi-foot { color: rgba(255,255,255,.85); }
.person-bi-kpi--hero .person-bi-kpi-value { color: #fff; }
.person-bi-kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.person-bi-kpi-value { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.person-bi-kpi-foot { margin-top: 6px; font-size: 11px; color: var(--muted); }
.person-bi-kpi-link {
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.person-bi-kpi-link:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
.person-bi-kpi-link.person-bi-kpi--hero:hover { box-shadow: 0 6px 20px rgba(13, 148, 136, .35); }
.person-page { width: 100%; }
.person-toolbar-v2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}
.person-toolbar-v2__search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 240px;
    max-width: 560px;
}
.person-toolbar-v2__search-icon {
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.person-toolbar-v2__search input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
}
.person-toolbar-v2__search input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.person-toolbar-v2__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}
.person-toolbar-v2__actions .btn-outline {
    background: #fff;
    border-color: #d0d5dd;
    color: #353535;
    font-weight: 600;
}
.person-toolbar-v2__actions .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.person-toolbar-v2__bi {
    border-color: #d0d5dd;
    color: #353535;
}
.person-scene-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.person-scene-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    text-decoration: none;
    color: inherit;
    font-size: 13px;
    transition: border-color .15s, background .15s;
}
.person-scene-pill:hover {
    border-color: var(--primary);
    text-decoration: none;
}
.person-scene-pill.active {
    border-color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}
.person-scene-pill__label { white-space: nowrap; }
.person-scene-pill__count {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.person-scene-pill.active .person-scene-pill__count { color: #06ad56; }
.person-filter-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.person-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.person-filter-row__label {
    flex: 0 0 40px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    padding-top: 7px;
    letter-spacing: 0.04em;
}
.person-filter-row__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
/* 分级与具备/缺乏同一 flex-wrap 节奏，避免一行一种布局 */
.person-filter-row__pills--tier {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.person-dim-pill,
.person-tier-pill,
.person-aux-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s, background .15s;
    min-width: 0;
}
.person-dim-pill input,
.person-tier-pill input,
.person-aux-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.person-dim-pill--have.active {
    border-color: #06ad56;
    background: #ecfdf5;
    color: #06ad56;
    font-weight: 600;
}
.person-dim-pill--lack.active {
    border-color: #d97706;
    background: #fffbeb;
    color: #b45309;
    font-weight: 600;
}
.person-tier-pill {
    border-radius: 999px;
    flex-direction: row;
    padding: 6px 12px;
    text-align: left;
}
.person-tier-pill.active {
    border-color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}
.person-tier-count {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    font-style: normal;
    font-variant-numeric: tabular-nums;
}
.person-aux-pill.active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
}
.person-filter-row--aux { align-items: center; }
.person-filter-clear {
    font-size: 12px;
    color: var(--muted);
    padding: 6px 10px;
    text-decoration: none;
}
.person-filter-clear:hover { color: var(--primary); }
@media (max-width: 640px) {
    .person-filter-row { flex-direction: column; gap: 6px; }
    .person-filter-row__label { padding-top: 0; }
}
.person-active-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 13px;
}
.person-segment-saved--compact {
    margin-bottom: 10px;
    padding: 8px 0;
}
.person-list-panel__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.person-list-panel__head h3 { margin: 0 0 2px; }
.person-list-panel__meta { font-size: 12px; }
.person-list-table-wrap {
    overflow-x: auto;
}
.person-list-table {
    width: 100%;
    table-layout: auto;
}
.person-list-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: 0 1px 0 var(--border);
}
.person-list-mobile {
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}
.person-list-user__meta { margin-top: 2px; }
.person-list-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    background: #f1f5f9;
    color: #64748b;
}
.person-list-badge--ok {
    background: #ecfdf5;
    color: #06ad56;
}
.person-channel-dots {
    display: inline-flex;
    gap: 4px;
}
.person-channel-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    background: #f1f5f9;
    color: #cbd5e1;
    border: 1px solid #e2e8f0;
}
.person-channel-dot.is-on.is-mp { background: #ecfdf5; color: #06ad56; border-color: #a7f3d0; }
.person-channel-dot.is-on.is-mini { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.person-channel-dot.is-on.is-work { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.person-list-active {
    font-size: 13px;
    white-space: nowrap;
}
.person-list-active__ch {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.person-list-pagination { padding-top: 0; }
.person-bi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.person-bi-panel {
    border-radius: 12px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--border);
    overflow: hidden;
}
.person-bi-panel--wide { grid-column: 1 / -1; }
.person-bi-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fafbfc, #fff);
}
.person-bi-panel-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.person-bi-panel-body { padding: 14px 16px 16px; }
.person-bi-depth-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.person-bi-donut { width: 120px; height: 120px; flex-shrink: 0; position: relative; }
.person-bi-donut-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
}
.person-bi-donut-ring::after {
    content: '';
    position: absolute;
    inset: 22%;
    background: #fff;
    border-radius: 50%;
}
.person-bi-depth-legend { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 8px; }
.person-bi-legend-item {
    display: grid;
    grid-template-columns: 10px 1fr auto auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}
.person-bi-legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.person-bi-legend-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.person-bi-legend-rate { font-size: 11px; color: var(--muted); min-width: 42px; text-align: right; }
.person-bi-bar-row {
    display: grid;
    grid-template-columns: 72px 1fr 52px;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
}
.person-bi-bar-row:last-child { margin-bottom: 0; }
.person-bi-bar-label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.person-bi-bar-track { height: 10px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.person-bi-bar-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
.person-bi-bar-fill--mp { background: linear-gradient(90deg, #22c55e, #16a34a); }
.person-bi-bar-fill--mini { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.person-bi-bar-fill--work { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.person-bi-bar-meta { text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.person-bi-combo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
}
.person-bi-combo-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    min-height: 96px;
}
.person-bi-combo-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(13, 159, 90, .12);
    transform: translateY(-1px);
    text-decoration: none;
}
.person-bi-combo-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px rgba(13, 159, 90, .2);
}
.person-bi-combo-channels { display: flex; gap: 4px; flex-wrap: wrap; }
.person-bi-channel-dot {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1.4;
}
.person-bi-channel-dot--mp { background: #dcfce7; color: #166534; }
.person-bi-channel-dot--mini { background: #ede9fe; color: #5b21b6; }
.person-bi-channel-dot--work { background: #dbeafe; color: #1e40af; }
.person-bi-combo-label { font-size: 12px; font-weight: 600; line-height: 1.35; flex: 1; }
.person-bi-combo-count { font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1; }
.person-bi-combo-rate { font-size: 11px; color: var(--muted); }
.person-bi-opp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.person-bi-opp-card {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, background .15s;
}
.person-bi-opp-card:hover { border-color: var(--primary); background: #fff; text-decoration: none; }
.person-bi-opp-card.active { border-style: solid; border-color: var(--primary); background: var(--primary-light); }
.person-bi-opp-label { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.person-bi-opp-count { font-size: 22px; font-weight: 800; color: #ea580c; line-height: 1.1; }
.person-bi-opp-hint { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.person-bi-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,.06);
}
.person-bi-actions-note { font-size: 12px; margin-left: auto; }
.person-bi-scenes-wrap { margin: 16px 0; }
.person-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.person-list-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}
.person-list-search input {
    flex: 1;
    min-width: 160px;
    max-width: 360px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.person-list-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.person-bi-scenes-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}
.person-bi-scenes-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.person-bi-scenes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.person-bi-scene {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.person-bi-scene:hover { border-color: var(--primary); text-decoration: none; }
.person-bi-scene.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px rgba(13, 159, 90, .15);
}
.person-bi-scene-label { font-size: 13px; font-weight: 600; }
.person-bi-scene-count { font-size: 17px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.person-bi-scene-hint { font-size: 10px; color: var(--muted); line-height: 1.35; }
.person-bi-list-panel { margin-top: 4px; }

@media (max-width: 960px) {
    .person-bi-kpi-row { grid-template-columns: repeat(2, 1fr); }
    .person-bi-kpi--hero { grid-column: 1 / -1; }
    .person-bi-grid { grid-template-columns: 1fr; }
    .person-bi-search { width: 100%; min-width: 0; }
}

.touch-chip-list { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.touch-chip {
    display: inline-block;
    max-width: 120px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.touch-chip-more { background: #e2e8f0; color: #64748b; cursor: help; }

.person-list-table .person-list-user { display: flex; align-items: center; gap: 10px; }
.person-list-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.person-list-avatar--placeholder {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary-light); color: #06ad56;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.person-row-toggle {
    border: none; background: transparent; color: #64748b;
    cursor: pointer; font-size: 12px; padding: 4px; line-height: 1;
}
.person-list-row { cursor: pointer; }
.person-list-row--open { background: #f8fafc; }
.person-expand-row td { padding: 0 !important; background: #f8fafc; border-top: none; }
.person-expand-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 12px 16px 0;
}
.person-expand-col {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 10px 12px;
}
.person-expand-head {
    display: flex; align-items: center; gap: 6px;
    font-weight: 600; font-size: 13px; margin-bottom: 10px;
}
.person-expand-actions { padding: 10px 16px 14px; }
.person-search-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.person-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.person-segment-save-form { margin-bottom: 12px; }
.person-segment-save-form.hidden { display: none; }
.person-segment-saved {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
}
.person-segment-chip-wrap { display: inline-flex; align-items: center; }
.person-segment-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    text-decoration: none;
}
.person-segment-chip:hover { background: #e2e8f0; text-decoration: none; }
.person-segment-chip.active { background: var(--primary-light); color: #06ad56; font-weight: 600; }
.person-segment-delete { display: inline; margin: 0; padding: 0; }
.person-segment-delete-btn {
    border: none; background: transparent; color: #94a3b8;
    cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px;
}
.person-segment-delete-btn:hover { color: #ef4444; }
.person-batch-bar { margin-bottom: 12px; }
.person-batch-body { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.person-batch-count { padding-top: 8px; min-width: 72px; }
.person-batch-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; flex: 1; min-width: 280px; }
.person-batch-label { font-size: 12px; color: #64748b; padding-top: 8px; min-width: 56px; }
.person-batch-control { flex: 1; min-width: 200px; max-width: 360px; }
.person-batch-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.person-segment-action {
    font-size: 11px; color: var(--primary); text-decoration: none; margin-left: 2px;
}
.person-segment-action:hover { text-decoration: underline; }

@media (max-width: 960px) {
    .person-expand-grid { grid-template-columns: 1fr; }
    .person-scene-tab { min-width: calc(50% - 8px); flex: 1; }
}

.panel-head h3 .channel-brand-icon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }

.sync-phase-list { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.9; }
.sync-phase-list li { margin-bottom: 2px; }

.channel-brand-icon { width: 22px; height: 22px; object-fit: contain; display: block; }
.sidebar-channel-btn .channel-brand-icon { width: 26px; height: 26px; }
.metric-brand-icon { width: 28px; height: 28px; }

.nav-group-system {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--sidebar-border);
}

.platform-nav {
    padding-top: 8px;
}

.platform-nav .nav-group {
    margin-bottom: 0;
}

.platform-nav .nav-item {
    font-size: 13px;
}

.channel-tab-brand .channel-brand-icon { width: 24px; height: 24px; }
.config-tabs .channel-tab-brand { padding: 8px; }

.mp-account-bar { display:flex; align-items:center; gap:10px; margin-bottom:16px; padding:10px 14px; background:#fff; border:1px solid var(--border); border-radius:var(--radius-sm); }
.mp-account-label { font-size:13px; color:var(--muted); }
.mp-account-select { padding:6px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); font-size:14px; min-width:180px; }

.menu-builder { display:flex; flex-direction:column; gap:12px; }
.menu-node { border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px; background:#fafbfc; }
.menu-node-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.menu-sub-list { margin-top:10px; padding-left:12px; border-left:2px solid var(--primary-soft); display:flex; flex-direction:column; gap:10px; }
.menu-node-actions { display:flex; gap:8px; margin-top:8px; flex-wrap:wrap; }

/* MP menu editor — WeChat official style */
.mp-menu-compose { display:grid; grid-template-columns:minmax(300px,380px) 1fr; gap:24px; margin-bottom:16px; align-items:start; }
@media (max-width: 960px) { .mp-menu-compose { grid-template-columns:1fr; } }
.mp-menu-compose-preview { display:flex; justify-content:center; padding:20px 16px 16px; background:#f5f5f5; border-radius:12px; border:1px solid #e7e7e7; }
.mp-official-preview { width:100%; max-width:340px; }
.mp-official-phone { background:#fff; border:1px solid #e7e7e7; border-radius:8px; overflow:hidden; box-shadow:0 2px 12px rgba(0,0,0,.06); }
.mp-official-status { display:flex; align-items:center; justify-content:space-between; padding:8px 14px 4px; font-size:12px; font-weight:600; color:#111; }
.mp-official-status-icons { display:flex; gap:5px; align-items:center; }
.mp-official-status-icons i { display:block; background:#111; border-radius:2px; }
.mp-official-status-icons .sig { width:16px; height:8px; border-radius:3px; }
.mp-official-status-icons .wifi { width:12px; height:8px; }
.mp-official-status-icons .bat { width:20px; height:9px; border-radius:3px; }
.mp-official-header { display:flex; align-items:center; justify-content:space-between; padding:6px 12px 10px; border-bottom:1px solid #f0f0f0; }
.mp-official-back { width:10px; height:10px; border-left:2px solid #888; border-bottom:2px solid #888; transform:rotate(45deg); margin-left:4px; }
.mp-official-avatar { width:28px; height:28px; border-radius:50%; background:linear-gradient(135deg,#e2e8f0,#cbd5e1); }
.mp-official-chat { min-height:420px; background:#fff; }
.mp-official-menu-zone { position:relative; border-top:1px solid #e7e7e7; background:#fcfcfc; }
.mp-official-menu-bar { display:flex; align-items:stretch; min-height:52px; }
.mp-official-keyboard { width:52px; flex-shrink:0; display:flex; align-items:center; justify-content:center; border-right:1px solid #e7e7e7; background:#fafafa; }
.mp-official-keyboard::before { content:''; width:22px; height:16px; border:1.5px solid #b2b2b2; border-radius:4px; display:block; box-shadow:inset 0 -5px 0 #e8e8e8; }
.mp-official-slots { flex:1; display:flex; align-items:stretch; }
.mp-official-slot { flex:1; border:0; border-left:1px solid #e7e7e7; background:#fafafa; color:#888; font-size:14px; padding:10px 6px; cursor:pointer; line-height:1.3; }
.mp-official-slot.is-active { background:#f6ffed; color:#07c160; box-shadow:inset 0 0 0 1px #07c160; font-weight:500; position:relative; z-index:1; }
.mp-official-slot.is-placeholder { color:#b2b2b2; }
.mp-official-float { position:absolute; bottom:100%; z-index:3; pointer-events:none; }
.mp-official-float--add { left:calc(52px + (100% - 52px) / 3 * var(--slot-index, 0) + (100% - 52px) / 6); transform:translateX(-50%); }
.mp-official-float--subs { left:calc(52px + (100% - 52px) / 3 * var(--slot-index, 0)); width:calc((100% - 52px) / 3); padding:0 2px 4px; }
.mp-official-add-btn, .mp-official-sub-item, .mp-official-sub-add { pointer-events:auto; border:1px solid #e7e7e7; background:#fff; color:#576b95; font-size:14px; padding:11px 12px; cursor:pointer; text-align:center; box-shadow:0 1px 4px rgba(0,0,0,.06); width:100%; }
.mp-official-add-btn { border-radius:4px; white-space:nowrap; width:auto; min-width:96px; }
.mp-official-sub-item { border-bottom:0; display:block; }
.mp-official-sub-item:first-child { border-radius:4px 4px 0 0; }
.mp-official-sub-item:last-of-type:not(.mp-official-sub-add) { border-bottom:1px solid #e7e7e7; border-radius:0 0 4px 4px; }
.mp-official-sub-item.is-active { color:#07c160; font-weight:600; background:#f6ffed; }
.mp-official-sub-add { border-radius:0 0 4px 4px; border-top:1px dashed #e7e7e7; color:#07c160; }
.mp-official-toolbar { display:flex; align-items:center; justify-content:center; margin-top:14px; background:#fff; border:1px solid #e7e7e7; border-radius:999px; padding:4px; box-shadow:0 2px 8px rgba(0,0,0,.06); width:fit-content; margin-left:auto; margin-right:auto; }
.mp-official-tool { width:44px; height:36px; border:0; background:transparent; color:#666; font-size:18px; cursor:pointer; border-radius:999px; display:flex; align-items:center; justify-content:center; }
.mp-official-tool .icon { width:18px; height:18px; }
.mp-official-tool:hover:not(:disabled) { background:#f5f5f5; color:#111; }
.mp-official-tool:disabled { opacity:.35; cursor:not-allowed; }
.mp-menu-compose-panel .panel { min-height:560px; }
.mp-menu-panel-form .form-section-title { margin-bottom:12px; }
.mp-menu-panel-form > label:last-child,
.mp-menu-panel-form #mp-menu-leaf-fields > label:last-child { margin-bottom:0; }
.mp-menu-panel-form #mp-menu-type-fields .form-meta { margin-top:-2px; }
.mp-menu-panel-empty { padding:32px 0; text-align:center; }
.mp-menu-tag-hint { margin-top:6px; font-size:12px; color:var(--muted); line-height:1.5; }

/* MP auto reply compose */
.mp-reply-compose { display:grid; grid-template-columns:1fr 320px; gap:16px; }
@media (max-width: 960px) { .mp-reply-compose { grid-template-columns:1fr; } }
.mp-reply-preview-device { background:#fff; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; }
.mp-reply-preview-header { padding:10px 12px; font-size:13px; font-weight:600; border-bottom:1px solid var(--border); background:#fafbfc; }
.mp-reply-preview-body { min-height:280px; padding:16px; background:#f5f6f7; }
.mp-reply-bubble { max-width:85%; padding:10px 12px; border-radius:12px; font-size:14px; line-height:1.5; word-break:break-word; }
.mp-reply-bubble-out { background:#95ec69; margin-left:auto; }
.mp-reply-bubble-in { background:#fff; border:1px solid #e5e7eb; }
.mp-reply-bubble img { max-width:100%; border-radius:8px; display:block; }
.mp-reply-mini-card { background:#fff; border:1px solid #e5e7eb; padding:0; overflow:hidden; }
.mp-reply-mini-card img, .mp-reply-mini-placeholder { width:100%; height:120px; object-fit:cover; display:block; background:#e2e8f0; }
.mp-reply-mini-title { padding:10px 12px; font-size:13px; }
.mp-material-pick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px; }
.mp-material-pick { border:1px solid var(--border); border-radius:var(--radius-sm); background:#fff; padding:8px; text-align:left; cursor:pointer; }
.mp-material-pick:hover { border-color:var(--primary); }
.mp-material-pick.is-selected { border-color:var(--primary); box-shadow:0 0 0 2px rgba(99,102,241,.25); }
.mp-material-pick img { width:100%; height:72px; object-fit:cover; border-radius:6px; display:block; margin-bottom:6px; }
.mp-material-pick span { font-size:12px; display:block; line-height:1.3; }
.mp-material-selected-preview { max-width:200px; margin-top:10px; border-radius:8px; border:1px solid var(--border); }

/* Contact way show — tech visual (scoped, no form impact) */
.cw-show-page {
    --cw-accent: var(--primary);
    --cw-accent-2: var(--accent-blue);
    --cw-surface: var(--card);
    --cw-text: var(--text);
    --cw-muted: var(--muted);
    position: relative;
    padding: 4px 0 8px;
}
.cw-show-page::before { display: none; }
.cw-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 22px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0b1220 0%, #132238 48%, #0d3d35 100%);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 20px 50px rgba(15,23,42,.18);
    color: #e2e8f0;
}
.cw-hero-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #07c160;
    background: rgba(7,193,96,.12);
    border: 1px solid rgba(7,193,96,.35);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.cw-hero-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.cw-hero-meta { margin: 0; font-size: 13px; color: #94a3b8; }
.cw-hero-meta code { color: #7dd3fc; background: rgba(0,0,0,.25); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.cw-hero-actions { margin: 0; align-self: center; }
.cw-btn-glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #e2e8f0; backdrop-filter: blur(8px); }
.cw-btn-glass:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; }
.cw-btn-glow { box-shadow: 0 0 20px rgba(7,193,96,.35); }
.cw-alert {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    color: #92400e;
    background: linear-gradient(90deg, rgba(255,251,235,.95), rgba(254,243,199,.9));
    border: 1px solid #fcd34d;
}
.cw-alert a { color: #b45309; font-weight: 600; margin-left: 6px; }
.cw-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.cw-metric {
    padding: 18px 16px;
    border-radius: 14px;
    background: var(--cw-surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(15,23,42,.06);
    transition: transform .2s, box-shadow .2s;
}
.cw-metric:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(15,23,42,.1); }
.cw-metric-primary {
    background: linear-gradient(145deg, rgba(7,193,96,.12), rgba(255,255,255,.95));
    border-color: rgba(7,193,96,.25);
}
.cw-metric-value { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--cw-text); letter-spacing: -.03em; }
.cw-metric-primary .cw-metric-value {
    background: linear-gradient(135deg, #06ad56, #0082ef);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.cw-metric-label { margin-top: 6px; font-size: 12px; color: var(--cw-muted); font-weight: 500; }
.cw-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.cw-card {
    border-radius: 16px;
    background: var(--cw-surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(15,23,42,.06);
    overflow: hidden;
}
.cw-card-wide { margin-bottom: 16px; }
.cw-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,0,0,.05);
    background: linear-gradient(180deg, rgba(248,250,252,.9), rgba(255,255,255,.6));
}
.cw-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--cw-text); }
.cw-card-sub { margin: 4px 0 0; font-size: 12px; color: var(--cw-muted); }
.cw-card-body { padding: 18px; }
.cw-card-qr .cw-card-body { text-align: center; }
.cw-qr-shell { position: relative; display: inline-block; margin-bottom: 14px; }
.cw-qr-glow {
    position: absolute;
    inset: -12px;
    background: radial-gradient(circle, rgba(7,193,96,.25), transparent 70%);
    border-radius: 20px;
    animation: cw-pulse 3s ease-in-out infinite;
}
@keyframes cw-pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }
.cw-qr-img {
    position: relative;
    width: 200px;
    max-width: 100%;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
.cw-qr-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.cw-kv { text-align: left; font-size: 13px; margin: 0; }
.cw-kv div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid #f1f5f9; }
.cw-kv dt { margin: 0; color: var(--cw-muted); font-weight: 500; }
.cw-kv dd { margin: 0; word-break: break-all; }
.cw-field { margin-bottom: 16px; }
.cw-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cw-field-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--cw-muted); margin-bottom: 8px; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-chip {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    background: linear-gradient(135deg, rgba(0,130,239,.08), rgba(7,193,96,.08));
    border: 1px solid rgba(0,130,239,.15);
    color: var(--cw-text);
}
.cw-welcome-box {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border: 1px solid #e2e8f0;
    color: #334155;
}
.cw-muted { color: var(--cw-muted); font-size: 13px; }
.cw-empty { text-align: center; color: var(--cw-muted); padding: 24px 12px; margin: 0; }
.cw-chart { display: flex; flex-direction: column; gap: 10px; }
.cw-chart-row {
    display: grid;
    grid-template-columns: 72px 1fr 36px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.cw-chart-row.is-today .cw-chart-date { color: var(--cw-accent-2); font-weight: 700; }
.cw-chart-date { color: var(--cw-muted); font-variant-numeric: tabular-nums; }
.cw-chart-bar-track {
    height: 10px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}
.cw-chart-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cw-accent), var(--cw-accent-2));
    box-shadow: 0 0 12px rgba(7,193,96,.4);
    transition: width .4s ease;
}
.cw-chart-val { text-align: right; font-weight: 700; color: var(--cw-text); font-variant-numeric: tabular-nums; }
.cw-table-wrap { border-radius: 0 0 16px 16px; overflow: hidden; }
.cw-table thead th { background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--cw-muted); }
.cw-table tbody tr:hover td { background: rgba(7,193,96,.04); }
@media (max-width: 960px) {
    .cw-metrics { grid-template-columns: repeat(2, 1fr); }
    .cw-grid { grid-template-columns: 1fr; }
    .cw-field-row { grid-template-columns: 1fr; }
}

/* 话术库 — 信息架构（scope 主导 + 类型筛选 + 追踪能力） */
.material-page { display: flex; flex-direction: column; gap: 16px; }
.material-scope-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.material-scope-tabs { flex: 1; min-width: 0; }
.material-scope-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.material-filter-panel { margin-bottom: 0; }
.material-filter-body { display: flex; flex-direction: column; gap: 14px; padding-top: 14px !important; padding-bottom: 14px !important; }
.material-filter-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.material-filter-group--inline { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
.material-filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    flex-shrink: 0;
}
.material-type-tabs { flex-wrap: wrap; }
.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border);
    background: #fff;
    transition: border-color .15s, background .15s, color .15s;
}
.filter-chip:hover { border-color: rgba(7,193,96,.45); color: var(--primary); background: #fff; }
.filter-chip.is-active {
    background: var(--primary-light);
    border-color: rgba(7,193,96,.45);
    color: #06ad56;
    font-weight: 600;
    box-shadow: none;
}
.material-tag-filter select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: rgba(255,255,255,.9);
    min-width: 140px;
}
.panel-head-desc { margin: 4px 0 0; font-size: 12px; color: var(--muted); font-weight: 400; }
.badge-radar {
    background: var(--primary-light);
    color: #06ad56;
    border: 1px solid rgba(7,193,96,.25);
    margin-left: 6px;
    vertical-align: middle;
}
.material-perception-block {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(248,250,252,.9), rgba(255,255,255,.6));
}
.material-perception-toggle {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 0 !important;
}
.material-perception-toggle span { display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
.material-perception-fields { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
@media (max-width: 768px) {
    .material-scope-bar { flex-direction: column; align-items: stretch; }
    .material-scope-actions { justify-content: flex-start; }
    .material-filter-group--inline { flex-direction: column; align-items: flex-start; }
}

/* Material library card grid */
.material-card-panel { padding: 16px; }
.material-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.material-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.material-card:hover {
    border-color: rgba(7,193,96,.35);
    box-shadow: 0 4px 14px rgba(7,193,96,.08);
}
.material-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 8px;
}
.material-card__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.material-card__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.material-card__action-form { display: inline; margin: 0; }
.material-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--muted);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.material-card__action:hover { background: #f1f5f9; color: #475569; }
.material-card__action .icon { width: 16px; height: 16px; }
.material-card__media {
    aspect-ratio: 1;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
}
.material-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.material-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}
.material-card__placeholder-icon { width: 48px; height: 48px; }
.material-card__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--muted);
}
.material-card__type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.material-card__type-icon { width: 14px; height: 14px; }
.material-card__time {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.material-card__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.msg-existing-cover {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 10px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.msg-existing-cover-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Mass message material picker */
.mass-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    max-height: 420px;
    overflow-y: auto;
    padding: 4px;
}
.mass-material-pick {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    padding: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.mass-material-pick:hover { border-color: #a5b4fc; }
.mass-material-pick.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}
.mass-material-pick__media {
    aspect-ratio: 1;
    background: #f8fafc;
    overflow: hidden;
}
.mass-material-pick__media img { width: 100%; height: 100%; object-fit: cover; }
.mass-material-pick__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}
.mass-material-pick__body { padding: 8px 10px; }
.mass-material-pick__title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mass-material-pick__type { font-size: 11px; color: var(--muted); margin-top: 2px; }

.mass-target-section {
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
}
.mass-target-section--compact .form-section-title { margin-top: 0; }
.mass-target-filters {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.mass-target-account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.mass-target-account-label {
    font-size: 13px;
    color: var(--muted);
    flex-shrink: 0;
}
.mass-target-account-select {
    min-width: 160px;
    max-width: 280px;
}
.mass-target-account-name {
    font-size: 14px;
    font-weight: 600;
}
.mass-target-mode { margin-bottom: 8px; }
.mass-target-reach { margin: 8px 0 0; }
.mass-filter-label {
    font-size: 13px;
    color: var(--muted);
    margin-right: 8px;
}

.tag-dropdown-picker { margin-top: 12px; }
.tag-dropdown-picker--exclude .tag-dropdown-chip { background: #fef2f2; border-color: #fecaca; }
.tag-dropdown-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    align-items: center;
    margin-bottom: 8px;
}
.tag-dropdown-empty { font-size: 12px; color: var(--muted); }
.tag-dropdown-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
}
.tag-dropdown-chip-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--muted);
    padding: 0 2px;
}
.tag-dropdown-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.tag-dropdown-group,
.tag-dropdown-tag {
    min-width: 100px;
    max-width: 160px;
}

.mass-page-shell {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}
.mass-page-left {
    flex: 1 1 70%;
    min-width: 0;
    max-width: 70%;
}
.mass-page-right {
    flex: 0 0 30%;
    width: 30%;
    min-width: 260px;
    max-width: 360px;
    position: sticky;
    top: 16px;
    align-self: flex-start;
}
.mass-page-right .compose-preview-panel { position: static; top: auto; }
.mass-page-right .wx-phone {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}
.mass-compose-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}
.mass-compose-col.panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
}
.mass-compose-col .panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.mass-message-body { gap: 12px; }
.mass-field { display: flex; flex-direction: column; gap: 6px; }
.mass-field-label { font-size: 13px; font-weight: 600; }
.mass-send-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.mass-send-bar-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mass-send-bar-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.mass-send-hint { margin: 6px 0 0; font-size: 12px; }
.mass-page-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    width: 100%;
    clear: both;
}
.mass-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 0;
}
.mass-config-body { gap: 0; }
.mass-config-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.mass-config-section {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.mass-config-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.mass-config-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
}
.mass-config-control { flex: 1; max-width: 240px; }
.mass-config-value { font-size: 14px; font-weight: 500; }
.mass-config-section .staff-picker-field { margin: 0; }
.mass-config-section .form-section-title { margin-top: 0; }
.mass-config-section .form-meta { margin-bottom: 8px; font-size: 12px; }
.mass-config-section .staff-picker-selected { min-height: 32px; margin-bottom: 6px; }

.mass-target-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 10px;
}
.mass-target-head .mass-config-label { margin-right: 4px; }
.mass-target-reach {
    margin-left: auto;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}
.mass-target-reach strong { color: var(--primary); font-size: 15px; }

.mass-filter-panel {
    margin-top: 4px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.mass-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 10px;
}
.mass-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin: 0;
    white-space: nowrap;
}
.mass-filter-item input[type="date"] {
    width: 124px;
    padding: 4px 6px;
    font-size: 12px;
}
.mass-filter-gender {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
}
.mass-filter-gender .checkbox { font-size: 12px; }
.mass-filter-label { font-size: 12px; color: var(--muted); margin-right: 2px; }

.mass-tag-filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.tag-dropdown-picker--inline { margin-top: 0; }
.tag-dropdown-inline-head {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 5px;
    align-items: center;
}
.tag-dropdown-inline-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.tag-dropdown-picker--inline .tag-dropdown-controls { display: contents; }
.tag-dropdown-picker--inline .tag-dropdown-group,
.tag-dropdown-picker--inline .tag-dropdown-tag {
    min-width: 0;
    width: 100%;
    max-width: none;
    font-size: 12px;
    padding: 4px 6px;
}
.tag-dropdown-picker--inline .tag-dropdown-selected {
    margin-top: 4px;
    margin-bottom: 0;
    grid-column: 1 / -1;
}
.tag-dropdown-picker--inline [data-tag-dropdown-add] {
    white-space: nowrap;
    padding: 4px 8px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .mass-page-shell { flex-direction: column; }
    .mass-page-left { max-width: none; flex: 1 1 auto; width: 100%; }
    .mass-page-right {
        position: static;
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
        order: 2;
    }
    .mass-page-right .wx-phone { max-width: none; }
    .mass-compose-columns { grid-template-columns: 1fr; }
    .mass-tag-filters-row { grid-template-columns: 1fr; }
    .mass-target-reach { margin-left: 0; width: 100%; }
}

.variable-chip {
    font-family: ui-monospace, monospace;
    font-size: 12px;
}

.analytics-kpi-grid { grid-template-columns: repeat(4, 1fr); }
.metric-teal .metric-icon { background: rgba(20,184,166,.12); color: #14b8a6; }
.metric-indigo .metric-body { width: 100%; }
.metric-cyan .metric-body { width: 100%; }
.metric-amber .metric-body { width: 100%; }
.metric-pink .metric-body { width: 100%; }
.metric-gray .metric-body { width: 100%; }
.analytics-delta { font-size: 11px; font-weight: 600; margin-left: 4px; }
.analytics-delta.up { color: #06ad56; }
.analytics-delta.down { color: #dc2626; }
.analytics-footnote { background: #f8fafc; border-color: #e2e8f0; }
.analytics-trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 160px;
    padding-bottom: 4px;
    width: 100%;
}
.analytics-trend-chart--fit {
    overflow-x: hidden;
}
.analytics-trend-chart--fit .analytics-trend-col {
    flex: 1 1 0;
    width: auto;
    min-width: 4px;
    max-width: 56px;
}
.analytics-trend-chart--scroll {
    overflow-x: auto;
    min-width: 100%;
    width: max(100%, calc(var(--trend-cols, 90) * 11px));
}
.analytics-trend-chart--scroll .analytics-trend-col {
    flex: 0 0 10px;
    width: 10px;
}
.analytics-trend-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
}
.analytics-trend-stack-wrap {
    height: 130px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.analytics-trend-stack {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    width: 72%;
    max-width: 40px;
    min-width: 4px;
    border-radius: 3px 3px 0 0;
    overflow: hidden;
}
.analytics-trend-chart--fit .analytics-trend-stack {
    width: 60%;
    max-width: 36px;
}
.analytics-trend-chart--scroll .analytics-trend-stack {
    width: 90%;
    max-width: 10px;
}
.analytics-trend-stack-new { background: #10b981; flex-shrink: 0; }
.analytics-trend-stack-return { background: #60a5fa; flex-shrink: 0; }
.analytics-trend-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 130px;
    width: 100%;
    justify-content: center;
}
.analytics-bar { width: 40%; min-height: 2px; border-radius: 3px 3px 0 0; transition: height .2s; }
.analytics-bar-uv { background: #3b82f6; }
.analytics-bar-new { background: #10b981; }
.analytics-bar-pv { background: #8b5cf6; }
.analytics-trend-label {
    font-size: 10px;
    color: var(--muted);
    margin-top: 6px;
    white-space: nowrap;
    height: 14px;
    line-height: 14px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.analytics-trend-label.is-sparse { visibility: hidden; }
.analytics-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.analytics-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.analytics-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.analytics-bar-row-label { width: 88px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-bar-track { flex: 1; background: #eef2f7; border-radius: 4px; height: 8px; overflow: hidden; }
.analytics-bar-track > div { background: var(--primary, #2563eb); height: 100%; border-radius: 4px; }
.analytics-bar-row-val { width: 88px; text-align: right; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.analytics-portrait-tabs { margin-left: auto; }
.analytics-portrait-panel { display: none; }
.analytics-portrait-panel.active { display: block; }
.analytics-portrait-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.analytics-toolbar { flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) {
    .analytics-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .analytics-kpi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .analytics-kpi-grid { grid-template-columns: 1fr; }
}

.analytics-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    padding: 12px 16px 16px;
}
.analytics-health-card {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
}
.analytics-health-card.is-empty { background: #f9fafb; }
.analytics-health-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.analytics-health-card__name { font-weight: 600; font-size: 14px; }
.analytics-health-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.analytics-health-metric { text-align: center; }
.analytics-health-metric__val {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text, #111827);
}
.analytics-health-metric__lbl {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.analytics-health-perf {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.analytics-health-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
}
.analytics-health-tag--warn {
    background: #fef2f2;
    color: #b91c1c;
}
.analytics-health-anomaly__title {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.analytics-health-anomaly__list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}
.analytics-health-anomaly__list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    padding: 4px 0;
    border-top: 1px solid #f1f5f9;
}
.analytics-health-anomaly__path {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    flex: 1;
    min-width: 0;
}
.analytics-health-anomaly__rate {
    font-weight: 600;
    color: #b91c1c;
    flex-shrink: 0;
}
.analytics-perf-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}
.analytics-perf-kpi {
    text-align: center;
    padding: 12px 8px;
    border-radius: 8px;
    background: #f8fafc;
}
.analytics-perf-kpi.has-alert { background: #fef2f2; }
.analytics-perf-kpi__val {
    display: block;
    font-size: 18px;
    font-weight: 700;
}
.analytics-perf-kpi__lbl {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}
@media (max-width: 560px) {
    .analytics-health-metrics { grid-template-columns: 1fr; }
    .analytics-perf-summary { grid-template-columns: 1fr; }
}

/* ── 仪表盘导图布局 ── */
.dash-layout { display: flex; flex-direction: column; gap: 20px; }
.dash-row1.metric-grid { margin-bottom: 0; }
.dash-channel-card { align-items: flex-start; }
.dash-channel-card .metric-body { flex: 1; min-width: 0; }
.dash-channel-card__theme {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.dash-channel-card__primary { font-size: 28px; line-height: 1.15; }
.dash-channel-card__primary--sm { font-size: 24px; }
.dash-channel-card__slash {
    font-size: .72em;
    font-weight: 600;
    color: var(--muted);
    margin: 0 2px;
}
.dash-channel-card__meta { font-size: 11px; font-weight: 500; color: var(--muted); }
.dash-channel-card__secondary {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.dash-channel-card__secondary strong { color: var(--text); font-weight: 700; }
.dash-channel-card--empty {
    border-style: dashed;
    background: rgba(255,255,255,.55);
    justify-content: center;
}
.dash-channel-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 88px;
    color: var(--muted);
    font-size: 13px;
}
.dash-channel-card__placeholder-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px dashed var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}

.dash-row2__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.dash-row2__head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.dash-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.dash-mini-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow .2s, transform .2s;
}
.dash-mini-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.dash-mini-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.dash-mini-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
}
.dash-mini-card__name:hover { color: var(--primary-hover); }
.dash-mini-card__active-toggle {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
}
.dash-mini-card__active-btn {
    border: 0;
    background: transparent;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--muted);
}
.dash-mini-card__active-btn.is-active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(15,23,42,.1);
}
.dash-mini-card__metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.dash-mini-card__metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    min-width: 0;
}
.dash-mini-card__metric-label {
    font-size: 11px;
    line-height: 1.3;
    color: var(--muted);
}
.dash-mini-card__metric-val {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: #6366f1;
}
.dash-mini-card__metric-val--new { color: #0ea5e9; }
.dash-mini-card__chart-caption {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
}
.dash-mini-card__chart {
    min-height: 112px;
    padding: 8px 6px 4px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #eef2f7;
}
.dash-bar-chart {
    width: 100%;
}
.dash-bar-plot {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 96px;
    padding-top: 14px;
    box-sizing: border-box;
    border-bottom: 1px solid #e2e8f0;
}
.dash-bar-col {
    flex: 1 1 0;
    min-width: 3px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.dash-bar-stack {
    position: relative;
    width: 100%;
    max-width: 22px;
    min-width: 4px;
    display: flex;
    align-items: flex-end;
}
.dash-bar-value {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    color: #64748b;
    white-space: nowrap;
    pointer-events: none;
}
.dash-bar-col:hover .dash-bar-value {
    color: #475569;
}
.dash-bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
    border-radius: 4px 4px 0 0;
    min-height: 3px;
    transition: height .25s ease;
}
.dash-bar-labels {
    display: flex;
    gap: 3px;
    height: 20px;
    margin-top: 4px;
}
.dash-bar-label {
    flex: 1 1 0;
    min-width: 0;
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-bar-empty {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--muted);
    background: #f8fafc;
    border-radius: 8px;
}
.dash-mini-card__foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: auto;
}

@media (max-width: 1100px) {
    .dash-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .dash-mini-grid { grid-template-columns: 1fr; }
}

/* Delivery / 全局表单控件：与筛选区统一为 32px 高度，避免下拉与按钮高低不一 */
.form-control,
.toolbar .form-control,
.filter-form .form-control,
.delivery-temple-upload .form-control {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 30px;
    color: var(--text);
    background: #fff;
    height: 32px;
    min-height: 32px;
}
textarea.form-control {
    height: auto;
    min-height: 88px;
    line-height: 1.5;
    padding: 8px 10px;
}
.toolbar .form-control,
.toolbar-form .form-control,
.delivery-temple-upload .form-control { width: auto; min-width: 140px; margin-top: 0; }
.toolbar-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.form-inline { display: inline; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.text-danger { color: #cf1322; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* 交付中心工具条：状态 Tab + 补拉表单同一行对齐 */
.delivery-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.delivery-status-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.delivery-wecom-owner {
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.45;
    color: #595959;
    font-weight: 500;
}
.delivery-wecom-staff { color: #595959; }
/* 主体作差异化后缀，不用「主体」二字 */
.delivery-wecom-account {
    color: #8c8c8c;
    font-weight: 400;
    font-size: 11px;
}
.delivery-wecom-account::before {
    content: '@';
    margin: 0 1px 0 4px;
    color: #bfbfbf;
}
.mp-skin .delivery-wecom-owner,
.mp-skin .delivery-wecom-staff { color: #4a4a4a; }
.mp-skin .delivery-wecom-account { color: #8c8c8c; }
.mp-skin .delivery-wecom-account::before { color: #bfbfbf; }

/* Temple delivery list */
.delivery-temple-list { display: flex; flex-direction: column; gap: 14px; }
.delivery-temple-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.96);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.delivery-temple-card__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
}
.delivery-temple-card__ref {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    color: var(--text-secondary);
}
.delivery-temple-card__meta { font-size: 13px; color: var(--text); }
.delivery-temple-card__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
}
.delivery-temple-card__note-body {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
    padding: 10px 12px;
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.delivery-temple-card__fields { margin-top: 12px; }
.delivery-temple-card__field-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.6;
}
.delivery-temple-card__proofs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.delivery-temple-proof img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.delivery-temple-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

/* Platform admin */
.platform-kpi-row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    max-width: 560px;
}

.panel-body-flush { padding: 0; }
.panel-body-flush .table-wrap { border-radius: 0; }
.panel-body-flush .platform-panel-note {
    margin: 0;
    padding: 14px 18px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    background: rgba(248,250,252,.6);
}

.table-pagination {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: rgba(248,250,252,.5);
}

.pagination-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text, #334155);
}

.pagination-meta-text {
    font-weight: 500;
}

.pagination-jump-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.pagination-jump-input {
    width: 4.5em;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.pagination-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination-pages {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.pagination-btn,
.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text, #334155);
    text-decoration: none;
    font-size: 13px;
}

.pagination-btn:hover,
.pagination-page:hover {
    border-color: rgba(7,193,96,.4);
    color: #06ad56;
}

.pagination-page.is-current,
.pagination-btn-disabled {
    background: #f8fafc;
    color: var(--text-muted, #64748b);
    cursor: default;
}

.pagination-ellipsis {
    padding: 0 6px;
    color: var(--text-muted, #64748b);
}

.staff-select-list {
    min-height: 180px;
}

.platform-settings-form .form-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.platform-settings-form .form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.platform-settings-form .platform-checkbox {
    margin-bottom: 0;
}
.form-actions-compact {
    margin-top: 8px;
    padding-top: 0;
    border-top: none;
}

.input,
select.input,
textarea.input,
.panel-body .input,
.panel-body select.input,
.inline-status-form select,
.inline-status-form input {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: rgba(255,255,255,.95);
    color: var(--text);
    transition: border-color .18s, box-shadow .18s;
    box-sizing: border-box;
}
.input-sm,
.inline-status-form .input {
    width: auto;
    min-width: 108px;
    padding: 7px 10px;
    font-size: 13px;
}
.input:focus,
select.input:focus,
textarea.input:focus,
.inline-status-form select:focus,
.inline-status-form input:focus {
    outline: none;
    border-color: rgba(7,193,96,.55);
    box-shadow: 0 0 0 3px rgba(7,193,96,.12);
    background: #fff;
}

.platform-info-table th {
    width: 160px;
    white-space: nowrap;
    vertical-align: top;
    padding-top: 12px;
}
.platform-info-table td {
    word-break: break-all;
}
.code-inline {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(15,23,42,.06);
    border: 1px solid rgba(15,23,42,.08);
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #334155;
    word-break: break-all;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.status-tag--pending {
    background: rgba(245,158,11,.12);
    color: #b45309;
    border: 1px solid rgba(245,158,11,.22);
}
.status-tag--contacted {
    background: rgba(7,193,96,.12);
    color: #06ad56;
    border: 1px solid rgba(7,193,96,.22);
}
.status-tag--closed {
    background: rgba(100,116,139,.10);
    color: #64748b;
    border: 1px solid rgba(100,116,139,.18);
}

.badge-success {
    background: rgba(7,193,96,.12);
    color: #06ad56;
    border: 1px solid rgba(7,193,96,.22);
}
.badge-warning {
    background: rgba(245,158,11,.12);
    color: #b45309;
    border: 1px solid rgba(245,158,11,.22);
}

.inline-status-form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.inline-bind-form {
    min-width: 280px;
}
.inline-bind-form .input-sm {
    flex: 1;
    min-width: 100px;
}

.platform-delete-details summary {
    list-style: none;
}
.platform-delete-details summary::-webkit-details-marker {
    display: none;
}
.platform-delete-form {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-sm);
    min-width: 200px;
}
.platform-invite-renew-form {
    flex-wrap: wrap;
}
.platform-auth-actions {
    min-width: 280px;
}

.invite-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(7,193,96,.08);
    border: 1px solid rgba(7,193,96,.2);
}
.invite-result-label {
    font-size: 12px;
    font-weight: 600;
    color: #06ad56;
    margin-bottom: 6px;
}
.invite-result-link {
    display: block;
    font-size: 13px;
    word-break: break-all;
    color: var(--accent-blue);
    text-decoration: none;
}
.invite-result-link:hover { text-decoration: underline; }

/* Staff management */
.staff-page-hint {
    font-size: 13px;
    line-height: 1.65;
}
.staff-page .staff-invite-form {
    align-items: flex-end;
}
.staff-page .staff-invite-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
    min-width: 180px;
    max-width: 240px;
}
.staff-page .staff-invite-form .form-control {
    margin-top: 0;
}
.staff-page .staff-sync-form {
    flex-shrink: 0;
}
.staff-list-head {
    gap: 12px;
}
.staff-list-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.work-account-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}
.work-account-inline .mp-account-label {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}
.work-account-inline .mp-account-select {
    min-width: 140px;
    padding: 5px 8px;
    font-size: 13px;
}
.staff-account-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}
.staff-page .staff-table td {
    vertical-align: middle;
}
.staff-page .staff-actions-col {
    width: auto;
    min-width: 200px;
    max-width: 420px;
}
.staff-userid-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}
.staff-userid-code {
    font-size: 12px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
}
.staff-page .staff-bind-form {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 8px;
}
.staff-page .staff-bind-form .staff-userid-select {
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 220px;
}
.staff-page .staff-bind-form .staff-role-select {
    width: 96px;
    min-width: 96px;
    flex-shrink: 0;
}
.staff-invite-path {
    font-size: 12px;
    word-break: break-all;
}
.staff-name-cell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
}
.staff-reset-form {
    margin: 0;
    display: inline-flex;
}
.staff-reset-btn {
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}
.staff-reset-btn:hover {
    color: #b45309;
}
.staff-reset-alert {
    line-height: 1.65;
}
.staff-reset-code {
    display: inline-block;
    margin: 0 6px;
    padding: 4px 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .06em;
    background: #fff;
    border: 1px dashed #f59e0b;
    border-radius: 6px;
    color: #92400e;
}
.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.3;
    border-radius: 6px;
}
@media (max-width: 900px) {
    .staff-page .staff-bind-form {
        flex-wrap: wrap;
        min-width: 0;
    }
    .staff-page .staff-actions-col {
        width: auto;
        min-width: 0;
    }
}

.data-table .cell-message {
    max-width: 280px;
    word-break: break-word;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}
.data-table .nowrap { white-space: nowrap; }

.workbench-stats-root.is-loading .workbench-skeleton-block {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.06);
    color: transparent;
}
.workbench-stats-root.is-loading .workbench-skeleton-block::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
    animation: workbench-shimmer 1.4s infinite;
}
@keyframes workbench-shimmer {
    100% { transform: translateX(100%); }
}
.workbench-skeleton-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.workbench-skeleton-value { width: 72px; height: 28px; margin-bottom: 8px; }
.workbench-skeleton-label { width: 110px; height: 14px; }
.workbench-skeleton-title { width: 120px; height: 18px; }
.workbench-skeleton-bar { height: 16px; margin-bottom: 12px; }
.workbench-skeleton-trend { height: 280px; border-radius: 12px; }
.workbench-skeleton-range { width: 260px; height: 36px; border-radius: 999px; margin-left: auto; }
.workbench-skeleton-row { height: 14px; margin-bottom: 10px; }
.workbench-skeleton-line { height: 16px; border-radius: 6px; }
.workbench-skeleton-card {
    display: flex;
    gap: 14px;
    align-items: center;
}
.workbench-skeleton-hint {
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
}

.follow-more-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(7, 193, 96, 0.12);
    color: #06ad56;
    font-size: 11px;
    font-weight: 600;
    cursor: help;
}
.follow-filter-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding-top: 4px;
    flex-wrap: wrap;
}
.follow-filter-row--expanded {
    flex-wrap: nowrap;
    padding-top: 10px;
    margin-top: 2px;
    border-top: 1px solid var(--border);
}
.follow-filter-chip-all {
    cursor: pointer;
    font: inherit;
    appearance: none;
    background: #fff;
}
.follow-filter-chip-all.is-active {
    border-color: rgba(7, 193, 96, .55);
    background: var(--primary-light);
    color: #06ad56;
    font-weight: 600;
}
.follow-filter-row .work-account-inline {
    flex-shrink: 0;
}
.follow-filter-row .work-account-inline .mp-account-label {
    font-size: 12px;
}
.follow-filter-row .work-account-inline .mp-account-select {
    min-width: 120px;
    padding: 5px 8px;
    font-size: 13px;
}
.work-account-multi {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    flex-shrink: 0;
}
.work-account-multi .follow-filter-label {
    margin-right: 0;
}
.account-pill {
    display: inline-block;
    font-size: 12px;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.follow-filter-label {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.follow-filter-multi-body {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}
.follow-filter-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 13px;
    color: var(--text);
    font-weight: 400;
    margin-bottom: 0 !important;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.follow-filter-chip:has(input:checked) {
    border-color: rgba(7, 193, 96, .55);
    background: var(--primary-light);
    color: #06ad56;
}
.follow-filter-chip input {
    margin: 0;
    accent-color: var(--primary);
}
.follow-filter-hint {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}
.filter-form .follow-filter-row .follow-filter-chip {
    margin-bottom: 0;
}
.tag-follow-scope {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafb;
}
.tag-follow-scope--compact {
    margin-top: 8px;
    padding: 10px 12px;
}
.tag-follow-scope-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.form .tag-follow-scope .tag-scope-radio {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 8px !important;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text);
    font-weight: 400;
    cursor: pointer;
}
.form .tag-follow-scope .tag-scope-radio span {
    white-space: nowrap;
}
.form .tag-follow-scope .tag-scope-radio input[type="radio"] {
    flex-shrink: 0;
    accent-color: var(--primary);
}
.tag-follow-scope-staff {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.form .tag-follow-scope .tag-scope-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid #dce3ea;
    background: #fff;
    font-size: 13px;
    line-height: 1.3;
    color: var(--text);
    font-weight: 400;
    margin: 0 !important;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.form .tag-follow-scope .tag-scope-chip:hover {
    border-color: #b7ebd0;
    background: #f6fffb;
}
.form .tag-follow-scope .tag-scope-chip:has(input:checked) {
    border-color: #7dd4a8;
    background: var(--primary-light);
    color: #0d7a42;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(13,122,66,.08);
}
/* 隐藏原生 checkbox，点击感与 tag-picker-chip 一致 */
.form .tag-follow-scope .tag-scope-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.form .tag-follow-scope .tag-scope-chip input:disabled + span {
    opacity: 0.5;
}
/* 客户列表批量条：单行工具栏，控件同高同边框 */
.customer-batch-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}
.customer-batch-bar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 480px;
    min-width: 0;
}
.customer-batch-bar .tag-dropdown-picker--inline {
    display: contents;
}
.customer-batch-bar .tag-dropdown-inline-head {
    display: contents;
}
.customer-batch-bar .tag-dropdown-picker--inline .tag-dropdown-controls {
    display: contents;
}
.customer-batch-bar .tag-dropdown-group,
.customer-batch-bar .tag-dropdown-tag {
    flex: 0 1 140px;
    min-width: 120px;
    max-width: 180px;
}
/* 已选标签芯片与控件同一行，不单独占满宽 */
.customer-batch-bar .tag-dropdown-selected {
    display: inline-flex;
    flex: 0 1 auto;
    margin: 0;
    min-height: 0;
    max-width: 280px;
}
.customer-batch-bar .tag-dropdown-selected:not(:has(.tag-dropdown-chip)) {
    display: none;
}
.customer-batch-bar .tag-dropdown-empty {
    display: none;
}
.customer-batch-action {
    flex: 0 0 auto;
    min-width: 118px;
}
.customer-batch-bar .tag-follow-scope--cascade {
    display: contents;
}
.customer-batch-bar .tag-scope-selected {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    max-width: 220px;
}
.customer-batch-bar .tag-scope-selected[hidden] {
    display: none !important;
}

/* 生效范围一二级下拉（批量条） */
.tag-follow-scope--cascade {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.tag-scope-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 12px;
    background: #e8f8ef;
    border: 1px solid #b7ebd0;
    border-radius: 4px;
    color: #0d7a42;
}
.tag-scope-selected-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--muted);
    padding: 0 2px;
}

/* 筛选区跟进人：默认收起 */
.follow-filter-dd {
    flex: 1 1 auto;
    min-width: 0;
}
.follow-filter-dd-summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    color: var(--text);
    user-select: none;
    white-space: nowrap;
}
.follow-filter-dd-summary::-webkit-details-marker { display: none; }
.follow-filter-dd-summary::after {
    content: '▾';
    color: var(--muted);
    font-size: 11px;
}
.follow-filter-dd-body {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fafbfc;
}
.follow-filter-dd-body .follow-filter-hint {
    display: block;
    margin-top: 8px;
}

/* 兼容旧 class */
.customer-batch-tags {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.customer-batch-tags-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* 旧 dropdown 折叠样式保留（详情页若仍引用） */
.tag-follow-scope--dropdown {
    margin-top: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    min-width: 160px;
}
.tag-follow-scope-summary {
    list-style: none;
    cursor: pointer;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--text);
    user-select: none;
    white-space: nowrap;
}
.tag-follow-scope-summary::-webkit-details-marker { display: none; }
.tag-follow-scope-summary::after {
    content: '▾';
    margin-left: 6px;
    color: var(--muted);
    font-size: 11px;
}
.tag-follow-scope--dropdown[open] .tag-follow-scope-summary {
    border-bottom: 1px solid var(--border);
    background: #f8fafb;
}
.tag-follow-scope-body {
    padding: 10px 12px 12px;
}
.tag-follow-scope--dropdown .tag-follow-scope-staff {
    margin-top: 8px;
}

.integration-add-panel {
    margin-top: 28px;
}
.integration-add-panel .panel-head h3 {
    font-size: 15px;
}
.panel-head-compact {
    padding-top: 14px;
    padding-bottom: 14px;
}
.integration-add-section {
    border-top: 1px solid var(--border);
    background: rgba(248,250,252,.5);
    padding: 20px 18px 22px;
    margin-top: 20px;
}
.account-edit-panel > td {
    padding: 0 !important;
    background: rgba(248,250,252,.65);
    border-bottom: 1px solid var(--border);
}
.account-edit-panel-inner {
    padding: 16px 18px 18px;
}
.account-edit-panel-inner .form {
    max-width: 920px;
}
.account-edit-panel-inner .webhook-config-row {
    margin: 8px 0 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.account-config-table .code-inline {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
.account-overview-table .code-inline {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
}
.integration-primary-tabs {
    margin-bottom: 16px;
}
.integration-channel-tabs {
    margin-bottom: 16px;
}
.integration-channel-content {
    margin-top: 4px;
}
.integration-channel-panel .panel-body {
    padding-top: 14px;
}


/* ============================================================
 * 公众号后台风格样板（仅 .mp-skin 作用域，其它页面不变）
 * ============================================================ */
.mp-skin {
    --mp-green: #07c160;
    --mp-green-hover: #06ad56;
    --mp-green-soft: rgba(7, 193, 96, 0.08);
    --mp-green-border: rgba(7, 193, 96, 0.35);
    --mp-border: #e7e7e7;
    --mp-border-strong: #d9d9d9;
    --mp-bg: #f5f5f5;
    --mp-card: #ffffff;
    --mp-text: #353535;
    --mp-muted: #888888;
    --mp-radius: 4px;
    --mp-head-bg: #fafafa;
    --mp-ctrl-h: 32px;
    color: var(--mp-text);
}

.mp-skin .mp-page-toolbar {
    margin-bottom: 12px;
}
.mp-skin .mp-page-hint {
    color: var(--mp-muted);
}
.mp-skin .mp-page-toolbar-actions {
    gap: 8px;
}

.mp-skin .panel {
    background: var(--mp-card);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    box-shadow: none;
    backdrop-filter: none;
}
.mp-skin .panel:hover {
    box-shadow: none;
}
.mp-skin .panel-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--mp-border);
    background: var(--mp-head-bg);
}
.mp-skin .panel-head h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-text);
    letter-spacing: 0;
}
.mp-skin .panel-body {
    padding: 12px 16px;
}
.mp-skin .panel-compact .panel-body {
    padding: 12px 16px;
}
.mp-skin .mp-filter-panel {
    margin-bottom: 12px;
}
.mp-skin .mp-list-panel {
    margin-bottom: 12px;
}
.mp-skin .mp-batch-panel {
    margin-bottom: 12px;
    border-color: var(--mp-green-border);
    background: #f6ffed;
}

.mp-skin .tip-banner.mp-tip {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
    padding: 8px 12px;
    border-radius: var(--mp-radius);
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.55;
}

.mp-skin .btn {
    border-radius: var(--mp-radius);
    box-shadow: none;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    transform: none;
}
.mp-skin .btn:hover,
.mp-skin .btn:active {
    transform: none;
    box-shadow: none;
}
.mp-skin .btn-primary {
    background: var(--mp-green);
    border-color: var(--mp-green);
    color: #fff;
    filter: none;
}
.mp-skin .btn-primary:hover,
.mp-skin .btn-primary:focus-visible {
    background: var(--mp-green-hover);
    border-color: var(--mp-green-hover);
    color: #fff;
    filter: none;
}
.mp-skin .btn-outline {
    background: #fff;
    border-color: var(--mp-border-strong);
    color: var(--mp-text);
}
.mp-skin .btn-outline:hover,
.mp-skin .btn-outline:focus-visible {
    border-color: var(--mp-green);
    color: var(--mp-green);
    background: #fff;
}
.mp-skin .btn-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--mp-muted);
    box-shadow: none;
}
.mp-skin .btn-ghost:hover {
    color: var(--mp-text);
    background: var(--mp-bg);
}
.mp-skin .btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.mp-skin .filter-form {
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    align-items: center;
}
/*
 * 全局统一：筛选区 / 工具条 / form-control / 交付补拉下拉 同高同边框，
 * 解决交付中心等页「有的 38px、有的 32px、裸 btn 与 outline 混用」观感问题。
 */
.mp-skin .filter-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.mp-skin .filter-form select,
.mp-skin .filter-form .form-control:not(textarea),
.mp-skin .toolbar select,
.mp-skin .toolbar input[type="text"],
.mp-skin .toolbar input[type="search"],
.mp-skin .toolbar .form-control:not(textarea),
.mp-skin .toolbar-form select,
.mp-skin .toolbar-form input[type="text"],
.mp-skin .toolbar-form .form-control:not(textarea),
.mp-skin .delivery-temple-upload input[type="text"],
.mp-skin .delivery-temple-upload .form-control:not(textarea):not([type="file"]),
.mp-skin .form-control:not(textarea),
.mp-skin .customer-batch-action,
.mp-skin .customer-batch-bar .tag-dropdown-group,
.mp-skin .customer-batch-bar .tag-dropdown-tag,
.mp-skin .customer-batch-bar .tag-scope-mode-select,
.mp-skin .customer-batch-bar .tag-scope-staff-select,
.mp-skin .work-account-inline .mp-account-select {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    margin-top: 0;
    height: var(--mp-ctrl-h);
    min-height: var(--mp-ctrl-h);
    line-height: calc(var(--mp-ctrl-h) - 2px);
    border: 1px solid var(--mp-border-strong);
    border-radius: var(--mp-radius);
    background: #fff;
    box-shadow: none;
    padding: 0 10px;
    font-size: 13px;
    color: var(--mp-text);
}
.mp-skin .filter-form > input,
.mp-skin .filter-form > select,
.mp-skin .filter-form > .form-control {
    width: 100%;
}
.mp-skin textarea.form-control {
    height: auto;
    min-height: 88px;
    line-height: 1.5;
    padding: 8px 10px;
}
.mp-skin .filter-form input:focus,
.mp-skin .filter-form select:focus,
.mp-skin .filter-form .form-control:focus,
.mp-skin .toolbar select:focus,
.mp-skin .toolbar .form-control:focus,
.mp-skin .toolbar-form select:focus,
.mp-skin .toolbar-form .form-control:focus,
.mp-skin .form-control:focus,
.mp-skin .customer-batch-action:focus,
.mp-skin .customer-batch-bar .tag-dropdown-group:focus,
.mp-skin .customer-batch-bar .tag-dropdown-tag:focus,
.mp-skin .customer-batch-bar .tag-scope-mode-select:focus,
.mp-skin .customer-batch-bar .tag-scope-staff-select:focus,
.mp-skin .work-account-inline .mp-account-select:focus {
    border-color: var(--mp-green);
    outline: none;
    box-shadow: 0 0 0 2px var(--mp-green-soft);
}
.mp-skin .filter-form .btn,
.mp-skin .filter-form .btn-ghost,
.mp-skin .toolbar > .btn,
.mp-skin .toolbar-form .btn,
.mp-skin .delivery-status-tabs .btn,
.mp-skin .delivery-toolbar > .btn {
    box-sizing: border-box;
    height: var(--mp-ctrl-h);
    min-height: var(--mp-ctrl-h);
    padding: 0 14px;
    line-height: 1;
    align-self: center;
}
/* 未标注 variant 的裸 .btn 视为 outline，避免与主按钮混成「灰块」 */
.mp-skin .btn:not(.btn-primary):not(.btn-outline):not(.btn-ghost):not(.btn-danger) {
    background: #fff;
    border-color: var(--mp-border-strong);
    color: var(--mp-text);
}
.mp-skin .btn:not(.btn-primary):not(.btn-outline):not(.btn-ghost):not(.btn-danger):hover {
    border-color: var(--mp-green);
    color: var(--mp-green);
    background: #fff;
}

.mp-skin .follow-filter-row {
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--mp-border);
    margin-top: 4px;
    align-items: center;
}
.mp-skin .follow-filter-row--expanded {
    flex-wrap: nowrap;
    overflow: hidden;
}
.mp-skin .follow-filter-row--expanded .follow-filter-multi-body {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
}
.mp-skin .follow-filter-chip-all {
    flex-shrink: 0;
}
.mp-skin .follow-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-text);
    line-height: var(--mp-ctrl-h);
}
.mp-skin .follow-filter-hint {
    font-size: 12px;
    color: var(--mp-muted);
    line-height: var(--mp-ctrl-h);
}
.mp-skin .follow-filter-chip {
    box-sizing: border-box !important;
    height: var(--mp-ctrl-h) !important;
    min-height: var(--mp-ctrl-h) !important;
    border-radius: var(--mp-radius) !important;
    padding: 0 10px !important;
    border: 1px solid var(--mp-border-strong) !important;
    background: #fff;
    font-size: 13px;
    color: var(--mp-text);
    line-height: 1;
    display: inline-flex !important;
    align-items: center;
}
.mp-skin .follow-filter-chip:has(input:checked) {
    border-color: var(--mp-green) !important;
    background: var(--mp-green-soft);
    color: var(--mp-green-hover);
}
.mp-skin .follow-filter-chip input {
    margin: 0;
    width: 14px;
    height: 14px;
}
.mp-skin .work-account-inline {
    align-items: center;
    gap: 8px;
}
.mp-skin .work-account-inline .mp-account-label {
    font-size: 13px;
    color: var(--mp-text);
    font-weight: 600;
    line-height: var(--mp-ctrl-h);
}
.mp-skin .work-account-inline .mp-account-select {
    min-width: 120px;
    width: auto;
}

.mp-skin .data-table th {
    background: var(--mp-head-bg);
    border-bottom: 1px solid var(--mp-border);
    color: var(--mp-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 14px;
    letter-spacing: 0;
}
.mp-skin .data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--mp-border);
    font-size: 13px;
    color: var(--mp-text);
}
.mp-skin .data-table tbody tr:hover {
    background: #fafafa;
}
.mp-skin .data-table tbody tr:last-child td {
    border-bottom: 1px solid var(--mp-border);
}
.mp-skin .customer-cell {
    gap: 8px;
}
.mp-skin .avatar-sm,
.mp-skin .mp-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 2px;
    border: 1px solid var(--mp-border);
}
.mp-skin .mp-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: var(--mp-bg);
    color: var(--mp-muted);
}
.mp-skin .mp-customer-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--mp-text);
}
.mp-skin .mp-customer-id {
    font-size: 12px;
}
.mp-skin .text-muted {
    color: var(--mp-muted);
}
.mp-skin .tag-pill {
    background: #f7f7f7;
    color: #595959;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    padding: 1px 6px;
    font-size: 12px;
    font-weight: 400;
}
.mp-skin .badge {
    border-radius: var(--mp-radius);
    font-size: 12px;
    font-weight: 500;
    padding: 1px 6px;
}
.mp-skin .badge-ok {
    background: var(--mp-green-soft);
    color: var(--mp-green-hover);
    border: 1px solid var(--mp-green-border);
}
.mp-skin .follow-more-badge {
    background: var(--mp-bg);
    color: var(--mp-muted);
    border: 1px solid var(--mp-border);
}
.mp-skin .table-link {
    color: var(--mp-green);
}
.mp-skin .empty-cell {
    color: var(--mp-muted);
    padding: 28px 14px !important;
}
.mp-skin .mp-batch-count {
    font-size: 13px;
    color: var(--mp-text);
    white-space: nowrap;
    line-height: var(--mp-ctrl-h);
    padding: 0;
}
/* 客户管理 LIST-TAB：与公众号粉丝 Tab 同级视觉，active 用企微绿 */
.mp-skin .customer-list-nav .workbench-tab.active {
    border-color: rgba(7, 193, 96, .6);
    background: rgba(7, 193, 96, .08);
    color: #06ad56;
}
/* 批量条：加入按钮 / 下拉统一 32px 与筛选区一致 */
.mp-skin .customer-batch-bar .btn,
.mp-skin .customer-batch-bar [data-tag-dropdown-add],
.mp-skin .customer-batch-bar [data-tag-scope-staff-add] {
    box-sizing: border-box;
    height: var(--mp-ctrl-h);
    min-height: var(--mp-ctrl-h);
    padding: 0 14px;
    line-height: 1;
    font-size: 13px;
}
.mp-skin .customer-batch-bar .tag-dropdown-group,
.mp-skin .customer-batch-bar .tag-dropdown-tag,
.mp-skin .customer-batch-bar .tag-scope-mode-select,
.mp-skin .customer-batch-bar .tag-scope-staff-select {
    font-size: 13px;
    padding: 0 10px;
    flex: 0 1 140px;
    min-width: 120px;
    max-width: 180px;
}
.mp-skin .customer-batch-bar .tag-dropdown-chip,
.mp-skin .customer-batch-bar .tag-scope-selected-chip {
    background: #e8f8ef;
    border-color: #b7ebd0;
    color: #0d7a42;
    border-radius: var(--mp-radius);
}
.mp-skin .follow-filter-dd-summary {
    border-color: var(--mp-border-strong);
    border-radius: var(--mp-radius);
    height: var(--mp-ctrl-h);
}
.mp-skin .follow-filter-dd[open] .follow-filter-dd-summary {
    border-color: var(--mp-green);
    color: var(--mp-green);
}
.mp-skin .follow-filter-dd-body {
    border-color: var(--mp-border);
    background: #fff;
}

/*
 * 布局基线：内容区内「无 class 的 a」禁止浏览器默认蓝链。
 * 说明性内联链接统一为绿色文字链；真正操作请用 .btn / .table-link / .filter-tab。
 */
.mp-skin a:not([class]) {
    color: var(--mp-green);
    text-decoration: none;
    font-weight: 500;
}
.mp-skin a:not([class]):hover {
    color: var(--mp-green-hover);
    text-decoration: underline;
}
.mp-skin .link-more {
    color: var(--mp-green);
}
.mp-skin .link-more:hover {
    color: var(--mp-green-hover);
}

/* 内容区在样板页略收紧，贴近公众号列表密度 */
body:has(.mp-skin) .content-area {
    padding-top: 16px;
}
body:has(.mp-skin) .page-desc {
    color: #999;
    font-size: 13px;
}
