/* ============ 续费管理系统 深色主题全局样式 ============ */
:root {
    --bg: #0b1120;
    --surface: #151b2b;
    --surface-hover: #1e293b;
    --border: #273148;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-muted-2: #475569;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-soft: rgba(56, 189, 248, .15);
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, .15);
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, .15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, .15);
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--surface-hover); padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--accent); }

/* ---- 布局 ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; background: #0f172a; color: #cbd5e1; flex-shrink: 0;
    display: flex; flex-direction: column; padding: 16px 0; border-right: 1px solid var(--border);
    position: sticky; top: 0; max-height: 100vh; overflow: hidden;
}
.sidebar .brand {
    color: var(--accent); font-weight: 700; font-size: 17px;
    padding: 8px 20px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    flex-shrink: 0;
    position: relative; /* 移动端：叉叉定位锚点（贴 LOGO 右上角） */
}
.brand-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* LOGO 包装层（点击可回后台首页，v2026-08-27）：
   - 用 a 标签包 .brand-img/.brand-text，整体可点击
   - 用 flex: 0 1 auto（不撑满）；max-width: calc(100% - 44px) 给叉叉留 28+gap 空间
   - min-width:0 防止 ellipsis 触发死布局
   - focus-visible 给键盘用户视觉反馈
   这样 .brand-img 仍按自然宽高显示，左对齐不受影响（遵守 MEMORY.md 规则）。 */
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 0 1 auto;
    max-width: calc(100% - 44px);
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    padding: 4px 6px;
    margin: -4px -6px;
    outline: none;
    transition: background .15s ease, opacity .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.brand-link:hover {
    background: rgba(56,189,248,.10);
    text-decoration: none;
    opacity: .9;
}
.brand-link:active { opacity: .75; }
.brand-link:focus-visible {
    box-shadow: 0 0 0 2px rgba(56,189,248,.55);
    background: rgba(56,189,248,.10);
}
.brand-link .brand-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
    display: block;
}
/* 文字版 LOGO 链接（无 logo 图片时显示站名） */
.brand-link .brand-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent);
    font-weight: 700;
    font-size: 17px;
}

/* 页面底部版权信息（全局页脚，v2026-08-27）：
   - 居中两行：第一行品牌版权，第二行 Powered by + 系统设置动态版权
   - 与内容区保持分割（上边框），不影响其他面板布局
   - 移动端字号略缩小、行高放大更易读
   - AnDunCMS 蓝青渐变高亮（v7.2 加 <a> 包外层，点击直达 www.rcad.cn） */
.page-footer {
    margin-top: 28px;
    padding: 16px 20px 18px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12.5px;
    text-align: center;
    line-height: 1.85;
    background: transparent;
}
.page-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color .15s ease, border-color .15s ease;
}
.page-footer a:hover {
    color: var(--accent);
    border-bottom-color: rgba(56,189,248,.45);
    text-decoration: none;
}
.page-footer-line + .page-footer-line { margin-top: 2px; }
.page-footer-meta { opacity: .85; }
/* v7.2：AnDunCMS 包一层 <a> 直达官网，外层 a 不下划线（border-bottom 一律 transparent），
   span.page-footer-brand 仍走 background-clip:text 渐变，悬停 a 时同步高亮 brand */
.page-footer-brand-link {
    display: inline-block;
    border-bottom: none !important;
    text-decoration: none;
}
.page-footer-brand-link:hover {
    border-bottom: none !important;
}
.page-footer-brand-link:hover .page-footer-brand {
    background: linear-gradient(135deg, #3b82f6, #22d3ee, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
}
.page-footer-brand {
    font-weight: 800;
    letter-spacing: .3px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 2px;
}
/* v7.1：系统设置→版权信息（site_copyright）渲染到这里，v7.2 包 <a> 直达官网。
   v7.4：去掉左右两条细蓝竖线（border-left/right）——用户截图显示成「|」竖杠，要求删掉。
        同时把 ICP 备案号（site_icp）也用同一样式渲染，两段之间仍走 PHP `&nbsp;·&nbsp;` 分隔。
        只保留颜色 + 字重保持页面权重节奏一致，悬停仍给浅色背板凸显。 */
.page-footer-copyright-custom {
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px dashed transparent !important;
}
.page-footer-copyright-custom:hover {
    color: var(--accent);
    background: rgba(56, 189, 248, .08);
    border-radius: 6px;
}
/* v7.5：应用版本号徽章（getAppVersion()，读 system_config.app_version，回退 APP_VERSION 'v2.0.2'）。
   等宽字体 + 浅色微胶囊，置于版权段末尾，强调"这是系统版本"而非普通文字。 */
.page-footer-version {
    display: inline-block;
    color: var(--text-muted);
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: .92em;
    padding: 1px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(148,163,184,.08);
}
/* v2026-08-30：删除页脚「检查更新」按钮（v7.6 加的 .page-footer-check-btn 同步清理，不再有元素引用）。
   数据看板「系统信息→当前版本」行内仍保留「检查更新」入口，使用 .sysinfo-check-btn（下方）。 */
/* v7.6：数据看板「系统信息」面板——版本号行内的小按钮 + 面板头部的按钮 */
.sysinfo-check-btn {
    display: inline-block;
    margin-left: 10px;
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(56,189,248,.4);
    border-radius: 999px;
    padding: 1px 10px;
    font-size: 11.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    vertical-align: middle;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sysinfo-check-btn:hover:not(:disabled) {
    background: rgba(56,189,248,.12);
    border-color: var(--accent);
}
.sysinfo-check-btn:disabled { opacity: .5; cursor: not-allowed; }
/* v2026-08-29：.panel-head-check-btn 已死代码（仅 dashboard 的 panel-head 用了一次，
   移动端面板头「检查更新」按钮与「当前版本」行重复，已改为保留行内那个）。
   CSS 规则全部移除以保持样式表整洁。*/
/* panel-head 是 space-between：把 panel-tag 推到右侧靠拢 */
.sysinfo-panel .panel-head { flex-wrap: wrap; gap: 8px; }
.sysinfo-panel .panel-head .panel-tag { margin-left: auto; }
/* v7.2：第一行「安盾客户续费管理CMS」加超链到官网，鼠标悬停变蓝色 */
.page-footer-link {
    color: inherit;
    border-bottom: 1px dashed rgba(56,189,248,.35);
}
.page-footer-link:hover { color: var(--accent); }
@media (max-width: 768px) {
    .page-footer { font-size: 12px; padding: 14px 14px 16px; }
    .brand-link { gap: 6px; padding: 3px 4px; margin: -3px -4px; max-width: calc(100% - 40px); }
}
.sidebar-close {
    flex: 0 0 auto;
    display: none;
    background: transparent; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 26px; line-height: 1;
    padding: 2px 10px; border-radius: 8px;
    transition: background .15s, color .15s, transform .15s;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-close:hover { background: rgba(239, 68, 68, .15); color: #f87171; }
.sidebar-close:active { transform: scale(0.92); }
@media (max-width: 768px) {
    .sidebar-close {
        display: inline-flex; align-items: center; justify-content: center;
        position: absolute; /* 脱离 brand flex flow，贴到 LOGO 右上角 */
        top: -12px; /* 在原 top:2px 基础上再上移"一个叉叉位"（≈ 30px） */
        right: 4px;
        width: 28px; height: 28px;
        padding: 0;
        background: transparent; /* v6：去掉圆形半透背板，恢复纯 × 字符 */
        border: 0;
        border-radius: 0;
        font-size: 26px;
        line-height: 1;
        color: var(--text-secondary);
    }
    .sidebar-close:hover { background: rgba(239, 68, 68, .15); color: #f87171; }
}
.nav { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; }
.nav-item {
    display: flex; align-items: center; gap: 8px; padding: 11px 20px; color: #cbd5e1; font-size: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: keep-all;
}
.nav-item:hover { background: var(--surface-hover); text-decoration: none; color: #fff; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset -3px 0 0 var(--accent); padding-left: 20px !important; padding-right: 20px !important; border-left: 0 !important; border-right: 0 !important; }
.nav-ico { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; flex: 0 0 20px; }
.nav-ico svg { width: 20px !important; height: 20px !important; display: block; stroke: currentColor; fill: none; }
.badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; }

/* 侧边栏分组下拉菜单（产品资产 → 待续费） */
.nav-group { display: flex; flex-direction: column; }
.nav-toggle { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }
.nav-label { flex: 1 1 auto; }
.nav-caret { margin-left: auto; font-size: 24px; line-height: 1; opacity: .75; transition: transform .18s ease; }
.nav-group.open .nav-caret { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; }
.nav-group.open .nav-sub { display: flex; }
.nav-subitem {
    display: flex; align-items: center; gap: 8px; padding: 9px 20px 9px 42px; color: #94a3b8; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: keep-all;
}
.nav-subitem:hover { background: var(--surface-hover); color: #fff; text-decoration: none; }
.nav-subitem.active { background: var(--accent-soft); color: var(--accent); }
.nav-subitem .nav-ico { width: 16px; height: 16px; opacity: .9; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex;
    align-items: center; justify-content: space-between; padding: 0 18px; position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-weight: 600; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.points-pill { background: var(--warn-soft); color: var(--warn); padding: 4px 10px; border-radius: 20px; font-size: 13px; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
.points-pill:hover { background: var(--warn); color: #0b1120; text-decoration: none; box-shadow: 0 0 0 3px var(--warn-soft); }
.points-change { font-weight: 700; font-family: var(--font-mono); }
.points-change.positive { color: var(--success); }
.points-change.negative { color: var(--danger); }
.user-chip { color: var(--text-secondary); font-size: 13px; text-decoration: none; transition: color .15s; display: inline-flex; align-items: center; }
.user-chip:hover { color: var(--accent); text-decoration: none; }
.menu-toggle { display: none; background: none; border: none; font-size: 22px; line-height: 1; padding: 0; margin: 0; cursor: pointer; color: var(--text); width: 36px; height: 36px; border-radius: 8px; transition: background .15s; -webkit-tap-highlight-color: transparent; }
.menu-toggle:hover { background: var(--surface-hover); }

.content { padding: 18px; flex: 1; }

/* ---- 按钮 ---- */
.btn {
    display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
    font-size: 14px; cursor: pointer; text-align: center; line-height: 1.2;
    transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #0f172a; font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface-hover); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.mini {
    border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px;
    padding: 3px 8px; font-size: 12px; cursor: pointer; margin: 1px; transition: .15s;
}
.mini:hover { background: var(--surface-hover); border-color: var(--accent); color: var(--accent); }
.mini.danger { color: var(--danger); border-color: rgba(239,68,68,.4); }
.mini.danger:hover { background: var(--danger-soft); }

/* ---- 卡片 / 面板 ---- */
/* ===== Hero 概览 ===== */
.dash-hero {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    background: linear-gradient(120deg, #0e1a33 0%, #152747 45%, #0b2540 100%);
    border: 1px solid var(--border); border-radius: 18px; padding: 26px 30px; margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.dash-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(600px 200px at 12% 20%, rgba(56,189,248,.18), transparent 60%),
                radial-gradient(500px 220px at 90% 80%, rgba(168,85,247,.16), transparent 60%);
    pointer-events: none;
}
.hero-glow {
    position: absolute; width: 360px; height: 360px; right: -120px; top: -160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,.30), transparent 65%);
    filter: blur(10px); animation: heroFloat 9s ease-in-out infinite; pointer-events: none;
}
@keyframes heroFloat {
    0%,100% { transform: translate(0,0) scale(1); opacity: .55; }
    50% { transform: translate(-30px, 26px) scale(1.12); opacity: .85; }
}
.hero-left { position: relative; z-index: 1; }
.hero-kicker { font-size: 12px; letter-spacing: 2px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.hero-title { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #bae6fd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { margin: 0; color: var(--text-secondary); font-size: 14px; }
.hero-right { position: relative; z-index: 1; text-align: right; }
.hero-clock { font-size: 34px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: 2px; text-shadow: 0 0 18px rgba(56,189,248,.4); }
.hero-date { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }

/* ===== 卡片 / 面板 基础（含入场动画） ===== */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
/* 横向布局：图标在左，文本在右（严格按参考图） */
.stat-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: row; align-items: center; gap: 16px;
    background: linear-gradient(135deg, var(--surface), var(--surface-hover));
    border-radius: 14px; padding: 18px 20px; color: var(--text); min-height: 100px;
    box-shadow: var(--shadow); border: 1px solid var(--border);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    text-decoration: none;
}
.stat-card::after {
    content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
    transform: skewX(-20deg); transition: left .6s ease;
}
.stat-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 28px rgba(0,0,0,.32); }
.stat-card:hover::after { left: 120%; }

/* 图标方块：左对齐、50×50（用户手动指定尺寸，AI 不再修改 width/height） */
.stat-ico { flex: 0 0 auto; width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.32); }
.stat-ico svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ico-blue  { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.ico-green { background: linear-gradient(135deg, #10b981, #34d399); }
.ico-amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.ico-red   { background: linear-gradient(135deg, #ef4444, #fb7185); }
.ico-violet{ background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.ico-cyan  { background: linear-gradient(135deg, #06b6d4, #67e8f9); }

/* 右侧文本块：编号在上、标签在中、辅助信息在下 */
.stat-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; line-height: 1.2; }
.stat-num   { font-size: 28px; font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-secondary); font-size: 13px; }
.stat-sub   { color: var(--text-muted); font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.stat-sub b  { font-weight: 700; }

/* 副文本中的占比数字，按图标色显示（与图标配色统一） */
.stat-card:has(.ico-blue)  .stat-sub b { color: #38bdf8; }
.stat-card:has(.ico-green) .stat-sub b { color: #34d399; }
.stat-card:has(.ico-amber) .stat-sub b { color: #fbbf24; }
.stat-card:has(.ico-red)   .stat-sub b { color: #fb7185; }
.stat-card:has(.ico-violet) .stat-sub b { color: #c084fc; }
.stat-card:has(.ico-cyan)  .stat-sub b { color: #67e8f9; }
.stat-sub .text-info { color: #7dd3fc; }
.stat-sub .text-muted-2 { color: var(--text-muted-2); }

/* ===== 客户管理快捷筛选面板（数据看板） ===== */
.cust-filter-panel { display: flex; flex-direction: column; gap: 14px; }
.cust-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cust-filter-label { color: var(--text-secondary); font-size: 13px; flex: 0 0 auto; min-width: 70px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 18px;
    background: var(--surface-hover); color: var(--text); text-decoration: none; font-size: 13px;
    border: 1px solid var(--border); transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: #fff; background: rgba(56,189,248,.12); text-decoration: none; }
.chip b { color: var(--accent); font-weight: 700; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip .dot.st-contact { background: #8896a8; }
.chip .dot.st-following { background: #2f80ed; }
.chip .dot.st-deal { background: #27ae60; }
.chip .dot.st-invalid { background: #b0b6bf; }
.chip.chip-warn { border-color: rgba(251,191,36,.4); color: #fbbf24; }
.chip.chip-warn b { color: #fbbf24; }
.chip.chip-warn:hover { background: rgba(251,191,36,.12); border-color: #fbbf24; color: #fbbf24; }

.panel { background: var(--surface); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.panel:has(> .panel-head) { padding: 0; }
.panel:has(> .panel-head) > .panel-body { padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.panel-head h3::before { content: ''; display: inline-block; width: 4px; height: 14px; background: var(--accent); border-radius: 2px; margin-right: 8px; vertical-align: -2px; }
.panel-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-tag { font-size: 12px; color: var(--text-secondary); background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; }
.chart-wrap { position: relative; width: 100%; height: 240px; }

/* ===== 系统信息 / 服务器信息面板 ===== */
.sysinfo-panel { grid-column: 1 / -1; }
.sysinfo-panel .panel-body,
.sysinfo-panel .sysinfo-body { padding: 0; }
.sysinfo-panel .panel-head h3 { display: inline-flex; align-items: center; gap: 8px; }
.sysinfo-panel .panel-head h3::before { display: none; }
.panel-ico { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== 数据看板：4 个模块标题突出显示（参考系统信息样式） ===== */
.dash-module-head h3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}
.dash-module-head h3::before { display: none; }
.dash-module-head .panel-ico {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
    flex-shrink: 0;
}

.sysinfo-body { display: block; }
.sysinfo-row {
    display: grid;
    grid-template-columns: 110px 1fr 110px 1fr;
    gap: 0;
    align-items: center;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    transition: background .15s;
}
.sysinfo-row:last-child { border-bottom: none; }
.sysinfo-row:hover { background: rgba(56,189,248,.06); }
.sysinfo-label {
    color: var(--text-secondary);
    text-align: right;
    white-space: nowrap;
    padding-right: 12px;
    border-right: 1px solid var(--border);
    min-height: 18px;
}
.sysinfo-value {
    color: var(--text);
    font-weight: 500;
    word-break: break-word;
    padding-left: 12px;
    border-right: 1px solid var(--border);
    min-height: 18px;
}
/* 第二组 label 左边距，与第一组 value 分隔 */
.sysinfo-label:nth-of-type(2) { padding-left: 20px; border-left: 1px solid var(--border); border-right: none; text-align: right; padding-right: 12px; }
.sysinfo-value:nth-of-type(2) { border-right: none; padding-left: 12px; }

@media (max-width: 1100px) {
    .sysinfo-row { grid-template-columns: 100px 1fr 100px 1fr; padding: 12px 16px; }
    .sysinfo-label { padding-right: 10px; }
    .sysinfo-value { padding-left: 10px; }
    .sysinfo-label:nth-of-type(2) { padding-left: 16px; padding-right: 10px; }
    .sysinfo-value:nth-of-type(2) { padding-left: 10px; }
}
/* 移动端：2 列 × 2 行 紧凑网格（每对 label+value 横排成对，两对左右并排）
   ——取代旧的「单列堆叠」模式；让面板在一屏内可看到更多字段，
   解决窄屏底部「网址域名/IP / PHP 版本」等内容被裁不可见的问题。
   奇数行（label2/value2 缺失，如「版权所有」）由模板加 .sysinfo-row-single class，
   在本媒体查询内同样使用「label 左 / value 右」2 列栅格（value 过长自动换行成 2 行），
   与上方成对行保持同一栅格 → 形成「二行二列」紧凑块，彻底杜绝错位。 */
@media (max-width: 768px) {
    .sysinfo-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "label1 value1"
            "label2 value2";
        column-gap: 8px;
        row-gap: 2px;
        padding: 11px 14px;
    }
    .sysinfo-label,
    .sysinfo-value {
        border: 0 !important;
        padding: 0 !important;
        background: transparent;
        min-height: 0;
    }
    .sysinfo-label {
        font-size: 11px;
        color: var(--muted);
        text-align: left;
        letter-spacing: .3px;
        margin-top: 0;
    }
    .sysinfo-value {
        font-size: 13.5px;
        color: var(--text);
        font-weight: 500;
        word-break: break-word;
    }
    .sysinfo-row > .sysinfo-label:nth-of-type(1) { grid-area: label1; }
    .sysinfo-row > .sysinfo-value:nth-of-type(1) { grid-area: value1; }
    .sysinfo-row > .sysinfo-label:nth-of-type(2) { grid-area: label2; }
    .sysinfo-row > .sysinfo-value:nth-of-type(2) { grid-area: value2; }
    /* 去除旧版偶数项 label 上方的细分隔线（紧凑网格不需要） */
    .sysinfo-label:nth-of-type(2)::before { display: none; }

    /* 奇数行（single，如「版权所有」）：与普通成对行保持同一套 2 列栅格
       （label 左 / value 右），value 过长自动换行 → 形成「二行二列」紧凑块，
       与上方成对行栅格完全对齐，杜绝单列堆叠带来的错位。 */
    .sysinfo-row.sysinfo-row-single {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "label1 value1"
            "label2 value2";
        row-gap: 2px;
        padding: 11px 14px;
    }
    .sysinfo-row.sysinfo-row-single > .sysinfo-label:nth-of-type(1) { grid-area: label1; }
    .sysinfo-row.sysinfo-row-single > .sysinfo-value:nth-of-type(1) { grid-area: value1; }
}

/* ===== 供应商排行进度条 ===== */
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.rank-no { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--surface-hover); color: var(--text-secondary); }
.rank-no.n1 { background: linear-gradient(135deg,#f59e0b,#fde68a); color: #3b2a00; }
.rank-no.n2 { background: linear-gradient(135deg,#94a3b8,#e2e8f0); color: #1f2937; }
.rank-no.n3 { background: linear-gradient(135deg,#b45309,#fdba74); color: #2b1500; }
.rank-main { flex: 1; min-width: 0; }
.rank-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.rank-name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-val { font-size: 14px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.rank-bar { height: 6px; border-radius: 4px; background: var(--surface-hover); overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #818cf8); transition: width 1s cubic-bezier(.22,1,.36,1); }

/* ===== 入场动画 =====
   注意：用 transform: translateY(...) 会在手机端触发合成层，
   导致合成层内文字失去 sub-pixel 抗锯齿，表现为「发糊」。
   改为 translate3d 显式开启 GPU 合成层 + will-change 提前告知浏览器
   （GPU 合成层反而用更优的栅格化路径，文字保持锐利）。*/
.reveal {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    -webkit-transform: translate3d(0, 16px, 0);
    animation: fadeUp .6s cubic-bezier(.22,1,.36,1) forwards;
    /* delay 上限 0.5s，避免 --i 很大时元素长时间停留在 opacity:0 的不可见状态 */
    animation-delay: calc(min(var(--i, 0) * .07s, 0.5s));
    will-change: opacity, transform;
}
@keyframes fadeUp { to { opacity: 1; transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
    .reveal { animation: none; opacity: 1; transform: none; -webkit-transform: none; }
    .hero-glow { animation: none; }
}

/* 文字清晰度：对所有正文文本启用 sub-pixel/grayscale 抗锯齿 + optimizeLegibility 渲染 */
:root, html, body, button, input, select, textarea, .panel, .panel-head, .panel-body,
.swiper-card, .swiper-card *, .donut-stage, .donut-body, .donut-legend,
.hero, .hero *, .stat-card, .stat-card *, .cards, .cards * {
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    text-rendering: optimizeLegibility;
}

/* ---- 工具栏 / 筛选 ---- */
.toolbar { margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar-right { margin-left: auto; }
.filter-bar { background: var(--surface); border-radius: 10px; padding: 12px; margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border: 1px solid var(--border); }
.f-input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; min-width: 130px; background: var(--bg); color: var(--text); }
.f-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.legend { display: flex; gap: 16px; margin: 8px 0 14px; font-size: 12px; color: var(--text-secondary); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.warn-green { background: var(--success); } .warn-yellow { background: var(--warn); }
.warn-red { background: var(--danger); } .warn-gray { background: var(--text-muted); }

/* ---- 表格 ---- */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.data-table th { background: var(--surface-hover); color: var(--text-secondary); font-weight: 600; box-shadow: 0 1px 0 var(--border); }
.data-table tbody tr { height: 50px; }
.data-table tbody tr:hover { background: rgba(56,189,248,.08); }
.data-table a { color: var(--accent); }
.data-table a:hover { text-decoration: underline; }
.th-check, .td-check { width: 44px; text-align: center; padding-left: 16px; padding-right: 8px; }
.text-right { text-align: right !important; }
.days-left { display: block; font-size: 11px; color: var(--text-secondary); }
.actions { white-space: normal; }
.data-table td.actions { text-align: left; }
.tag-archived { font-size: 11px; background: var(--surface-hover); color: var(--text-secondary); padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.pill { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; font-size: 13px; color: var(--text); transition: .15s; }
.pill:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.pill.red { color: var(--danger); border-color: rgba(239,68,68,.4); }
.pill.red:hover, .pill.red.active { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.pill.yellow { color: var(--warn); border-color: rgba(245,158,11,.4); }
.pill.yellow:hover, .pill.yellow.active { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pill.success { color: var(--success); border-color: rgba(34,197,94,.4); }
.pill.success:hover, .pill.success.active { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.pill.danger { color: var(--danger); border-color: rgba(239,68,68,.4); }
.pill.danger:hover, .pill.danger.active { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* 用于带圆角边框的大表格（产品列表等） */
.table-wrap { border-radius: 10px; border: 1px solid var(--border); overflow: visible; box-shadow: var(--shadow); }
.table-wrap > .data-table { border: none; border-radius: 10px; box-shadow: none; overflow: hidden; }

/* 分页条在面板底部时贴合面板 */
.panel-body > .pager-bar { margin: 14px -20px -18px -20px; padding: 14px 20px; border-radius: 0 0 13px 13px; border-width: 1px 0 0 0; box-shadow: none; background: transparent; }
.panel-body > .pager-bar .pager { flex: 1 1 auto; justify-content: center; }

.empty { text-align: center; color: var(--text-muted); padding: 40px; background: var(--surface); border-radius: 10px; border: 1px dashed var(--border); }
.muted { color: var(--text-muted); }

/* ---- 分页 ---- */
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 14px; }
.pager a, .pager .pager-link { display: inline-block; padding: 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; }
.pager a:hover, .pager .pager-link:hover { background: var(--surface-hover); border-color: var(--accent); }
.pager .pager-link.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.pager-info { background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }

.pager-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-top: 14px; box-shadow: var(--shadow); }
.pager-bar .pager { flex: 1 1 auto; justify-content: center; padding: 0; background: transparent; border: none; box-shadow: none; }
.pager-left, .pager-right { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.pager-size { padding: 6px 26px 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 13px; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.pager-size:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pager-total { font-size: 13px; color: var(--text-secondary); background: var(--surface-hover); padding: 4px 12px; border-radius: 20px; }
.pager-actions { display: flex; align-items: center; gap: 8px; }

/* ---- 表格序号列 ---- */
.seq-col { width: 52px; text-align: center; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---- 表单 ---- */
.field { margin-bottom: 14px; }
.field label, .form-row label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--text-secondary); }
.field input, .field select, .field textarea,
.form-row input, .form-row select, .form-row textarea,
.product-form input, .product-form select, .product-form textarea,
.user-form input, .user-form select, .cfg-form input, .cfg-form select,
.opt-form input, .inv-form input, .tag-form input {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
    background: var(--bg); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus,
.form-row input:focus, .form-row select:focus, .form-row textarea:focus,
.product-form input:focus, .product-form select:focus, .product-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-weight: 400 !important; color: var(--text-secondary); }
.checkbox input { width: auto !important; }
.hint { color: var(--text-muted); font-size: 12px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.form-row > label { flex: 1; min-width: 160px; }
.form-row.checks { flex-direction: column; gap: 6px; align-items: flex-start; }
.form-row .btn { align-self: center; }
.form-actions { margin-top: 10px; display: flex; gap: 10px; }
.sub-title { margin: 6px 0 14px; font-size: 13px; font-weight: 600; color: var(--text-secondary); padding-left: 10px; border-left: 3px solid var(--accent); line-height: 1.3; }
.sub-title:not(:first-child) { margin-top: 22px; }

/* 产品表单网格 + 美化 */
.product-form { padding: 0; background: transparent; }
.product-form .pf-body { padding: 18px 20px 6px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; }
.product-form fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 14px 14px 16px; margin: 0; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.product-form fieldset:hover { border-color: var(--border-strong, #2b3650); }
.product-form legend { font-weight: 700; color: var(--accent); padding: 0 8px; font-size: 13px; letter-spacing: .3px; }
.product-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.product-form input, .product-form select, .product-form textarea { padding: 9px 11px; border-radius: 9px; transition: border-color .15s, box-shadow .15s, background .15s; }
.product-form input:hover, .product-form select:hover, .product-form textarea:hover { border-color: #2b3650; }
.product-form textarea { resize: vertical; min-height: 52px; }
.product-form .form-actions { position: sticky; bottom: 0; background: var(--surface); padding: 14px 20px; border-top: 1px solid var(--border); margin-top: 0; display: flex; gap: 10px; justify-content: flex-end; }
.product-form .form-actions .btn { min-width: 96px; padding: 9px 20px; }

/* 金额输入：¥ 前缀 + 等宽数字 */
.product-form .money-field { position: relative; display: block; }
.product-form .money-field::before { content: "\A5"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }
.product-form input.money { padding-left: 26px; font-variant-numeric: tabular-nums; letter-spacing: .3px; }

/* ===== 「其他 → 手动输入」文本框（配套 JS：assets/js/other-select.js） ===== */
.other-input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.other-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.other-input::placeholder { color: var(--text-muted); }

.tag-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.tag-opt { display: inline-flex; align-items: center; gap: 4px; font-weight: 400 !important; }
.tag-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ---- 标签云 ---- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-item { display: flex; align-items: center; gap: 6px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; }
.tag-name { cursor: pointer; user-select: none; }
.tag-name:hover { text-decoration: underline; }
.tag-scope { font-size: 11px; color: var(--text-muted); }
.tag-count { font-size: 11px; color: var(--text); background: var(--accent-soft); border-radius: 10px; padding: 1px 8px; }
.tag-ops a { margin-left: 4px; font-size: 12px; }
.rs-copy-tip { position: absolute; background: var(--success); color: #fff; padding: 3px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; z-index: 1000; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.15); }

/* ---- 标签编辑器（新建/编辑） ---- */
.tag-editor-panel { padding: 0; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.tag-editor-panel.editing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tag-editor-panel .panel-head { margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.tag-editor-panel .panel-body { padding: 18px 20px; }
.tag-form { margin: 0; }
.tf-row { margin-bottom: 16px; }
.tf-row:last-of-type { margin-bottom: 0; }
.tf-row-2col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.tf-row-2col .tf-col { min-width: 0; }
.tf-row-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tf-row-inline .tf-label { margin-bottom: 0; }
.tf-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }
.tag-form input[type="text"],
.tag-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; background: var(--bg); color: var(--text); font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.tag-form input[type="text"]:focus,
.tag-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tf-color { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag-form input[type="color"] { width: 40px; height: 40px; padding: 3px; border: 1px solid var(--border); border-radius: 50%; background: var(--bg); cursor: pointer; flex: 0 0 auto; }
.tag-form input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.tag-form input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
.tag-presets { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.tag-preset { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .12s, border-color .12s, box-shadow .12s; }
.tag-preset:hover { transform: scale(1.15); }
.tag-preset.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.tf-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.tf-preview { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 13px; color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.tf-preview .tag-dot { width: 10px; height: 10px; }
.tf-msg { font-size: 13px; margin: -6px 0 12px; min-height: 18px; }
.tf-msg.err { color: var(--danger); }
.tf-msg.ok { color: var(--success); }
.tag-editor-panel .form-actions { margin-top: 6px; display: flex; gap: 10px; }
.tag-editor-panel .form-actions .btn { min-width: 88px; }

/* ---- 邀请码生成表单 ---- */
.inv-form .tf-row-inline { align-items: center; }
.inv-form input[type="number"] { width: 140px; }

/* ---- 是否已提醒 列 ---- */
.remind-status { white-space: nowrap; }
.reminded { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 10px; font-weight: 600; }
.reminded.yes { color: var(--success); background: var(--success-soft); }
.reminded.no { color: var(--text-muted); background: var(--surface-hover); }
.reminded-date { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---- 消息中心 ---- */
.noti-list { list-style: none; padding: 0; margin: 0; }
.noti { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; border-left: 3px solid var(--border); }
.noti.unread { border-left-color: var(--accent); background: var(--accent-soft); }
.noti-check { flex: 0 0 auto; padding-top: 2px; }
.noti-check input, .check-all input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.noti-body { flex: 1 1 auto; min-width: 0; }
.noti-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.noti-time { font-size: 12px; color: var(--text-muted); font-weight: 400; white-space: nowrap; }
.noti-msg { color: var(--text-secondary); margin: 6px 0; font-size: 13px; word-break: break-word; }
.check-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); cursor: pointer; user-select: none; }
.btn-danger { background: var(--danger); color: #fff; font-weight: 600; border-color: transparent; }
.btn-danger:hover { background: #dc2626; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* ---- 提示条 ---- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; transition: opacity .5s; border: 1px solid transparent; }
.flash-success { background: var(--success-soft); color: var(--success); border-color: rgba(34,197,94,.3); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(239,68,68,.3); }
.flash-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(245,158,11,.3); }

/* ---- 弹窗 ---- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.modal-box { position: relative; background: var(--surface); border-radius: var(--radius); width: min(960px, 94vw); max-height: 92vh; overflow: auto; box-shadow: var(--shadow); border: 1px solid var(--border); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); font-weight: 600; color: #fff; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-secondary); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 0; }

/* ---- 登录/注册 ---- */
/* v7.5：auth-body 改纵向堆叠，让登录卡片与底部版权垂直居中排布 */
.auth-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 100vh; background: radial-gradient(ellipse at top, #1e293b 0%, #0b1120 60%); }
.auth-card { background: var(--surface); border-radius: 18px; padding: 34px; width: min(420px, 92vw); box-shadow: var(--shadow); border: 1px solid var(--border); }
.auth-title { margin: 0; font-size: 24px; text-align: center; background: linear-gradient(90deg, var(--accent), #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-sub { text-align: center; color: var(--text-secondary); font-size: 14px; margin: 6px 0 24px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.auth-foot a { color: var(--accent); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-foot-sep { margin: 0 8px; color: var(--border); }
.auth-submit { padding: 12px; font-size: 16px; border-radius: 10px; margin-top: 6px; }
/* v7.5：登录页底部版权（独立于后台 footer.php，复用 .page-footer-brand / -copyright-custom / -version 样式） */
.auth-footer { text-align: center; font-size: 12px; color: rgba(203,213,225,.7); }
.auth-footer .auth-footer-line { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 0; }
.auth-footer .page-footer-brand-link { border-bottom: none !important; text-decoration: none; }
/* 让 AnDunCMS 在深色背景上仍走品牌渐变（与后台一致） */
.auth-footer .page-footer-brand {
    font-weight: 800; letter-spacing: .3px;
    background: linear-gradient(135deg, #60a5fa, #38bdf8);
    -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 2px;
}
.auth-footer .page-footer-copyright-custom,
.auth-footer .page-footer-version { color: rgba(203,213,225,.85); font-weight: 600; border-bottom: 1px dashed transparent !important; }

.captcha-field .field label { margin-bottom: 8px; }
.captcha-display {
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
    font-size: 20px; font-weight: 700; letter-spacing: 1px; color: var(--accent);
}
.captcha-display img { height: 42px; border-radius: 6px; cursor: pointer; }
.captcha-answer-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.captcha-answer-row input { flex: 1; }
.captcha-answer-row .btn { white-space: nowrap; padding: 8px 18px; }
.captcha-type-row { display: flex; gap: 10px; margin-bottom: 8px; }
.captcha-type {
    flex: 1; padding: 7px 0; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface-hover); color: var(--text-secondary); cursor: pointer; transition: .15s;
}
.captcha-type:hover { border-color: var(--accent); color: var(--text); }
.captcha-type.active { background: var(--accent); color: #0f172a; border-color: var(--accent); font-weight: 600; }
.captcha-hint { text-align: center; font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.captcha-hint.ok { color: var(--success); }
.captcha-hint.err { color: var(--danger); }

.row-between { display: flex; justify-content: space-between; align-items: center; }

/* ---- 看板图例（详见文件末尾响应式区补充） ---- */
.summary { list-style: none; padding: 0; margin: 4px 0; }
.summary li { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.summary li:last-child { border-bottom: none; }
.summary li span { color: var(--text-secondary); font-size: 13px; }
.summary b { color: #fff; font-size: 16px; font-weight: 700; }
.rank { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: rank; }
.rank li { counter-increment: rank; display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.rank li:last-child { border-bottom: none; }
.rank li::before { content: counter(rank); flex: 0 0 auto; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; background: var(--surface-hover); color: var(--text-secondary); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rank li:nth-child(1)::before { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1f2937; }
.rank li:nth-child(2)::before { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #1f2937; }
.rank li:nth-child(3)::before { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }
.rank-name { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank b { color: var(--accent); font-size: 13px; white-space: nowrap; margin-left: 10px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.panel-full { grid-column: 1 / -1; }

/* ---- 设置页：邮件模板帮助 ---- */
.panel-help { margin: 14px 0; padding: 12px; background: var(--surface-hover); border: 1px dashed var(--border); border-radius: 8px; }
.panel-help summary { cursor: pointer; font-weight: 600; color: var(--text); }
.tag-list { margin-top: 10px; }
.tag-list p { margin: 8px 0 4px; font-size: 12px; color: var(--text-muted); }
.tag-list code {
    display: inline-block; background: var(--bg); color: var(--accent);
    padding: 2px 6px; border-radius: 4px; font-size: 12px; margin: 2px 4px 2px 0;
}

/* ---- 企业编辑表单专用 ---- */
/* page-hero 上方分支面板（深色+gradient，与 follow-hero 同款） */
.ent-form-hero {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    color: #fff;
}
.ent-form-hero .hero-title { font-size: 22px; margin: 0 0 6px; }
.ent-form-hero .hero-sub { color: #94a3b8; font-size: 13px; line-height: 1.6; }
.ent-form-hero .hero-right { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ent-form-hero .hero-meta-row { display:flex; flex-direction:column; gap:6px; }
@media (max-width: 720px) {
    .ent-form-hero { padding: 18px; }
    .ent-form-hero .hero-title { font-size: 18px; }
}

/* 签名实时预览（与 ent-mail-signature 输出同款） */
.signature-preview {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--surface-hover);
}
.signature-preview-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.signature-preview-label::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.signature-preview-box {
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}
.signature-preview-box:empty::before {
    content: '（空，输入内容将在这里预览）';
    color: var(--text-muted);
    font-style: italic;
}

/* 「什么是邮件签名」可折叠 tip */
.signature-tip {
    margin: 12px 0 16px;
    padding: 12px 14px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}
.signature-tip > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.signature-tip > summary::before {
    content: 'ⓘ';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
}
.signature-tip > summary::-webkit-details-marker { display: none; }
.signature-tip-body {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(148, 163, 184, 0.3);
}
.signature-tip-body ul { padding-left: 20px; margin: 6px 0; }
.signature-tip-body li { margin: 4px 0; }
.signature-tip-body code {
    background: var(--bg);
    color: var(--accent);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* SMTP 状态徽章（hero 右上角） */
.smtp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.smtp-status::before {
    content: '';
    width: 8px; height: 8px; border-radius: 50%;
}
.smtp-status.on { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.smtp-status.on::before { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.smtp-status.off { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.smtp-status.off::before { background: #94a3b8; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .panel-full { grid-column: auto; }
    .tf-row-2col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dash-hero { flex-direction: column; align-items: flex-start; }
    .hero-right { text-align: left; }
    .cards { grid-template-columns: 1fr; }
    .hero-title { font-size: 24px; }
}
/* ---- 产品资产滚动列表 ---- */
.asset-table-wrap { max-height: 340px; overflow: auto; border-radius: 10px; border: 1px solid var(--border); }
.asset-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.asset-table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.asset-table-wrap::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.asset-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.asset-table th, .asset-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; white-space: nowrap; }
.asset-table th { background: var(--surface-hover); color: var(--text-secondary); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.asset-table tbody tr { height: 50px; }
.asset-table tbody tr:hover { background: rgba(56,189,248,.06); }
.asset-table a { color: var(--accent); }
.asset-table .days-left { display: block; font-size: 11px; color: var(--text-secondary); }
.asset-table td.actions { white-space: normal; }
.asset-table td.actions .mini { padding: 3px 6px; font-size: 11px; margin: 1px 1px 1px 0; }
.asset-empty { padding: 26px 0; text-align: center; }

.legend-inline { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12px; color: var(--text-secondary); }
.legend-inline .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline .lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 560px) {
    .cards { grid-template-columns: 1fr; }
    .stat-card { padding: 14px 16px; gap: 12px; min-height: 84px; }
    .stat-num { font-size: 24px; }
    .stat-label { font-size: 12px; }
    .stat-sub { font-size: 11px; }
}
@media (max-width: 768px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%);
        transition: transform .2s; width: 200px;
    }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: block; }
    .cards { grid-template-columns: 1fr 1fr; }
    .filter-bar .f-input { min-width: 100%; }
    /* 表格转卡片 */
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table thead { display: none; }
    .data-table tr { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 6px 4px; background: var(--surface); }
    .data-table td { border: none; padding: 6px 12px; display: flex; justify-content: space-between; gap: 10px; }
    .data-table td::before { content: attr(data-label); font-weight: 600; color: var(--text-secondary); }
    .data-table td.actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* ---- 个人中心 ---- */
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.profile-info { position: sticky; top: 18px; }
.profile-head { display: flex; align-items: center; gap: 16px; padding: 22px 20px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #0e1a33, #152747); }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #38bdf8); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; flex: 0 0 64px; text-transform: uppercase; position: relative; overflow: hidden; }
.profile-avatar-clickable { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.profile-avatar-clickable:hover { transform: scale(1.04); box-shadow: 0 0 0 3px rgba(56,189,248,.35); }
.profile-avatar-clickable.is-uploading { opacity: .55; pointer-events: none; }
.profile-avatar-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,.55); color: #fff; opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.profile-avatar-clickable:hover .profile-avatar-overlay { opacity: 1; }
.profile-avatar-overlay svg { width: 28px; height: 28px; }
.profile-avatar-remove { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: #ef4444; color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; opacity: 0; transition: opacity .18s ease, transform .18s ease; box-shadow: 0 2px 6px rgba(0,0,0,.22); }
.profile-avatar-clickable:hover .profile-avatar-remove { opacity: 1; }
.profile-avatar-remove:hover { transform: scale(1.12); background: #dc2626; }
.profile-avatar-remove svg { width: 12px; height: 12px; display: block; }
.profile-meta { min-width: 0; }
.profile-name { margin: 0; font-size: 20px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-role { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(56,189,248,.25); border-radius: 20px; padding: 2px 10px; }
.profile-body { padding: 14px 20px; }
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border); gap: 10px; }
.profile-row:last-child { border-bottom: none; }
.profile-label { color: var(--text-secondary); font-size: 13px; flex: 0 0 auto; }
.profile-value { color: var(--text); font-size: 13px; text-align: right; min-width: 0; }
.profile-value a { color: var(--accent); }
.profile-value a:hover { text-decoration: underline; }
.profile-value a.profile-points:hover { text-decoration: none; }
.profile-forms { display: flex; flex-direction: column; gap: 18px; }

/* ---- 站点 LOGO 预览（settings.php 网站信息） ---- */
.logo-preview {
    flex: 0 0 auto;
    width: 200px;
    height: 64px;
    border-radius: 8px;
    background: #0f1a30;
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px 10px;
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-preview [data-empty] { font-size: 13px; color: var(--muted); }
.profile-form .panel-head { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.profile-form .panel-body { padding: 18px 20px; }
.profile-form .field { margin-bottom: 14px; }
.profile-form .field label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.profile-form .field input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 14px; }
.profile-form .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.profile-form .btn { min-width: 120px; }

/* ---- 数据概览统计卡 ---- */
.panel-sub { font-size: 12px; color: var(--text-secondary); background: var(--surface-hover); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; }
.profile-stats .panel-body { padding: 16px 18px; }
.profile-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pstat-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 18px 10px; border-radius: 12px; cursor: pointer;
    background: var(--surface-hover); border: 1px solid var(--border); color: var(--text);
    text-align: center; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    font: inherit;
}
.pstat-tile:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pstat-tile:active { transform: translateY(0); }
.pstat-tile b { font-size: 26px; font-weight: 800; line-height: 1; color: #fff; }
.pstat-tile span { font-size: 13px; color: var(--text-secondary); }
.pstat-tile.warn { border-color: rgba(245,158,11,.35); }
.pstat-tile.warn b { color: var(--warn); }
.pstat-tile.warn:hover { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.pstat-tile.danger { border-color: rgba(239,68,68,.35); }
.pstat-tile.danger b { color: var(--danger); }
.pstat-tile.danger:hover { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* ---- 明细弹窗 ---- */
.stat-data { display: none; }
.stat-modal-overlay { position: fixed; inset: 0; background: rgba(2,6,23,.66); z-index: 999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.stat-modal-overlay[hidden] { display: none; }
.stat-modal { width: min(880px, 100%); max-height: 82vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.stat-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.stat-modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; color: #fff; }
.stat-modal-close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-hover); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; transition: background .15s ease; }
.stat-modal-close:hover { background: var(--danger-soft); color: var(--danger); }
.stat-modal-body { padding: 16px 20px; overflow: auto; }

/* ---- 明细表格 ---- */
.stat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stat-table th, .stat-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.stat-table th { color: var(--text-secondary); font-weight: 600; background: var(--bg); position: sticky; top: 0; }
.stat-table tbody tr:hover { background: var(--surface-hover); }
.stat-table .stat-name { font-weight: 600; color: #fff; }
.stat-empty { text-align: center; color: var(--text-muted); padding: 28px 0; }
.stat-modal-note { margin-top: 14px; font-size: 12px; color: var(--text-secondary); text-align: right; }
.stat-modal-note a { color: var(--accent); }

/* 剩余天数配色（与 warnClass 输出对应：warn-red/yellow/green/gray） */
.dl-warn-red { color: var(--danger); font-weight: 600; }
.dl-warn-yellow { color: var(--warn); font-weight: 600; }
.dl-warn-green { color: var(--success); }
.dl-warn-gray { color: var(--text-muted); }

/* 阶段徽章补全（客户明细弹窗用） */
.stage-badge.st-new { background: #64748b; }
.stage-badge.st-intent { background: #8b5cf6; }
.stage-badge.st-lost { background: #64748b; }

@media (max-width: 1100px) {
    .profile-stat-grid { grid-template-columns: repeat(2, 1fr); }
}


@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-info { position: static; }
}
@media (max-width: 768px) {
    .profile-head { padding: 18px; }
    .profile-avatar { width: 56px; height: 56px; font-size: 24px; flex-basis: 56px; }
    .profile-name { font-size: 18px; }
}

/* ---- 头像（个人中心 / 顶栏） ---- */
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.chip-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 6px; border: 1px solid rgba(255,255,255,.25); flex: 0 0 auto; }

/* ---- 系统设置横向标签页 ---- */
.settings-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    scrollbar-width: thin;
}
.settings-tabs::-webkit-scrollbar { height: 4px; }
.settings-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.settings-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    white-space: nowrap;
    transition: color .15s, background .15s;
    text-decoration: none;
}
.settings-tab:hover {
    color: var(--text);
    background: var(--surface-hover);
    text-decoration: none;
}
.settings-tab.active {
    color: var(--accent);
    background: var(--accent-soft);
}
.settings-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width .2s ease;
}
.settings-tab.active::after { width: 60%; }

.settings-panel { display: none; animation: fadeIn .25s ease; }
.settings-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .settings-tabs { padding: 4px; border-radius: 12px; }
    .settings-tab { padding: 9px 14px; font-size: 13px; }
}

/* ===== 客户跟进：标记 / 进度 / 时间线（v2.0 合并增强） ===== */
.badge-warn { margin-left: auto; background: rgba(245,158,11,.18); color: #fbbf24; border: 1px solid rgba(245,158,11,.4); border-radius: 10px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.badge-muted { margin-left: auto; background: rgba(148,163,184,.15); color: #94a3b8; border: 1px solid rgba(148,163,184,.25); border-radius: 10px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.row-due > td { background: rgba(245,158,11,.06); }

.progress-steps { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.pstep { display: flex; align-items: center; gap: 6px; color: #94a3b8; font-size: 13px; }
.pstep .dot { width: 22px; height: 22px; border-radius: 50%; background: rgba(148,163,184,.18); color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; border: 1px solid rgba(148,163,184,.3); }
.pstep.on { color: #e2e8f0; }
.pstep.on .dot { background: var(--accent, #3b82f6); color: #fff; border-color: transparent; }
.progress-bar { height: 10px; background: rgba(148,163,184,.18); border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #6366f1); border-radius: 6px; transition: width .3s ease; }
.progress-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.progress-stats > div { background: rgba(148,163,184,.08); border-radius: 10px; padding: 10px; text-align: center; }
.progress-stats b { display: block; font-size: 18px; color: #e2e8f0; }
.progress-stats span { font-size: 12px; color: #94a3b8; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid rgba(148,163,184,.25); }
.timeline li { position: relative; padding: 8px 0 8px 14px; }
.timeline li::before { content: ''; position: absolute; left: -23px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent, #3b82f6); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.timeline li.tl-followup::before { background: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.tl-time { font-size: 12px; color: #94a3b8; }
.tl-body { margin-top: 2px; }
.tl-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 6px; background: rgba(59,130,246,.16); color: #93c5fd; margin-right: 6px; }
.tl-followup .tl-tag { background: rgba(99,102,241,.16); color: #c7d2fe; }
.tl-text { color: #cbd5e1; margin-top: 2px; font-size: 13px; }

@media (max-width: 768px) {
    .progress-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============ v2.0.2 客户概览仪表盘 + 跟进阶段操作 ============ */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 4px; }
.stat-cards .stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 2px; transition: border-color .2s, transform .2s; }
.stat-cards .stat-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.stat-cards .stat-card b { font-size: 24px; line-height: 1.1; }
.stat-cards .stat-card span { font-size: 12px; color: var(--text-secondary); }
.stat-cards .stat-card.warn b { color: #fbbf24; }
.stat-cards .stat-card.success b { color: #34d399; }
.stat-cards .stat-card.danger  b { color: #fb7185; }
.stat-cards .stat-card.muted   b { color: #94a3b8; }
.stat-cards .stat-card.primary b { color: #38bdf8; }   /* 2026-08-23 v3：全部客户 KPI 蓝 */

.stage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }

@media (max-width: 768px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 客户列表「跟进进度」列：可点击选择 + 进度显示 ============ */
.stage-cell { display: flex; flex-direction: column; gap: 4px; min-width: 116px; }
.stage-badge {
    align-self: flex-start; padding: 2px 11px; border-radius: 12px;
    font-size: 12px; line-height: 1.7; color: #fff; cursor: pointer;
    user-select: none; white-space: nowrap;
}
.stage-badge:hover { filter: brightness(1.08); }
.stage-progress { height: 6px; border-radius: 4px; background: #eef0f3; overflow: hidden; }
.stage-progress-fill { height: 100%; border-radius: 4px; }
.st-contact   { background: #8896a8; }
.st-following { background: #2f80ed; }
.st-deal      { background: #27ae60; }
.st-invalid   { background: #b0b6bf; }
.stage-badge.st-contact   { background: #8896a8; }
.stage-badge.st-following { background: #2f80ed; }
.stage-badge.st-deal      { background: #27ae60; }
.stage-badge.st-invalid   { background: #b0b6bf; }
.stage-progress-fill.st-contact   { background: #8896a8; }
.stage-progress-fill.st-following { background: #2f80ed; }
.stage-progress-fill.st-deal      { background: #27ae60; }
.stage-progress-fill.st-invalid   { background: #b0b6bf; }
.badge.sm { font-size: 11px; padding: 1px 7px; line-height: 1.6; }

/* 弹出式阶段选择器 */
.stage-picker { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.stage-btn {
    padding: 11px 14px; border: none; border-radius: 8px; color: #fff;
    font-size: 14px; cursor: pointer; text-align: left; transition: filter .15s;
}
.stage-btn:hover:not(:disabled) { filter: brightness(1.1); }
.stage-btn:disabled { cursor: default; opacity: .55; }

@media (max-width: 768px) {
    .stage-cell { min-width: 100px; }
}

/* ============ 数据看板：上方模块响应式断点 ============ */
/* 桌面 4 列 → 平板 2 列 → 手机 1 列 */
@media (max-width: 1180px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .cards { grid-template-columns: 1fr; }
    .stat-card { padding: 14px 16px; gap: 12px; min-height: 84px; }
    .stat-num { font-size: 24px; }
    .stat-label { font-size: 12px; }
    .stat-sub { font-size: 11px; }
}
/* Hero 概览 */
@media (max-width: 720px) {
    .dash-hero { padding: 20px 18px; gap: 14px; }
    .hero-title { font-size: 22px; }
    .hero-kicker { font-size: 11px; }
    .hero-desc { font-size: 13px; }
    .hero-clock { font-size: 28px; }
    .hero-date { font-size: 13px; }
}
/* 客户管理快捷筛选 */
@media (max-width: 720px) {
    .cust-filter-row { gap: 6px; }
    .cust-filter-label { min-width: 64px; font-size: 12px; }
    .chip { padding: 4px 10px; font-size: 12px; }
}
@media (max-width: 420px) {
    .cust-filter-row .chip { flex: 1 1 100%; justify-content: flex-start; }
    .cust-filter-label { flex-basis: 100%; }
}
/* 产品资产表：响应式（多档断点 + 移动端卡片化回退） */
/* 中等屏：隐藏不重要列（供应商、重要） */
@media (max-width: 1280px) {
    .asset-table th:nth-child(5),
    .asset-table td:nth-child(5),
    .asset-table th:nth-child(8),
    .asset-table td:nth-child(8) { display: none; }
}
/* 平板：表格横向滚动，隐藏「是否已提醒」 */
@media (max-width: 900px) {
    .asset-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .asset-table { min-width: 640px; }
    .asset-table th:nth-child(11),
    .asset-table td:nth-child(11) { display: none; }
}
@media (max-width: 720px) {
    .asset-table th, .asset-table td { padding: 6px 8px; font-size: 12px; }
    .asset-table tbody tr { height: auto; }
    .asset-table td.actions .mini { padding: 2px 5px; font-size: 10px; }
    .asset-table .days-left { display: block; margin-top: 2px; }
}
/* 手机（≤560px）：表格转卡片式（block 显示 + 标签前缀） */
@media (max-width: 560px) {
    .asset-table-wrap {
        max-height: none; overflow: visible; border: none; border-radius: 0;
    }
    .asset-table, .asset-table thead, .asset-table tbody, .asset-table tr, .asset-table th, .asset-table td { display: block; }
    .asset-table thead { display: none; }
    .asset-table tbody tr {
        margin-bottom: 12px; padding: 12px 14px;
        border: 1px solid var(--border); border-radius: 10px;
        background: var(--surface); box-shadow: var(--shadow);
    }
    .asset-table tbody tr:hover { background: var(--surface); }
    .asset-table td {
        display: grid; grid-template-columns: 64px 1fr; align-items: center;
        padding: 5px 0; border: none; white-space: normal;
        font-size: 13px; gap: 8px;
    }
    .asset-table td::before {
        content: attr(data-label); color: var(--text-muted); font-size: 11px;
    }
    .asset-table td:nth-child(1)::before  { content: "预警"; }
    .asset-table td:nth-child(2)::before  { content: "客户"; }
    .asset-table td:nth-child(3)::before  { content: "产品"; }
    .asset-table td:nth-child(4)::before  { content: "类型"; }
    .asset-table td:nth-child(5)::before  { content: "供应商"; }
    .asset-table td:nth-child(6)::before  { content: "到期日"; }
    .asset-table td:nth-child(7)::before  { content: "状态"; }
    .asset-table td:nth-child(8)::before  { content: "重要"; }
    .asset-table td:nth-child(9)::before  { content: "金额"; }
    .asset-table td:nth-child(10)::before { content: "操作"; }
    .asset-table td:nth-child(11)::before { content: "提醒"; }
    .asset-table td.actions { display: block; padding-top: 8px; }
    .asset-table td.actions::before { display: none; }
    .asset-table td.actions .mini { margin-right: 4px; margin-bottom: 4px; }
    .asset-table .days-left { display: inline; margin-left: 6px; }
    .asset-empty { padding: 16px 0; font-size: 13px; }
}
/* 看板主网格 2 列 → 1 列（已有 900px 断点；这里补充更窄的修正） */
@media (max-width: 640px) {
    /* 旧版这里会把 .sysinfo-row 改回 2 列 + display:none 第 2 对，
       与 ≤768px 的"单列堆叠"冲突 → 移动端值被隐藏。
       已删除冲突规则，≤640px 继承 ≤768px 的单列堆叠样式。 */
}
/* 面板头部 mobile 优化 */
@media (max-width: 560px) {
    .panel-head { padding: 12px 14px; }
    .panel-head h3 { font-size: 15px; }
    .panel-tag { font-size: 11px; }
}

/* ============ 数据看板：发布图（环形 / 客户管理） ============ */
.donut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.donut-body {
    display: flex; align-items: center; gap: 28px;
    padding: 22px 26px;
    min-height: 220px;
}
.donut-stage { position: relative; flex: 0 0 200px; width: 200px; height: 200px; transition: transform .25s ease; }
.donut-stage:hover { transform: scale(1.02); }
.donut-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 16px rgba(0,0,0,.32)); }
.donut-svg circle { transition: stroke-dasharray .25s ease, stroke-dashoffset .25s ease; }
.donut-svg .donut-seg { transition: stroke-width .22s ease, opacity .22s ease; }
.donut-svg .donut-seg.dim { opacity: .28; }
.donut-svg .donut-seg.active { stroke-width: 25; }
.donut-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    pointer-events: none; color: var(--text-secondary);
}
.donut-center b {
    font-size: 30px; font-weight: 800; color: #fff; line-height: 1.05;
    font-variant-numeric: tabular-nums; letter-spacing: .5px;
}
.donut-center span { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.donut-legend-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: var(--text); line-height: 1.2;
}
.donut-legend-item i {
    width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,.06);
}
.donut-legend-item .li-label {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.donut-legend-item b {
    color: var(--text-secondary); font-weight: 600;
    font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.donut-empty { color: var(--text-muted); font-size: 13px; padding: 22px 0; text-align: center; }
/* 图例联动高亮 + 中心数值过渡 */
.donut-center b, .donut-center span { transition: color .2s ease; }
.donut-legend-item { cursor: default; border-radius: 8px; padding: 5px 8px; transition: background .15s ease, transform .15s ease; }
.donut-legend-item:hover { background: var(--surface-hover); }
.donut-legend-item.active { background: var(--accent-soft); }
.donut-legend-item.active .li-label { color: #fff; }
/* 悬浮提示 */
.donut-tip {
    position: fixed; z-index: 200; pointer-events: none; max-width: 220px;
    background: #0f172a; color: #fff; border: 1px solid var(--border); border-radius: 8px;
    padding: 7px 11px; font-size: 12px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity .15s ease;
}
.donut-tip b { font-size: 13px; font-weight: 700; }
.donut-tip span { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
@media (max-width: 1080px) {
    .donut-grid { grid-template-columns: 1fr; }
}
/* 终极兜底：≤1100 时 donut-grid 强制单列满宽（即使上面断点被覆盖也行） */
@media (max-width: 1100px) {
    .donut-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .donut-grid > .panel {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .donut-body { flex-direction: column !important; gap: 14px !important; align-items: center !important; padding: 16px !important; min-height: 0 !important; }
    .donut-stage { width: 180px !important; height: 180px !important; flex-basis: 180px !important; }
}
@media (max-width: 560px) {
    .donut-body { flex-direction: column; gap: 16px; padding: 16px; min-height: 0; }
    .donut-stage { width: 160px; height: 160px; flex-basis: 160px; }
    .donut-center b { font-size: 24px; }
    .donut-center span { font-size: 11px; }
}

/* ============ 数据看板：响应式断点分组 =============*/
@media (min-width: 1181px) {
    .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ============================================================
   产品列表：手机端横向滑动卡片
   与桌面 .table-wrap / .data-table 同源，CSS 控制显隐
   ============================================================ */
.mobile-swiper {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 8px 4px 14px;
    margin: 0 -16px;             /* 拉出 panel 内边距，让边缘卡片贴边 */
    scroll-padding: 0 16px;
}
.mobile-swiper::-webkit-scrollbar { display: none; }
.mobile-swiper { scrollbar-width: none; }
.swiper-card {
    flex: 0 0 86%;
    max-width: 380px;
    scroll-snap-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 16px 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    /* 关键：强制 GPU 合成层，让 Android Chrome scroll-snap 容器下文字走一致渲染路径 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout style;
}
/* swiper-card 内所有文字强制 subpixel 抗锯齿 + 几何精度渲染 */
.swiper-card, .swiper-card * {
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    text-rendering: geometricPrecision;
}
.swiper-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
    opacity: .55;
}
.swiper-card .sc-top {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    color: var(--text-secondary); font-size: 12px;
    line-height: 18px;  /* 整数倍 12*1.5 */
    margin-top: 2px;
}
.swiper-card .sc-top .sc-warn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, .12);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, .25);
}
.swiper-card .sc-top .sc-warn .dot { width: 8px; height: 8px; }
.swiper-card .sc-type {
    padding: 3px 10px; border-radius: 999px;
    background: rgba(56, 189, 248, .12);
    color: #38bdf8; border: 1px solid rgba(56, 189, 248, .25);
    font-size: 12px; font-weight: 600;
    line-height: 18px;  /* 整数倍 */
}
/* ============ swiper 卡片首/末滑动方向提示箭头 ============
   规则：仅作用于被显式标记 .sc-first / .sc-last 的卡片（由 PHP 渲染时按列表索引判定）。
   第一个卡片右箭头 → ：暗示可向右滑查看更多；最后一张左箭头 ← ：暗示可向左滑回退。
   说明：
   ① 仅作用于带 .sc-first/.sc-last 的 .swiper-card（其他页面的 .sc-type 不受牵连）
   ② 只在 ≤768px 生效（.mobile-swiper/.swiper-indic 在桌面端已 display:none，不会看到）
   ③ 用 ::before/::after 注入内容，零额外 DOM、零对原 HTML 改动   =============== */
.swiper-card.sc-first .sc-type::after { content: ' →'; margin-left: 4px; opacity: .9; font-weight: 700; }
.swiper-card.sc-last .sc-type::before  { content: '← '; margin-right: 4px; opacity: .9; font-weight: 700; }
.swiper-card .sc-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text); font-size: 16px; font-weight: 600;  /* 17→16, 700→600 更锐利 */
    text-decoration: none; line-height: 22px;  /* 整数倍 16*1.375=22 */
    word-break: break-word;
}
.swiper-card .sc-title:hover { color: var(--accent); text-decoration: none; }
.swiper-card .sc-meta {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 13px; color: var(--text-secondary);
    line-height: 20px;  /* 整数倍 13*1.54=20 */
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    padding: 10px 0;
}
.swiper-card .sc-meta-row {
    display: flex; align-items: center; gap: 12px;
    min-width: 0;
    line-height: 20px;
}
.swiper-card .sc-meta-row i {
    flex: 0 0 auto; min-width: 44px;
    font-style: normal; font-size: 11px; color: var(--text-secondary);
    background: rgba(148, 163, 184, .14);
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 6px;
    padding: 2px 8px;
    text-align: center;
    letter-spacing: .3px;
    font-weight: 600;
    line-height: 16px;  /* 整数倍 11*1.45 */
}
.swiper-card .sc-meta-row b {
    flex: 1 1 auto; min-width: 0;
    font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding-left: 2px;
    line-height: 20px;
}
.swiper-card .sc-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.swiper-card .sc-stat {
    display: flex; flex-direction: column; gap: 2px;
    background: rgba(255, 255, 255, .025);
    border-radius: 10px; padding: 8px 10px;
    min-width: 0;
}
.swiper-card .sc-stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: .5px; line-height: 16px; }
.swiper-card .sc-stat-val {
    font-size: 14px; font-weight: 600;  /* 700→600 */
    color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    line-height: 20px;  /* 整数倍 14*1.43 */
}
.swiper-card .sc-stat-val.sc-expire { color: #fbbf24; }
.swiper-card .sc-stat-val.sc-price { color: #34d399; }
.swiper-card .sc-stat-sub {
    font-size: 11px; color: var(--text-secondary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    line-height: 16px;
}
.swiper-card .sc-foot {
    display: flex; flex-wrap: wrap; gap: 6px;
    font-size: 11px;
    line-height: 16px;
}
.swiper-card .sc-tag {
    padding: 2px 8px; border-radius: 999px;
    background: rgba(148, 163, 184, .12); color: var(--text-secondary);
    line-height: 16px;
}
.swiper-card .sc-tag.tag-high { background: rgba(251, 146, 60, .16); color: #fb923c; }
.swiper-card .sc-tag.tag-critical { background: rgba(239, 68, 68, .18); color: #f87171; }
.swiper-card .tag-archived { background: rgba(148, 163, 184, .18); color: var(--text-secondary); padding: 2px 8px; border-radius: 999px; }
.swiper-card .sc-actions {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 4px;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
}
.swiper-card .sc-actions .mini { flex: 1 1 60px; min-width: 56px; }
.swiper-card .sc-actions .mini.primary {
    background: linear-gradient(135deg, #2563eb, #38bdf8); color: #fff; border: none;
}
.swiper-indic {
    display: flex; gap: 7px; justify-content: center;
    padding: 8px 0 16px;
    flex-wrap: wrap;
    align-items: center;
    min-height: 24px;  /* 兜底：即使 dots 未生成也保留可视间距，让布局不会塌掉 */
}
.swiper-indic .dot-indic {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(148, 163, 184, .55);
    transition: background .25s, width .25s, box-shadow .25s;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-block;
}
.swiper-indic .dot-indic.active {
    background: var(--accent);
    width: 26px; height: 10px; border-radius: 5px;
    box-shadow: 0 0 10px rgba(56, 189, 248, .6);
}

/* 默认状态下：手机端走 swiper，桌面端走 table */
@media (max-width: 768px) {
    .panel .table-wrap,
    .panel .paginate,
    .panel #sel-all,
    .panel .legend,
    .panel .asset-table-wrap,
    .panel .asset-table,
    .panel > table.data-table,
    .panel .data-table { display: none !important; }
    .panel .mobile-swiper {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    /* 手机端一屏只显示一个产品：强制每张卡占满 swiper 整宽 */
    .panel .mobile-swiper > .swiper-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        scroll-snap-align: center !important;
    }
    /* 抵消 swiper 的负 margin，避免卡片被裁到 panel 边外 */
    .panel .mobile-swiper {
        margin: 0 !important;
        padding: 8px 0 14px !important;
    }
    /* ============ v3 自防御修复（2026-08-27）============
       根因：前两轮 CSS 把 .swiper-indic 用普通 display: flex 实现，
             无 !important 兜底，万一被任何高优先级规则带 display:none 直接失踪。
       修复：display + visibility + min-height 均 !important 兜底；加可视化背景框
             （淡蓝描边），用户肉眼一眼能看到 swiper-indic 区域。
       视觉：dot 默认 12×12 高对比色，active 30×12 渐变胶囊 + 强烈蓝色光晕。
    */
    .panel .swiper-indic {
        display: flex !important;
        gap: 8px !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 32px !important;
        padding: 12px 12px 18px !important;
        margin: 4px 12px 8px !important;
        visibility: visible !important;
        background: rgba(56, 189, 248, .08) !important;
        border: 1px dashed rgba(56, 189, 248, .35) !important;
        border-radius: 8px !important;
    }
    .panel .swiper-indic .dot-indic {
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        background: rgba(100, 116, 139, .85) !important;
        border: 1px solid rgba(255, 255, 255, .5) !important;
        box-shadow: 0 0 4px rgba(0, 0, 0, .35) !important;
        display: inline-block !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        transition: background .25s, width .25s, box-shadow .25s !important;
    }
    .panel .swiper-indic .dot-indic.active {
        width: 30px !important;
        height: 12px !important;
        border-radius: 6px !important;
        background: linear-gradient(90deg, #38bdf8, #2563eb) !important;
        border: none !important;
        box-shadow: 0 0 10px rgba(56, 189, 248, .95), 0 0 22px rgba(56, 189, 248, .55) !important;
    }
    /* 强化 sc-first / sc-last 方向箭头（更亮、更醒目） */
    .swiper-card.sc-first .sc-type::after {
        content: ' \2192' !important;  /* → */
        margin-left: 6px !important;
        opacity: 1 !important;
        color: #38bdf8 !important;
        font-weight: 800 !important;
        font-size: 16px !important;
        text-shadow: 0 0 6px rgba(56, 189, 248, .6) !important;
    }
    .swiper-card.sc-last .sc-type::before {
        content: '\2190 ' !important;  /* ← */
        margin-right: 6px !important;
        opacity: 1 !important;
        color: #38bdf8 !important;
        font-weight: 800 !important;
        font-size: 16px !important;
        text-shadow: 0 0 6px rgba(56, 189, 248, .6) !important;
    }
}
@media (min-width: 769px) {
    .panel .mobile-swiper,
    .panel .swiper-indic { display: none !important; }
}

/* ============================================================
   企业管理 / 用户管理 等「纯表格页」移动端修复
   根因：上方 @media(max-width:768px) 的 .panel .data-table{display:none!important}
         本是为产品/客户列表的 .mobile-swiper 让位，但通杀所有 .panel 内表格，
         导致企业管理、用户管理等无 swiper 替代的页面在手机端整表被隐藏。
   修复：用更高特异性(!important)的 .ent-list / .user-list 标记类把这两张表重新启用，
         走上面 836 行的「卡片化回退」（common.js 已自动为每格写入 data-label）。
   注意：产品/客户页仍走 .mobile-swiper，此处不动，零回归。
   ============================================================ */
@media (max-width: 768px) {
    /* 通用：JS 自动给 .data-table 加 .mc-table 后强制显示（覆盖 catch-all 隐藏） */
    .panel .data-table.mc-table { display: block !important; }
}

/* ============================================================
   企业/用户/通用管理 移动端卡片折叠（v3 — 通用化、不依赖 nth-child）
   关键设计点：
   ① 完全由 common.js cardifyTables() 在 ≤768px 时给每个 td 加 .mc-cell + 列角色类
   ② .mc-head = 第 2 列作卡片头（渐变 + 大字号企业/用户名）
   ③ .mc-id   = 第 1 列 ID 胶囊徽章（绝对定位到卡片右上角）
   ④ .mc-row  = 中间字段行（data-label ::before 显示中文列名/emoji）
   ⑤ .mc-act  = 最后一列操作栏（全宽底部条带，按钮 flex:1 等分）
   ⑥ 所有重要样式加 !important 兜底，避免 catch-all 通杀规则二次干扰
   ============================================================ */
@media (max-width: 768px) {
    /* ====== 共享：tr 容器 ====== */
    .mc-tr {
        padding: 0 !important;
        overflow: hidden;
        position: relative;
        background: rgba(15, 23, 42, .35);
        border-radius: 10px;
        margin-bottom: 12px;
        box-shadow: 0 2px 6px rgba(0,0,0,.18);
    }
    /* 兜底：强制所有 td 都 display:flex（防 form 子元素吞父 td） */
    .mc-cell {
        display: flex !important;
        visibility: visible !important;
        width: 100% !important;
        align-items: center;
        box-sizing: border-box;
        position: relative;
    }

    /* ====== 通用：data-label ::before 列标签 ====== */
    .mc-cell:not(.mc-head):not(.mc-id)::before {
        content: attr(data-label);
        flex: 0 0 auto;
        min-width: 92px;
        margin-right: 12px;
        font-size: 11px;
        color: rgba(203, 213, 225, .55);
        text-transform: none;
        letter-spacing: 0;
    }

    /* ====== ID 角徽章（第 1 列） ====== */
    .mc-id {
        position: absolute !important;
        top: 12px; right: 12px;
        width: auto !important;
        min-width: 0;
        background: rgba(56,189,248,.18) !important;
        color: #38bdf8;
        border: 1px solid rgba(56,189,248,.3);
        border-radius: 12px;
        padding: 2px 10px !important;
        font-size: 11px;
        font-weight: 600;
        z-index: 2;
        line-height: 1.2;
        height: auto !important;
    }
    .mc-id::before { content: 'ID '; opacity: .65; margin-right: 2px; }
    .mc-id > * { display: none; } /* ID 文本在外层，::after 没有，文本本身就是值 */

    /* ====== 卡片头（第 2 列） ====== */
    .mc-head {
        background: linear-gradient(135deg, rgba(14,26,51,.92), rgba(21,39,71,.92)) !important;
        padding: 16px 96px 14px 16px !important;
        font-size: 16px !important;
        font-weight: 700;
        color: #fff;
        border-bottom: 1px solid rgba(56,189,248,.18);
        min-height: 56px;
        align-items: center;
    }
    .mc-head::before { display: none; }

    /* ====== 字段行（中间列） ====== */
    .mc-row {
        padding: 10px 16px !important;
        border-bottom: 1px dashed rgba(56,189,248,.12);
        background: rgba(15, 23, 42, .15);
        min-height: 38px;
    }

    /* ====== 操作栏底条（最后一列） ====== */
    .mc-act {
        padding: 12px 16px !important;
        background: rgba(8, 15, 32, .55) !important;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: stretch;
    }
    .mc-act::before {
        display: block;
        width: 100%;
        margin-bottom: 6px;
        content: attr(data-label);
        font-weight: 600;
        color: rgba(203, 213, 225, .55);
        font-size: 12px;
        letter-spacing: .05em;
    }
    .mc-act .mini,
    .mc-act button {
        flex: 1 1 0 !important;
        min-width: 70px;
        text-align: center;
        margin: 0 !important;
    }

    /* ====== 顶栏移动端精简（标题不被挤断）====== */
    .topbar-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 110px;
        font-size: 15px;
    }
    .user-chip { padding: 4px 8px; font-size: 12px; }
    .points-pill { padding: 3px 8px; font-size: 12px; }
    /* ≤560 顶栏再精简：清缓存隐藏 */
}
@media (max-width: 560px) {
    #btn-clear-cache { display: none !important; }
    .user-chip { max-width: 110px; }
    .topbar-title { max-width: 88px; }
}
/* 极小屏（≤560px）继续瘦身：隐藏「清缓存」按钮 + 角色括号详情 */
@media (max-width: 560px) {
    #btn-clear-cache { display: none !important; }
    .user-chip { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
    .user-chip::after { content: ''; } /* 不显示角色括号详情 */
}

/* ============================================================
   数据看板：手机端严格自适应 v2
   目标：4 张统计卡 1 列占满 / donut-grid 1 列 + 垂直堆叠
         / 客户筛选 chip 横向滚动 / 时间日期不重叠
   ============================================================ */
@media (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }
    .stat-card {
        padding: 14px 16px;
        min-height: 92px;
        gap: 14px;
    }
    .stat-card .stat-num { font-size: 24px; }
    .stat-card .stat-label { font-size: 13px; }
    .stat-card .stat-sub { font-size: 12px; }

    .dash-hero { padding: 18px 16px; gap: 14px; flex-direction: column; align-items: flex-start; }
    .hero-right { text-align: left; width: 100%; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
    .hero-clock { font-size: 26px; letter-spacing: 1px; }
    .hero-date { font-size: 12px; margin-top: 0; }

    /* 客户管理筛选条：横向滚动，避免折行拥挤 */
    .cust-filter-panel { padding: 12px 14px; gap: 8px; }
    .cust-filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .cust-filter-row::-webkit-scrollbar { height: 4px; }
    .cust-filter-row::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .35); border-radius: 4px; }
    .cust-filter-row .chip { flex: 0 0 auto; }

    /* 公布图小屏：ring 与图例改为上下堆叠 */
    .donut-body { flex-direction: column; gap: 14px; padding: 14px; align-items: center; min-height: 0; }
    .donut-stage { width: 200px; height: 200px; flex-basis: 200px; }
    .donut-legend { width: 100%; }

    /* 系统信息条：避免折行后字段重叠 */
    .system-info-list { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
    .dash-hero { padding: 14px 14px; }
    .hero-title { font-size: 19px; letter-spacing: .5px; }
    .hero-kicker { font-size: 10px; }
    .hero-desc { font-size: 12px; line-height: 1.45; }
    .hero-clock { font-size: 22px; }
    .hero-date { font-size: 11px; }

    .stat-card { padding: 12px 14px; min-height: 84px; gap: 12px; }
    .stat-card .stat-num { font-size: 22px; }
    .stat-card .stat-label { font-size: 12px; }
    .stat-card .stat-sub { font-size: 11px; }

    .donut-body { padding: 12px; gap: 12px; }
    .donut-stage { width: 170px; height: 170px; flex-basis: 170px; }
    .donut-center b { font-size: 22px; }
    .donut-center span { font-size: 10px; }
}
@media (max-width: 420px) {
    .hero-clock { font-size: 20px; }
    .hero-right { gap: 8px; }
    .stat-card .stat-num { font-size: 20px; }
    .stat-card .stat-sub b { font-size: 12px; }

    /* 顶部 topbar 内距收紧、避免文字溢出 */
    .topbar { padding: 8px 10px; gap: 6px; }
    .topbar-title { font-size: 14px; max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-right { gap: 6px; }
    .topbar-right .user-chip { display: none; }
}

/* ============================================================
   全站统一响应式加固（覆盖所有页面：列表 / 表单 / 设置 / 详情）
   依赖 common.js 自动注入的 data-label 与 .table-scroll 包裹
   ============================================================ */

/* 表格滚动容器（由 common.js 为未包裹的 .data-table 自动添加） */
.table-scroll { width: 100%; }

/* 中屏（769–1180px）：宽表横向滚动，避免溢出视口；
   手机（≤768px）走下方 .data-table 卡片化回退，不在此处滚动 */
@media (min-width: 769px) and (max-width: 1180px) {
    .table-wrap, .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-wrap > .data-table,
    .table-scroll > .data-table { min-width: 680px; }
}

/* 表单网格：3 列 → 平板 2 列（不与下方 ≤900px 的 1 列冲突） */
@media (min-width: 901px) and (max-width: 1180px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 通用表单操作区在窄屏换行，按钮占满一行 */
@media (max-width: 560px) {
    .form-actions { flex-wrap: wrap; }
    .form-actions .btn { flex: 1 1 auto; }
    .content { padding: 14px; }
    .toolbar { gap: 8px; }
    .filter-bar { gap: 8px; padding: 10px; }
    .panel { padding: 14px 14px; margin-bottom: 12px; }
    .noti-head { flex-wrap: wrap; }
    .pager-bar { flex-direction: column; align-items: stretch; }
    .pager-left, .pager-right { justify-content: center; }
    .fm-follow { gap: 14px; }
    .fm-follow .fm-field { min-width: 0; }
}

/* ===== 跟进监控页（follow_monitor.php）专用样式 ===== */

/* Hero 顶部（与 dashboard 同款 page-hero，但允许右上角只放一个 CTA，避免与时钟冲突） */
.follow-hero {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 14px;
    padding: 22px 26px;
    color: #fff;
    position: relative; overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    min-height: 110px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.follow-hero .hero-kicker { color: #fbbf24; }

/* Hero 内的筛选回显 tag */
.filter-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    background: rgba(56,189,248,.18);
    color: #38bdf8;
    border: 1px solid rgba(56,189,248,.4);
}

/* Hero CTA 在右上的样式已继承 .btn .btn-primary */

/* KPI 卡片栅格（v5：5 列，含「客户管理跟进」第 5 张卡） */
.follow-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1400px) {
    .follow-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
    .follow-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .follow-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .follow-cards { grid-template-columns: 1fr; }
}

/* 筛选 panel：把 filter-bar 转成竖向 label+下拉，避免一边挤 */
.fm-follow {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
}
.fm-follow .fm-field {
    display: flex; flex-direction: column; gap: 6px;
}
.fm-follow .fm-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}
.fm-follow .fm-actions {
    display: flex; gap: 8px; align-items: flex-end;
}
@media (max-width: 768px) {
    .fm-follow { grid-template-columns: 1fr; }
    .fm-follow .fm-actions { justify-content: flex-end; }
}

/* 表格专用样式 */
.follow-table tbody tr {
    height: 56px;
    transition: background-color .15s ease;
}
.follow-table tbody tr.row-overdue {
    background: rgba(239,68,68,.06);
}
.follow-table tbody tr.row-overdue:hover {
    background: rgba(239,68,68,.12);
}
.follow-table tbody tr.row-today {
    background: rgba(251,191,36,.06);
}
.follow-table tbody tr.row-today:hover {
    background: rgba(251,191,36,.12);
}
.follow-table .cell-content {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.follow-table .cell-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.follow-table .cell-link:hover { text-decoration: underline; }

/* 表格内客户名（小色块强调） */
.follow-table .cell-customer {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(56,189,248,.10);
    color: #bae6fd;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(56,189,248,.25);
}

/* 头像式软标签（跟进人 / 角色） */
.chip-soft {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    background: rgba(56,189,248,.10);
    color: #93c5fd;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(56,189,248,.25);
}
.chip-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56,189,248,.18);
}

/* 日期样式（带提醒色） */
.follow-table .date {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--surface-hover);
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}
.follow-table .date.date-danger {
    background: rgba(239,68,68,.15);
    color: #fca5a5;
}
.follow-table .date.date-warning {
    background: rgba(251,191,36,.18);
    color: #fcd34d;
}
/* v7：跟进日期 4 档视觉 — 近 7 天(蓝 info) / 远期(灰 muted) */
.follow-table .date.date-soon {
    background: rgba(56,189,248,.15);
    color: #7dd3fc;
}
.follow-table .date.date-future {
    background: rgba(148,163,184,.10);
    color: var(--text-muted);
}

/* 文字辅助色 */
.follow-table .muted.small {
    color: var(--text-muted);
    font-size: 12px;
}
.follow-table .muted {
    color: var(--text-muted);
}

/* Panel 头部内联徽章色 */
.text-danger  { color: #fca5a5; }
.text-warning { color: #fcd34d; }

/* 状态徽章补全（CSS 没定义的话补一组） */
.badge-info {
    background: rgba(56,189,248,.18); color: #7dd3fc; border: 1px solid rgba(56,189,248,.4);
}
.badge-muted {
    background: rgba(148,163,184,.15); color: #94a3b8; border: 1px solid rgba(148,163,184,.30);
}
.badge-danger {
    background: rgba(239,68,68,.18); color: #fca5a5; border: 1px solid rgba(239,68,68,.40);
}
.badge-warning {
    background: rgba(251,191,36,.18); color: #fcd34d; border: 1px solid rgba(251,191,36,.40);
}
.badge-success {
    background: rgba(34,197,94,.18); color: #86efac; border: 1px solid rgba(34,197,94,.40);
}

/* 表格为空时的插画态 */
.follow-table tbody .empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}
.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 56px 24px;
    text-align: center;
    color: var(--text-muted);
}
.empty-art {
    display: inline-flex; align-items: center; justify-content: center;
    width: 96px; height: 96px;
    border-radius: 50%;
    background: rgba(56,189,248,.08);
    color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56,189,248,.18) inset, 0 8px 24px rgba(56,189,248,.18);
}
.empty-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.empty-desc {
    margin: 0;
    font-size: 13px;
    max-width: 420px;
    line-height: 1.7;
}
.empty-desc a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}
.empty-desc a:hover { color: #7dd3fc; }

/* 顶栏：极小屏时让右侧信息可压缩，避免遮挡标题 */
@media (max-width: 420px) {
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-right { gap: 8px; }
    .points-pill { padding: 3px 8px; font-size: 12px; }
}

/* 防止任意图片/画布溢出容器 */
img, svg, canvas { max-width: 100%; }

/* 尊重「减少动态效果」偏好（看板动画 / 悬浮提示等） */
@media (prefers-reduced-motion: reduce) {
    .donut-stage:hover { transform: none; }
    .donut-svg .donut-seg { transition: none; }
    .reveal { animation: none; opacity: 1; transform: none; }
    .hero-glow { animation: none; }
}

/* ============================================================
   数据看板：模块宽度归位兜底（v2）
   用户反馈：469px 视口下「产品资产」面板（.dash-grid > .panel-full）
   只显示约 50% 宽，与 donut-grid 内面板宽度不一致。
   兜底方案（三层保险 + box-sizing）：
     1) .dash-grid / .donut-grid 强制 1fr（即使断点被遗漏或被覆盖）
     2) .panel-full 强制 grid-column:auto + width:100%（避免被压成 1fr 列）
     3) .panel 自身 width:100% + max-width:100% + box-sizing:border-box
        （关键是 border-box，把 padding/border 算进 width 内，
         避免内容 + padding 撑破父容器后被浏览器强制压缩实际宽度）
   ============================================================ */
@media (max-width: 768px) {
    .dash-grid,
    .donut-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .panel-full {
        grid-column: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .panel,
    .content > .panel,
    .dash-grid > .panel,
    .donut-grid > .panel {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    /* 兜底：dashboard 上的 panel-body 不应被 .panel:has(> .panel-head) 规则
       偷走宽度，把 panel-body 也撑满 panel 内宽 */
    .panel-body {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 14px 14px !important;
    }
    /* panel-head 也撑满，避免其内部 flex 容器挤在一起 */
    .panel-head {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 14px !important;
    }
}


/* ============ P3 客户查重 ============ */

/* 表单内查重结果提示面板 */
.dup-warn {
    margin: 0 16px 12px;
    border: 1px solid var(--warn);
    border-radius: 10px;
    background: var(--warn-soft);
    overflow: hidden;
}
.dup-warn-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, .12);
    border-bottom: 1px solid rgba(245, 158, 11, .3);
    font-size: 13px;
}
.dup-warn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--warn);
    color: #0b1120;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}
.dup-warn-count {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 12px;
}
.dup-warn-body { padding: 8px 14px 12px; }
.dup-item {
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dup-item:last-child { border-bottom: none; }
.dup-name { font-weight: 600; }
.dup-match {
    color: var(--warn);
    font-size: 12px;
    background: rgba(245, 158, 11, .15);
    padding: 1px 8px;
    border-radius: 4px;
}
.dup-detail { color: var(--text-muted); font-size: 12px; }

/* 查重字段输入框标识 */
.dup-field {
    border-left: 2px solid var(--warn) !important;
}

/* 查重扫描视图 */
.dup-group {
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.dup-group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    flex-wrap: wrap;
}
.dup-group-num {
    font-weight: 700;
    color: var(--warn);
    flex-shrink: 0;
}
.dup-group-count {
    background: var(--warn-soft);
    color: var(--warn);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    flex-shrink: 0;
}
.dup-group-fields {
    color: var(--text-secondary);
    font-size: 12px;
}

/* ===================== P5 积分商城 ===================== */

/* Badge 变体 */
.badge-success { background: rgba(34,197,94,.18); color: #4ade80; border: 1px solid rgba(34,197,94,.35); border-radius: 10px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.badge-warning { background: rgba(245,158,11,.18); color: #fbbf24; border: 1px solid rgba(245,158,11,.35); border-radius: 10px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.badge-danger  { background: rgba(239,68,68,.18); color: #f87171; border: 1px solid rgba(239,68,68,.35); border-radius: 10px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.badge-info    { background: rgba(14,165,233,.18); color: #38bdf8; border: 1px solid rgba(14,165,233,.35); border-radius: 10px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }

/* 跟进监控：逾期行高亮 */
.row-overdue { background: rgba(239,68,68,.06); }
.row-overdue:hover { background: rgba(239,68,68,.10); }
.cell-content { max-width: 320px; color: var(--text-secondary); font-size: 13px; }

/* Button 变体 */
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-hover); border-color: var(--accent); }
.btn-success { background: #22c55e; color: #fff; font-weight: 600; border-color: transparent; }
.btn-success:hover { background: #16a34a; }
.btn-info { background: #0ea5e9; color: #fff; font-weight: 600; border-color: transparent; }
.btn-info:hover { background: #0284c7; }

/* 等宽文本 */
.mono { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; }

/* 兑换商城网格 */
.redeem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.redeem-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color .2s, transform .15s;
}
.redeem-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.redeem-card-type { display: flex; align-items: center; }
.redeem-type-badge {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 600;
}
.redeem-type-badge.type-quota   { background: rgba(99,102,241,.15); color: #818cf8; }
.redeem-type-badge.type-quota_customer { background: rgba(244,114,182,.15); color: #f472b6; }
.redeem-type-badge.type-channel { background: rgba(14,165,233,.15); color: #38bdf8; }
.redeem-type-badge.type-vip     { background: rgba(168,85,247,.15); color: #c084fc; }
.redeem-type-badge.type-coupon  { background: rgba(245,158,11,.15); color: #fbbf24; }
.redeem-type-badge.type-invite  { background: rgba(34,197,94,.15); color: #4ade80; }
.redeem-type-badge.type-goods   { background: rgba(239,68,68,.15); color: #f87171; }
.redeem-type-badge.type-cash    { background: rgba(20,184,166,.15); color: #2dd4bf; }

.redeem-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}
.redeem-card-cost {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.redeem-cost-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}
.redeem-cost-unit {
    font-size: 13px;
    color: var(--text-muted);
}
.redeem-card-stock {
    font-size: 12px;
}
.stock-ok { color: #4ade80; }
.stock-out { color: #f87171; }
.stock-warn { color: #fbbf24; }

/* 兑换项管理：批量操作条 */
.batch-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.batch-toolbar .bt-checkall { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.batch-toolbar .bt-count { font-size: 13px; color: var(--text-muted); margin-right: auto; }
.batch-toolbar .bt-count b { color: var(--accent); }
.redeem-redeemed-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.redeem-redeemed-link:hover { text-decoration: underline; }

/* 表单内联行 */
.form-inline .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}
.form-inline .field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.form-inline .field label {
    font-size: 12px;
    color: var(--text-muted);
}
.form-inline .field input,
.form-inline .field select {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

/* 响应式：商城网格 */
@media (max-width: 560px) {
    .redeem-grid { grid-template-columns: 1fr; }
}

/* 兑换项 JSON 参数单元格（admin_redeem_items 列表） */
.json-cell {
    margin: 0;
    padding: 8px 10px;
    background: #0b1325;
    color: #e2e8f0;
    border-radius: 6px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
    font-size: 12px;
    line-height: 1.5;
    max-width: 320px;
    max-height: 120px;
    overflow: auto;
    white-space: pre;
    word-break: break-all;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

/* ============ 兑换项管理（admin_redeem_items）美化 ============ */
/* 顶部设置条：开关 / 频次 / 比例（从 settings 迁入） */
.redeem-settings-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(56,189,248,.08), rgba(168,85,247,.06));
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.redeem-settings-bar .rsb-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.redeem-settings-bar .rsb-item label { font-size: 12px; color: var(--text-secondary); font-weight: 600; letter-spacing: .5px; }
.redeem-settings-bar .rsb-item input[type="number"] {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    width: 100%;
}
.redeem-settings-bar .rsb-item input[type="number"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.redeem-settings-bar .rsb-toggle { flex-direction: row; align-items: center; gap: 10px; padding-top: 18px; }
.redeem-settings-bar .rsb-toggle label.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.redeem-settings-bar .rsb-toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }

/* 编辑 / 新增表单：2 行网格，每行 4 字段（更整齐） */
.redeem-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
    margin-bottom: 18px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.redeem-form-grid .rf-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.redeem-form-grid .rf-cell > label,
.redeem-form-grid .rf-cell > .rf-label {
    font-size: 12px; color: var(--text-secondary); font-weight: 600; letter-spacing: .3px;
}
.redeem-form-grid .rf-cell input,
.redeem-form-grid .rf-cell select {
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    width: 100%;
    transition: border-color .15s, box-shadow .15s;
}
.redeem-form-grid .rf-cell input:focus,
.redeem-form-grid .rf-cell select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.redeem-form-grid .rf-cell .rf-hint { font-size: 11px; color: var(--text-muted); }
.redeem-form-grid .rf-actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; padding-top: 4px; border-top: 1px dashed var(--border); margin-top: 4px; }
.redeem-form-grid .rf-actions .rf-tip { color: var(--text-muted); font-size: 12px; margin-left: auto; }

/* 类型说明卡：4 列，每列含 2-3 个类型，便于管理员快速对照 */
.type-help-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 18px;
}
.type-help-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    transition: border-color .15s, transform .15s;
}
.type-help-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.type-help-card h5 { margin: 0 0 4px; font-size: 12px; color: #fff; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.type-help-card h5 .redeem-type-badge { font-weight: 600; }
.type-help-card p { margin: 0; font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
.type-help-card code { font-size: 10.5px; padding: 1px 4px; }

/* 兑换项列表：行高更宽松，json-cell 居中 */
.data-table.redeem-table th,
.data-table.redeem-table td { padding: 14px 14px; font-size: 13.5px; }
.data-table.redeem-table tbody tr { height: 64px; }
.data-table.redeem-table .col-id { width: 56px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.data-table.redeem-table .col-name { min-width: 160px; font-weight: 600; color: #fff; }
.data-table.redeem-table .col-cost { width: 110px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.data-table.redeem-table .col-stock,
.data-table.redeem-table .col-sort { width: 80px; text-align: center; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.data-table.redeem-table .col-status { width: 90px; }
.data-table.redeem-table .col-actions { width: 160px; white-space: nowrap; }
.data-table.redeem-table .col-actions .btn { margin-right: 6px; }

@media (max-width: 1100px) {
    .redeem-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .type-help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .redeem-settings-bar { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .redeem-form-grid { grid-template-columns: 1fr; }
    .type-help-grid { grid-template-columns: 1fr; }
}

/* ===================== 占位符速查（tags.php + enterprise_form.php） ===================== */
/* ============ 占位符速查面板 v2（2026-08-23 美化） ============ */
.placeholder-ref .ph-cat-block {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.04);
    transition: box-shadow .2s ease, transform .2s ease;
}
.placeholder-ref .ph-cat-block:hover {
    box-shadow: 0 8px 24px rgba(56,189,248,.12), 0 2px 6px rgba(0,0,0,.05);
}
.placeholder-ref .ph-cat-block > summary {
    cursor: pointer;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
    list-style: none;
    background: linear-gradient(135deg, rgba(56,189,248,.10), rgba(56,189,248,0));
    border-bottom: 1px solid var(--border);
    transition: background .2s ease;
    position: relative;
}
.placeholder-ref .ph-cat-block > summary::-webkit-details-marker { display: none; }
.placeholder-ref .ph-cat-block > summary::before {
    content: "";
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 30px; height: 30px;
    margin-right: 12px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    box-shadow: 0 4px 12px rgba(56,189,248,.30);
    transition: transform .25s ease;
    flex-shrink: 0;
}
/* 默认箭头（用 ::after） */
.placeholder-ref .ph-cat-block > summary::after {
    content: "▸";
    position: absolute;
    left: 28px; top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    transition: transform .25s ease;
    pointer-events: none;
}
.placeholder-ref .ph-cat-block[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
.placeholder-ref .ph-cat-block > summary:hover {
    background: linear-gradient(135deg, rgba(56,189,248,.16), rgba(56,189,248,.04));
}
.placeholder-ref .ph-cat-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--accent);
    letter-spacing: .3px;
    flex: 1;
    min-width: 0;
}
.placeholder-ref .ph-cat-count {
    font-size: 12px;
    color: var(--accent);
    background: rgba(56,189,248,.14);
    padding: 5px 12px;
    border-radius: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border: 1px solid rgba(56,189,248,.25);
}
/* 让不同分类用不同色 */
.placeholder-ref .ph-cat-block[data-cat="企业级"] > summary::before { background: linear-gradient(135deg, #8b5cf6, #6366f1); box-shadow: 0 4px 12px rgba(139,92,246,.30); }
.placeholder-ref .ph-cat-block[data-cat="企业级"] .ph-cat-name { color: #8b5cf6; }
.placeholder-ref .ph-cat-block[data-cat="企业级"] .ph-cat-count { color: #8b5cf6; background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.25); }

.placeholder-ref .ph-cat-block[data-cat="产品级（中文别名）"] > summary::before { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 4px 12px rgba(16,185,129,.30); }
.placeholder-ref .ph-cat-block[data-cat="产品级（中文别名）"] .ph-cat-name { color: #10b981; }
.placeholder-ref .ph-cat-block[data-cat="产品级（中文别名）"] .ph-cat-count { color: #10b981; background: rgba(16,185,129,.14); border-color: rgba(16,185,129,.25); }

.placeholder-ref .ph-cat-block[data-cat="产品级（英文原名）"] > summary::before { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 4px 12px rgba(245,158,11,.30); }
.placeholder-ref .ph-cat-block[data-cat="产品级（英文原名）"] .ph-cat-name { color: #f59e0b; }
.placeholder-ref .ph-cat-block[data-cat="产品级（英文原名）"] .ph-cat-count { color: #f59e0b; background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.25); }

.placeholder-ref .ph-cat-block[data-cat="联系人 / 系统"] > summary::before { background: linear-gradient(135deg, #ec4899, #f43f5e); box-shadow: 0 4px 12px rgba(236,72,153,.30); }
.placeholder-ref .ph-cat-block[data-cat="联系人 / 系统"] .ph-cat-name { color: #ec4899; }
.placeholder-ref .ph-cat-block[data-cat="联系人 / 系统"] .ph-cat-count { color: #ec4899; background: rgba(236,72,153,.14); border-color: rgba(236,72,153,.25); }

.placeholder-ref .ph-cat-grid {
    padding: 14px 18px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 10px 12px;
}

/* 单条占位符卡片 */
.placeholder-ref .ph-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}
.placeholder-ref .ph-item::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(56,189,248,.05), rgba(56,189,248,0));
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}
.placeholder-ref .ph-item:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(56,189,248,.15), 0 2px 4px rgba(0,0,0,.05);
    transform: translateY(-2px);
}
.placeholder-ref .ph-item:hover::before { opacity: 1; }
/* 各分类卡片左边色条 */
.placeholder-ref .ph-cat-block[data-cat="企业级"] .ph-item { border-left-color: #8b5cf6; }
.placeholder-ref .ph-cat-block[data-cat="企业级"] .ph-item:hover { border-color: #8b5cf6; box-shadow: 0 6px 18px rgba(139,92,246,.18), 0 2px 4px rgba(0,0,0,.05); }
.placeholder-ref .ph-cat-block[data-cat="产品级（中文别名）"] .ph-item { border-left-color: #10b981; }
.placeholder-ref .ph-cat-block[data-cat="产品级（中文别名）"] .ph-item:hover { border-color: #10b981; box-shadow: 0 6px 18px rgba(16,185,129,.18), 0 2px 4px rgba(0,0,0,.05); }
.placeholder-ref .ph-cat-block[data-cat="产品级（英文原名）"] .ph-item { border-left-color: #f59e0b; }
.placeholder-ref .ph-cat-block[data-cat="产品级（英文原名）"] .ph-item:hover { border-color: #f59e0b; box-shadow: 0 6px 18px rgba(245,158,11,.18), 0 2px 4px rgba(0,0,0,.05); }
.placeholder-ref .ph-cat-block[data-cat="联系人 / 系统"] .ph-item { border-left-color: #ec4899; }
.placeholder-ref .ph-cat-block[data-cat="联系人 / 系统"] .ph-item:hover { border-color: #ec4899; box-shadow: 0 6px 18px rgba(236,72,153,.18), 0 2px 4px rgba(0,0,0,.05); }

/* 占位符代码 chip — 重头戏 */
.placeholder-ref .ph-code {
    align-self: flex-start;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #f8fafc;
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .2px;
    user-select: all;
    transition: all .15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    position: relative;
    z-index: 1;
}
.placeholder-ref .ph-code.small { font-size: 12px; padding: 4px 10px; }
.placeholder-ref .ph-code:hover {
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 8px 20px rgba(56,189,248,.42);
}
.placeholder-ref .ph-code:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.placeholder-ref .ph-code:active { transform: translateY(0) scale(.98); }
/* 各分类的 chip hover 用对应色 */
.placeholder-ref .ph-cat-block[data-cat="企业级"] .ph-code:hover { background: linear-gradient(135deg, #8b5cf6, #6366f1); box-shadow: 0 8px 20px rgba(139,92,246,.42); }
.placeholder-ref .ph-cat-block[data-cat="产品级（中文别名）"] .ph-code:hover { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 8px 20px rgba(16,185,129,.42); }
.placeholder-ref .ph-cat-block[data-cat="产品级（英文原名）"] .ph-code:hover { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 8px 20px rgba(245,158,11,.42); color: #1e293b; }
.placeholder-ref .ph-cat-block[data-cat="联系人 / 系统"] .ph-code:hover { background: linear-gradient(135deg, #ec4899, #f43f5e); box-shadow: 0 8px 20px rgba(236,72,153,.42); }

.placeholder-ref .ph-desc {
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
    position: relative;
    z-index: 1;
}
.placeholder-ref .ph-sample {
    color: var(--text-secondary);
    font-size: 11.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    padding: 5px 10px;
    background: rgba(148,163,184,.10);
    border-radius: 6px;
    border-left: 2px solid rgba(148,163,184,.40);
    word-break: break-all;
    margin-top: 2px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* 搜索栏升级 */
.placeholder-ref .ph-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0 8px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--panel), rgba(56,189,248,.04));
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.placeholder-ref .ph-search-input-wrap {
    flex: 1;
    min-width: 240px;
    position: relative;
    display: flex;
    align-items: center;
}
.placeholder-ref .ph-search-input-wrap > svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
    z-index: 1;
}
.placeholder-ref .ph-search-input-wrap > input {
    width: 100%;
    padding: 9px 36px 9px 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
    background: var(--bg);
    color: var(--text);
    transition: all .15s ease;
}
.placeholder-ref .ph-search-input-wrap > input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--panel);
    box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}
.placeholder-ref .ph-search-input-wrap > input:focus + .ph-search-clear { opacity: 1; pointer-events: auto; }
.placeholder-ref .ph-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(148,163,184,.18);
    color: var(--muted);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all .15s ease;
}
.placeholder-ref .ph-search-clear:hover { background: rgba(239,68,68,.18); color: #ef4444; }
.placeholder-ref .ph-search-clear.visible { opacity: 1; pointer-events: auto; }
.placeholder-ref .ph-search .btn-mini {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600;
    background: var(--panel); color: var(--text);
    border: 1px solid var(--border);
    transition: all .15s ease;
}
.placeholder-ref .ph-search .btn-mini:hover {
    border-color: var(--accent); color: var(--accent);
    background: rgba(56,189,248,.06);
    transform: translateY(-1px);
}
.placeholder-ref .ph-search .btn-mini.btn-accent {
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    color: #fff; border-color: transparent;
    box-shadow: 0 3px 10px rgba(56,189,248,.28);
}
.placeholder-ref .ph-search .btn-mini.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(56,189,248,.38); }
.placeholder-ref .ph-search .btn-mini svg { width: 13px; height: 13px; }
.placeholder-ref .ph-search .ph-stat {
    font-size: 12px;
    color: var(--accent);
    background: rgba(56,189,248,.14);
    border: 1px solid rgba(56,189,248,.25);
    padding: 6px 14px;
    border-radius: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

/* 占位符速查顶部 hero 装饰 */
.placeholder-ref .ph-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}
.placeholder-ref .ph-hero-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(56,189,248,.32);
    flex-shrink: 0;
}
.placeholder-ref .ph-hero-icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.placeholder-ref .ph-hero-text { flex: 1; min-width: 0; }
.placeholder-ref .ph-hero-text h4 {
    margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--text);
    letter-spacing: .3px;
}
.placeholder-ref .ph-hero-text p { margin: 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.placeholder-ref .ph-hero-stat {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 14px;
    background: rgba(56,189,248,.10);
    border: 1px solid rgba(56,189,248,.30);
    font-size: 12px; font-weight: 700; color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* 详情折叠面板中的紧凑版（enterprise_form.php 提示用） */
.signature-tip-body .ph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 8px;
    margin: 8px 0 4px;
}
.signature-tip-body .ph-cat {
    background: var(--panel, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    padding: 8px 10px;
}
.signature-tip-body .ph-cat-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent, #3b82f6);
    margin-bottom: 6px;
}
.signature-tip-body .ph-cat .ph-code {
    display: inline-block;
    margin: 2px 4px 2px 0;
    cursor: pointer;
    transition: background .12s ease;
}
.signature-tip-body .ph-cat .ph-code:hover { background: var(--accent, #3b82f6); }

@media (max-width: 760px) {
    .placeholder-ref .ph-cat-grid,
    .placeholder-ref .ph-grid {
        grid-template-columns: 1fr;
    }
    .placeholder-ref .ph-search { flex-direction: column; align-items: stretch; }
    .placeholder-ref .ph-search .btn-mini { width: 100%; }
    .placeholder-ref .ph-search .ph-stat { margin-left: 0; text-align: center; }
    .placeholder-ref .ph-hero { flex-direction: column; align-items: flex-start; gap: 8px; }
    .placeholder-ref .ph-hero-stat { align-self: flex-start; }
}

/* ============================================================
 * 2026-08-23 客户归属 + 沟通行内操作（customer_detail / customers）
 * ============================================================ */
.info-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.text-self {
    color: var(--accent);
    font-style: normal;
}

/* 角色徽章 */
.role-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.2px;
    color: #fff;
    background: #64748b;
    vertical-align: middle;
}
.role-pill.role-admin       { background: linear-gradient(135deg, #6366f1, #4338ca); }
.role-pill.role-enterprise  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.role-pill.role-salesperson { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.role-pill.role-member      { background: linear-gradient(135deg, #10b981, #059669); }

/* 行内右侧操作按钮（不抢主按钮风格） */
.row-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 999px;
    background: var(--panel, #fff);
    color: var(--text, #1e293b);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    cursor: pointer;
    transition: all .15s ease;
    margin-left: 4px;
    white-space: nowrap;
}
.row-btn:hover {
    border-color: var(--accent, #3b82f6);
    color: var(--accent, #3b82f6);
    background: rgba(59,130,246,.06);
}
.row-btn:disabled {
    opacity: 0.5; cursor: not-allowed;
}
.row-btn-now { color: #10b981; border-color: rgba(16,185,129,.3); }
.row-btn-now:hover { background: rgba(16,185,129,.08); border-color: #10b981; color: #047857; }
.row-btn-custom { color: #6366f1; border-color: rgba(99,102,241,.3); }
.row-btn-custom:hover { background: rgba(99,102,241,.08); border-color: #6366f1; color: #4338ca; }
.row-btn-transfer { color: #f59e0b; border-color: rgba(245,158,11,.3); }
.row-btn-transfer:hover { background: rgba(245,158,11,.08); border-color: #f59e0b; color: #b45309; }

/* 列表中的归属列 */
.owner-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.owner-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Popover ===== */
.rsa-popover {
    width: 320px;
    max-width: calc(100vw - 16px);
    background: var(--panel, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(15,23,42,.18), 0 2px 8px rgba(15,23,42,.08);
    z-index: 9999;
    overflow: hidden;
}
.rsa-popover[hidden] { display: none; }
.rsa-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #eef0f4;
    font-size: 14px;
}
.rsa-popover-head b {
    font-size: 14px;
    color: var(--text, #1e293b);
}
.rsa-pop-close {
    border: none;
    background: transparent;
    color: var(--muted, #64748b);
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
}
.rsa-pop-close:hover { background: #f1f5f9; color: #475569; }
.rsa-popover-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rsa-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #64748b);
    margin-top: 6px;
}
.rsa-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    background: var(--bg, #f8fafc);
    color: var(--text, #1e293b);
    font-size: 13px;
}
.rsa-input:focus {
    outline: none;
    border-color: var(--accent, #3b82f6);
    background: var(--panel, #fff);
}
.rsa-textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    background: var(--bg, #f8fafc);
    color: var(--text, #1e293b);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 50px;
}
.rsa-textarea:focus {
    outline: none;
    border-color: var(--accent, #3b82f6);
    background: var(--panel, #fff);
}
.rsa-hint {
    margin: 0 0 4px;
    padding: 6px 10px;
    background: var(--bg, #f1f5f9);
    border-radius: 6px;
    font-size: 12px;
    color: var(--muted, #64748b);
}

/* ===== Popover 2.0 美化（2026-08-23 v2 品牌蓝扁平） ===== */
.rsa-popover {
    width: 380px;
    max-width: calc(100vw - 16px);
    border-radius: 12px;  /* 与 .cards 同圆角 */
    border: 1px solid #eef0f4;
    box-shadow:
        0 12px 32px rgba(15,23,42,.12),
        0 2px 6px rgba(15,23,42,.04);
    animation: rsa-pop-in .2s ease-out;
    position: relative;
    background: #ffffff;
}
/* 顶部不再放彩色渐变彩条（已与主体同色，靠 1px dashed 分隔） */
@keyframes rsa-pop-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rsa-pop-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px 12px;
    gap: 10px;
    border-bottom: 1px solid #eef0f4;   /* 与主体同：实色 1px（非 dashed） */
}
.rsa-pop-head-l {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.rsa-pop-ico {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 8px;                /* 与主站按钮圆角同（去 11px 大圆角） */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;         /* 加 1px 浅边，与 .stat-card 同语，避免"漂浮色块" */
}
.rsa-pop-ico.ico-blue {
    background: #ffffff;                /* 白底而非透明蓝，与主站面板同 */
    color: #2563eb;
    border-color: #dbeafe;              /* 浅蓝边 = 主题色细描边，与主站 badge 同 */
}
.rsa-pop-ico.ico-purple {
    background: #ffffff;
    color: #4f46e5;
    border-color: #e0e7ff;
}
.rsa-pop-ico svg {
    width: 20px; height: 20px;
    fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.rsa-pop-titles { flex: 1; min-width: 0; }
.rsa-pop-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;                     /* 与主站同色（非模糊 var(--text)） */
    line-height: 1.4;
}
.rsa-pop-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.4;
}
.rsa-pop-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    width: 28px; height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background .15s ease, color .15s ease;
    flex-shrink: 0;
}
.rsa-pop-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.rsa-pop-body {
    padding: 4px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 字段容器 */
.rsa-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rsa-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #64748b);
    margin: 0;
}
.rsa-field-label > span:first-child { flex: 1; }
.rsa-counter {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted, #94a3b8);
    letter-spacing: .3px;
    transition: color .15s ease;
}
.rsa-counter.warn { color: #f59e0b; font-weight: 600; }

/* 输入控件 — 与主站 .f-input 同语（圆角 8 + 1px 边 + focus 蓝光环） */
.rsa-input-lg {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 8px;
}
.rsa-popover .rsa-input,
.rsa-popover .rsa-textarea {
    background: #ffffff;
    border-color: #d1d5db;
    color: #0f172a;
}
.rsa-popover .rsa-input:focus,
.rsa-popover .rsa-textarea:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
.rsa-popover .rsa-textarea {
    line-height: 1.55;
    min-height: 72px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

/* 底部按钮栏 — 与主站按钮同语（实色分隔线、白底 footer） */
.rsa-popover-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    padding: 12px 16px;
    border-top: 1px solid #eef0f4;     /* 与主站同：实色 1px（非 dashed） */
    background: #ffffff;                /* 与 body 同色（非浅灰） */
}
.rsa-popover-foot .btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 8px;                 /* 与 .btn 同圆角 */
}
.btn-ico {
    width: 14px; height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* 快捷预设（沟通时间） — 改成"主站按钮语"：圆角 8 + 实色，非胶囊 */
.rsa-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.rsa-presets-label {
    font-size: 12px;
    color: #64748b;
    margin-right: 4px;
    font-weight: 500;
}
.rsa-preset-chip {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 8px;            /* 与主站按钮同圆角（去 999px 胶囊） */
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
    font-family: inherit;
    line-height: 1.5;
}
.rsa-preset-chip:hover {
    border-color: #3b82f6;
    color: #2563eb;
    background: rgba(59,130,246,.04);
}
.rsa-preset-chip.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    font-weight: 500;
}

/* 归属人对照条（切换归属） — 当前 → 目标 */
.rsa-owner-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;                         /* 去 6px 内边距，与卡片同无内边距 */
    background: #ffffff;                /* 与 body 同白（去浅灰底） */
    border-radius: 10px;
    border: none;                       /* 无外层边，靠内部卡片分隔，避免双层 border */
}
.rsa-owner-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;          /* 实色 1px（非 nested 下决定） */
    border-radius: 8px;
    min-width: 0;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.rsa-owner-card.rsa-owner-target {
    border-style: solid;                /* 默认也是实色 1px 灰边（去 dashed） */
    border-color: #e2e8f0;
    background: #ffffff;
}
.rsa-owner-card.rsa-owner-target.has-target {
    border-style: solid;                /* 选中后仍是实色（去 dashed） */
    border-color: #3b82f6;
    background: rgba(59,130,246,.04);
    box-shadow: 0 1px 4px rgba(59,130,246,.10);
}
.rsa-avatar {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 8px;                 /* 圆角方块（与 .stat-ico 同 8） */
    background: #94a3b8;                /* 主站灰底，与 .role-pill 灰同 */
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.rsa-avatar.avatar-ghost {
    background: #ffffff;                /* 白底（去透明，去 dashed 边） */
    color: #cbd5e1;
    border: 1px solid #e2e8f0;          /* 实色灰边，与未选中卡片同 */
    font-size: 16px;
}
.rsa-avatar.avatar-active {
    background: #3b82f6;                /* 主站品牌蓝（替换紫粉渐变） */
    color: #ffffff;
    box-shadow: none;
}
.rsa-owner-info { min-width: 0; flex: 1; }
.rsa-owner-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rsa-owner-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}
.rsa-arrow {
    flex-shrink: 0;
    color: #cbd5e1;
    width: 24px; height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .15s ease;
}
.rsa-popover.has-target .rsa-arrow { color: #3b82f6; }
.rsa-arrow svg {
    width: 14px; height: 14px;
    fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* 底部按钮栏样式见上方 Popover 2.0 段（约 2825 行） */

/* ===== Toast ===== */
.rsa-toast-host {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.rsa-toast {
    pointer-events: auto;
    background: var(--panel, #fff);
    color: var(--text, #1e293b);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 6px 22px rgba(15,23,42,.18);
    border-left: 4px solid var(--accent, #3b82f6);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity .2s ease, transform .25s ease;
}
.rsa-toast.rsa-toast-ok  { border-left-color: #10b981; }
.rsa-toast.rsa-toast-err { border-left-color: #ef4444; }
.rsa-toast.rsa-toast-out { opacity: 0; transform: translateY(-18px); }

@media (max-width: 540px) {
    .rsa-popover { width: calc(100vw - 24px); }
    .row-btn { padding: 2px 7px; font-size: 11px; }
    .role-pill { font-size: 10px; padding: 2px 6px; }
}

/* 信息表行内内容不挤压 */
.data-table.info-table tr td .info-value { gap: 6px; }
.data-table.info-table tr td .info-value .row-btn { margin-top: 0; }

/* ===================== 询盘管理（inquiries）美化 ===================== */
/* 状态徽章：与 dashboard / 跟进监控 同色卡，对齐种子数据 4 档 */
.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px; border-radius: 999px;
    font-size: 11.5px; line-height: 1.6; font-weight: 600;
    border: 1px solid transparent; white-space: nowrap;
    background: rgba(148,163,184,.12); color: #94a3b8; border-color: rgba(148,163,184,.28);
}
.status-badge::before {
    content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; opacity: .85;
}
.status-badge.status-pending  { background: rgba(56,189,248,.14); color: #38bdf8;  border-color: rgba(56,189,248,.35); } /* 待处理 蓝 */
.status-badge.status-following{ background: rgba(251,191,36,.14); color: #fbbf24;  border-color: rgba(251,191,36,.38); } /* 跟进中 琥珀 */
.status-badge.status-dealed   { background: rgba(34,197,94,.14);  color: #4ade80;  border-color: rgba(34,197,94,.38);  } /* 已成交 绿 */
.status-badge.status-invalid  { background: rgba(148,163,184,.18); color: #cbd5e1; border-color: rgba(148,163,184,.34); text-decoration: line-through; text-decoration-color: rgba(148,163,184,.55); } /* 无效 灰 */

/* 询盘表单弹窗 hero 区（在 .pf-body 顶部，pre-form 标题说明） */
.inquiry-hero {
    display: flex; align-items: center; gap: 14px;
    padding: 4px 2px 16px; margin-bottom: 4px;
    border-bottom: 1px dashed var(--border);
}
.inquiry-hero .ih-ico {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(56,189,248,.18), rgba(14,165,233,.10));
    border: 1px solid rgba(56,189,248,.34);
    color: #38bdf8;
}
.inquiry-hero .ih-ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.inquiry-hero .ih-title  { margin: 0; font-size: 16px; font-weight: 700; color: #fff; line-height: 1.2; }
.inquiry-hero .ih-sub    { margin: 4px 0 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }

/* 面包屑（用于 inquiries/inquiry_detail/inquiry_form 顶部） */
.breadcrumb-trail {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    padding: 4px 0 12px; font-size: 12.5px; color: var(--text-secondary);
}
.breadcrumb-trail a {
    color: var(--text-secondary); text-decoration: none;
    padding: 3px 9px; border-radius: 7px; transition: background .15s, color .15s;
}
.breadcrumb-trail a:hover { background: var(--surface-hover); color: #fff; }
.breadcrumb-trail .bc-sep   { color: var(--text-muted); opacity: .55; padding: 0 1px; }
.breadcrumb-trail .bc-cur   { color: var(--accent); background: rgba(56,189,248,.12); padding: 3px 10px; border-radius: 7px; font-weight: 600; }

/* 表单字段提示文字（嵌在 label 里或独立显示） */
.form-hint {
    display: inline-block; margin-top: 4px;
    font-size: 11.5px; color: var(--text-muted); line-height: 1.45;
}
.form-hint .req { color: #f87171; font-weight: 700; }

/* 联系方式「至少一项」提示与校验错误（新增客户 / 新增询盘共用） */
.contact-req-hint {
    grid-column: 1 / -1;
    margin: 2px 0 6px;
    padding: 7px 11px;
    background: var(--accent-soft, rgba(56, 132, 255, 0.08));
    border: 1px solid var(--accent-border, rgba(56, 132, 255, 0.25));
    border-radius: 8px;
    font-size: 11.5px; color: var(--text-secondary); line-height: 1.5;
}
.contact-err {
    grid-column: 1 / -1;
    margin: 2px 0 4px;
    padding: 7px 11px;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.5);
    border-radius: 8px;
    font-size: 12px; color: #f87171; font-weight: 600;
}

/* 状态选项 dot 预览（用于 form 内的 select 旁说明） */
.status-legend {
    display: flex; flex-wrap: wrap; gap: 6px 12px;
    margin-top: 6px; font-size: 11.5px; color: var(--text-muted);
    align-items: center;
}
.status-legend .sl-item { display: inline-flex; align-items: center; gap: 5px; }

/* 询盘 KPI 4 卡（轻量版 dashboard 风格） */
.inquiry-kpis {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
    margin: 4px 0 18px;
}
.inquiry-kpis .ik-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform .15s, border-color .15s;
}
.inquiry-kpis .ik-card:hover { transform: translateY(-1px); border-color: var(--accent); }
.inquiry-kpis .ik-ico {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.inquiry-kpis .ik-ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.inquiry-kpis .ik-meta { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; min-width: 0; }
.inquiry-kpis .ik-num  { font-size: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.inquiry-kpis .ik-lbl  { font-size: 12px; color: var(--text-secondary); }
.inquiry-kpis .ik-blue   { background: linear-gradient(135deg, rgba(56,189,248,.18), rgba(14,165,233,.06)); color: #38bdf8; }
.inquiry-kpis .ik-amber  { background: linear-gradient(135deg, rgba(251,191,36,.18), rgba(245,158,11,.06)); color: #fbbf24; }
.inquiry-kpis .ik-green  { background: linear-gradient(135deg, rgba(34,197,94,.18),  rgba(16,185,129,.06)); color: #4ade80; }
.inquiry-kpis .ik-violet { background: linear-gradient(135deg, rgba(167,139,250,.18), rgba(139,92,246,.06)); color: #a78bfa; }

/* 统计卡可点击：点击筛选对应状态/范围，再次点击取消筛选 */
.inquiry-kpis .ik-card.ik-card-clickable { text-decoration: none; cursor: pointer; }
.inquiry-kpis .ik-card.ik-card-clickable:hover { border-color: var(--accent); }
.inquiry-kpis .ik-card.ik-card-active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(56,189,248,.16), rgba(14,165,233,.05));
    box-shadow: inset 0 0 0 1px rgba(56,189,248,.45), var(--shadow);
}
.inquiry-kpis .ik-card.ik-card-active .ik-num { color: #0ea5e9; }
.inquiry-kpis .ik-card.ik-card-active .ik-lbl { color: var(--accent); }

/* 询盘列表空态插画 */
.inquiry-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 56px 24px; text-align: center; gap: 10px;
    color: var(--text-muted);
}
.inquiry-empty .ie-art {
    width: 88px; height: 88px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(56,189,248,.16), rgba(14,165,233,.03));
    border: 1px solid rgba(56,189,248,.34);
    display: inline-flex; align-items: center; justify-content: center; color: #38bdf8;
}
.inquiry-empty .ie-art svg { width: 42px; height: 42px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.inquiry-empty .ie-title  { font-size: 15px; color: #fff; font-weight: 600; margin-top: 6px; }
.inquiry-empty .ie-desc   { font-size: 12.5px; color: var(--text-secondary); max-width: 360px; }
.inquiry-empty .ie-cta    { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }

/* 询盘列表表格：行高更宽松、关联客户加粗 */
.data-table.inquiry-table th,
.data-table.inquiry-table td { padding: 13px 14px; font-size: 13.5px; }
.data-table.inquiry-table tbody tr { height: 60px; }
.data-table.inquiry-table .col-customer { min-width: 140px; font-weight: 600; color: #fff; }
.data-table.inquiry-table .col-status   { width: 110px; }
.data-table.inquiry-table .col-amount   { width: 110px; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
.data-table.inquiry-table .col-follow   { width: 110px; color: var(--text-secondary); }
.data-table.inquiry-table .col-actions  { width: 220px; white-space: nowrap; }
.data-table.inquiry-table .col-actions .mini { margin-right: 6px; }
.data-table.inquiry-table .inquiry-content { max-width: 320px; }
.data-table.inquiry-table .inquiry-content a { color: var(--accent); text-decoration: none; }
.data-table.inquiry-table .inquiry-content a:hover { text-decoration: underline; }

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

/* ============================================================================
   跟进监控 v3（2026-08-23）：可点击 KPI 卡 + 按跟进人汇总面板
   注意：未修改 .stat-ico 的 width/height（用户硬规则）
   ============================================================================ */

/* 4 张 KPI 卡：可点击筛选 */
.cards .stat-card.stat-card-clickable { text-decoration: none; cursor: pointer; }
.cards .stat-card.stat-card-clickable:hover { border-color: var(--accent); }
.cards .stat-card.stat-card-active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(56,189,248,.14), rgba(14,165,233,.04));
    box-shadow: inset 0 0 0 1px rgba(56,189,248,.4), var(--shadow);
}
.cards .stat-card.stat-card-active .stat-num { color: #0ea5e9; }
.cards .stat-card.stat-card-active .stat-label { color: var(--accent); }

/* 筛选条：日期范围内联（from ~ to） */
.fm-follow .fm-inline { display: inline-flex; align-items: center; gap: 6px; }
.fm-follow .fm-sep { color: var(--text-muted); }
.fm-follow input[type="date"].f-input { min-width: 140px; }

/* 按跟进人汇总面板 */
.follow-user-summary { border-color: var(--accent); }
.follow-user-summary .panel-head { padding-right: 14px; }
.follow-user-summary .panel-close {
    width: 28px; height: 28px; line-height: 24px; text-align: center;
    border-radius: 8px; font-size: 18px; color: var(--text-secondary);
    text-decoration: none; border: 1px solid var(--border); background: var(--surface-hover);
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.follow-user-summary .panel-close:hover {
    color: #fff; border-color: var(--accent); background: var(--accent);
}
.follow-user-table { font-size: 13px; }
.follow-user-table thead th { font-weight: 600; }
.follow-user-table tbody tr:nth-child(odd) { background: rgba(56,189,248,.04); }
.follow-user-table tbody td { text-align: left; }
.follow-user-table tbody td:not(:first-child) { font-variant-numeric: tabular-nums; }
.follow-user-table .text-danger  { color: #fb7185; font-weight: 600; }
.follow-user-table .text-warning { color: #fcd34d; font-weight: 600; }
.follow-user-table tbody td:first-child { font-weight: 600; color: #fff; }

/* ============ v2.0.9: 系统更新自动感知徽标 ============ */
/* 顶栏「系统更新」徽标：有可用更新时由 common.js 填充并显示 */
.update-indicator[hidden]{display:none}
.update-indicator:not([hidden]){display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;background:linear-gradient(135deg,rgba(56,189,248,.18),rgba(99,102,241,.14));border:1px solid rgba(56,189,248,.4);color:#38bdf8;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap;transition:filter .15s}
.update-indicator:hover{filter:brightness(1.15)}
.update-indicator .ud-dot{width:7px;height:7px;border-radius:50%;background:#38bdf8;animation:udpulse 1.8s infinite}
@keyframes udpulse{0%{box-shadow:0 0 0 0 rgba(56,189,248,.5)}70%{box-shadow:0 0 0 7px rgba(56,189,248,0)}100%{box-shadow:0 0 0 0 rgba(56,189,248,0)}}
/* v2.1.1: 强制推送模式（管理员从 renewal-server 后台发起推送） */
.update-indicator.force{background:linear-gradient(135deg,rgba(239,68,68,.20),rgba(220,38,38,.12));border-color:rgba(239,68,68,.5);color:#fca5a5}
.update-indicator .ud-dot-force{width:7px;height:7px;border-radius:50%;background:#ef4444;animation:udpulse-force 1.4s infinite}
@keyframes udpulse-force{0%{box-shadow:0 0 0 0 rgba(239,68,68,.6)}70%{box-shadow:0 0 0 8px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}
