/* =====================================================================
   元枢科技 · 设计系统
   参考：现代 SaaS 后台（Stripe / Linear / Ant Design Pro）设计规范
   要点：4px 间距栅格、语义化色板、48px 行高、等宽数字、1px 分隔线
   ===================================================================== */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --border: #e6e9ef;
  --border-strong: #d3d8e0;
  --text: #101828;
  --text-2: #475467;
  --muted: #7c8698;
  --accent: #2563eb;
  --accent-weak: #eff4ff;
  --accent-2: #1d4ed8;
  --green: #12b76a;
  --green-weak: #ecfdf3;
  --amber: #f79009;
  --amber-weak: #fffaeb;
  --red: #f04438;
  --red-weak: #fef3f2;
  --violet: #7a5af8;
  --violet-weak: #f4f3ff;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --side-w: 232px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
.num, .money, td.num, td.money, th.num, th.money { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 登录 */
.auth { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-aside {
  background: linear-gradient(150deg, #0f172a 0%, #16234a 55%, #1e3a8a 100%);
  color: #fff; padding: 64px 60px; display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .3px; }
.auth-aside h1 { font-size: 34px; line-height: 1.35; font-weight: 650; letter-spacing: -.5px; }
.auth-aside p { color: #b9c6e4; max-width: 460px; font-size: 15px; line-height: 1.7; }
.auth-points { list-style: none; display: grid; gap: 10px; margin-top: 8px; }
.auth-points li { color: #cfdaf3; font-size: 13.5px; padding-left: 22px; position: relative; }
.auth-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: #60a5fa; font-weight: 700;
}
.auth-panel { display: flex; align-items: center; justify-content: center; background: var(--surface); }
#login-form { width: 340px; }
#login-form h2 { font-size: 24px; letter-spacing: -.3px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 6px 0 26px; }
#login-form label { display: block; font-size: 12.5px; color: var(--text-2); margin: 16px 0 6px; font-weight: 500; }
#login-form input {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 14px; outline: none; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
#login-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
#login-form button {
  width: 100%; height: 44px; margin-top: 24px; border: 0; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 500; letter-spacing: 2px;
  cursor: pointer; transition: background .15s;
}
#login-form button:hover { background: var(--accent-2); }
#login-form button:disabled { opacity: .6; cursor: default; }
.auth-tip { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }
.auth-tip.err { color: var(--red); }
.logo {
  width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
}
.logo.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }

/* ---------------------------------------------------------------- 骨架 */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--side-w); flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-head {
  height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 18px;
  border-bottom: 1px solid var(--border); font-weight: 600; letter-spacing: .2px;
}
.brand-text { font-size: 15px; }
/* 侧边栏：一级分组（图标+粗体+深底）与二级菜单（小字+浅色）形成层级 */
.nav { flex: 1; overflow-y: auto; padding: 10px 8px 16px; background: #f4f6fa; }
.nav-group { margin-bottom: 3px; }
.nav-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: #101828; padding: 8px 10px; border-radius: 7px;
  display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none;
  transition: background .12s, color .12s;
}
.nav-title:hover { background: #e6ebf3; color: #0b1220; }
.nav-group:not(.collapsed) > .nav-title { background: #e3e9f2; color: #0b1220; }
.nav-title .chev { font-size: 9px; transition: transform .15s; opacity: .5; }
.nav-group.collapsed .nav-title .chev { transform: rotate(-90deg); }
.nav-title .nav-gico {
  width: 18px; text-align: center; font-size: 13px; color: #475467; opacity: .95;
  flex-shrink: 0;
}
.nav-group:not(.collapsed) > .nav-title .nav-gico { color: #1d4ed8; }
.nav-title .nav-gtitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-title .nav-count {
  margin-left: auto; font-size: 10px; font-weight: 700; color: #475467; background: #fff;
  border: 1px solid #d7dee9; border-radius: 999px; padding: 0 6px; line-height: 15px; letter-spacing: 0;
}
.nav-group:not(.collapsed) > .nav-title .nav-count { background: #fff; border-color: #c3cddd; }
.nav-group.collapsed .nav-links { display: none; }
.nav-links {
  padding: 2px 0 6px 10px; margin: 2px 0 0 12px; border-left: 1px solid #dde4ee;
}
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 5px;
  color: #475467; font-size: 12px; font-weight: 400; cursor: pointer; margin-bottom: 1px;
  transition: background .12s, color .12s;
}
.nav a:hover { background: #e8edf5; color: #101828; }
.nav a.active {
  background: #dbe6fb; color: #1d4ed8; font-weight: 600;
  box-shadow: inset 2px 0 0 #2563eb;
}
.nav a .ico { width: 15px; text-align: center; opacity: .65; font-size: 12px; }
.nav a.active .ico { opacity: 1; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: grid; gap: 4px; }
.stat { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.stat b { color: var(--text-2); font-weight: 600; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 54px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 16px; position: sticky; top: 0; z-index: 20;
}
.topbar .search-box { width: 230px; }
.menu-toggle { display: none; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.crumbs b { color: var(--text); font-weight: 600; font-size: 14.5px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search-box {
  display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); width: 280px;
}
.search-box input { border: 0; background: transparent; outline: none; flex: 1; font-size: 13px; color: var(--text); }
.search-box kbd {
  font-size: 10.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 4px; background: #fff;
}
.search-ico { color: var(--muted); font-size: 15px; }
.env-chip {
  font-size: 11.5px; color: var(--green); background: var(--green-weak);
  border: 1px solid #d1fadf; border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.user-menu { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-weak); color: var(--accent-2);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px;
}
.user-info { display: grid; line-height: 1.25; }
.user-info b { font-size: 13px; font-weight: 600; }
.user-info span { font-size: 11px; color: var(--muted); }
.icon-btn {
  width: 32px; height: 32px; border: 1px solid var(--border); background: #fff; border-radius: 8px;
  cursor: pointer; color: var(--text-2); font-size: 14px;
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }

.view { padding: 20px 22px 48px; flex: 1; }

/* ---------------------------------------------------------------- 通用 */
/* 页面头部：标题和页签重复，直接隐掉，只留一句说明 + 操作按钮 */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.page-head h1 { display: none; }
.page-head p { color: var(--text-2); font-size: 13px; margin: 0; }
.page-actions { display: flex; gap: 8px; }

.btn {
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--accent-2); }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #d92d20; }
.btn.ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn.ghost:hover { background: #f2f4f7; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 14px; font-weight: 600; }
.card-head .hint { font-size: 12px; color: var(--muted); }
.card-body { padding: 16px 18px; }

/* ---------------------------------------------------------------- 工作台 */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.kpi .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 28px; font-weight: 650; letter-spacing: -.8px; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.kpi .delta { font-size: 12px; display: flex; gap: 6px; align-items: center; }
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }
.delta-flat { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.chart-svg { width: 100%; height: 220px; display: block; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); padding: 8px 18px 14px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f2f4f7; }
.rank-row:last-child { border-bottom: 0; }
.rank-row .idx {
  width: 22px; height: 22px; border-radius: 6px; background: #f2f4f7; color: var(--muted);
  font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.rank-row:nth-child(1) .idx { background: #fef3c7; color: #b45309; }
.rank-row:nth-child(2) .idx { background: #e0e7ff; color: #4338ca; }
.rank-row:nth-child(3) .idx { background: #d1fae5; color: #047857; }
.rank-row .name { flex: 1; font-size: 13px; }
.rank-row .name span { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.rank-row .val { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

.todo-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f2f4f7; font-size: 13px; }
.todo-row:last-child { border-bottom: 0; }
.todo-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }
.todo-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-row .d { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 列表页 */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.field { display: flex; align-items: center; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.input, .select {
  height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 13px; background: #fff; color: var(--text); outline: none; min-width: 120px;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.input.search { min-width: 240px; padding-left: 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237c8698' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 9px center no-repeat; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px 0 10px;
  background: var(--accent-weak); color: var(--accent-2); border-radius: 999px; font-size: 12px;
}
.chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; }

.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); background: var(--surface-2);
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.data th.num, table.data td.num { text-align: right; }
table.data td { padding: 0 14px; height: 48px; border-bottom: 1px solid #f2f4f7; white-space: nowrap; color: var(--text-2); }
table.data tbody tr:hover td { background: #fbfcfe; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.name { color: var(--text); font-weight: 500; }
/* 第一列冻结：要避开左侧复选框列（约 40px） */
table.data th.sticky, table.data td.sticky {
  position: sticky; left: 40px; background: var(--surface); z-index: 1;
}
table.data th.sticky { z-index: 3; background: var(--surface-2); }
table.data tbody tr:hover td.sticky { background: #fbfcfe; }
table.data td.actions { text-align: right; }
.row-actions { display: inline-flex; gap: 4px; opacity: 0; transition: opacity .12s; }
tr:hover .row-actions { opacity: 1; }
.link { color: var(--accent); cursor: pointer; }
.link:hover { text-decoration: underline; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--green-weak); color: #067647; }
.b-blue { background: var(--accent-weak); color: var(--accent-2); }
.b-amber { background: var(--amber-weak); color: #b54708; }
.b-red { background: var(--red-weak); color: #b42318; }
.b-gray { background: #f2f4f7; color: #475467; }
.b-violet { background: var(--violet-weak); color: #5925dc; }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; border-top: 1px solid var(--border); }
.pager .btn, .pager .select { height: 26px !important; font-size: 12px !important; }
.pager .info { font-size: 12.5px; color: var(--muted); }
.pager .info b { color: var(--text-2); font-weight: 600; }
.pager-btns { display: flex; gap: 8px; align-items: center; }
.page-size { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 30px; opacity: .5; }
.empty h4 { margin: 10px 0 4px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.empty p { font-size: 12.5px; margin-bottom: 14px; }

.skeleton-row td { padding: 0 14px; height: 48px; }
.sk { height: 12px; border-radius: 4px; background: linear-gradient(90deg, #eef1f5 25%, #f7f9fb 40%, #eef1f5 55%); background-size: 300% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------------------------------------------------------- 抽屉 */
.drawer { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 80; display: flex; justify-content: flex-end; }
.drawer-panel {
  width: 720px; max-width: 94vw; background: var(--surface); height: 100%; overflow-y: auto;
  box-shadow: var(--shadow-lg); animation: slidein .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.drawer-head .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer-head h2 { font-size: 18px; letter-spacing: -.3px; }
.drawer-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.drawer-body { padding: 18px 24px 40px; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin: 0 -24px; padding: 0 24px; }
.tab { padding: 10px 0; font-size: 13.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 600; }
.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; padding: 18px 0; }
.kv { min-width: 0; }
.kv span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.kv b { font-size: 13.5px; font-weight: 500; word-break: break-all; }
.kv .badge { width: max-content; }
.section { margin-top: 18px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-title h4 { font-size: 13.5px; font-weight: 600; }
.mini-table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.mini-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mini-table td { padding: 9px 10px; border-bottom: 1px solid #f2f4f7; color: var(--text-2); }
.mini-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.timeline { list-style: none; padding-left: 16px; border-left: 2px solid #eaecf0; }
.timeline li { position: relative; padding: 0 0 14px 6px; font-size: 12.5px; color: var(--text-2); }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #d0d5dd; border: 2px solid #fff; }
.timeline li.contract::before { background: var(--accent); }
.timeline li.receipt::before { background: var(--green); }
.timeline time { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 400; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-panel { background: var(--surface); border-radius: 12px; width: 760px; max-width: 96vw; max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
@keyframes pop { from { transform: scale(.98); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.form-group { margin-bottom: 18px; }
.form-group > .gtitle { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; padding-left: 8px; border-left: 3px solid var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-item { display: grid; gap: 5px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12px; color: var(--text-2); display: block; margin-bottom: 4px; }
.form-item label .req { color: var(--red); margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 13px; outline: none; background: #fff; color: var(--text);
}
.form-item textarea { height: 72px; padding: 8px 10px; resize: vertical; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.form-item .err { color: var(--red); font-size: 11.5px; }

/* ---------------------------------------------------------------- 提示 */
/* 提示：显示在屏幕正中间，一眼能看到 */
/* 提示条：多邻国风格——粗圆角 + 立体底边 + 回弹动画 */
/* ---------- 提示条：随主题变化 ---------- */
/* 基础：极简（默认）——白底卡片，克制、无音效、无吉祥物 */
.toast {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--text);
  padding: 13px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 500; letter-spacing: 0;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
  z-index: 900; max-width: min(560px, 84vw); line-height: 1.5;
  pointer-events: none;
  animation: toast-fade .16s ease;
}
.toast .toast-text { min-width: 0; }
.toast.err { border-color: #fecdca; background: #fef3f2; color: #b42318; }
.toast.ok { border-color: #d1e2ff; }
@keyframes toast-fade {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 多邻国主题：橘色立体卡片 + 猫头鹰（音效由 JS 控制） */
html[data-theme="duo"] .toast {
  background: var(--duo-main); color: #fff;
  padding: 16px 26px 16px 16px; border-radius: 18px;
  font-size: 16px; font-weight: 900; letter-spacing: .3px;
  border: 0;
  box-shadow: 0 7px 0 var(--duo-dark), 0 16px 32px var(--duo-shadow-3);
  text-shadow: 0 1px 2px rgba(120, 60, 0, .25);
  animation: duo-pop .34s cubic-bezier(.34, 1.56, .64, 1);
}
html[data-theme="duo"] .toast, html[data-theme="duo"] .toast * { color: #fff !important; }
html[data-theme="duo"] .toast-text { font-weight: 900; }
html[data-theme="duo"] .toast.err {
  background: #ff4b4b;
  box-shadow: 0 7px 0 #d33131, 0 16px 32px rgba(255, 75, 75, .26);
  animation: duo-shake .4s cubic-bezier(.36, .07, .19, .97);
}
html[data-theme="duo"] .toast.err .toast-owl ellipse { fill: #ff4b4b !important; }

/* 商务主题：深色描边、方一点 */
html[data-theme="pro"] .toast { border-radius: 6px; box-shadow: 0 8px 20px rgba(11,18,32,.16); }

.toast-owl { flex: none; width: 40px; height: 40px; margin-left: -4px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.12)); }

@keyframes duo-pop {
  0%   { transform: translate(-50%, -50%) scale(.7); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.04); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes duo-shake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0); }
  20% { transform: translate(calc(-50% - 6px), -50%) rotate(-1.5deg); }
  40% { transform: translate(calc(-50% + 6px), -50%) rotate(1.5deg); }
  60% { transform: translate(calc(-50% - 4px), -50%) rotate(-1deg); }
  80% { transform: translate(calc(-50% + 4px), -50%) rotate(1deg); }
}

@keyframes duo-pop {
  0%   { transform: translate(-50%, -50%) scale(.7); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.04); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes duo-shake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0); }
  20% { transform: translate(calc(-50% - 6px), -50%) rotate(-1.5deg); }
  40% { transform: translate(calc(-50% + 6px), -50%) rotate(1.5deg); }
  60% { transform: translate(calc(-50% - 4px), -50%) rotate(-1deg); }
  80% { transform: translate(calc(-50% + 4px), -50%) rotate(1deg); }
}}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .search-box { width: 200px; }
  .env-chip { display: none; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .kv-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}




.kpi.clickable { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi.clickable:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi .label .src {
  font-style: normal; font-size: 10.5px; color: var(--accent-2); background: var(--accent-weak);
  border-radius: 4px; padding: 1px 5px; margin-left: 4px;
}
.kpi .formula { font-size: 11.5px; color: var(--muted); margin-top: 6px; border-top: 1px dashed var(--border); padding-top: 6px; }


/* ================= 顶部页签 ================= */
.tabbar {
  display: flex; align-items: center; gap: 4px; padding: 0;
  height: 34px; background: transparent; border-bottom: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  flex: 1; min-width: 0;
}
.tabbar::-webkit-scrollbar { display: none; }
.tab-item {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer;
  white-space: nowrap; border: 1px solid transparent; flex-shrink: 0;
}
.tab-item:hover { background: #f2f4f7; }
.tab-item.active { background: var(--accent-weak); color: var(--accent-2); border-color: #d8e2fd; font-weight: 600; }
.tab-ico { font-size: 11px; opacity: .8; }
.tab-x {
  font-size: 10px; line-height: 1; width: 14px; height: 14px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.tab-x:hover { background: #e4e7ec; color: var(--text); }

/* ================= 抽屉栈 ================= */
.drawer-stack { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
/* 明细/表单：居中大弹窗（原来是右侧抽屉，信息铺不开） */
.dlayer {
  position: fixed; inset: 0; pointer-events: auto;
  display: flex; align-items: stretch; justify-content: flex-end;
}
.dlayer .dmask {
  position: absolute; inset: 0; background: rgba(16, 24, 40, .45);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
/* 详情/表单：右侧滑出，撑到几乎满屏，左边只留一条缝 */
.dlayer .dpanel {
  position: relative; width: calc(100vw - 56px); max-width: min(calc(100vw - 56px), 1800px);
  height: 100vh; max-height: 100vh;
  background: var(--surface); border-radius: 14px 0 0 0; overflow: hidden;
  box-shadow: -18px 0 50px rgba(16, 24, 40, .22);
  display: flex; flex-direction: column;
  animation: dpanel-slide .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes dpanel-slide {
  from { transform: translateX(32px); opacity: .7; }
  to { transform: none; opacity: 1; }
}
/* 叠层时上一层轻微缩小下移，形成层次 */
.dlayer .dpanel.is-covered { transform: translateX(-18px) scale(.99); opacity: .95; }
.dhead {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.dhead-text h2 { font-size: 17px; letter-spacing: -.3px; }
.dhead-text .dsub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.dhead .btn, .dhead .icon-btn { flex-shrink: 0; }
.dbody { padding: 16px 22px 28px; overflow-y: auto; flex: 1; }
.dfoot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px;
  border-top: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}
.dtabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin: -4px 0 16px; }
.dtabs .tab { padding: 9px 0; font-size: 13.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dtabs .tab.active { color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 600; }



/* ================= 通知铃铛 ================= */
.bell-wrap { position: relative; }
#bell { position: relative; font-size: 14px; }
.bell-badge {
  position: absolute; top: -4px; right: -4px; min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 999px; font-size: 10px; line-height: 15px; text-align: center;
}
.bell-panel {
  position: absolute; right: 0; top: 40px; width: 320px; max-height: 420px; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 60;
}
.bell-head { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; }
.bell-head button { border: 0; background: none; color: var(--accent); font-size: 12px; cursor: pointer; }
.bell-item { padding: 10px 14px; border-bottom: 1px solid #f2f4f7; cursor: pointer; }
.bell-item:hover { background: #f9fafb; }
.bell-item .t { font-size: 13px; color: var(--text); }
.bell-item .b { font-size: 12px; color: var(--muted); margin-top: 3px; }
.bell-item.unread { background: #f5f8ff; }

/* ================= 批量操作条 ================= */
.bulk-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin-bottom: 10px;
  background: var(--accent-weak); border: 1px solid #d8e2fd; border-radius: 8px; font-size: 13px; color: var(--accent-2);
}
.bulk-bar b { font-weight: 600; }
.bulk-bar .spacer2 { flex: 1; }
table.data td.sel, table.data th.sel { width: 38px; text-align: center; padding-right: 0; }


/* ================= 手机端适配 ================= */
@media (max-width: 900px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .crumbs { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .search-box { width: 150px; }
  .view { padding: 16px 14px 40px; }
  .dlayer .dpanel { width: 100% !important; max-width: 100vw; height: 100vh; border-radius: 0; }
  .dlayer .dpanel.is-covered { transform: scale(.98); }
  .dhead { padding: 14px 16px 12px; }
  .dbody { padding: 14px 16px 24px; }
  .dfoot { padding: 10px 16px; }
  .card-body { overflow-x: auto; }
  .bulk-bar { flex-wrap: wrap; }
  .level-row { flex-wrap: wrap; row-gap: 6px; }
  .dtabs { overflow-x: auto; }
  .page-head { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .search-box { display: none; }
  .user-info { display: none; }
  .env-chip { display: none; }
  .top-actions { gap: 8px; }
  .view { padding: 14px 12px 36px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head h1 { font-size: 18px; }
  .page-actions { justify-content: flex-end; flex-wrap: wrap; }
  .kpi-grid { grid-template-columns: 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 24px; }
  .toolbar { gap: 8px; }
  .toolbar .input.search { min-width: 0; width: 100%; }
  .toolbar .select { min-width: 0; flex: 1; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .rank-row .name span { display: none; }
  .bell-panel { width: calc(100vw - 24px); right: -10px; }
  .tabbar { padding: 0 8px; }
  .table-scroll { -webkit-overflow-scrolling: touch; }
  .mini-table { white-space: nowrap; }
  .kv-grid { grid-template-columns: 1fr 1fr; }
}



/* =====================================================================
   第 1 期 · 首页 / 16 板块导航 样式
   ===================================================================== */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 16px; align-items: start; }

/* ---------- 8 项经营指标 ---------- */
.kpi2-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi2 {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px 14px; cursor: pointer; transition: .16s ease;
}
.kpi2:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kpi2-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi2-label { font-size: 13px; color: var(--text-2); }
.kpi2-ico {
  width: 30px; height: 30px; border-radius: 8px; font-style: normal; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.t-amber  { background: #fff6e5; color: #d97706; }
.t-rose   { background: #fef3f2; color: #e04b3a; }
.t-green  { background: #ecfdf3; color: #079455; }
.t-blue   { background: #eff4ff; color: #2563eb; }
.t-violet { background: #f4f3ff; color: #7a5af8; }
.kpi2-val { font-size: 25px; font-weight: 650; letter-spacing: -.02em; margin: 9px 0 5px; font-variant-numeric: tabular-nums; }
.kpi2-val small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.kpi2-sub { font-size: 12px; color: var(--muted); }

/* ---------- 收支图 ---------- */
.chart-card .card-head { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.chart-card h3 { font-size: 14px; font-weight: 600; margin: 0; }
.chart-tabs { display: flex; gap: 2px; background: var(--bg); padding: 2px; border-radius: 8px; }
.chart-tab { border: 0; background: transparent; padding: 5px 13px; font-size: 12px; color: var(--text-2); border-radius: 6px; cursor: pointer; }
.chart-tab.on { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm); }
.chart-card .link { margin-left: auto; font-size: 12px; color: var(--accent); cursor: pointer; }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lg-unpaid { background: #bfd3f8; }
.lg-paid { background: #2563eb; }
.lg-line { background: #f79009; border-radius: 50%; }
.chart-wrap { padding: 4px 8px 12px; }

/* ---------- 待办中心 ---------- */
.todo-card { overflow: hidden; }
.todo-card .card-head { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.todo-card h3 { font-size: 14px; font-weight: 600; margin: 0; }
.todo-tiles { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.todo-tile { padding: 13px 8px 11px; text-align: center; cursor: pointer; border-bottom: 2px solid transparent; }
.todo-tile:hover { background: var(--surface-2); }
.todo-tile.on { border-bottom-color: var(--amber); background: var(--amber-weak); }
.todo-tile-label { font-size: 12px; color: var(--text-2); }
.todo-tile-num { font-size: 19px; font-weight: 650; margin-top: 5px; font-variant-numeric: tabular-nums; }
.todo-body { padding: 4px 0 8px; }
.todo-item { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px; color: var(--text); text-decoration: none; cursor: pointer; }
.todo-item:hover { background: var(--surface-2); }
.todo-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); flex: none; }
.todo-name { flex: 1; }
.todo-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }

/* ---------- 时间维度 ---------- */
.seg-tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.seg-tab { border: 0; background: transparent; padding: 6px 14px; font-size: 12.5px; color: var(--text-2); border-radius: 6px; cursor: pointer; }
.seg-tab.on { background: var(--accent-weak); color: var(--accent-2); font-weight: 600; }
.range-box { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.range-box input { border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 12px; color: var(--text); }

/* ---------- 16 板块导航 ---------- */
.nav-seg { margin-bottom: 1px; }
.nav-seg-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  cursor: pointer; color: var(--text-2); font-size: 13.5px; user-select: none;
}
.nav-seg-head:hover { background: var(--surface-2); }
.nav-seg-head.active { background: var(--accent-weak); color: var(--accent-2); font-weight: 600; }
.nav-seg-title { flex: 1; }
.chev { font-size: 10px; color: var(--muted); transition: transform .18s ease; }
.nav-seg.open .chev { transform: rotate(180deg); }
.nav-kids { display: none; padding: 2px 0 6px 34px; }
.nav-seg.open .nav-kids { display: block; }
.nav-kids a { display: block; padding: 7px 10px; border-radius: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; text-decoration: none; }
.nav-kids a:hover { background: var(--surface-2); }
.nav-kids a.active { color: var(--accent); font-weight: 600; background: var(--accent-weak); }
.phase-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px; }

/* ---------- 规划中板块 ---------- */
.plan-head { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.plan-list li { display: flex; gap: 8px; font-size: 13px; color: var(--text-2); padding: 9px 0; border-bottom: 1px dashed var(--border); }
.plan-ck { color: var(--amber); }
.plan-note { font-size: 12px; color: var(--muted); margin: 0; }

@media (max-width: 1200px) {
  .home-grid { grid-template-columns: 1fr; }
  .kpi2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .kpi2-grid { grid-template-columns: 1fr; }
  .plan-list { grid-template-columns: 1fr; }
}


/* ---------- 数据表（专业密度） ---------- */
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2);
  text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.ta-r { text-align: right; }
.mono { font-variant-numeric: tabular-nums; color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--muted); }
.warn { color: var(--red); font-weight: 600; }
.cell-main { max-width: 260px; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.empty-cell { text-align: center; color: var(--muted); padding: 40px 0 !important; }
.grow { flex: 1; }
.hint-text { font-size: 12px; color: var(--muted); }
.kpi2-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 剩余天数/标签 ---------- */
.days { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.d-red { background: #fef3f2; color: #b42318; }
.d-amber { background: #fffaeb; color: #b54708; }
.d-gray { background: #f2f4f7; color: #475467; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--accent-weak); color: var(--accent-2); font-size: 12px; }
.btn.xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; }


/* ---------- 场景页签 ---------- */
.scene-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.scene-tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 8px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; transition: .15s;
}
.scene-tab b { margin-left: 6px; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.scene-tab:hover { border-color: var(--border-strong); }
.scene-tab.on { background: var(--accent-weak); border-color: #c7d7fe; color: var(--accent-2); }
.scene-tab.on b { color: var(--accent-2); }
.role-tag { margin-left: 6px; font-size: 10.5px; padding: 1px 5px; border-radius: 4px; }
.r-adv { background: #ecfdf3; color: #067647; }
.r-sale { background: #eff4ff; color: #1d4ed8; }

.input.sm, .select.sm { height: 30px; font-size: 12.5px; padding: 0 8px; min-width: 0; }
.alloc-head { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.alloc-head b { color: var(--text); }

.bd-row { display:flex; align-items:center; gap:10px; padding:7px 0; font-size:13px; }
.bd-label { width:150px; color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bd-bar { flex:1; height:8px; background:var(--bg); border-radius:4px; overflow:hidden; }
.bd-bar i { display:block; height:100%; background:linear-gradient(90deg,#2563eb,#60a5fa); border-radius:4px; }
.bd-val { width:190px; text-align:right; color:var(--muted); font-variant-numeric:tabular-nums; font-size:12px; }

/* ---------- 列表：操作列吸右，首列吸左（列多时不丢按钮） ---------- */
.table-scroll .data thead th:last-child,
.table-scroll .data tbody td:last-child {
  position: sticky; right: 0; z-index: 2; background: var(--surface);
  box-shadow: -8px 0 10px -8px rgba(16,24,40,.18);
}
.table-scroll .data thead th:last-child { z-index: 3; background: var(--surface-2); }
.table-scroll .data tbody tr:hover td:last-child { background: var(--surface-2); }

.table-scroll .data thead th.sel,
.table-scroll .data tbody td.sel {
  position: sticky; left: 0; z-index: 2; background: var(--surface);
}
.table-scroll .data thead th.sel { z-index: 3; background: var(--surface-2); }

/* 单元格内容过长省略，避免撑爆列宽 */
.table-scroll .data tbody td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 回滚：sticky 方案在现有表格结构下会压住状态列，先撤销 */
.table-scroll .data thead th:last-child,
.table-scroll .data tbody td:last-child { position: static; box-shadow: none; background: transparent; }
.table-scroll .data thead th.sel,
.table-scroll .data tbody td.sel { position: static; background: transparent; }
.table-scroll .data tbody td { max-width: none; overflow: visible; text-overflow: clip; white-space: normal; }


/* ================= 审批流（拖拽配置） ================= */
.flow { position: relative; padding-left: 4px; }
.flow-node {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  cursor: grab; transition: .15s ease;
}
.flow-node:active { cursor: grabbing; }
.flow-node.dragging { opacity: .45; border-style: dashed; }
.flow-node.over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.flow-handle { color: #98a2b3; font-size: 14px; letter-spacing: -1px; cursor: grab; }
.flow-step {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent-weak); color: var(--accent-2);
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none;
}
.flow-role { min-width: 132px; }
.flow-amt { width: 110px; }
.flow-del { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.flow-del:hover { color: var(--red); }
.flow-arrow { color: #c7ccd6; font-size: 11px; margin: -4px 0 4px 20px; }
.flow-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.flow-add { border: 1px dashed var(--border-strong); background: none; color: var(--text-2); width: 100%; padding: 9px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.flow-add:hover { border-color: var(--accent); color: var(--accent); }
.flow-summary { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 9px 12px; margin-top: 10px; }
.flow-summary b { color: var(--text); }

/* ================= 审批流画布 ================= */
.flow-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr) 280px; gap: 12px; align-items: start; }
.flow-palette { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 12px; }
.palette-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.palette-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text);
}
.palette-btn:hover { border-color: var(--accent); color: var(--accent); }
.pdot { width: 8px; height: 8px; border-radius: 2px; }
.pdot-approval { background: #2563eb; }
.pdot-condition { background: #d97706; transform: rotate(45deg); }
.pdot-end { background: #98a2b3; border-radius: 50%; }
.palette-tip { font-size: 11.5px; color: var(--muted); line-height: 1.8; margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }

.flow-canvas {
  position: relative; height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 10px;
  background-color: #fbfcfe;
  background-image: radial-gradient(#dde3ee 1px, transparent 1px);
  background-size: 18px 18px;
}
.flow-svg { position: absolute; inset: 0; width: 2400px; height: 1400px; pointer-events: none; }
.fedge { fill: none; stroke: #98a2b3; stroke-width: 1.6; pointer-events: stroke; cursor: pointer; }
.fedge:hover { stroke: var(--accent); stroke-width: 2.4; }
.fedge-label { font-size: 11px; fill: #7c8698; }
.fedge-temp { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 4; }

.fnode {
  position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-sm); padding: 7px 10px; cursor: grab; user-select: none;
}
.fnode.dragging { cursor: grabbing; box-shadow: var(--shadow-lg); z-index: 5; }
.fnode.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.fnode.fn-start { background: #eef4ff; border-color: #c7d7fb; }
.fnode.fn-end { background: #f2f4f7; border-color: #d0d5dd; }
.fnode.fn-condition { border-left: 3px solid #d97706; }
.fnode.fn-approval { border-left: 3px solid #2563eb; }
.fn-head { display: flex; align-items: center; gap: 6px; }
.fn-ico { font-size: 11px; color: var(--muted); }
.fn-title { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-del { border: 0; background: none; color: #98a2b3; cursor: pointer; font-size: 11px; padding: 0 2px; }
.fn-del:hover { color: var(--red); }
.fn-sub { font-size: 11px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fport {
  position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  border: 2px solid #98a2b3; top: 50%; margin-top: -5px; cursor: crosshair;
}
.fport:hover { border-color: var(--accent); background: var(--accent-weak); }
.fport-in { left: -6px; }
.fport-out { right: -6px; }

.flow-props { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 12px; min-height: 200px; }
.props-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.props-row { display: block; margin-bottom: 10px; font-size: 12px; color: var(--text-2); }
.props-row span { display: block; margin-bottom: 4px; }
.props-row .input, .props-row .select { width: 100%; }
.props-hint { font-size: 12px; color: var(--muted); line-height: 1.7; }
.props-empty { font-size: 12px; color: var(--muted); }
.flow-foot { margin-top: 8px; font-size: 12px; color: var(--muted); }

@media (max-width: 1100px) {
  .flow-layout { grid-template-columns: 1fr; }
  .flow-canvas { height: 460px; }
}

/* ================= 审批节点（对齐钉钉式设计规范） ================= */
.fnode { padding: 0 !important; overflow: hidden; border-radius: 6px; border: 1px solid #e3e6eb; background: #fff; }
.fnode.fn-end { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.fnode.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.fnode.dragging { box-shadow: 0 8px 24px rgba(16,24,40,.16); }

.dn-title { height: 26px; display: flex; align-items: center; padding: 0 10px; color: #fff; font-size: 12px; font-weight: 600; }
.dn-title.bar-start { background: #576a95; }
.dn-title.bar-approval { background: #ff943e; }
.dn-title.bar-cc { background: #3296fa; }
.dn-title.bar-cond { background: #15bc83; }
.dn-body { padding: 8px 10px; }
.dn-name { font-size: 13px; font-weight: 600; color: #1d2939; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-sub { font-size: 11.5px; color: #7c8698; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-condition .dn-title { background: #e8f8f1; }
.fn-condition .dn-title span { color: #0e9f6e; }

.dn-end { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 6px; }
.dn-end-dot { width: 12px; height: 12px; border-radius: 50%; background: #ccd2dd; }
.dn-end-text { font-size: 12px; color: rgba(25,31,37,.45); }

.fn-del { position: absolute; top: 4px; right: 6px; border: 0; background: rgba(255,255,255,.25); color: #fff; border-radius: 4px; font-size: 11px; cursor: pointer; line-height: 16px; padding: 0 4px; }
.fn-end .fn-del { background: #eef1f5; color: #7c8698; top: -8px; right: -8px; }
.fn-del:hover { background: #e5484d; color: #fff; }
.fport { z-index: 3; }

/* 图例 */
.flow-legend { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 10px 14px; margin-bottom: 12px; }
.flow-legend-title { font-size: 12px; color: var(--muted); display: block; margin-bottom: 8px; }
.legend-items { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.legend-item { flex: 1 1 180px; max-width: 200px; }
.dn-mini { transform: scale(.78); transform-origin: left top; height: 62px; pointer-events: none; }
.dn-mini .dn-title { height: 24px; }
.dn-mini .dn-name { font-size: 13px; }

/* 校验面板 */
.check-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
@media (max-width: 1000px) { .check-grid { grid-template-columns: 1fr; } }
.check-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.check-line { font-size: 12.5px; padding: 5px 0; color: #475467; }
.check-line.error { color: #b42318; }
.check-line.warn { color: #b54708; }
.check-line.ok { color: #067647; }
.check-sub { font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
.check-path { font-size: 12px; color: #475467; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.check-step { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.cs-idx { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-weak); color: var(--accent-2); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; }
.cs-node { font-size: 12.5px; font-weight: 600; color: #1d2939; }
.cs-text { font-size: 12px; color: #667085; margin-top: 2px; }
.pdot-cc { background: #3296fa; }

/* ================= 节点卡片强化（区分度 + 结束节点可读性） ================= */
.fnode {
  border-radius: 8px !important;
  border: 1px solid #d7dbe4 !important;
  box-shadow: 0 2px 6px rgba(16,24,40,.08) !important;
  background: #fff !important;
}
.fnode::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 8px 0 0 8px;
}
.fnode.fn-start::before { background: #576a95; }
.fnode.fn-approval::before { background: #f79009; }
.fnode.fn-cc::before { background: #2e90fa; }
.fnode.fn-condition::before { background: #12b76a; }

.fnode.fn-start { background: #f7f9fd !important; }
.fnode.fn-approval { background: #fffdf9 !important; }
.fnode.fn-cc { background: #f6faff !important; }
.fnode.fn-condition { background: #f6fdf9 !important; }
.fnode.sel { border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37,99,235,.18), 0 2px 6px rgba(16,24,40,.10) !important; }

.dn-title { height: 28px; padding: 0 10px 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .2px; gap: 6px; }
.dn-ico { font-size: 10px; opacity: .95; }
.dn-title.bar-start { background: #576a95; }
.dn-title.bar-approval { background: #f79009; }
.dn-title.bar-cc { background: #2e90fa; }
.dn-title.bar-cond { background: #12b76a; }
.fn-condition .dn-title { background: #e6f8ef; }
.fn-condition .dn-title span { color: #067647; font-weight: 700; }

.dn-body { padding: 7px 12px 8px; }
.dn-name { font-size: 13.5px; font-weight: 600; color: #101828; }
.dn-sub { font-size: 11.5px; color: #667085; margin-top: 2px; }

/* 结束节点：胶囊 + 实心灰点，保证一眼能看到 */
.fnode.fn-end {
  background: transparent !important; border: 0 !important; box-shadow: none !important; overflow: visible;
}
.fnode.fn-end::before { display: none; }
.dn-end {
  display: flex !important; align-items: center; justify-content: center; gap: 8px;
  width: 152px; height: 44px; border-radius: 999px;
  background: #eef1f6; border: 1.5px solid #b8c0cd;
  box-shadow: 0 2px 5px rgba(16,24,40,.10);
}
.fnode.fn-end.sel .dn-end { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.dn-end-dot { width: 10px; height: 10px; border-radius: 50%; background: #475467; }
.dn-end-text { font-size: 13px; font-weight: 600; color: #344054; }

/* 端口更明显 */
.fport { width: 12px; height: 12px; margin-top: -6px; border-width: 2px; border-color: #98a2b3; background: #fff; }
.fnode:hover .fport { border-color: #2563eb; background: #eff4ff; }

/* 图例背景提亮，避免和画布混淆 */
.dn-mini { height: 66px; }

/* 结束节点最终样式：横向胶囊，深色边框与文字 */
.dn-end {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 152px !important;
  height: 44px !important;
  border-radius: 999px !important;
  background: #e4e7ec !important;
  border: 1.5px solid #98a2b3 !important;
  box-shadow: 0 2px 6px rgba(16,24,40,.12) !important;
}
.dn-end-dot { width: 12px !important; height: 12px !important; background: #344054 !important; flex: none; }
.dn-end-text { font-size: 13px !important; font-weight: 600 !important; color: #1d2939 !important; white-space: nowrap; }
.fnode.fn-end { width: 152px !important; height: 52px !important; }
.fnode.fn-end.sel .dn-end { border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37,99,235,.18) !important; }

/* ================= 企业切换 ================= */
.tenant-wrap { position: relative; }
.tenant-chip {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--text);
}
.tenant-chip:hover { border-color: var(--accent); }
.tc-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tc-ver { font-size: 11px; color: var(--accent-2); background: var(--accent-weak); border-radius: 4px; padding: 1px 5px; }
.tc-arrow { color: var(--muted); font-size: 10px; }
.tenant-panel {
  position: absolute; right: 0; top: 38px; width: 300px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 70; overflow: hidden;
}
.tenant-head { padding: 10px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.tenant-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f2f4f7; }
.tenant-item:hover { background: #f9fafb; }
.tenant-item.on { background: #f5f8ff; }
.tenant-item .ti-name { flex: 1; font-size: 13px; color: var(--text); }
.tenant-item .ti-meta { font-size: 11px; color: var(--muted); }
.tenant-item.disabled { opacity: .55; cursor: not-allowed; }

/* ================= 平台后台 ================= */
.pf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1100px) { .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pf-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.pf-card .n { font-size: 24px; font-weight: 650; margin-top: 6px; }

/* ================= 菜单管理 ================= */
.nav a .nav-ext { margin-left: auto; font-size: 11px; opacity: .55; }

.me-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.me-dirty { font-size: 12.5px; color: #b54708; margin-left: 4px; }
.btn.pulse { box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }

.me-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.me-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.me-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s;
}
.me-group.me-gmark { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.me-group.me-dragging { opacity: .45; }

.me-ghead {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  border-radius: 9px 9px 0 0; cursor: grab;
}
.me-ghead:active { cursor: grabbing; }
.me-gtitle {
  flex: 1; min-width: 0; height: 28px; padding: 0 8px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text);
}
.me-gtitle:hover { background: #fff; border-color: var(--border); }
.me-gtitle:focus { outline: none; background: #fff; border-color: var(--accent); }
.me-count { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.me-grip { color: #b6bfcc; font-size: 14px; letter-spacing: -2px; cursor: grab; user-select: none; flex: none; }
.me-grip:hover { color: var(--muted); }

.me-items { padding: 6px; display: flex; flex-direction: column; gap: 4px; min-height: 44px; }
.me-drop-empty {
  padding: 10px; text-align: center; font-size: 12px; color: #c0c6d2;
  border: 1px dashed var(--border-strong); border-radius: 8px;
}

.me-item {
  display: grid; grid-template-columns: 16px minmax(110px, 1.1fr) minmax(140px, 1.6fr) 46px auto;
  align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px;
  border: 1px solid transparent; background: #fcfdff; transition: background .12s, border-color .12s;
}
.me-item:hover { background: #fff; border-color: var(--border); }
.me-item.me-dragging { opacity: .45; }
.me-item.me-drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.me-item.me-drop-after { box-shadow: inset 0 -2px 0 var(--accent); }

.me-ititle, .me-iurl {
  height: 28px; padding: 0 8px; font-size: 13px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; color: var(--text); min-width: 0;
}
.me-iurl { font-size: 12px; color: var(--text-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.me-ititle:focus, .me-iurl:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }

.me-typeline { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.me-type { font-size: 11px; text-align: center; padding: 2px 0; border-radius: 5px; color: var(--muted); background: #f2f4f7; width: 100%; }
.me-type.t-link { color: #5925dc; background: #f4f0ff; }
.me-type.t-sys { color: #475467; background: #eef1f5; }

.me-move { display: flex; gap: 2px; }
.me-iconbtn {
  width: 24px; height: 24px; border: 1px solid var(--border); background: #fff; border-radius: 6px;
  font-size: 11px; line-height: 1; color: var(--text-2); cursor: pointer; padding: 0;
}
.me-iconbtn:hover { background: var(--surface-2); border-color: var(--muted); color: var(--text); }
.me-iconbtn.danger { color: #b42318; border-color: #fecdca; }
.me-iconbtn.danger:hover { background: #fef3f2; }

.me-help {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; font-size: 12.5px; color: var(--text-2); line-height: 1.75;
}
.me-help h4 { font-size: 13px; margin-bottom: 8px; color: var(--text); }
.me-help ul { margin: 0 0 10px 16px; padding: 0; }
.me-help li { margin-bottom: 5px; }
.me-help code { background: #f2f4f7; padding: 1px 4px; border-radius: 4px; font-size: 11.5px; }
.me-note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 8px; }
.me-empty { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 1100px) {
  .me-wrap { grid-template-columns: 1fr; }
  .me-item { grid-template-columns: 16px minmax(90px, 1fr) minmax(120px, 1.2fr) auto; }
  .me-type { display: none; }
}

/* ================= 续费清单 ================= */
.rw-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.rw-tab {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.rw-tab b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.rw-tab:hover { border-color: var(--muted); }
.rw-tab.on { background: var(--accent-weak); border-color: #c7d7fe; color: var(--accent-2); }
.rw-tab.on b { color: var(--accent-2); }

/* ================= 看板 / 报表：条形图 ================= */
.bar-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.bar-label { width: 96px; flex: none; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #60a5fa); }
.bar-val { width: 132px; flex: none; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }

/* ================= 回收站 ================= */
.recycle-wrap { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 14px; align-items: start; }
.rc-side-head { padding: 12px 14px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--border); }
.rc-side-head b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rc-list { padding: 6px; max-height: 62vh; overflow: auto; }
.rc-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border: 0; background: transparent; border-radius: 7px; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--text-2); text-align: left; transition: background .12s;
}
.rc-item:hover { background: var(--surface-2); }
.rc-item.on { background: var(--accent-weak); color: var(--accent-2); font-weight: 500; }
.rc-item b { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.rc-item.on b { color: var(--accent-2); }
.rc-empty { padding: 20px 12px; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.7; }
.rc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.rc-head .hint { font-size: 12px; color: var(--muted); margin-left: 8px; }
.rc-actions { display: flex; gap: 8px; }
@media (max-width: 900px) { .recycle-wrap { grid-template-columns: 1fr; } }

/* 导航顶部工具条 */
.nav-tools { display: flex; justify-content: flex-end; padding: 0 2px 6px; }
.nav-tool-btn {
  border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer;
  font-size: 11.5px; border-radius: 6px; padding: 3px 8px; line-height: 1.2;
}
.nav-tool-btn:hover { color: var(--text-2); border-color: var(--muted); background: var(--surface-2); }
.nav-title .chev { font-size: 9px !important; opacity: .55; }

/* ================= 角色化首页 ================= */
.role-chip {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; vertical-align: middle;
  background: var(--accent-weak); color: var(--accent-2); border-radius: 999px; padding: 2px 8px; margin-left: 6px;
}
.home-list-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f2f4f7;
  font-size: 13px; cursor: pointer; border-radius: 6px;
}
.home-list-row:last-child { border-bottom: 0; }
.home-list-row:hover { background: var(--surface-2); }
.hlr-idx {
  width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--muted);
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center;
}
.hlr-label { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hlr-sub { color: var(--muted); font-size: 12px; white-space: nowrap; }
.hlr-badge { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .hlr-sub { display: none; } }

/* ================= 角色视角切换（管理员） ================= */
.pv-bar {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
}
.pv-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pv-select {
  height: 26px; min-width: 84px; font-size: 12.5px; padding: 0 6px;
  border-radius: 6px; border-color: var(--border-strong); background: #fff;
}
.pv-tip { font-size: 11px; color: #b54708; background: #fffaeb; border: 1px solid #fedf89; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
@media (max-width: 900px) { .pv-bar { width: 100%; justify-content: space-between; } }

/* ================= 企业品牌 ================= */
.brand-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; background: #fff; flex: none; }
.auth-brand .brand-logo { width: 28px; height: 28px; border-radius: 7px; }
.sidebar-head .brand-logo { width: 28px; height: 28px; }

.bd-logo-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.bd-logo-box {
  width: 64px; height: 64px; border-radius: 14px; border: 1px dashed var(--border-strong);
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface-2);
  font-size: 24px; color: var(--muted); flex: none;
}
.bd-logo-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.bd-mock { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.bd-mock-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); }
.bd-mock-bar .brand-text { font-size: 15px; font-weight: 600; color: var(--text); }
.form-label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

/* ================= 列表：操作列不折行 + 手机号复制 ================= */
.row-actions { opacity: 1; flex-wrap: nowrap; align-items: center; }
.row-actions .btn {
  white-space: nowrap; flex: none; height: 26px; padding: 0 8px; font-size: 12px; line-height: 1;
}
table.data td.actions { white-space: nowrap; padding-left: 8px; }

.copyable {
  display: inline-flex; align-items: center; gap: 4px; cursor: copy;
  border-radius: 5px; padding: 2px 5px; margin: -2px -5px;
  font-variant-numeric: tabular-nums; transition: background .12s, color .12s;
}
.copyable:hover { background: var(--accent-weak); color: var(--accent-2); }
.copy-ico { font-style: normal; font-size: 11px; opacity: 0; transition: opacity .12s; }
.copyable:hover .copy-ico { opacity: .7; }
.copyable.copied { background: #ecfdf3; color: #067647; }
.copyable.copied .copy-ico { opacity: 1; }

/* ================= 列表：列宽收紧 + 操作列吸右（保证按钮永远完整） ================= */
table.data th { padding-left: 8px; padding-right: 8px; }
table.data td { padding-left: 8px; padding-right: 8px; }
table.data td.actions { padding-right: 12px; }
.row-actions .btn { padding: 0 7px; }

/* 操作列固定在右侧：列多需要横向滚动时，按钮不会被裁掉 */
.table-scroll { overflow-x: auto; }
.table-scroll table.data thead th:last-child,
.table-scroll table.data tbody td:last-child {
  position: sticky; right: 0; z-index: 2; background: var(--surface);
  box-shadow: -6px 0 8px -8px rgba(16, 24, 40, .18);
}
.table-scroll table.data thead th:last-child { background: var(--surface-2); z-index: 3; }
.table-scroll table.data tbody tr:hover td:last-child { background: #fbfcfe; }

/* ================= 页面内确认 / 表单弹窗 ================= */
.cf-mask {
  position: fixed; inset: 0; z-index: 500; background: rgba(16, 24, 40, .45);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: cfFade .16s ease;
}
.cf-box {
  width: 400px; max-width: 94vw; background: var(--surface); border-radius: 14px;
  box-shadow: var(--shadow-lg); animation: cfPop .2s cubic-bezier(.2, .8, .2, 1);
}
.cf-box.cf-wide { width: 520px; }
.cf-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.cf-ic {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent-2); font-size: 16px; font-weight: 600; flex: none;
}
.cf-ic.danger { background: #fef3f2; color: #b42318; }
.cf-title { font-size: 15.5px; font-weight: 600; color: var(--text); padding-top: 7px; }
.cf-body { padding: 10px 22px 6px 68px; font-size: 13.5px; line-height: 1.75; color: var(--text-2); max-height: 62vh; overflow-y: auto; }
.cf-form-body { padding-left: 22px; }
.cf-msg { margin-bottom: 12px; }
.cf-field { margin-bottom: 12px; }
.cf-label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; }
.cf-input {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong);
  border-radius: 8px; font-size: 13.5px; background: #fff; color: var(--text);
}
.cf-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.cf-input.cf-err { border-color: #f04438; box-shadow: 0 0 0 3px #fee4e2; }
.cf-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.cf-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.cf-mask.out { animation: cfFadeOut .14s ease forwards; }
@keyframes cfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cfFadeOut { to { opacity: 0; } }
@keyframes cfPop { from { transform: translateY(10px) scale(.98); opacity: .5; } to { transform: none; opacity: 1; } }

/* 更多操作弹窗 */
.am-list { display: flex; flex-direction: column; gap: 6px; }
.am-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  cursor: pointer; text-align: left; transition: background .12s, border-color .12s;
}
.am-item:hover { background: var(--surface-2); border-color: var(--muted); }
.am-item b { font-size: 13.5px; font-weight: 500; color: var(--text); }
.am-item span { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ================= 线索：行内跟进面板 ================= */
.flw-toggle {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2);
  padding: 0 10px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer;
}
.flw-toggle:hover { border-color: var(--muted); }
.flw-toggle input { margin: 0; }

/* 跟进行：整体比主行更淡、更小，形成层次 */
table.data tr.flw-row > td { padding: 0; background: #f7f9fc; border-bottom: 1px solid #edf0f5; }
table.data tr.flw-row:hover > td { background: #f7f9fc; }

.flw-panel {
  padding: 14px 20px 16px 24px;
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #fbfcfe 100%);
  border-left: 3px solid #c7d7fe;
  display: flex; flex-direction: column; gap: 12px;
}
.flw-panel > * { max-width: 860px; }
.flw-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.flw-item {
  background: #fff; border: 1px solid #e8edf5; border-radius: 8px;
  padding: 7px 11px; display: flex; flex-direction: column; gap: 3px;
}
.flw-meta { display: flex; align-items: center; gap: 8px; }
.flw-type {
  flex: none; font-size: 10.5px; padding: 1px 6px; border-radius: 4px; line-height: 1.6;
  background: var(--accent-weak); color: var(--accent-2); font-weight: 500;
}
.flw-when { color: #98a2b3; font-variant-numeric: tabular-nums; font-size: 11px; }
.flw-by { color: #98a2b3; font-size: 11px; }
.flw-result { margin-left: auto; color: #067647; font-size: 11px; background: #ecfdf3; border-radius: 4px; padding: 0 6px; }
.flw-content { font-size: 12.5px; color: var(--text-2); line-height: 1.65; word-break: break-word; }
.flw-empty { font-size: 12.5px; color: #b6bfcc; padding: 4px 0 8px; }

/* 主行悬浮提示：可点进详情 */
table.data tbody tr[data-open-row] { cursor: pointer; }
table.data tbody tr[data-open-row]:hover > td { background: #f7fbff; }
table.data tbody tr[data-open-row]:hover > td.sticky { background: #f7fbff; }
.row-hint {
  display: none; margin-left: 8px; font-size: 11px; color: var(--accent-2);
  background: var(--accent-weak); border-radius: 4px; padding: 1px 6px; white-space: nowrap;
}
table.data tbody tr[data-open-row]:hover .row-hint { display: inline-block; }

.flw-compose {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid #e6ebf2; border-radius: 12px;
  padding: 10px 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.flw-sel {
  height: 34px; padding: 0 8px; font-size: 12.5px; border: 1px solid var(--border-strong);
  border-radius: 7px; background: #fff; color: var(--text-2); flex: none;
}
.flw-input {
  width: 100%; min-height: 64px; max-height: 200px; padding: 2px 4px; font-size: 13.5px;
  border: 0; border-radius: 6px; background: transparent; color: var(--text);
  line-height: 1.65; resize: vertical; overflow-y: auto; font-family: inherit;
}
.flw-input:focus { outline: none; box-shadow: none; }
.flw-input::placeholder { color: #b6bfcc; }
.flw-btn {
  flex: none; height: 34px; padding: 0 16px; border-radius: 7px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.flw-btn:hover { filter: brightness(1.05); }
.flw-btn:disabled { opacity: .6; cursor: default; }

/* 线索状态页签 */
.list-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.list-tab {
  height: 32px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer; transition: all .12s;
}
.list-tab:hover { border-color: var(--muted); color: var(--text); }
.list-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }

/* 页签栏右侧的刷新按钮 */
.tab-refresh {
  margin-left: auto; flex: none; width: 28px; height: 28px; border-radius: 7px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  font-size: 15px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.tab-refresh:hover { color: var(--accent-2); border-color: var(--accent); background: var(--accent-weak); }
.tab-refresh:active { transform: rotate(180deg); }

/* 自动刷新提示 */
.auto-hint { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ================= 侧边栏收起 / 悬浮唤出 ================= */
.sb-collapse {
  margin-left: auto; flex: none; width: 24px; height: 24px; border-radius: 6px; border: 0;
  background: transparent; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer;
}
.sb-collapse:hover { background: var(--surface-2); color: var(--text); }

/* 收起后：整条侧栏移出屏幕，鼠标贴左边缘滑出，覆盖在内容之上 */
body.sb-collapsed .sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; z-index: 60;
  transform: translateX(-100%); transition: transform .2s ease;
  box-shadow: 8px 0 24px rgba(16, 24, 40, .16);
}
body.sb-collapsed .sidebar.open { transform: none; }
body.sb-collapsed .main { width: 100%; }
body.sb-collapsed .menu-toggle { display: inline-flex; }

/* 左边缘 12px 感应区，平时不可见，只有收起状态才生效 */
.sb-peek { display: none; }
body.sb-collapsed .sb-peek {
  display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 12px; z-index: 15;
}
/* 弹窗打开时不显示定位点，避免盖在遮罩上 */
body.sb-collapsed:has(.dlayer) .sb-peek { display: none !important; }
/* 收起后左侧留一条窄导轨，提示菜单在这里 */
body.sb-collapsed .sb-peek {
  display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 46px; z-index: 15;
  flex-direction: column; align-items: center; gap: 14px; padding-top: 14px;
  background: var(--surface); border-right: 1px solid var(--border);
}
body.sb-collapsed .main { margin-left: 46px; }
/* 导轨上已经有 ☰，顶部不再重复（手机端保留） */
@media (min-width: 901px) {
  body.sb-collapsed .menu-toggle { display: none; }
}
.sb-rail-btn {
  width: 30px; height: 30px; padding: 0; border-radius: 8px; border: 0;
  background: transparent; color: var(--text-2); font-size: 16px; line-height: 1; cursor: pointer;
  transition: all .12s;
}
.sb-rail-btn:hover { background: var(--accent-weak); color: var(--accent-2); }
.sb-rail-label {
  font-size: 11px; color: var(--muted); letter-spacing: 3px;
  writing-mode: vertical-rl; text-orientation: upright; user-select: none;
}
body.sb-collapsed .sb-peek::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, #d8e2fd, transparent);
}

/* ================= 列表页紧凑头部 ================= */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.lh-left { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.lh-title { font-size: 17px; font-weight: 650; letter-spacing: -.2px; margin: 0; white-space: nowrap; }
.lh-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.list-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.list-bar .list-tabs { margin: 0; }
.list-bar .toolbar { margin: 0; flex: 1; min-width: 0; }
.chips { margin-bottom: 8px !important; }
.chips:empty { display: none; }

/* 宽弹窗里的表单：三列铺开 */
.dbody .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 1180px) {
  .dbody .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dbody .form-grid { grid-template-columns: 1fr; }
}
/* 文本域/长字段占满整行 */
.dbody .form-grid .form-item.full { grid-column: 1 / -1; }

/* 详情弹窗：内容两栏铺开 */
.detail-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.detail-split:has(.detail-aside) { grid-template-columns: minmax(0, 1fr) 360px; }
.detail-main { min-width: 0; }
.detail-main .kv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; padding: 10px 0; }
@media (min-width: 1700px) { .detail-main .kv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .detail-main .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 详情左侧主区 + 右侧跟进栏 */
.detail-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.detail-split:not(:has(.detail-aside)) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1400px) { .detail-split { grid-template-columns: minmax(0, 1fr) 320px; } }
.detail-aside {
  position: sticky; top: 0; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
}
.dsec-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.detail-aside .flw-panel { padding: 0; margin: 0; border-left: 0; max-width: none; }
.detail-aside .flw-compose { max-width: none; flex-wrap: wrap; row-gap: 8px; }
.detail-aside .flw-input { flex: 1 0 100%; order: -1; min-height: 84px; font-size: 13px; }
.detail-aside .flw-btn { margin-left: auto; height: 34px; padding: 0 20px; }
.detail-aside .flw-item { background: #fff; }
@media (max-width: 1100px) {
  .detail-split:has(.detail-aside) { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
}

/* 企业名称联想下拉 */
.has-suggest { position: relative; }
.suggest-box {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16,24,40,.12); max-height: 240px; overflow-y: auto; padding: 4px;
}
.suggest-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border-radius: 6px; cursor: pointer;
}
.suggest-item:hover { background: var(--accent-weak); }
.suggest-item b { font-weight: 500; font-size: 13px; color: var(--text); }
.suggest-item span { font-size: 11px; color: var(--muted); flex: none; }
.suggest-btn { margin-top: 6px; }

/* 行首展开箭头：一次只展开一条的跟进明细 */
.row-expand {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-right: 6px; padding: 0; border: 1px solid transparent; border-radius: 5px;
  background: transparent; color: #667085; font-size: 12px; line-height: 1; cursor: pointer;
  transition: all .12s; vertical-align: -3px;
}
.row-expand:hover { background: var(--accent-weak); color: var(--accent-2); border-color: #d8e2fd; }
.row-expand.open { color: var(--accent-2); background: var(--accent-weak); }
tr[data-row]:has(+ tr.flw-row) > td { background: #fbfdff; }

/* 跟进：下次跟进 + 生成待办 */
.flw-compose { flex-wrap: wrap; row-gap: 8px; }
.flw-compose .flw-input { flex: 1 0 100%; }
.flw-tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid #f1f4f9; padding-top: 9px;
}
.flw-tools .flw-btn { margin-left: auto; }
.flw-due { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flw-due-label { font-size: 11.5px; color: var(--muted); }
.due-chip {
  height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 11.5px; cursor: pointer; transition: all .12s;
}
.due-chip:hover { border-color: var(--accent); color: var(--accent-2); }
.due-chip.on { background: var(--accent-weak); border-color: #c7d7fe; color: var(--accent-2); font-weight: 500; }
.flw-next {
  height: 28px; padding: 0 8px; font-size: 12px; border: 1px solid var(--border);
  border-radius: 7px; background: #fff; color: var(--text-2);
}
.flw-next:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.flw-mktask { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); cursor: pointer; }
.flw-mktask input { margin: 0; }
.flw-btn { margin-left: auto; }
.flw-next-tag { font-size: 11px; color: #b54708; background: #fffaeb; border-radius: 4px; padding: 0 6px; }

/* 下次跟进的小红旗 */
.due-flag {
  display: inline-flex; align-items: center; margin-left: 4px; vertical-align: -1px; cursor: help;
}
.due-flag svg { display: block; }
.due-flag.later { color: #98a2b3; }  /* 已不再使用，保留兼容 */
.due-flag.soon { color: #f79009; }
.due-flag.today { color: #f04438; animation: flag-bob 1.6s ease-in-out infinite; }
.due-flag.overdue { color: #d92d20; }
.due-flag.overdue { animation: flag-blink 2.4s ease-in-out infinite; }
@keyframes flag-blink { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* 待办弹窗文本域 */
.cf-textarea { height: auto !important; min-height: 64px; padding: 8px 10px; line-height: 1.55; resize: vertical; font-family: inherit; }
.flw-todo-btn { white-space: nowrap; }

/* 铃铛里的待办提醒 */
.bell-sec {
  padding: 8px 14px 4px; font-size: 11.5px; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.bell-due { border-left: 3px solid #f79009; }
.bell-due.overdue { border-left-color: #d92d20; background: #fffbfa; }
.bell-done {
  margin-left: 8px; height: 22px; padding: 0 8px; border-radius: 5px; border: 1px solid var(--border);
  background: #fff; color: var(--accent-2); font-size: 11px; cursor: pointer;
}
.bell-done:hover { background: var(--accent-weak); border-color: var(--accent); }
.bell-done:disabled { opacity: .6; cursor: default; }

/* 导轨顶部品牌标 */
.sb-rail-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; overflow: hidden; flex: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.sb-rail-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.sb-collapsed .sb-peek { padding-top: 14px; gap: 12px; }

/* 首页：去掉标题后，控制条单独一行、右对齐，省出纵向空间 */
.dash-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: flex-end; margin-bottom: 10px;
}
.dash-head .preview-bar { margin-right: auto; }

/* 页面说明文字 */
.lh-desc {
  font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 520px;
}
.lh-desc + .lh-meta::before { content: '·'; margin: 0 8px; color: var(--border-strong); }
.dash-intro { margin-right: auto; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dash-intro b { font-size: 13px; font-weight: 600; color: var(--text); }
.dash-intro span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1180px) { .lh-desc { display: none; } }

/* ================= 开放接口生态 ================= */
.int-sum-chip { font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; }
.int-sum-chip b { color: var(--text); }
.int-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1200px) { .int-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .int-grid { grid-template-columns: 1fr; } }
.int-card {
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  padding: 14px; cursor: pointer; transition: .15s ease; display: flex; flex-direction: column; gap: 8px;
}
.int-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.int-top { display: flex; align-items: center; gap: 10px; }
.int-logo { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; }
.int-name { font-size: 14px; font-weight: 600; color: var(--text); }
.int-cat { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.int-sum { font-size: 12.5px; color: var(--text-2); line-height: 1.7; min-height: 42px; }
.int-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--border); padding-top: 8px; }

/* 页面说明后的数据量/耗时 */
.page-head p .pm { color: var(--muted); font-size: 12px; }
.page-head p .pm::before { content: '·'; margin: 0 8px 0 4px; color: var(--border-strong); }

/* 尾款管理：顶部汇总 */
.tail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.ts-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.ts-item span { font-size: 12px; color: var(--muted); }
.ts-item b { font-size: 19px; font-weight: 650; letter-spacing: -.4px; color: var(--text); }
.ts-item em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.ts-item.warn b { color: #d92d20; }
.ts-item.ok b { color: #067647; }
@media (max-width: 1100px) { .tail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 菜单管理：隐藏状态 */
.me-item.is-hidden { opacity: .55; background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 6px, #f4f6f9 6px, #f4f6f9 12px); }
.me-item.is-hidden .me-ititle { text-decoration: line-through; }
.me-hidden-tag { font-size: 10px; line-height: 1.5; color: #b54708; background: #fffaeb; border: 1px solid #fedf89; border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.me-iconbtn.on { background: var(--accent-weak); border-color: #c7d7fe; }

/* 菜单管理：整组隐藏 */
.me-group.is-hidden-group { opacity: .6; }
.me-group.is-hidden-group .me-ghead { background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 6px, #f4f6f9 6px, #f4f6f9 12px); }
.me-group.is-hidden-group .me-gtitle { text-decoration: line-through; }

/* 菜单管理：添加菜单项选择器 */
.me-empty-add {
  border: 1px dashed var(--border-strong); background: #fff; color: var(--accent-2);
  padding: 8px 14px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
}
.me-empty-add:hover { border-color: var(--accent); background: var(--accent-weak); }
.mp-sec { margin-bottom: 12px; }
.mp-sec-t { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.mp-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent;
}
.mp-row:hover { background: var(--surface-2); border-color: var(--border); }
.mp-row input { margin: 0; }
.mp-t { font-size: 13px; color: var(--text); }
.mp-g { margin-left: auto; font-size: 11.5px; color: var(--muted); }


/* 侧边栏拖拽排序 */
.nav-title[draggable="true"], .nav-link[draggable="true"] { cursor: grab; }
.nav-group.dragging, .nav-link.dragging { opacity: .45; }
.nav-group.drag-over { outline: 2px dashed #93b4f7; outline-offset: -2px; border-radius: 8px; background: #eaf1ff; }
.nav-link.drag-before { box-shadow: inset 0 2px 0 #2563eb; }
.nav-link.drag-after { box-shadow: inset 0 -2px 0 #2563eb; }

/* 首页项目一览 */
.proj-glance td { vertical-align: middle; }
.pg-bar { height: 6px; border-radius: 999px; background: #eef2f7; overflow: hidden; display: inline-block; width: 84px; vertical-align: middle; }
.pg-bar i { display: block; height: 100%; border-radius: 999px; }
.pg-num { font-size: 11.5px; color: var(--text-2); margin-left: 6px; }
.pg-sub { font-size: 11px; color: var(--muted); margin-left: 4px; }

/* 首页自适应卡片网格：按内容自动填充，避免大片空白 */
.home-grid-dense {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}
.home-grid-dense > .hg-span2 { grid-column: span 2; }
@media (max-width: 1200px) {
  .home-grid-dense { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid-dense > .hg-span2 { grid-column: span 2; }
}
@media (max-width: 820px) {
  .home-grid-dense { grid-template-columns: 1fr; }
  .home-grid-dense > .hg-span2 { grid-column: span 1; }
}

/* 首页时间范围选择 */
.period-select {
  height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer;
}
.period-select:hover { border-color: var(--muted); color: var(--text); }

/* 首页卡片：可拖拽 + 可调宽度 */
.home-grid.home-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  /* 不用 dense：保持阅读顺序，卡片按整行对齐，避免宽窄错位 */
  grid-auto-flow: row;
}
.home-widgets > .home-col { display: contents; }
.home-widget { grid-column: span 1; }
/* 卡片内部不要再带外边距，否则同一行会上下错位 */
.home-widgets > .home-widget { margin: 0 !important; }
.home-widget .card-head { cursor: move; }
.home-widget .card-head .hw-size {
  margin-left: 8px; width: 22px; height: 22px; border-radius: 5px;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  font-size: 12px; line-height: 1; cursor: pointer; flex: none;
}
.home-widget .card-head .hw-size:hover { color: var(--accent); border-color: var(--accent); }
.home-widget.hw-dragging { opacity: .5; }
.home-widget.drag-over { outline: 2px dashed #93b4f7; }
@media (max-width: 1100px) {
  .home-grid.home-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-widget { grid-column: span 1 !important; }
}
@media (max-width: 780px) {
  .home-grid.home-widgets { grid-template-columns: 1fr; }
}
.mp-tag { font-size: 10px; color: #b54708; background: #fffaeb; border: 1px solid #fedf89; border-radius: 4px; padding: 0 5px; margin-left: 6px; }

/* 列表：列宽拖拽与列顺序 */
th.col-th { position: relative; }
th.col-th .col-resize {
  position: absolute; right: -3px; top: 0; width: 7px; height: 100%;
  cursor: col-resize; z-index: 2;
}
th.col-th .col-resize:hover { background: rgba(37, 99, 235, .18); }
th.col-th.col-dragging { opacity: .45; }
th.col-th[draggable="true"] { cursor: grab; }

/* 项目一览：数字列右对齐，表头与数值对齐 */
.proj-glance th.num, .proj-glance td.num { text-align: right; }
.proj-glance th, .proj-glance td { white-space: nowrap; }
.proj-glance td:first-child { white-space: normal; }

/* 侧边栏内联改名 */
.nav-rename { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.nav-rename-input {
  flex: 1; min-width: 0; height: 24px; padding: 0 6px; font-size: 12.5px;
  border: 1px solid var(--accent); border-radius: 5px; outline: none;
  box-shadow: 0 0 0 3px var(--accent-weak); color: var(--text); background: #fff;
}

/* 首页：未填预算成本的提示 */
.pg-warn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 6px; border-radius: 50%;
  background: #fef0c7; color: #b54708; border: 1px solid #fedf89;
  font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle;
  cursor: help;
}

/* 首页：验收卡点提醒 */
.pg-warn-red {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px;
  font-size: 10.5px; line-height: 16px; color: #b42318;
  background: #fef3f2; border: 1px solid #fecdca; white-space: nowrap;
}

/* 列宽拖拽手感 */
body.col-resizing { cursor: col-resize !important; user-select: none; }
body.col-resizing * { cursor: col-resize !important; }
th.col-th .col-resize { width: 9px; right: -4px; }
th.col-th:hover .col-resize { background: rgba(37, 99, 235, .25); }

/* 列设置面板：拖动排序 */
.col-row { cursor: grab; }
.col-row.dragging { opacity: .5; background: var(--accent-weak); }
.col-drag { color: #b6bfcd; font-size: 12px; margin-right: 2px; }
.col-top {
  margin-left: auto; width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--border);
  background: #fff; color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer; flex: none;
}
.col-top:hover { color: var(--accent); border-color: var(--accent); }

/* 表头筛选/排序 */
th.col-th[data-sortable="1"] .th-label { cursor: pointer; }
th.col-th[data-sortable="1"]:hover .th-label { color: var(--accent); }
.th-fbtn {
  margin-left: 4px; border: none; background: transparent; color: #b6bfcd;
  font-size: 10px; cursor: pointer; padding: 0 2px; line-height: 1;
}
.th-fbtn:hover { color: var(--accent); }
.th-pop {
  position: fixed; z-index: 120; width: 240px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .14); padding: 12px;
}
.thp-head { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.thp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.thp-row label { font-size: 12px; color: var(--muted); flex: none; }
.thp-row .input { height: 30px; }
.thp-hint { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.thp-opts { max-height: 220px; overflow: auto; display: grid; gap: 2px; }
.thp-opt { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; font-size: 12.5px; cursor: pointer; }
.thp-opt:hover { background: var(--surface-2); }
.thp-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* 表头：已生效的筛选/排序高亮 */
th.col-th.th-active .th-label { color: #1d4ed8; font-weight: 600; }
th.col-th.th-active .th-fbtn, .th-fbtn.on { color: #1d4ed8; }
.th-dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: #2563eb; margin-left: 4px; vertical-align: middle;
}

/* 表头筛选：关键词/人员/部门 */
.thp-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.thp-tab {
  flex: 1; padding: 5px 0; font-size: 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
}
.thp-tab.on { background: var(--accent-weak); border-color: #c7d7fe; color: var(--accent); font-weight: 600; }
.thp-list { max-height: 200px; overflow: auto; display: grid; gap: 2px; }
.thp-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px;
}
.thp-item:hover { background: var(--surface-2); }
.thp-item.on { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.thp-item span { font-size: 11.5px; color: var(--muted); }
.thp-pane.hidden { display: none; }

/* 经营看板：简易柱状图 */
.bd-chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 0 4px; }
.bd-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bd-bars { display: flex; align-items: flex-end; gap: 3px; height: 100px; }
.bd-bars i { display: block; width: 10px; background: #2563eb; border-radius: 3px 3px 0 0; }
.bd-bars b { display: block; width: 10px; background: #16a34a; border-radius: 3px 3px 0 0; }
.bd-col span { font-size: 10.5px; color: var(--muted); }

/* 项目核算表：首列自适应 + 表头吸顶 + 竖向分割 */
.acct-wrap { max-height: calc(100vh - 300px); overflow: auto; border-radius: 10px; }
.acct-table { border-collapse: separate; border-spacing: 0; }
.acct-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--border);
}
.acct-table th, .acct-table td { border-right: 1px solid #f1f5f9; }
.acct-table th:last-child, .acct-table td:last-child { border-right: none; }
.acct-table th:first-child, .acct-table td:first-child {
  min-width: 210px; max-width: 240px;
  position: sticky; left: 0; z-index: 2; background: #fff;
}
.acct-table thead th:first-child { z-index: 4; background: var(--surface-2); }
.acct-table td:first-child > div:first-child {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.acct-table td:first-child > div:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.acct-table tbody tr:hover td { background: #fbfcfe; }
.acct-table tbody tr:hover td:first-child { background: #fbfcfe; }

/* 核算表：分组表头 */
.acct-table thead tr.acct-grp th {
  position: sticky; top: 0; z-index: 3;
  height: 30px; padding: 4px 12px; font-size: 12px; font-weight: 700;
  color: var(--text-2); background: #f4f7fb;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid #e6ebf2;
}
.acct-table thead tr.acct-cols th {
  position: sticky; top: 30px; z-index: 3;
  background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--border);
}
.acct-table thead tr.acct-grp th.grp { text-align: center; letter-spacing: 1px; }
.acct-table thead tr.acct-grp th.grp-in { background: #eef4ff; color: #1d4ed8; }
.acct-table thead tr.acct-grp th.grp-cost { background: #fff4ed; color: #b45309; }
.acct-table thead tr.acct-grp th.grp-profit { background: #eefbf3; color: #15803d; }
.acct-table thead tr.acct-grp th.grp-budget { background: #f4f1ff; color: #6d28d9; }
.acct-table thead tr.acct-grp th.grp-cash { background: #eef8fb; color: #0e7490; }
.acct-table thead th.acct-first {
  position: sticky; left: 0; z-index: 5; background: #f4f7fb; text-align: left;
}
.acct-table thead tr.acct-cols th:first-child { z-index: 5; }

/* 首页：催收提醒条 */
.alert-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; margin-bottom: 14px; border-radius: 10px;
  background: #fff7ed; border: 1px solid #fed7aa; color: #b45309; font-size: 13px;
}
.alert-strip a { color: #b45309; font-weight: 600; text-decoration: none; white-space: nowrap; }
.alert-strip a:hover { text-decoration: underline; }

/* 列表快捷筛选（回款/尾款） */
.quick-tabs { display: flex; gap: 8px; margin: 2px 0 10px; flex-wrap: wrap; }
.quick-tab {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 12.5px; cursor: pointer;
}
.quick-tab:hover { border-color: #c7d7fe; color: var(--accent); }
.quick-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* 资金调拨：未还余额汇总 */
.fund-summary { margin: 2px 0 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.fund-sum-title { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.fund-sum-title b { font-size: 15px; color: var(--text); }
.fund-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fund-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: #f4f7fb; font-size: 12.5px; color: var(--text-2);
}
.fund-chip b { color: var(--text); }
.fund-chip.warn { background: #fff1f1; color: #b42318; }
.fund-chip.warn b { color: #b42318; }
.fund-chip i { font-style: normal; font-size: 11.5px; }

/* 首页角色看板切换 */
.home-rolebar { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.home-role {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer;
}
.home-role:hover { border-color: #c7d7fe; color: var(--accent); }
.home-role.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.role-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-bottom: 1px solid #f2f5f9; }
.role-row:last-child { border-bottom: none; }
.role-row[data-row-go] { cursor: pointer; }
.role-row[data-row-go]:hover { background: #fbfcfe; }
.role-row-t { font-size: 13px; font-weight: 600; color: var(--text); }
.role-row-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.role-row-v { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }

/* 角色看板：管理员预览提示 */
.role-preview {
  display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 12px;
  padding: 5px 12px; border-radius: 999px; background: #eef4ff; color: #1d4ed8; font-size: 12px;
}
.role-preview .link { background: none; border: none; color: #1d4ed8; text-decoration: underline; cursor: pointer; font-size: 12px; padding: 0; }

/* 线索池规则页：一行内联数字输入 */
.lr-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.lr-inline .input { width: 88px; padding: 6px 8px; text-align: center; }

/* 客户经营档案（详情概览顶部） */
.cp-wrap { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; background: var(--surface); }
.cp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cp-head b { font-size: 14px; }
.cp-hint { margin-left: 10px; font-size: 12px; color: var(--muted); }
.cp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cp-cell { background: var(--bg-2, #f8fafc); border-radius: 8px; padding: 10px 12px; }
.cp-lb { font-size: 12px; color: var(--muted); }
.cp-vl { font-size: 17px; font-weight: 600; margin-top: 2px; letter-spacing: -.2px; }
.cp-vl.ok { color: #067647; }
.cp-vl.warn { color: #b54708; }
.cp-vl.bad { color: #b42318; }
.cp-sb { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cp-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cp-tag { font-size: 12.5px; color: var(--text-2); background: var(--bg-2, #f8fafc); border-radius: 999px; padding: 5px 12px; }
.cp-tag i { font-style: normal; color: var(--muted); margin-right: 6px; }
.cp-tag.bad { background: #fef3f2; color: #b42318; }
.cp-st { color: #b54708; }
.cp-st.bad { color: #b42318; }

/* 客户经营档案里的「客户价值」一行 */
.cp-value { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 12px 0 6px; }
.cp-v-item { background: #fbfcfe; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; }
.cp-v-item span { display: block; font-size: 11.5px; color: var(--muted); }
.cp-v-item b { font-size: 15px; display: block; margin-top: 2px; }
.cp-v-item b.ok { color: #067647; }
.cp-v-item b.bad { color: #b42318; }
.cp-v-item em { font-style: normal; font-size: 11px; color: var(--muted); }
.cp-products { font-size: 12px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.cp-products i { font-style: normal; color: var(--muted); margin-right: 6px; }

/* 客户价值：服务时长 / 月单价 一行 */
.cp-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.cp-meta b { font-weight: 600; color: var(--text); }
.cp-meta b + span { margin-left: 2px; }

/* 生效中的筛选条：从看板点进来时告诉用户「现在按什么在筛」 */
.afbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0 2px; }
.afbar-lb { font-size: 12px; color: var(--muted); }
.afchip { display: inline-flex; align-items: center; gap: 6px; background: #eff4ff; color: #1d4ed8;
  border: 1px solid #d6e2ff; border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.afchip:hover { background: #e2ebff; }
.af-x { font-style: normal; opacity: .55; font-size: 11px; }
.afchip:hover .af-x { opacity: 1; }

/* 经营分析：横向条形列表（城市 / 产品） */
.tb-list { padding: 6px 16px 12px; }
.tb-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.tb-name { width: 96px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-bar { flex: 1; height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.tb-bar i { display: block; height: 100%; background: #2563eb; border-radius: 999px; }
.tb-bar.cat i { background: #7c3aed; }
.tb-val { min-width: 84px; text-align: right; font-size: 12.5px; }
.tb-sub { width: 62px; text-align: right; font-size: 11.5px; color: var(--muted); font-style: normal; }

/* 市场热力图：省份方块地图 */
.hm-grid { display: grid; grid-template-columns: repeat(9, 1fr); grid-auto-rows: 62px; gap: 6px; }
.hm-cell { border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 12px; transition: transform .12s ease; cursor: default; }
.hm-cell:hover { transform: translateY(-1px); box-shadow: 0 2px 10px rgba(15,23,42,.12); }
.hm-name { font-weight: 600; letter-spacing: .5px; }
.hm-val { font-size: 11px; opacity: .9; font-weight: 500; }
.hm-legend { display: flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.hm-legend i { width: 26px; height: 12px; border-radius: 3px; display: inline-block; }

.hm-pct { font-size: 10px; opacity: .75; font-style: normal; }

/* 热力图上的竞争对手标记：右上角红点 */
.hm-cell { position: relative; }
.hm-comp { position: absolute; top: 4px; right: 5px; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: 10px; line-height: 14px;
  text-align: center; font-weight: 700; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.hm-comp.hot { background: #b91c1c; animation: hm-pulse 2s ease-in-out infinite; }
@keyframes hm-pulse { 0%,100% { box-shadow: 0 0 0 2px rgba(255,255,255,.7); } 50% { box-shadow: 0 0 0 4px rgba(185,28,28,.25); } }
.hm-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text-2); }

/* 统计报表：列对齐、紧凑排版 */
.rp-card { margin-bottom: 14px; }
.rp-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.rp-scroll { max-height: 680px; overflow: auto; }
.rp-scroll.tall { max-height: none; }
.rp-table th, .rp-table td { white-space: nowrap; }
.rp-table th.num, .rp-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.rp-table tr.rp-total td { font-weight: 600; background: #f8fafc; border-top: 1px solid var(--border); }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1400px) { .rp-grid, .rp-grid-3 { grid-template-columns: 1fr; } }

/* 报表卡片头：标题与说明之间留白，别粘在一起 */
.rp-card .card-head h3 { margin-right: 10px; }
.rp-card .card-head .hint { margin-right: auto; }

/* 图表悬浮提示 */
.chart-tip { position: fixed; z-index: 9999; display: none; min-width: 190px; padding: 10px 12px;
  background: #0f172a; color: #e2e8f0; border-radius: 8px; font-size: 12px; line-height: 1.7;
  box-shadow: 0 8px 28px rgba(15,23,42,.28); pointer-events: none; }
.chart-tip .ct-title { font-weight: 600; color: #fff; margin-bottom: 4px; display: flex; justify-content: space-between; gap: 12px; }
.chart-tip .ct-sub { color: #94a3b8; font-weight: 400; font-size: 11px; }
.chart-tip .ct-row { display: flex; align-items: center; gap: 6px; color: #cbd5e1; }
.chart-tip .ct-row i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.chart-tip .ct-row b { margin-left: auto; color: #fff; font-weight: 600; }
.chart-tip .ct-hint { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(148,163,184,.25); color: #93c5fd; font-size: 11px; }

/* 合同详情：明细汇总 */
.ci-wrap { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface); }
.ci-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ci-head b { font-size: 14px; }
.ci-hint { font-size: 12px; color: var(--muted); }
.ci-empty { font-size: 12.5px; color: var(--muted); padding: 8px 0; }
.ci-scroll { max-height: 320px; overflow: auto; }
.ci-table th, .ci-table td { white-space: nowrap; font-size: 12.5px; }
.ci-table th.num, .ci-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ci-table tfoot td { background: #f8fafc; border-top: 1px solid var(--border); }

/* 抽屉里的子表明细：按钮别被挤成「改」「删」 */
.dtabs .tab { white-space: nowrap; }
#tab-content table td .btn, #tab-content table td button { white-space: nowrap; }
#tab-content .data-table th, #tab-content .data-table td { font-size: 12.5px; }

/* 抽屉子表：列多时可横滚，操作列固定宽度、按钮不换行 */
.sub-table-wrap { overflow-x: auto; margin-top: 6px; }
.sub-table { min-width: 100%; border-collapse: collapse; }
.sub-table th, .sub-table td { white-space: nowrap; padding: 8px 10px; }
.sub-table td.sub-actions { text-align: right; white-space: nowrap; }
.sub-table td.sub-actions .btn { white-space: nowrap; margin-left: 6px; }
.sub-table .btn.sub-del { background: #fff; border-color: #fecdca; color: #b42318; }

/* 业绩划分标签 */
.perf-tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; }
.perf-NEW { background: #eff8ff; color: #175cd3; }
.perf-RENEW { background: #ecfdf3; color: #067647; }
.perf-OFFLINE { background: #f4f3ff; color: #5925dc; }

/* 客户贡献榜：排名列要窄，首列不要继承会计宽表的 210px */
.cv-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.cv-table thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--border); white-space: nowrap; }
.cv-table th.cv-rank, .cv-table td.cv-rank { width: 62px; min-width: 62px; max-width: 62px;
  text-align: right; padding-right: 14px; padding-left: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cv-table td .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cv-table td.num { font-variant-numeric: tabular-nums; }

/* 退款责任分摊 */
.rf-wrap { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface); }
.rf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rf-head b { font-size: 14px; }
.rf-hint { font-size: 12px; color: var(--muted); flex: 1; }
.rf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rf-cell { background: #fbfcfe; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; }
.rf-lb { font-size: 11.5px; color: var(--muted); }
.rf-vl { font-size: 16px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.rf-vl.ok { color: #067647; } .rf-vl.warn { color: #b54708; } .rf-vl.bad { color: #b42318; }
.rf-sb { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rf-formula { margin-top: 10px; font-size: 12px; color: var(--text-2); background: #f8fafc; border-radius: 6px; padding: 8px 10px; line-height: 1.6; }

/* 首页快捷工作台 */
.qw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qw-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; transition: all .12s; }
.qw-item:hover { border-color: #93c5fd; background: #f5f9ff; transform: translateY(-1px); }
.qw-ico { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; background: #eff4ff; color: #1d4ed8; font-size: 13px; }

/* 授课学堂：课程视频块 */
.cvp-wrap { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface); }
.cvp-head { display: flex; align-items: center; gap: 10px; }
.cvp-head b { font-size: 14px; }
.cvp-hint { flex: 1; font-size: 12px; color: var(--muted); }
.cvp-body { margin-top: 10px; }
.cvp-video { width: 100%; max-height: 380px; border-radius: 8px; background: #000; }
.cvp-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 12.5px; background: #f8fafc; border-radius: 8px; }
.cvp-url { margin-top: 8px; font-size: 12px; color: var(--muted); word-break: break-all; }

/* 我的学堂 */
.ac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ac-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; transition: all .12s; }
.ac-card:hover { border-color: #93c5fd; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(15,23,42,.06); }
.ac-cover { width: 64px; height: 64px; border-radius: 8px; background: #eff4ff; color: #1d4ed8; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.ac-cover.exam { background: #fff7ed; color: #b45309; }
.ac-body { min-width: 0; }
.ac-body b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.ac-meta { font-size: 11.5px; color: var(--muted); }
.ac-sum { font-size: 12px; color: var(--text-2); margin: 4px 0; }
.ac-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ac-tries { font-size: 11px; color: var(--muted); }
.ac-player { margin-top: 16px; }

/* 考试作答 */
.ex-q { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.ex-title { font-size: 13px; line-height: 1.7; }
.ex-type { font-size: 11px; color: var(--muted); margin-left: 8px; }
.ex-opt { display: block; margin: 6px 0 0 18px; font-size: 13px; cursor: pointer; }

/* 学堂视频：不自带进度条，禁止快进 */
.vguard { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #0f172a; color: #e2e8f0; border-radius: 0 0 8px 8px; font-size: 12.5px; }
.vguard-btn { background: #2563eb; color: #fff; border: 0; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; }
.vguard-time { font-variant-numeric: tabular-nums; color: #cbd5e1; }
.vguard-tip { margin-left: auto; color: #fbbf24; }

.ac-done { font-size: 11px; color: #067647; margin-left: 8px; }
.ac-pct { font-size: 11px; color: #b54708; margin-left: 8px; }

/* 新建表单：粘贴识别面板 */
.pf-box { border: 1px dashed #bfd3f8; background: #f7faff; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.pf-head { display: flex; align-items: center; gap: 10px; }
.pf-head b { font-size: 13px; }
.pf-hint { flex: 1; font-size: 11.5px; color: var(--muted); }
.pf-box textarea { width: 100%; margin-top: 8px; font-size: 12.5px; line-height: 1.6; }
.pf-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pf-result { font-size: 11.5px; color: #067647; }
.pf-filled { background: #fffbe6 !important; border-color: #f5c542 !important; }

.pf-over { background: #fef3f2 !important; border-color: #f97066 !important; }

/* 新版本提示条 */
/* 版本更新提示：屏幕居中，带轻遮罩 */
.ver-mask { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 24, 40, .28); backdrop-filter: blur(2px); animation: ver-fade .18s ease; }
@keyframes ver-fade { from { opacity: 0; } to { opacity: 1; } }
.ver-card { position: relative; display: flex; align-items: center; gap: 14px; background: #fff;
  padding: 18px 22px; border-radius: 16px; box-shadow: 0 24px 60px rgba(15,23,42,.28);
  border: 1px solid #e6ebf2; max-width: min(520px, 86vw); animation: ver-pop .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes ver-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.ver-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 700; color: #1d4ed8; background: #eef4ff; }
.ver-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ver-text b { font-size: 14.5px; color: #0f172a; }
.ver-text span { font-size: 12px; color: #667085; line-height: 1.6; }
.ver-close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent;
  color: #98a2b3; font-size: 13px; cursor: pointer; }
.ver-close:hover { color: #475467; }

/* 智能体对话 */
.chat-box { min-height: 320px; max-height: 56vh; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-tip { color: var(--muted); font-size: 12.5px; }
.chat-msg { max-width: 78%; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; }
.chat-msg.me { align-self: flex-end; background: #1d4ed8; color: #fff; }
.chat-msg.ai { align-self: flex-start; background: #f1f5f9; color: var(--text); }
.chat-msg.err { align-self: center; background: #fef3f2; color: #b42318; font-size: 12.5px; }
.chat-input { display: flex; gap: 10px; padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.chat-input textarea { flex: 1; }

/* 知识管理 */
.kb-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.kb-search { display: flex; gap: 10px; padding: 0 14px 12px; }
.kb-search input { flex: 1; }
.kb-hits { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.kb-hit { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.kb-hit-head { font-size: 12px; color: #1d4ed8; font-weight: 600; }
.kb-hit-head span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.kb-hit-body { font-size: 12.5px; line-height: 1.7; color: var(--text-2); margin-top: 4px; }
.kb-docs { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.kb-doc { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.kb-doc b { font-size: 13px; flex: 1; }
.kb-doc span { font-size: 11.5px; color: var(--muted); }
.fl { display: block; margin-bottom: 10px; font-size: 12.5px; color: var(--text-2); }
.fl .input, .fl textarea, .fl select { margin-top: 4px; width: 100%; }

/* 表单分区卡片：可折叠 + 三列 */
.fg-card { border: 1px solid #e6ebf2; border-radius: 12px; margin-bottom: 14px; background: #fff; overflow: hidden; }
.fg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #fbfcfe; }
.fg-title { font-size: 14px; font-weight: 600; color: var(--text); position: relative; padding-left: 10px; }
.fg-title::before { content: ''; position: absolute; left: 0; top: 2px; width: 3px; height: 14px; background: #2563eb; border-radius: 2px; }
.fg-toggle { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.fg-card .fg-body { display: none; padding: 6px 18px 16px; }
.fg-card.open .fg-body { display: block; }
.form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid > .form-item:has(textarea) { grid-column: 1 / -1; }
.form-item .input, .form-item select, .form-item textarea { min-height: 38px; border-radius: 8px; }

/* 字段说明气泡 */
.fh-tip { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  margin-left: 4px; border-radius: 50%; background: #e2e8f0; color: #64748b; font-size: 10px; cursor: help;
  position: relative; vertical-align: middle; }
.fh-tip:hover { background: #2563eb; color: #fff; }
.fh-tip:hover::after { content: attr(data-tip); position: absolute; left: 20px; top: -6px; z-index: 60;
  width: 240px; padding: 8px 10px; background: #0f172a; color: #e2e8f0; font-size: 11.5px; line-height: 1.6;
  border-radius: 8px; box-shadow: 0 6px 20px rgba(15,23,42,.25); white-space: normal; text-align: left; }

/* 列表分屏：左列表 + 右详情 */
/* 分屏：头部整行满宽，下面一行左边表格、右边详情面板 */
#view.split-on { display: flex !important; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
#view.split-on > * { flex: 0 0 100%; min-width: 0; }
#view.split-on > .table-card { flex: 1 1 calc(100% - 432px); }
#view.split-on > .split-pane { flex: 0 0 420px; }
#view.split-on .table-wrap { overflow-x: auto; }
.split-pane { position: sticky; top: 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  max-height: calc(100vh - 140px); overflow: auto; }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sp-head b { font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-actions { display: flex; gap: 6px; flex: none; }
.sp-body { padding: 6px 16px 16px; }
.sp-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #eef2f7; font-size: 12.5px; }
.sp-row span { color: var(--muted); flex: none; }
.sp-row b { font-weight: 500; text-align: right; word-break: break-all; }
.muted { color: var(--muted); }

/* 分屏宽度自适应：窗口越窄，右侧面板越窄 */
@media (max-width: 1600px) {
  #view.split-on > .table-card { flex: 1 1 calc(100% - 372px); }
  #view.split-on > .split-pane { flex: 0 0 360px; }
}
@media (max-width: 1280px) {
  #view.split-on > .table-card { flex: 1 1 calc(100% - 332px); }
  #view.split-on > .split-pane { flex: 0 0 320px; }
}

/* 详情内联编辑 */
.kv[data-kv] { cursor: text; border-radius: 6px; transition: background .12s; }
.kv[data-kv]:hover { background: #f8fafc; }
.kv[data-kv] b .input { min-height: 30px; font-size: 13px; }

/* ---------------- 列表页纵向压缩：一屏至少 20 行 ---------------- */
.page-head { padding: 8px 14px 4px !important; margin-bottom: 4px !important; }
.page-head h1 { font-size: 17px !important; }
.list-head { padding: 8px 14px 4px !important; }
.list-bar { padding: 6px 14px 4px !important; gap: 8px !important; }
.toolbar { padding: 4px 0 6px !important; gap: 6px !important; }
.list-tabs, .list-tab { height: 28px !important; font-size: 12.5px !important; }
.toolbar .input, .toolbar .select, .toolbar .btn { height: 30px !important; font-size: 12.5px !important; }
.tool-aux { display: flex; gap: 4px; }
.tool-aux .icon-btn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: #fff; cursor: pointer; font-size: 13px; color: var(--text-2); }
.tool-aux .icon-btn:hover { border-color: #93c5fd; color: #1d4ed8; }
.tool-aux .icon-btn.on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
#afbar { margin: 0 0 4px !important; }
/* 行高压缩 */
table.data thead th { padding: 5px 10px !important; font-size: 12px !important; height: 30px !important; }
table.data tbody td { padding: 0 10px !important; height: 35px !important; max-height: 35px !important;
  font-size: 12.5px !important; line-height: 35px !important; white-space: nowrap !important; overflow: hidden; }
table.data tbody td > * { vertical-align: middle; }
table.data tbody td .row-hint { display: none !important; }
table.data tbody td .btn, table.data tbody td .icon-btn { height: 24px !important; line-height: 22px !important; padding: 0 8px !important; font-size: 12px !important; }
table.data tbody td .copyable, table.data tbody td .chip { line-height: 1.4 !important; display: inline-block; vertical-align: middle; }
table.data tbody td .due-flag { vertical-align: middle; }
/* 表格区域撑满剩余高度，分页始终贴在卡片底部可见 */
.table-card { display: flex; flex-direction: column; max-height: none !important;
  height: calc(100vh - var(--list-hdr, 150px)); min-height: 320px; }
.table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
.table-card .pager { flex: none; }

/* ---------------- 列表头部再压缩：贴近销售易的一行过滤器 ---------------- */
.list-head { margin-bottom: 2px !important; padding: 2px 2px 0 !important; gap: 10px !important; flex-wrap: nowrap !important; }
.lh-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.lh-meta { font-size: 12px; color: var(--muted); }
.lh-desc { font-size: 11.5px; color: #98a2b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.lh-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.lh-actions .flw-toggle { font-size: 12px; }
.lh-actions .btn { height: 30px !important; font-size: 12.5px !important; }

.list-bar { flex-wrap: nowrap !important; gap: 8px !important; margin-bottom: 4px !important; }
.list-bar .toolbar { flex-wrap: nowrap !important; gap: 6px !important; }
.list-bar .list-tabs { gap: 4px !important; }
.list-bar .list-tab { padding: 0 10px !important; height: 28px !important; font-size: 12.5px !important; }
.afbar { padding: 0 !important; gap: 6px !important; line-height: 1.2; }
.afchip, .afchip * { font-size: 11.5px !important; }
.afbar .afchip button { font-size: 11px !important; }

@media (max-width: 1100px) {
  .lh-desc { display: none; }
}

/* 地址旁的地图检索链接 */
.map-links { display: inline-flex; gap: 6px; margin-left: 8px; }
.map-links a { font-size: 11.5px; color: #1d4ed8; border: 1px solid #bfd3f8; border-radius: 6px; padding: 1px 7px; text-decoration: none; background: #f5f9ff; }
.map-links a:hover { background: #1d4ed8; color: #fff; }

/* 流转记录 */
.flow-list { padding: 12px 0; }
.flow-item { display: flex; gap: 10px; padding: 8px 0; position: relative; }
.flow-dot { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; margin-top: 7px; flex: none; }
.flow-main { flex: 1; }
.flow-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.flow-head b { font-weight: 600; }
.flow-by { color: var(--text-2); }
.flow-time { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.flow-detail { font-size: 12px; color: var(--text-2); margin-top: 2px; word-break: break-all; }

/* 评论 */
.cmt-box { padding: 12px 0; }
.cmt-compose textarea { width: 100%; }
.cmt-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.cmt-list { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.cmt-item { display: flex; gap: 10px; }
.cmt-avatar { width: 30px; height: 30px; border-radius: 50%; background: #e0e7ff; color: #3730a3; display: flex;
  align-items: center; justify-content: center; font-size: 13px; flex: none; }
.cmt-head { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.cmt-head span { color: var(--muted); font-size: 11.5px; }
.cmt-content { font-size: 13px; line-height: 1.7; margin-top: 2px; white-space: pre-wrap; }

/* 头像 */
.avt { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600; flex: none; }
.avt-text { letter-spacing: 0; }

/* 跟进动态流（朋友圈式） */
.feed-day { margin-bottom: 14px; }
.feed-day-label { font-size: 12px; color: var(--muted); margin: 6px 0 8px; padding-left: 2px; }
.feed-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #eef2f7; }
.feed-item:last-child { border-bottom: 0; }
.feed-main { flex: 1; min-width: 0; }
.feed-head { display: flex; align-items: baseline; gap: 6px; font-size: 13px; }
.feed-head b { font-weight: 600; }
.feed-verb { color: var(--text-2); font-size: 12.5px; }
.feed-time { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.feed-content { font-size: 13px; line-height: 1.75; margin: 4px 0 6px; white-space: pre-wrap; word-break: break-word; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--muted); }
.feed-checkin { color: #0e9384; }

/* AI 帮你填 */
.pf-title { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.pf-ai { display: inline-flex; align-items: center; justify-content: center; height: 18px; padding: 0 6px;
  border-radius: 5px; background: linear-gradient(135deg, #7c5cff, #2f7cf6); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px; }

/* 跟进悬浮小窗 */
td.has-pop { cursor: help; }
.fw-pop { position: absolute; z-index: 400; width: 320px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(15,23,42,.18); padding: 10px 12px; }
.fw-item { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #eef2f7; }
.fw-item:last-child { border-bottom: 0; }
.fw-main { min-width: 0; }
.fw-head { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.fw-head b { font-weight: 600; }
.fw-head span { color: var(--muted); font-size: 11px; margin-left: auto; }
.fw-content { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fw-more { font-size: 11px; color: var(--muted); padding-top: 6px; text-align: center; }

/* 展开的跟进区：日期标签与流内容更清晰 */
.flw-panel .feed-day { margin-bottom: 4px; }
.flw-panel .feed-day-label { font-size: 11.5px; color: #98a2b3; letter-spacing: .2px; margin: 2px 0 2px; }
.flw-panel .feed-item { padding: 10px 0; border-bottom: 1px solid #eef2f7; }
.flw-panel .feed-head { font-size: 13px; }
.flw-panel .feed-content { font-size: 13px; color: #344054; }
.flw-panel .feed-meta { font-size: 11.5px; color: #98a2b3; }


/* ---------------- 跟进动态：时间轴 + 分段落 ---------------- */
.feed-group { margin-bottom: 18px; }
.feed-day-label { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.feed-day-label span {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #eef4ff; color: #1d4ed8; font-size: 11.5px; font-weight: 600;
}
.feed-track { position: relative; padding-left: 4px; }
/* 左侧竖线串起来 */
.feed-track::before {
  content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(180deg, #dbe4f3, #eef2f7);
}
.feed-item { display: flex; gap: 10px; padding: 12px 0; position: relative; border-bottom: 0; }
.feed-axis { flex: none; width: 12px; display: flex; justify-content: center; position: relative; }
.feed-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  border: 2px solid #7c8db5; margin-top: 12px; z-index: 1;
}
.feed-item:first-child .feed-dot { border-color: #1d4ed8; }
.feed-main { flex: 1; min-width: 0; padding-bottom: 4px; }
.feed-content { font-size: 13px; color: #344054; line-height: 1.75; margin: 4px 0 6px; }
.feed-content p { margin: 0 0 8px; }
.feed-content p:last-child { margin-bottom: 0; }
.feed-content p + p { margin-top: 0; }
/* 同一天多条：最后一条不再画分割线 */
.feed-group .feed-item:last-child { border-bottom: 0; }

/* ================= 三套主题：多邻国 / 极简（默认）/ 商务 ================= */
/* 极简 = :root 默认变量，不做覆盖 */


/* 多邻国风格：白底 + 中性灰线 + 亮色点缀（按 hue 只换主色） */
html[data-theme="duo"] {
  --duo-main: #58cc02; --duo-dark: #58a700; --duo-soft: #e5f8d4;
  --duo-blue: #1cb0f6; --duo-blue-dark: #1899d6; --duo-blue-soft: #ddf4ff;
  --duo-yellow: #ffc800; --duo-red: #ff4b4b; --duo-purple: #ce82ff;
  --duo-bg-1: #ffffff; --duo-bg-2: #ffffff; --duo-page-bg: #ffffff; --duo-nav-bg: #ffffff;
  --duo-line: #e5e5e5; --duo-line-strong: #d0d0d0;
  --duo-text: #3c3c3c; --duo-text-2: #4b4b4b; --duo-muted: #afafaf;
  --duo-active-bg: #ddf4ff; --duo-active-fg: #1cb0f6;
  --duo-th-bg: #ffffff; --duo-th-fg: #777777; --duo-row-hover: #f7f7f7;
  --duo-shadow-flat: #e5e5e5;
  --duo-shadow-1: rgba(0,0,0,.04); --duo-shadow-2: rgba(0,0,0,.06);
  --duo-shadow-3: rgba(0,0,0,.08); --duo-shadow-4: rgba(0,0,0,.04);
  --duo-shadow-5: rgba(0,0,0,.08);
}
html[data-theme="duo"][data-hue="blue"] {
  --duo-main: #1cb0f6; --duo-dark: #1899d6; --duo-soft: #ddf4ff;
  --duo-active-bg: #ddf4ff; --duo-active-fg: #1899d6;
}
html[data-theme="duo"][data-hue="pink"] {
  --duo-main: #ff6ba9; --duo-dark: #e0488c; --duo-soft: #ffe3ef;
  --duo-active-bg: #ffe3ef; --duo-active-fg: #e0488c;
}
html[data-theme="duo"][data-hue="purple"] {
  --duo-main: #ce82ff; --duo-dark: #a568cc; --duo-soft: #f0e6ff;
  --duo-active-bg: #f0e6ff; --duo-active-fg: #a568cc;
}
html[data-theme="duo"][data-hue="orange"] {
  --duo-main: #ff9600; --duo-dark: #d97a00; --duo-soft: #fff0d9;
  --duo-active-bg: #fff0d9; --duo-active-fg: #d97a00;
}
/* ① 多邻国：绿色系 + 大圆角 + 立体感 + 卡通层次 */
html[data-theme="duo"] {
  --bg: var(--duo-page-bg);
  --surface: #ffffff;
  --surface-2: var(--duo-nav-bg);
  --border: var(--duo-line);
  --border-strong: var(--duo-line-strong);
  --text: var(--duo-text);
  --text-2: var(--duo-text-2);
  --muted: var(--duo-muted);
  --accent: var(--duo-main);
  --accent-2: var(--duo-dark);
  --accent-weak: var(--duo-soft);
  --radius: 18px;
  --radius-sm: 14px;
  --shadow-sm: 0 2px 0 var(--duo-shadow-1);
  --shadow-md: 0 4px 0 var(--duo-shadow-2), 0 10px 22px var(--duo-shadow-4);
  --shadow-lg: 0 6px 0 var(--duo-shadow-3), 0 18px 38px var(--duo-shadow-5);
}
html[data-theme="duo"] body { background: #ffffff; }
html[data-theme="duo"] .topbar { background: #fff; border-bottom: 2px solid var(--duo-line); }
html[data-theme="duo"] .sidebar { border-right: 2px solid var(--duo-line); }
html[data-theme="duo"] .nav { background: var(--duo-nav-bg); }
html[data-theme="duo"] .nav-title { border-radius: 10px; }
html[data-theme="duo"] .nav-title:hover { background: var(--duo-soft); }
html[data-theme="duo"] .nav-links { border-left: 2px dashed var(--duo-line); }
html[data-theme="duo"] .nav a { border-radius: 999px; font-weight: 500; }
html[data-theme="duo"] .nav a.active {
  background: var(--duo-active-bg); color: var(--duo-active-fg); font-weight: 800; box-shadow: none;
}
html[data-theme="duo"] .nav a:hover { background: var(--duo-soft); }
html[data-theme="duo"] .card,
html[data-theme="duo"] .kpi,
html[data-theme="duo"] .kpi2,
html[data-theme="duo"] .table-card { border: 2px solid var(--duo-line); border-radius: 16px; box-shadow: none; }
html[data-theme="duo"] .kpi .value,
html[data-theme="duo"] .kpi2 .value { font-weight: 900; color: var(--duo-active-fg); letter-spacing: -.6px; }
html[data-theme="duo"] .kpi .label { color: var(--duo-muted); font-weight: 700; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) {
  border-radius: 16px; font-weight: 800; letter-spacing: .2px;
  border: 0; box-shadow: 0 4px 0 var(--duo-dark);
  transition: transform .1s ease, box-shadow .1s ease;
}
html[data-theme="duo"] .btn.secondary {
  background: #fff; color: #4b4b4b; border: 2px solid var(--duo-line);
  box-shadow: 0 3px 0 var(--duo-line); font-weight: 800;
}
html[data-theme="duo"] .btn.secondary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--duo-line); }
html[data-theme="duo"] .input, html[data-theme="duo"] select, html[data-theme="duo"] textarea {
  border: 2px solid var(--duo-line) !important; border-radius: 12px !important; background: #fff !important;
}
html[data-theme="duo"] .input:focus, html[data-theme="duo"] select:focus, html[data-theme="duo"] textarea:focus {
  border-color: var(--duo-blue) !important; box-shadow: 0 0 0 3px var(--duo-blue-soft) !important; outline: none !important;
}
html[data-theme="duo"] .btn:not(.ghost):not(.secondary):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-2); }
html[data-theme="duo"] .btn.secondary, html[data-theme="duo"] .list-tab { border-radius: 12px; font-weight: 700; }
html[data-theme="duo"] .list-tab { background: #fff; border: 2px solid var(--duo-line); color: #777; font-weight: 800; }
html[data-theme="duo"] .list-tab.on { background: var(--duo-soft); border-color: var(--duo-main); color: var(--duo-dark); box-shadow: none; }
html[data-theme="duo"] table.data thead th { background: #fff; color: #777; border-bottom: 2px solid var(--duo-line);
  font-weight: 800; text-transform: none; letter-spacing: 0; }
html[data-theme="duo"] .page-head h1 { font-weight: 800; letter-spacing: -.2px; color: #3c3c3c; }
html[data-theme="duo"] .sidebar-foot { border-top: 2px solid var(--duo-line); }
html[data-theme="duo"] .nav a.active { background: var(--duo-active-bg); color: var(--duo-active-fg); }
html[data-theme="duo"] table.data tbody tr:hover { background: var(--duo-row-hover); }
html[data-theme="duo"] .chip, html[data-theme="duo"] .badge { border-radius: 999px; }
html[data-theme="duo"] .page-tab.active { background: var(--duo-soft); color: var(--duo-active-fg); border-radius: 12px 12px 0 0; }

/* ② 商务：深色侧栏 + 冷灰蓝 + 紧凑锐利 */
html[data-theme="pro"] {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #d7dde8;
  --border-strong: #bcc6d6;
  --text: #0b1220;
  --text-2: #37445c;
  --muted: #66748c;
  --accent: #1e3a8a;
  --accent-2: #16306e;
  --accent-weak: #e7ecf8;
  --radius: 5px;
  --radius-sm: 4px;
  --shadow-sm: none;
  --shadow-md: 0 1px 2px rgba(11, 18, 32, .07);
  --shadow-lg: 0 8px 22px rgba(11, 18, 32, .12);
}
html[data-theme="pro"] .sidebar { background: #101a2e; border-right: 0; }
html[data-theme="pro"] .sidebar-head { background: #0b1220; border-bottom: 1px solid #1e2a44; }
html[data-theme="pro"] .sidebar-head .brand-text,
html[data-theme="pro"] .sidebar-head * { color: #e6ecf8 !important; }
html[data-theme="pro"] .nav { background: #101a2e; }
html[data-theme="pro"] .nav-title { color: #c3cee3; }
html[data-theme="pro"] .nav-title:hover { background: #1a2540; }
html[data-theme="pro"] .nav-links { border-left: 1px solid #24314e; }
html[data-theme="pro"] .nav a { color: #94a6c6; border-radius: 4px; }
html[data-theme="pro"] .nav a:hover { background: #1a2540; color: #e6ecf8; }
html[data-theme="pro"] .nav a.active { background: #1e3a8a; color: #fff; box-shadow: none; }
html[data-theme="pro"] .sidebar-foot { border-top: 1px solid #1e2a44; background: #0b1220; color: #94a6c6; }
html[data-theme="pro"] .card,
html[data-theme="pro"] .kpi,
html[data-theme="pro"] .kpi2,
html[data-theme="pro"] .table-card { border-radius: 5px; box-shadow: none; border-color: #d7dde8; }
html[data-theme="pro"] .kpi .value,
html[data-theme="pro"] .kpi2 .value { font-weight: 700; letter-spacing: -.4px; }
html[data-theme="pro"] table.data thead th { background: #eff3fa; border-bottom: 1px solid #d7dde8; letter-spacing: .3px; }
html[data-theme="pro"] .btn, html[data-theme="pro"] .list-tab { border-radius: 4px; }
html[data-theme="pro"] .toast { border-radius: 8px; }

/* 主题切换面板 */
.theme-pop { position: fixed; z-index: 1000; width: 268px; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(16,24,40,.18); padding: 12px; }
.theme-pop h5 { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.theme-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.theme-item:hover { background: #f8fafc; }
.theme-item.on { border-color: var(--accent); background: var(--accent-weak); }
.theme-swatch { width: 30px; height: 30px; border-radius: 9px; flex: none; }
/* 多邻国配色选择 */
.hue-row { display: flex; gap: 8px; padding: 8px 10px 10px 50px; flex-wrap: wrap; }
.hue-dot { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border); transition: transform .12s; }
.hue-dot:hover { transform: scale(1.12); }
.hue-dot.on { box-shadow: 0 0 0 2px var(--text); transform: scale(1.08); }
.hue-dot[data-hue-pick="green"]  { background: linear-gradient(135deg, #58cc02, #89e219); }
.hue-dot[data-hue-pick="blue"]   { background: linear-gradient(135deg, #1cb0f6, #7ed4ff); }
.hue-dot[data-hue-pick="pink"]   { background: linear-gradient(135deg, #ff6ba9, #ffb3d1); }
.hue-dot[data-hue-pick="purple"] { background: linear-gradient(135deg, #a560ff, #c9a3ff); }
.hue-dot[data-hue-pick="orange"] { background: linear-gradient(135deg, #ff9600, #ffc266); }
.theme-swatch.duo { background: linear-gradient(135deg, var(--duo-main, #58cc02), var(--duo-soft, #89e219)); }
.theme-swatch.minimal { background: linear-gradient(135deg, #2563eb, #eff4ff); }
.theme-swatch.pro { background: linear-gradient(135deg, #1e3a8a, #94a3b8); }
.theme-item b { font-size: 13px; display: block; }
.theme-item span { font-size: 11.5px; color: var(--muted); }

/* 头像设置对话框 */
.av-drop { border: 2px dashed #c7d7fe; border-radius: 14px; background: #f7faff; padding: 26px 18px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s; }
.av-drop:hover, .av-drop.over { border-color: #2563eb; background: #eef4ff; }
.av-hint b { display: block; font-size: 13.5px; color: #1d4ed8; margin-bottom: 4px; }
.av-hint span { font-size: 12px; color: var(--muted); }
.av-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.av-preview { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.av-preview .av-shot { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(16,24,40,.16); }
.av-loading { font-size: 12.5px; color: var(--muted); }
.av-tip { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.6; }

/* 头像生成：提示词输入 */
.av-gen { display: inline-flex; gap: 6px; align-items: center; }
.av-gen .input { height: 30px; width: 190px; font-size: 12.5px; border-radius: 8px; }

/* 表单聚焦：去掉浏览器默认蓝色描边，只用主题色（此前绿色主题下会出现"蓝框套绿框"） */
.input:focus, .select:focus,
.form-item input:focus, .form-item select:focus, .form-item textarea:focus,
select:focus, textarea:focus, input:focus {
  outline: none !important;
  outline-offset: 0;
}
/* 下拉框统一为一条主题色描边 + 柔和外圈 */
.form-item select, .select, select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23667085' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px !important;
}
.form-item select:focus, .select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-weak) !important;
}

/* 版本更新卡片：跟随主题（多邻国风单独做一套，避免"商务感"） */
html[data-theme="duo"] .ver-mask { background: rgba(20, 48, 10, .22); backdrop-filter: blur(3px); }
html[data-theme="duo"] .ver-card {
  border-radius: 22px; border: 3px solid var(--duo-line);
  padding: 22px 26px; gap: 16px;
  box-shadow: 0 8px 0 var(--duo-shadow-flat), 0 26px 54px var(--duo-shadow-5);
  animation: duo-ver-in .34s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes duo-ver-in {
  0% { transform: scale(.86) rotate(-1.5deg); opacity: 0; }
  60% { transform: scale(1.02) rotate(.5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
html[data-theme="duo"] .ver-icon {
  width: 54px; height: 54px; background: var(--duo-soft); color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M11 15 C11 8 15 5 17 5 C19 5 20 8 21 10' fill='%2346a302'/%3E%3Cpath d='M37 15 C37 8 33 5 31 5 C29 5 28 8 27 10' fill='%2346a302'/%3E%3Cellipse cx='24' cy='27' rx='17.5' ry='16.5' fill='%2358cc02'/%3E%3Cellipse cx='24' cy='31' rx='12.5' ry='10.5' fill='%23c8f28a'/%3E%3Ccircle cx='16.6' cy='21.5' r='8' fill='%23fff'/%3E%3Ccircle cx='31.4' cy='21.5' r='8' fill='%23fff'/%3E%3Ccircle cx='17.2' cy='22.2' r='4' fill='%233c3c3c'/%3E%3Ccircle cx='30.8' cy='22.2' r='4' fill='%233c3c3c'/%3E%3Cpath d='M21.5 27 h5 l-2.5 4.2 z' fill='%23ffc800'/%3E%3C/svg%3E");
  background-size: 40px 40px; background-position: center; background-repeat: no-repeat;
}
html[data-theme="duo"] .ver-card b { font-size: 17px; font-weight: 900; color: var(--duo-text); }
html[data-theme="duo"] .ver-card span { font-size: 12.5px; color: var(--duo-muted); }
html[data-theme="duo"] .ver-card .btn {
  background: var(--duo-main); border-radius: 12px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 0 var(--duo-dark); border: 0; transition: transform .12s, box-shadow .12s;
}
html[data-theme="duo"] .ver-card .btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--duo-dark); }
html[data-theme="duo"] .ver-card .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--duo-dark); }
html[data-theme="duo"] .ver-close { color: var(--duo-muted); font-size: 15px; }

/* 版本卡片文字不被按钮挤断 */
.ver-card { max-width: min(600px, 88vw); }
.ver-card .ver-text { flex: 1; }
.ver-card .btn { white-space: nowrap; padding: 10px 18px; }
html[data-theme="duo"] .ver-card { max-width: min(640px, 90vw); }
html[data-theme="duo"] .ver-card .btn { padding: 12px 22px; font-size: 14.5px; }

/* ---------------- 跟进工作台 ---------------- */
.wb-mask { position: fixed; inset: 0; z-index: 1200; background: var(--bg);
  display: flex; align-items: stretch; justify-content: center; animation: wb-in .18s ease; }
@keyframes wb-in { from { opacity: 0; transform: scale(.99); } to { opacity: 1; transform: none; } }
.wb-shell { width: min(760px, 100vw); display: flex; flex-direction: column; background: var(--bg); }
.wb-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 10px; }
.wb-close { border: 0; background: transparent; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.wb-close:hover { background: var(--surface); color: var(--text); }
.wb-progress { flex: 1; display: flex; align-items: center; gap: 10px; }
.wb-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--surface); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border); }
.wb-bar i { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s cubic-bezier(.34,1.56,.64,1); }
.wb-count { font-size: 12.5px; color: var(--text-2); white-space: nowrap; font-weight: 600; }
.wb-streak { font-size: 12.5px; color: var(--accent-2); font-weight: 700; white-space: nowrap; }
.wb-body { flex: 1; overflow-y: auto; padding: 8px 20px 28px; display: flex; flex-direction: column; }
.wb-loading { margin: 60px auto; color: var(--muted); font-size: 13px; }
.wb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px 18px; box-shadow: var(--shadow-md); margin-top: 10px; }
.wb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-tag { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--accent-weak); color: var(--accent-2); font-weight: 600; }
.wb-tag.warn { background: var(--red-weak); color: var(--red); }
.wb-tag.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.wb-idx { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.wb-name { font-size: 21px; font-weight: 700; margin: 12px 0 6px; letter-spacing: -.3px; }
.wb-sub { font-size: 13px; color: var(--text-2); }
.wb-last { font-size: 12.5px; color: var(--muted); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.wb-input { width: 100%; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; line-height: 1.7; resize: vertical; min-height: 110px; font-family: inherit; background: var(--surface); color: var(--text); }
.wb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.wb-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.wb-sel { height: 32px; padding: 0 28px 0 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; }
.wb-due { display: inline-flex; align-items: center; gap: 6px; }
.wb-due input[type="datetime-local"] { height: 32px; border-radius: 9px; border: 1px solid var(--border); padding: 0 8px; font-size: 12.5px; background: var(--surface); color: var(--text); }
.wb-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.wb-primary { min-width: 160px; }
.wb-done { text-align: center; margin: 70px auto; }
.wb-done-emoji { font-size: 54px; }
.wb-done h3 { font-size: 20px; margin: 12px 0 6px; }
.wb-done p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

/* 多邻国风：更大的圆角与立体按钮 */
html[data-theme="duo"] .wb-card { border-width: 3px; border-color: var(--duo-line); border-radius: 22px; box-shadow: 0 6px 0 var(--duo-shadow-flat); }
html[data-theme="duo"] .wb-primary { background: var(--duo-main); border: 0; border-radius: 12px; font-weight: 800; box-shadow: 0 4px 0 var(--duo-dark); }
html[data-theme="duo"] .wb-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--duo-dark); }
html[data-theme="duo"] .wb-bar i { background: var(--duo-main); }

/* 未选时间时「提醒我」置灰 */
.flw-mktask.off { opacity: .45; }
.flw-mktask.off input { cursor: not-allowed; }

/* 按钮聚焦：去掉浏览器默认蓝圈，改用主题色柔环（多邻国保留立体边） */
button:focus, .btn:focus, .btn:focus-visible, .cf-foot .btn:focus {
  outline: none !important;
}
.btn:focus-visible { box-shadow: 0 0 0 3px var(--accent-weak); }
html[data-theme="duo"] .btn:focus-visible {
  box-shadow: 0 4px 0 var(--duo-dark), 0 0 0 3px var(--duo-soft);
}
html[data-theme="duo"] .btn.danger:focus-visible,
html[data-theme="duo"] .btn.danger {
  background: #ff4b4b; border: 0; box-shadow: 0 4px 0 #d33131, 0 0 0 3px #ffe0e0;
}
html[data-theme="duo"] .btn.danger:active { transform: translateY(2px); box-shadow: 0 1px 0 #d33131; }
html[data-theme="pro"] .btn:focus-visible { box-shadow: 0 0 0 2px var(--accent-weak); }

/* 草稿恢复提示 */
.flw-draft-tip { font-size: 11.5px; color: var(--accent-2); background: var(--accent-weak);
  border-radius: 6px; padding: 3px 8px; margin-bottom: 6px; display: inline-block; }


/* 旗帜轻微浮动，提醒"这个要跟了" */
@keyframes flag-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}
@media (prefers-reduced-motion: reduce) {
  .due-flag.today { animation: none; }
}

/* 悬浮气泡提示 */
.tip-bubble {
  position: fixed; z-index: 2000; max-width: 280px;
  background: rgba(16, 24, 40, .94); color: #fff;
  font-size: 12px; line-height: 1.5; padding: 6px 10px; border-radius: 8px;
  pointer-events: none; opacity: 0; transform: translateY(-3px);
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: 0 8px 20px rgba(16, 24, 40, .25);
}
.tip-bubble.in { opacity: 1; transform: none; }
html[data-theme="duo"] .tip-bubble { border-radius: 10px; font-weight: 600; background: rgba(20, 48, 10, .95); }

/* 列表里的公司名：悬浮出现复制按钮，点名字仍然进详情 */
.name-copy {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12px; padding: 1px 4px; border-radius: 5px; opacity: 0;
  transition: opacity .12s, background .12s, color .12s; vertical-align: middle;
}
tr:hover .name-copy { opacity: .7; }
.name-copy:hover { opacity: 1; color: var(--accent); background: var(--accent-weak); }
.name-copy.copied { opacity: 1; color: var(--green); }

/* 今日目标 */
.today-goal { margin: 0 0 14px; }
.goal-card { display: flex; align-items: center; gap: 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-sm); }
.goal-left { min-width: 150px; }
.goal-title { font-size: 13px; font-weight: 600; color: var(--text); }
.goal-streak { font-size: 12px; color: var(--muted); margin-top: 4px; }
.goal-streak.on { color: #d97706; font-weight: 600; }
.goal-items { display: flex; gap: 26px; flex: 1; }
.goal-item { display: flex; align-items: center; gap: 10px; }
.goal-ring-wrap { position: relative; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.goal-ring-wrap b { position: absolute; font-size: 15px; font-weight: 700; color: var(--text); }
.goal-meta span { display: block; font-size: 12.5px; color: var(--text-2); }
.goal-meta small { font-size: 11px; color: var(--muted); }
html[data-theme="duo"] .goal-card { border-width: 3px; border-color: var(--duo-line); border-radius: 20px; box-shadow: 0 4px 0 var(--duo-shadow-flat); }
html[data-theme="duo"] .goal-streak.on { color: var(--duo-active-fg); }

/* 自动提醒说明 */
.flw-auto-tip { font-size: 11.5px; color: var(--muted); }
.flw-auto-tip.off { color: #b6bfcc; }

/* 评论 @ 选人 */
.at-pop { position: fixed; z-index: 1500; width: 220px; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16,24,40,.16); padding: 4px; }
.at-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.at-item:hover { background: var(--accent-weak); }
.at-av { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-weak); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: none; }
.at-item b { font-size: 12.5px; }
.at-item small { font-size: 11px; color: var(--muted); margin-left: auto; }
.cmt-at { color: var(--accent-2); font-weight: 600; }
html[data-theme="duo"] .at-item:hover { background: var(--duo-soft); }
html[data-theme="duo"] .cmt-at { color: var(--duo-active-fg); }

/* 详情里的跟进时间轴 */
.ff-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.ff-head h4 { font-size: 14px; }
.ff-list .feed-track::before { left: 9px; }
.ff-box { background: span; }
.ff-box, .ff-compose { margin-bottom: 14px; }
.ff-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.ff-text { width: 100%; border: 0; outline: none; resize: vertical; min-height: 70px; font-size: 13.5px;
  line-height: 1.7; font-family: inherit; color: var(--text); background: transparent; }
.ff-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; font-size: 12.5px; color: var(--text-2); }
.ff-tools select { height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12.5px; padding: 0 8px; }
.ff-tools input[type="datetime-local"] { height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12.5px; padding: 0 8px; }
.ff-tools .btn { margin-left: auto; }
.ff-tools .btn + .btn { margin-left: 0; }

/* 最新跟进列 */
.lf-cell { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom; color: var(--text-2); font-size: 12.5px; }

/* 最新跟进：时间在前，内容在后 */
.lf-time { font-style: normal; color: var(--muted); font-size: 11.5px; margin-right: 6px; }

/* 弹窗里的单选卡片 */
.cf-radios { display: flex; flex-direction: column; gap: 8px; }
.cf-radio { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  font-size: 13.5px; color: var(--text); transition: border-color .12s, background .12s; }
.cf-radio:hover { border-color: var(--accent); background: var(--accent-weak); }
.cf-radio.on { border-color: var(--accent); background: var(--accent-weak); font-weight: 600; }
.cf-radio input { margin: 0; accent-color: var(--accent); }
html[data-theme="duo"] .cf-radio { border-radius: 12px; }
html[data-theme="duo"] .cf-radio.on { border-color: var(--duo-main); background: var(--duo-soft); }
html[data-theme="duo"] .cf-radio input { accent-color: var(--duo-main); }

/* 表单暂存提示条 */
.draft-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
  background: var(--amber-weak); border: 1px solid #fedf89; color: #b54708;
  padding: 9px 12px; border-radius: 10px; font-size: 12.5px; }
.draft-bar span { flex: 1; }
html[data-theme="duo"] .draft-bar { border-radius: 12px; }

/* 列表页顶部汇总条 */
.mod-sum { margin: 0 0 10px; }
.ms-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; box-shadow: var(--shadow-sm); }
.ms-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: transparent; border: 0; padding: 4px 12px 4px 0; cursor: pointer; text-align: left;
  border-right: 1px solid var(--border); }
.ms-chip:last-of-type { border-right: 0; }
.ms-chip b { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.3px; }
.ms-chip span { font-size: 11.5px; color: var(--muted); }
.ms-chip:hover b { color: var(--accent); }
.ms-chip.warn b { color: var(--amber); }
.ms-chip.danger b { color: var(--red); }
.ms-goal { margin-left: auto; min-width: 190px; }
.ms-goal-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.ms-goal-top b { color: var(--text); }
.ms-bar { height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; }
.ms-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .3s ease; }
html[data-theme="duo"] .ms-inner { border-width: 3px; border-color: var(--duo-line); border-radius: 18px; box-shadow: 0 3px 0 var(--duo-shadow-flat); }
html[data-theme="duo"] .ms-bar i { background: var(--duo-main); }

/* 目标编辑小按钮 */
.ms-edit { margin-left: 6px; border: 0; background: var(--accent-weak); color: var(--accent-2);
  font-size: 11px; padding: 1px 7px; border-radius: 6px; cursor: pointer; }
.ms-edit:hover { background: var(--accent); color: #fff; }

/* 薪酬测算卡片 */
.sal-rule { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; line-height: 1.6; }
.sal-rows { display: flex; flex-direction: column; }
.sal-row { display: flex; align-items: baseline; gap: 8px; padding: 8px 2px; border-bottom: 1px dashed var(--border); font-size: 13px; }
.sal-row span { color: var(--text-2); width: 140px; flex: none; }
.sal-row b { font-variant-numeric: tabular-nums; }
.sal-row b.ok { color: var(--green); }
.sal-row i { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: auto; }
.sal-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--border); }
.sal-total b { font-size: 22px; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.sal-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 12px; }
.sal-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.sal-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
html[data-theme="duo"] .sal-bar i { background: var(--duo-main); }

/* 金币规则表 */
.coin-table td { vertical-align: middle; }
.coin-table .input { height: 32px; }
.coin-table .num { font-variant-numeric: tabular-nums; }
.coin-example td { color: var(--muted); font-size: 12.5px; background: var(--surface-2); }
.coin-tip { padding: 12px 16px; font-size: 12.5px; color: var(--text-2); line-height: 1.8; border-top: 1px solid var(--border); }
.coin-tip b { color: var(--text); }

/* 本月金币 chip */
.coin-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: linear-gradient(135deg, #fff7e6, #ffeccc); border: 1px solid #f7c873;
  border-radius: 12px; padding: 6px 14px; cursor: pointer; margin-right: 6px; }
.coin-chip span { font-size: 11px; color: #b45309; }
.coin-chip b { font-size: 17px; color: #b45309; }
.coin-chip i { font-style: normal; font-size: 10.5px; color: #c98a3c; }
.coin-chip:hover { filter: brightness(0.98); }

/* 金币流水 */
.coin-top { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 12px; }
.coin-top b { font-size: 26px; color: #b45309; }
.coin-top span { font-size: 12px; color: var(--muted); }
.coin-list { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--border); }
.coin-item { display: flex; justify-content: space-between; align-items: center;
  padding: 9px 2px; border-bottom: 1px dashed var(--border); }
.coin-item-l b { font-size: 13px; }
.coin-item-l span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.coin-item-r { text-align: right; }
.coin-item-r b { font-size: 14px; color: var(--green); }
.coin-item-r span { display: block; font-size: 11px; color: var(--muted); }
.coin-empty { padding: 26px 0; text-align: center; color: var(--muted); font-size: 13px; }
.coin-foot { font-size: 11.5px; color: var(--muted); padding-top: 10px; }

/* 顶栏金币 */
.top-coin { display: flex; align-items: center; }
.top-coin-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px;
  border-radius: 999px; border: 1px solid #f7c873; background: #fff8e8; cursor: pointer; }
.top-coin-btn:hover { background: #fff2d6; }
.tc-ico { font-size: 13px; }
.tc-num { font-size: 12.5px; font-weight: 700; color: #b45309; }
html[data-theme="duo"] .top-coin-btn { border-radius: 999px; }

/* 金币规则页的 AI 输入框 */
.coin-ai { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, background .15s; }
.coin-ai.over { border-color: var(--accent); background: var(--accent-weak); }
.coin-ai-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.coin-ai-head b { font-size: 13.5px; }
.coin-ai-head span { font-size: 11.5px; color: var(--muted); }
.coin-ai-text { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.7; resize: vertical; min-height: 66px; font-family: inherit;
  background: var(--surface); color: var(--text); }
.coin-ai-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.coin-ai-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.coin-ai-tip { font-size: 11.5px; color: var(--muted); flex: 1; }
html[data-theme="duo"] .coin-ai { border-width: 3px; border-color: var(--duo-line); border-radius: 18px; box-shadow: 0 3px 0 var(--duo-shadow-flat); }

/* 金币规则：跳档 / 等级 / 任务 */
.coin-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.tier-list, .task-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tier-row, .task-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.tier-row .input, .task-row .input { height: 28px; font-size: 12px; }
.tier-row.extra span { color: var(--amber); }
.grade-row { display: flex; gap: 12px; flex-wrap: wrap; }
.grade-row label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.grade-row .input { height: 30px; }

/* 金币规则表：紧凑排布，避免档位换行挤乱 */
.coin-table { table-layout: fixed; }
.coin-table td { vertical-align: top; padding: 10px 12px; }
.coin-table td.num { text-align: left; }
.coin-table td.num .input { width: 110px; }
.tier-row { display: grid; grid-template-columns: auto 92px auto 92px auto; align-items: center;
  gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.tier-row.extra { grid-template-columns: auto 92px auto 92px auto; }
.tier-row .input { width: 92px; height: 26px; padding: 0 6px; font-size: 12px; text-align: right; }
.task-row { display: grid; grid-template-columns: 140px 96px 1fr; align-items: center; gap: 8px; }
.task-row .input { height: 26px; font-size: 12px; }
.grade-row { display: flex; gap: 10px; flex-wrap: wrap; }
.grade-row label { font-size: 12px; white-space: nowrap; }
.grade-row .input { width: 78px; height: 28px; }

/* 档位行文字与输入框之间留白 */
.tier-row span { padding: 0 4px; white-space: nowrap; }
.tier-row .input { padding: 0 8px; }

/* ---------- 金币规则（现金口径） ---------- */
.cy-list { display: flex; flex-direction: column; gap: 14px; }
.cy-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.cy-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cy-head h3 { font-size: 14px; margin: 0; }
.cy-sw { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cy-body { padding: 12px 16px 14px; }
.cy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin: 6px 0; }
.cy-in { height: 32px; padding: 0 10px; font-size: 13px; text-align: right; width: 110px; }
.cy-sub { font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.cy-extra span { color: var(--amber); }
.cy-empty { font-size: 12px; color: var(--muted); padding: 4px 0; }
.cy-grades { gap: 14px; }
.cy-grade { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.cy-grade .cy-in { width: 88px; }
.cy-preview { margin-top: 12px; padding: 8px 12px; background: var(--accent-weak); border-radius: 8px; font-size: 12.5px; color: var(--accent-2); }
.cy-preview b { font-size: 15px; }
.cy-tip { font-size: 12px; color: var(--muted); margin-top: 8px; }
.cy-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
html[data-theme="duo"] .cy-card { border-width: 3px; border-color: var(--duo-line); border-radius: 18px; box-shadow: 0 3px 0 var(--duo-shadow-flat); }

/* 规则分组标题 */
.cy-group { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 -4px; }
.cy-group span { font-size: 13px; font-weight: 700; color: var(--text); }
.cy-group i { font-style: normal; font-size: 11.5px; color: var(--muted); }

/* ---------- 领取线索：种子发芽 ---------- */
.seed-mask { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 30, 20, .28); backdrop-filter: blur(2px); animation: seedFade .2s ease; }
@keyframes seedFade { from { opacity: 0 } to { opacity: 1 } }
.seed-card { position: relative; width: 360px; background: var(--surface); border-radius: 20px; padding: 26px 24px 20px;
  text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.22); overflow: hidden; animation: seedPop .34s cubic-bezier(.2,1.3,.5,1); }
@keyframes seedPop { from { transform: scale(.9) translateY(10px); opacity: 0 } to { transform: none; opacity: 1 } }
.seed-art { position: relative; height: 92px; display: flex; align-items: flex-end; justify-content: center; }
.seed-emoji { font-size: 54px; display: inline-block; animation: seedGrow 1.1s cubic-bezier(.2,1.4,.5,1) both; transform-origin: bottom center; }
@keyframes seedGrow { 0% { transform: scale(.2) translateY(18px); opacity: .2 } 60% { transform: scale(1.12) translateY(-4px); opacity: 1 } 100% { transform: scale(1) translateY(0) } }
.seed-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0; }
.seed-dot.d1 { left: 40%; bottom: 20px; animation: seedSpark 1.4s .45s ease-out; }
.seed-dot.d2 { left: 56%; bottom: 30px; animation: seedSpark 1.4s .6s ease-out; }
.seed-dot.d3 { left: 48%; bottom: 44px; animation: seedSpark 1.4s .75s ease-out; }
@keyframes seedSpark { 0% { opacity: 1; transform: translateY(0) scale(1) } 100% { opacity: 0; transform: translateY(-34px) scale(.4) } }
.seed-title { font-size: 18px; font-weight: 800; margin-top: 6px; }
.seed-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.seed-tip { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.7; }
.seed-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.seed-bar { height: 4px; border-radius: 999px; background: var(--border); margin-top: 16px; overflow: hidden; }
.seed-bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left;
  animation: seedCountdown 9s linear forwards; }
@keyframes seedCountdown { from { transform: scaleX(1) } to { transform: scaleX(0) } }
html[data-theme="duo"] .seed-card { border: 4px solid var(--duo-line); border-radius: 22px; box-shadow: 0 6px 0 var(--duo-shadow-flat); }

/* ---------- 跟进成长植物 ---------- */
.plant-box { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 8px; margin-right: 6px;
  border-radius: 14px; background: var(--surface-2); }
.plant-pot { position: relative; width: 46px; height: 60px; }
.plant-pot .stem { position: absolute; left: 22px; bottom: 6px; width: 3px; height: 26px; border-radius: 2px;
  background: linear-gradient(180deg, #7ac74f, #4e9d2d); }
.plant-pot .leaf { position: absolute; font-size: 15px; line-height: 1; animation: leafIn .5s ease both; }
.plant-pot .leaf.l { left: 2px; transform: scaleX(-1); }
.plant-pot .leaf.r { right: 2px; }
@keyframes leafIn { from { transform: scale(.2); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.plant-pot .leaf.l { animation-name: leafInL; }
@keyframes leafInL { from { transform: scale(.2) scaleX(-1); opacity: 0 } to { transform: scale(1) scaleX(-1); opacity: 1 } }
.plant-pot .bloom { position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); font-size: 24px;
  animation: bloomPop .7s cubic-bezier(.2,1.5,.5,1) both; }
@keyframes bloomPop { 0% { transform: translateX(-50%) scale(.2) rotate(-25deg); opacity: 0 } 70% { transform: translateX(-50%) scale(1.15) rotate(6deg) } 100% { transform: translateX(-50%) scale(1) rotate(0); opacity: 1 } }
.plant-meta { display: flex; flex-direction: column; line-height: 1.25; }
.plant-meta b { font-size: 15px; }
.plant-meta span { font-size: 11px; color: var(--muted); }
.plant-meta i { font-style: normal; font-size: 10.5px; color: var(--green); margin-top: 2px; }
html[data-theme="duo"] .plant-box { border: 2px solid var(--duo-line); }

/* 金豆子图标 */
.bean-svg { display: inline-block; vertical-align: -0.14em; }
.tc-ico .bean-svg { width: 15px; height: 15px; }
.cf-ic .bean-svg { width: 18px; height: 18px; }
.top-coin-btn .tc-ico { display: inline-flex; align-items: center; }

/* 金豆子榜 */
.rank-table tr.me { background: var(--accent-weak); }
.rank-no { font-size: 16px; text-align: center; }
.rank-bar { position: relative; height: 22px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd75e, #f5b21a); border-radius: 999px; }
.rank-bar b { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; }

/* 工资条 */
.payslip-rows { display: flex; flex-direction: column; gap: 6px; }
.payslip-row { font-size: 13px; color: var(--text-2); }
.payslip-total { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--border); }
.payslip-total b { font-size: 24px; color: var(--accent-2); }
.payslip-total i { font-style: normal; font-size: 12px; color: var(--muted); margin-left: auto; }

/* 浇水 */
.plant-box { position: relative; overflow: visible; }
.plant-box.watering .plant-pot { animation: plantDrink .9s ease; }
@keyframes plantDrink { 0%,100% { transform: none } 40% { transform: translateY(2px) scale(1.05) } }
.water-drop { position: absolute; top: -2px; font-size: 12px; pointer-events: none;
  animation: dropFall 1.1s cubic-bezier(.4,0,.7,1) forwards; }
@keyframes dropFall {
  0% { opacity: 0; transform: translateY(-6px) scale(.8); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(46px) scale(.6); }
}
.plant-energy { color: #2f80ed !important; }

/* 无效线索分布 */
.invalid-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 10px; margin-bottom: 10px; }
.is-label { font-size: 12px; color: var(--muted); }
.is-chip { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--text-2); }
.is-chip b { color: var(--text); margin-left: 2px; }
.is-chip:hover { border-color: var(--accent); color: var(--accent-2); }
.is-chip.warn b { color: var(--amber); }
.is-chip.danger b { color: var(--red); }
.is-total { margin-left: auto; font-size: 12px; color: var(--muted); }
.is-empty { font-size: 12px; color: var(--muted); }

/* 今日路径 */
.path-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.path-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.path-top b { font-size: 26px; color: var(--accent-2); }
.path-top span { font-size: 12px; color: var(--muted); }
.path-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin-left: 10px; }
.path-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8ef0ff, #4cc9f0); border-radius: 999px; transition: width .3s; }
.path-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px dashed var(--border); }
.path-item:first-child { border-top: 0; }
.path-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-weak); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.path-item.done .path-dot { background: var(--green-weak, #e6f7e6); color: var(--green); }
.path-main b { font-size: 13.5px; }
.path-item.done .path-main b { text-decoration: line-through; color: var(--muted); }
.path-main span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.path-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.path-ok { font-size: 12px; color: var(--green); }
.path-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 13px; }

/* 今日路径完成庆祝 */
.path-celebrate { position: fixed; inset: 0; z-index: 210; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 25, 40, .32); backdrop-filter: blur(2px); animation: seedFade .2s ease; }
.pc-card { background: var(--surface); border-radius: 20px; padding: 26px 30px 20px; text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.25); animation: seedPop .35s cubic-bezier(.2,1.3,.5,1); min-width: 260px; }
.pc-gem { font-size: 46px; animation: bloomPop .8s cubic-bezier(.2,1.5,.5,1) both; }
.pc-title { font-size: 18px; font-weight: 800; margin-top: 8px; }
.pc-sub { font-size: 14px; color: var(--accent-2); margin-top: 6px; font-weight: 700; }
.pc-tip { font-size: 12px; color: var(--muted); margin: 10px 0 16px; }
html[data-theme="duo"] .pc-card { border: 4px solid var(--duo-line); box-shadow: 0 6px 0 var(--duo-shadow-flat); }

/* 路径页宝石数 */
.path-gems { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--text-2); }
.path-gems b { font-size: 18px; color: #2b7fd4; }
.path-gems svg { width: 18px; height: 18px; }

/* 主题弹窗里的游戏化开关 */
.theme-gamify { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.theme-gamify div { display: flex; flex-direction: column; }
.theme-gamify b { font-size: 12.5px; }
.theme-gamify span { font-size: 11px; color: var(--muted); }

/* 首次选择界面风格 */
.theme-first { position: fixed; inset: 0; z-index: 220; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 25, 20, .3); backdrop-filter: blur(2px); }
.tf-card { background: var(--surface); border-radius: 18px; padding: 22px 24px 18px; width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: seedPop .3s cubic-bezier(.2,1.3,.5,1); }
.tf-title { font-size: 16px; font-weight: 800; }
.tf-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tf-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 12px; }
.tf-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; }
.tf-item:hover { border-color: var(--accent); background: var(--accent-weak); }
.tf-item b { font-size: 13.5px; }
.tf-item i { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: auto; }

/* 喜报飘屏 */
.cheer-pop { position: fixed; right: 24px; bottom: 28px; z-index: 205; animation: cheerIn .45s cubic-bezier(.2,1.3,.5,1); }
@keyframes cheerIn { from { transform: translateX(40px); opacity: 0 } to { transform: none; opacity: 1 } }
.cheer-card { position: relative; width: 330px; background: linear-gradient(160deg, #fff9ec, #fff); border: 1px solid #f7d488;
  border-radius: 16px; padding: 16px 18px 14px; box-shadow: 0 14px 40px rgba(180, 120, 20, .25); overflow: hidden; }
.cheer-glow { position: absolute; inset: -40% -10% auto -10%; height: 120px; background: radial-gradient(circle, rgba(255,215,94,.55), transparent 70%); pointer-events: none; }
.cheer-kind { font-size: 12px; color: #b45309; font-weight: 700; }
.cheer-title { font-size: 15px; font-weight: 800; margin-top: 4px; line-height: 1.4; }
.cheer-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.cheer-close { position: absolute; top: 8px; right: 10px; cursor: pointer; color: var(--muted); font-size: 12px; }
.cheer-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cheer-btn { border: 1px solid #f2d29a; background: #fffdf6; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.cheer-btn:hover { background: #fff3d6; border-color: #e8b45a; }
.cheer-btn:disabled { opacity: .5; }
.cheer-counts { margin-top: 10px; font-size: 11.5px; color: var(--muted); }
html[data-theme="duo"] .cheer-card { border-width: 3px; border-radius: 20px; box-shadow: 0 5px 0 var(--duo-shadow-flat); }

/* 喜报中心 */
.cheer-item { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.cheer-item-title { font-size: 13.5px; font-weight: 700; }
.cheer-item-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.cheer-item-react { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cheer-pill { font-size: 11.5px; background: var(--surface-2); border-radius: 999px; padding: 3px 9px; color: var(--text-2); }
.cheer-pill.muted { color: var(--muted); }

/* 喜报滚屏 */
#cheer-ticker { position: sticky; top: 0; z-index: 40; height: 32px; display: flex; align-items: center;
  margin: 0 0 6px; border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, #fff7e0, #fffdf5 40%, #fff7e0); border-bottom: 1px solid #f3ddb0; }
#cheer-ticker .ct-tag { flex: none; margin: 0 10px; font-size: 11.5px; font-weight: 700; color: #b45309;
  background: #ffe9b8; border-radius: 999px; padding: 2px 8px; }
#cheer-ticker .ct-track { flex: 1; overflow: hidden; cursor: pointer; }
#cheer-ticker .ct-text { display: inline-block; white-space: nowrap; font-size: 12.5px; color: #8a5a00;
  padding-left: 100%; animation: ctScroll 28s linear infinite; }
@keyframes ctScroll { from { transform: translateX(0) } to { transform: translateX(-100%) } }

#cheer-ticker .ct-close { flex: none; margin: 0 10px; cursor: pointer; color: #b45309; font-size: 12px; opacity: .7; }
#cheer-ticker .ct-close:hover { opacity: 1; }
#cheer-ticker.ct-hide { animation: ctOut .28s ease forwards; }
@keyframes ctOut { to { opacity: 0; transform: translateY(-100%); } }

/* ---------- 多邻国风格：图标与细节打磨 ---------- */
html[data-theme="duo"] .nav a .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 8px; margin-right: 6px;
  background: #f0f0f0; color: #777; font-size: 11px; line-height: 1;
}
html[data-theme="duo"] .nav a.active .ico { background: #fff; color: var(--duo-active-fg); }
html[data-theme="duo"] .nav a:hover .ico { background: #e8e8e8; }
html[data-theme="duo"] .nav a { color: #4b4b4b; font-weight: 600; padding: 6px 10px; }
html[data-theme="duo"] .nav a.active { font-weight: 800; }

html[data-theme="duo"] .btn.sm { border-radius: 999px; padding: 3px 12px; font-size: 12px; }
html[data-theme="duo"] .btn.secondary.sm { box-shadow: none; border-width: 2px; }
html[data-theme="duo"] .btn.secondary.sm:hover { background: #f7f7f7; }

html[data-theme="duo"] table.data tbody td { border-bottom: 1px solid #f0f0f0; }
html[data-theme="duo"] .name-copy { color: #afafaf; }
html[data-theme="duo"] .link, html[data-theme="duo"] .row-link { color: var(--duo-blue); font-weight: 700; }

/* 顶部小标签统一圆角 */
html[data-theme="duo"] .chip, html[data-theme="duo"] .badge, html[data-theme="duo"] .pill {
  border-radius: 999px; border: 2px solid var(--duo-line); background: #fff; font-weight: 700;
}
html[data-theme="duo"] .topbar { box-shadow: none; }
html[data-theme="duo"] .search-box { border: 2px solid var(--duo-line); border-radius: 999px; background: #fff; }
html[data-theme="duo"] .search-box:focus-within { border-color: var(--duo-blue); box-shadow: 0 0 0 3px var(--duo-blue-soft); }
html[data-theme="duo"] .page-tab { border-radius: 12px 12px 0 0; }
html[data-theme="duo"] .page-tab.active { background: var(--duo-blue-soft); color: var(--duo-blue-dark); font-weight: 800; }

/* 菜单图标：emoji 不再套灰色底，只要对齐 */
html[data-theme="duo"] .nav a .ico {
  background: transparent; width: 20px; height: 20px; font-size: 13px; border-radius: 0;
}
html[data-theme="duo"] .nav a.active .ico { background: transparent; }
html[data-theme="duo"] .nav a:hover .ico { background: transparent; }

/* ================= ④ 多邻国·鲜亮（照 App 原版配色） ================= */
html[data-theme="duo2"] {
  --d-green: #58cc02; --d-green-dark: #58a700; --d-green-soft: #d7ffb8; --d-green-line: #a5ed6e;
  --d-blue: #1cb0f6; --d-blue-dark: #1899d6; --d-blue-soft: #ddf4ff;
  --d-orange: #ff9600; --d-yellow: #ffc800; --d-red: #ff4b4b; --d-purple: #ce82ff; --d-pink: #ff86d0;
  --d-ink: #3c3c3c; --d-ink-2: #4b4b4b; --d-muted: #afafaf; --d-line: #e5e5e5;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --border: var(--d-line);
  --border-strong: #d0d0d0;
  --text: var(--d-ink);
  --text-2: var(--d-ink-2);
  --muted: var(--d-muted);
  --accent: var(--d-green);
  --accent-2: var(--d-green-dark);
  --accent-weak: var(--d-green-soft);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: none;
  --shadow-md: 0 2px 0 rgba(0,0,0,.04);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.10);
  font-size: 15px;
}
html[data-theme="duo2"] body { background: #fff; color: var(--d-ink); }

/* 侧栏 */
html[data-theme="duo2"] .sidebar { background: #fff; border-right: 2px solid var(--d-line); }
html[data-theme="duo2"] .sidebar-head { background: #fff; border-bottom: 2px solid var(--d-line); }
html[data-theme="duo2"] .nav { background: #fff; }
html[data-theme="duo2"] .nav-title { color: #777; font-weight: 800; font-size: 12px; letter-spacing: .4px; }
html[data-theme="duo2"] .nav-links { border-left: 0; }
html[data-theme="duo2"] .nav a {
  color: var(--d-ink-2); font-weight: 700; font-size: 14px; border-radius: 12px;
  padding: 7px 10px; margin: 1px 0; border: 2px solid transparent;
}
html[data-theme="duo2"] .nav a:hover { background: #f7f7f7; }
html[data-theme="duo2"] .nav a.active {
  background: var(--d-green-soft); color: var(--d-green-dark); font-weight: 800;
  border-color: var(--d-green-line);
}
html[data-theme="duo2"] .nav a .ico { font-size: 15px; }
html[data-theme="duo2"] .sidebar-foot { border-top: 2px solid var(--d-line); background: #fff; color: var(--d-muted); }

/* 顶栏 */
html[data-theme="duo2"] .topbar { background: #fff; border-bottom: 2px solid var(--d-line); box-shadow: none; }
html[data-theme="duo2"] .search-box { background: #fff; border: 2px solid var(--d-line); border-radius: 12px; }
html[data-theme="duo2"] .search-box:focus-within { border-color: var(--d-blue); }
html[data-theme="duo2"] .page-tab.active { background: var(--d-green-soft); color: var(--d-green-dark); font-weight: 800; }

/* 卡片：白底 + 2px 灰线 + 大圆角，无重阴影 */
html[data-theme="duo2"] .card,
html[data-theme="duo2"] .kpi,
html[data-theme="duo2"] .kpi2,
html[data-theme="duo2"] .table-card,
html[data-theme="duo2"] .cy-card,
html[data-theme="duo2"] .path-card,
html[data-theme="duo2"] .coin-ai {
  border: 2px solid var(--d-line); border-radius: 16px; box-shadow: none; background: #fff;
}
html[data-theme="duo2"] .kpi .value,
html[data-theme="duo2"] .kpi2 .value { font-weight: 900; color: var(--d-ink); letter-spacing: -.8px; font-size: 34px; }
html[data-theme="duo2"] .kpi .label { color: #777; font-weight: 800; font-size: 12.5px; }

/* 按钮：饱和绿 + 底部 4px 实色（核心立体感） */
html[data-theme="duo2"] .btn:not(.ghost):not(.secondary) {
  background: var(--d-green); color: #fff; border: 0; border-radius: 16px;
  font-weight: 800; font-size: 15px; padding: 9px 18px;
  box-shadow: 0 4px 0 var(--d-green-dark);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
html[data-theme="duo2"] .btn:not(.ghost):not(.secondary):hover { filter: brightness(1.03); }
html[data-theme="duo2"] .btn:not(.ghost):not(.secondary):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--d-green-dark); }
html[data-theme="duo2"] .btn.secondary {
  background: #fff; color: var(--d-ink-2); border: 2px solid var(--d-line); border-radius: 16px;
  font-weight: 800; box-shadow: 0 3px 0 var(--d-line);
}
html[data-theme="duo2"] .btn.secondary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--d-line); }
html[data-theme="duo2"] .btn.secondary:hover { background: #f7f7f7; }
html[data-theme="duo2"] .btn.sm { border-radius: 12px; font-size: 13px; padding: 5px 12px; box-shadow: 0 2px 0 var(--d-line); }
html[data-theme="duo2"] .btn:not(.ghost):not(.secondary).sm { box-shadow: 0 3px 0 var(--d-green-dark); }

/* 输入 */
html[data-theme="duo2"] .input,
html[data-theme="duo2"] select,
html[data-theme="duo2"] textarea {
  background: #fff; border: 2px solid var(--d-line); border-radius: 12px;
  font-size: 14.5px; font-weight: 600; color: var(--d-ink);
}
html[data-theme="duo2"] .input:focus,
html[data-theme="duo2"] select:focus,
html[data-theme="duo2"] textarea:focus {
  border-color: var(--d-blue); box-shadow: none; outline: none;
}

/* 页签 / 筛选 chip */
html[data-theme="duo2"] .list-tab {
  background: #fff; border: 2px solid var(--d-line); border-radius: 12px;
  color: #777; font-weight: 800; font-size: 13.5px; padding: 6px 14px;
}
html[data-theme="duo2"] .list-tab:hover { background: #f7f7f7; }
html[data-theme="duo2"] .list-tab.on {
  background: var(--d-green-soft); border-color: var(--d-green-line); color: var(--d-green-dark); box-shadow: none;
}
html[data-theme="duo2"] .chip, html[data-theme="duo2"] .badge, html[data-theme="duo2"] .pill {
  border-radius: 999px; border: 2px solid var(--d-line); background: #fff; font-weight: 800;
}

/* 表格：白底、灰细线、无底色 */
html[data-theme="duo2"] table.data { background: #fff; }
html[data-theme="duo2"] table.data thead th {
  background: #fff; color: #777; font-weight: 800; font-size: 12.5px;
  border-bottom: 2px solid var(--d-line); letter-spacing: 0;
}
html[data-theme="duo2"] table.data tbody td { border-bottom: 1.5px solid #f0f0f0; font-size: 14px; }
html[data-theme="duo2"] table.data tbody tr:hover { background: #fafafa; }
html[data-theme="duo2"] .name-copy { color: #cfcfcf; }

/* 进度条 */
html[data-theme="duo2"] .ms-bar, html[data-theme="duo2"] .path-bar {
  background: var(--d-line); border-radius: 999px; height: 10px;
}
html[data-theme="duo2"] .ms-bar i, html[data-theme="duo2"] .path-bar i {
  background: var(--d-green); border-radius: 999px;
}

/* 标题字重加大 */
html[data-theme="duo2"] .page-head h1 { font-size: 26px; font-weight: 900; letter-spacing: -.5px; }
html[data-theme="duo2"] .page-head p { font-size: 13px; color: #777; font-weight: 600; }
html[data-theme="duo2"] .card-head h3, html[data-theme="duo2"] .cy-head h3 { font-size: 15px; font-weight: 800; }
html[data-theme="duo2"] .link { color: var(--d-blue); font-weight: 800; }

/* 摘要条：选中态用浅绿 */
html[data-theme="duo2"] .ms-inner { border: 2px solid var(--d-line); border-radius: 16px; background: #fff; box-shadow: none; }
html[data-theme="duo2"] .ms-chip b { font-weight: 900; font-size: 20px; }
html[data-theme="duo2"] .ms-chip span { font-weight: 700; color: #999; }

/* ---------- 多邻国原版化：提饱和 + 加粗 + 更立体（保留浅底层次） ---------- */
html[data-theme="duo"] {
  --duo-main: #58cc02;
  --duo-dark: #58a700;
  --duo-soft: #d7ffb8;
  --duo-active-bg: #d7ffb8;
  --duo-active-fg: #58a700;
  --duo-line-strong: #c9e8ab;
}
html[data-theme="duo"] .page-head h1 { font-size: 24px; font-weight: 900; letter-spacing: -.4px; }
html[data-theme="duo"] .page-head p { font-weight: 600; }
html[data-theme="duo"] .kpi .value,
html[data-theme="duo"] .kpi2 .value { font-size: 32px; font-weight: 900; }
html[data-theme="duo"] .card-head h3,
html[data-theme="duo"] .cy-head h3 { font-weight: 900; font-size: 15px; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) {
  border-radius: 16px; font-weight: 900; font-size: 14.5px; padding: 8px 18px;
  box-shadow: 0 4px 0 var(--duo-dark);
}
html[data-theme="duo"] .btn:not(.ghost):not(.secondary):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--duo-dark); }
html[data-theme="duo"] .btn.secondary { border-radius: 16px; font-weight: 800; box-shadow: 0 3px 0 var(--duo-line-strong); }
html[data-theme="duo"] .btn.sm { border-radius: 12px; }
html[data-theme="duo"] .list-tab { font-weight: 800; border-radius: 12px; }
html[data-theme="duo"] .list-tab.on { background: var(--duo-soft); color: var(--duo-active-fg); border-color: var(--duo-main); box-shadow: 0 3px 0 var(--duo-main); }
html[data-theme="duo"] table.data tbody td { font-size: 13.5px; }
html[data-theme="duo"] table.data tbody tr:hover { background: #f2fbe6; }
html[data-theme="duo"] .chip, html[data-theme="duo"] .badge, html[data-theme="duo"] .pill { font-weight: 800; }
html[data-theme="duo"] .nav a { font-weight: 700; }
html[data-theme="duo"] .nav a.active { font-weight: 900; background: var(--duo-soft); color: var(--duo-active-fg); }

/* ---------- 第 1 步：只调字体（字号/字重），不动颜色 ---------- */
html[data-theme="duo"] { font-size: 14.5px; }
html[data-theme="duo"] body { font-size: 14px; font-weight: 500; }
html[data-theme="duo"] .page-head h1 { font-size: 24px; font-weight: 900; letter-spacing: -.4px; }
html[data-theme="duo"] .page-head p { font-size: 13px; font-weight: 600; }
html[data-theme="duo"] .card-head h3,
html[data-theme="duo"] .cy-head h3 { font-size: 15px; font-weight: 800; }
html[data-theme="duo"] .kpi .value,
html[data-theme="duo"] .kpi2 .value { font-size: 32px; font-weight: 900; }
html[data-theme="duo"] .kpi .label,
html[data-theme="duo"] .kpi2 .label { font-size: 12.5px; font-weight: 700; }
html[data-theme="duo"] table.data thead th { font-size: 13px; font-weight: 800; }
html[data-theme="duo"] table.data tbody td { font-size: 14px; font-weight: 500; }
html[data-theme="duo"] .nav a { font-size: 14px; font-weight: 600; }
html[data-theme="duo"] .nav a.active { font-weight: 900; }
html[data-theme="duo"] .nav-title { font-size: 12px; font-weight: 800; }
html[data-theme="duo"] .btn { font-size: 14px; font-weight: 800; }
html[data-theme="duo"] .btn.sm { font-size: 13px; font-weight: 700; }
html[data-theme="duo"] .list-tab { font-size: 13.5px; font-weight: 700; }
html[data-theme="duo"] .list-tab.on { font-weight: 900; }
html[data-theme="duo"] .input, html[data-theme="duo"] select, html[data-theme="duo"] textarea { font-size: 14px; font-weight: 500; }
html[data-theme="duo"] .ms-chip b { font-size: 20px; font-weight: 900; }
html[data-theme="duo"] .ms-chip span { font-size: 12px; font-weight: 700; }
html[data-theme="duo"] .link { font-weight: 800; }

/* ---------- 第 2 步：按钮立体感（底部实色厚边 + 按下沉） ---------- */
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) {
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--duo-dark);
  transition: transform .07s ease, box-shadow .07s ease, filter .15s ease;
}
html[data-theme="duo"] .btn:not(.ghost):not(.secondary):hover { filter: brightness(1.04); }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary):active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--duo-dark);
}
html[data-theme="duo"] .btn.secondary {
  border-radius: 16px;
  box-shadow: 0 3px 0 var(--duo-line-strong);
  transition: transform .07s ease, box-shadow .07s ease, background .15s ease;
}
html[data-theme="duo"] .btn.secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--duo-line-strong);
}
/* 小按钮按比例缩，别显得头重脚轻 */
html[data-theme="duo"] .btn.sm { border-radius: 12px; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary).sm { box-shadow: 0 3px 0 var(--duo-dark); }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary).sm:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--duo-dark); }
html[data-theme="duo"] .btn.secondary.sm { box-shadow: 0 2px 0 var(--duo-line-strong); }
html[data-theme="duo"] .btn.secondary.sm:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--duo-line-strong); }
/* 页签也带一点厚度，跟按钮成套 */
html[data-theme="duo"] .list-tab { border: 2px solid var(--duo-line); box-shadow: 0 2px 0 var(--duo-line); }
html[data-theme="duo"] .list-tab.on { border-color: var(--duo-main); box-shadow: 0 2px 0 var(--main-shadow, rgba(88,204,2,.5)); }

/* 次按钮的厚边用中性灰，别用绿色（绿边会显得脏） */
html[data-theme="duo"] .btn.secondary { border-color: #e5e5e5; box-shadow: 0 3px 0 #e0e0e0; }
html[data-theme="duo"] .btn.secondary.sm { box-shadow: 0 2px 0 #e0e0e0; }
html[data-theme="duo"] .list-tab { border-color: #e5e5e5; box-shadow: 0 2px 0 #e6e6e6; }

/* ---------- 第 3 步修正：页签/筛选片统一成"有厚度的实心块" ---------- */
/* 列表筛选页签 */
html[data-theme="duo"] .list-tab {
  background: #fff !important;
  border: 2px solid #e5e5e5 !important;
  color: #777 !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 0 #e0e0e0 !important;
  font-weight: 800 !important;
  padding: 6px 14px !important;
}
html[data-theme="duo"] .list-tab:hover { background: #fafafa !important; }
html[data-theme="duo"] .list-tab.on {
  background: var(--duo-main) !important;
  border-color: var(--duo-main) !important;
  color: #fff !important;
  box-shadow: 0 3px 0 var(--duo-dark) !important;
}
html[data-theme="duo"] .list-tab.on:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--duo-dark) !important; }

/* 顶部页签（公海线索那一排） */
html[data-theme="duo"] .page-tab {
  background: #fff !important;
  border: 2px solid #e5e5e5 !important;
  border-bottom: 0 !important;
  color: #777 !important;
  border-radius: 14px 14px 0 0 !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}
html[data-theme="duo"] .page-tab.active {
  background: var(--duo-soft) !important;
  border-color: var(--duo-main) !important;
  color: var(--duo-active-fg) !important;
  font-weight: 900 !important;
}
/* 周期切换（本月/本季/本年/全部） */
html[data-theme="duo"] .seg-tab {
  border-radius: 12px !important; font-weight: 800 !important; color: #777 !important;
}
html[data-theme="duo"] .seg-tab.on {
  background: var(--duo-main) !important; color: #fff !important;
  box-shadow: 0 3px 0 var(--duo-dark) !important;
}

/* 筛选行：禁止下拉和页签被挤成竖排字 */
html[data-theme="duo"] .list-tab { white-space: nowrap; flex: none; }
html[data-theme="duo"] #view select,
html[data-theme="duo"] .filters select,
html[data-theme="duo"] .toolbar select { min-width: 108px; flex: 0 0 auto; white-space: nowrap; }
html[data-theme="duo"] .filters label,
html[data-theme="duo"] .toolbar label { white-space: nowrap; flex: none; }
html[data-theme="duo"] .filters,
html[data-theme="duo"] .toolbar { flex-wrap: wrap; row-gap: 8px; }

/* 喜报滚屏：改回普通文档流，别再压住顶栏 */
#cheer-ticker { position: static !important; top: auto !important; margin: 0 0 8px !important; border-radius: 12px !important; }

/* 顶部页签（公海线索那排）：选中用实色+白字+厚边，跟筛选页签同一套语言 */
html[data-theme="duo"] .page-tab {
  background: #fff !important;
  border: 2px solid #e5e5e5 !important;
  border-radius: 14px !important;
  color: #777 !important;
  font-weight: 800 !important;
  padding: 5px 14px !important;
  box-shadow: 0 3px 0 #e0e0e0 !important;
  margin-right: 6px !important;
}
html[data-theme="duo"] .page-tab:hover { background: #fafafa !important; }
html[data-theme="duo"] .page-tab.active {
  background: var(--duo-main) !important;
  border-color: var(--duo-main) !important;
  color: #fff !important;
  font-weight: 900 !important;
  box-shadow: 0 3px 0 var(--duo-dark) !important;
}
html[data-theme="duo"] .page-tab .tab-x { color: rgba(255,255,255,.85) !important; }

/* 顶部页签实际元素是 .tab-item */
html[data-theme="duo"] .tabbar .tab-item {
  background: #fff !important;
  border: 2px solid #e5e5e5 !important;
  border-radius: 12px !important;
  color: #777 !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 0 #e0e0e0 !important;
  margin-right: 6px !important;
  padding: 4px 12px !important;
}
html[data-theme="duo"] .tabbar .tab-item:hover { background: #fafafa !important; }
html[data-theme="duo"] .tabbar .tab-item.active {
  background: var(--duo-main) !important;
  border-color: var(--duo-main) !important;
  color: #fff !important;
  font-weight: 900 !important;
  box-shadow: 0 3px 0 var(--duo-dark) !important;
}
html[data-theme="duo"] .tabbar .tab-item.active * { color: #fff !important; }

/* 顶部页签不要被固定高度裁切 */
html[data-theme="duo"] .tabbar {
  height: auto !important; min-height: 36px; align-items: center; overflow: visible;
}
html[data-theme="duo"] .tabbar .tab-item {
  height: auto !important; padding: 3px 12px !important; line-height: 20px;
  overflow: visible !important; max-width: none !important; font-size: 12.5px !important;
}

/* 顶部页签：紧凑胶囊 + 底部厚边（避免撑破顶栏） */
html[data-theme="duo"] .tabbar {
  height: auto !important; min-height: 34px; align-items: center;
  overflow-x: auto; overflow-y: visible;
}
html[data-theme="duo"] .tabbar .tab-item {
  height: 26px !important; padding: 0 10px !important; line-height: 26px;
  border-radius: 999px !important; font-size: 12px !important; font-weight: 800 !important;
  border-width: 0 !important; box-shadow: 0 2px 0 #e0e0e0 !important; max-width: 180px;
}
html[data-theme="duo"] .tabbar .tab-item.active {
  box-shadow: 0 2px 0 var(--duo-dark) !important;
}

/* 顶部页签回到紧凑浅色块（实色厚边会撑破顶栏，只在筛选页签和按钮上用） */
html[data-theme="duo"] .tabbar .tab-item {
  height: 28px !important; padding: 0 10px !important; line-height: 28px !important;
  border: 0 !important; border-radius: 9px !important; box-shadow: none !important;
  background: transparent !important; color: #777 !important; font-size: 12.5px !important; font-weight: 700 !important;
  max-width: none;
}
html[data-theme="duo"] .tabbar .tab-item:hover { background: #f4f4f4 !important; }
html[data-theme="duo"] .tabbar .tab-item.active {
  background: var(--duo-soft) !important; color: var(--duo-active-fg) !important;
  font-weight: 900 !important; box-shadow: none !important;
}
html[data-theme="duo"] .tabbar .tab-item.active * { color: var(--duo-active-fg) !important; }

/* 顶部页签最终版：实色胶囊 + 2px 厚边（宽屏下不会挤） */
html[data-theme="duo"] .tabbar .tab-item {
  height: 28px !important; padding: 0 12px !important; line-height: 28px !important;
  border: 0 !important; border-radius: 999px !important;
  background: #fff !important; color: #777 !important;
  font-size: 12.5px !important; font-weight: 800 !important;
  box-shadow: 0 2px 0 #e0e0e0 !important; margin-right: 6px;
}
html[data-theme="duo"] .tabbar .tab-item.active {
  background: var(--duo-main) !important; color: #fff !important;
  box-shadow: 0 2px 0 var(--duo-dark) !important; font-weight: 900 !important;
}
html[data-theme="duo"] .tabbar .tab-item.active * { color: #fff !important; }

/* ---------- 按钮/页签对齐与阴影修正 ---------- */
html[data-theme="duo"] .btn {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  line-height: 1 !important; text-align: center !important; letter-spacing: 0 !important;
  vertical-align: middle; gap: 4px;
}
html[data-theme="duo"] .btn.sm { line-height: 1 !important; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary),
html[data-theme="duo"] .btn.secondary,
html[data-theme="duo"] .btn:not(.ghost):not(.secondary).sm,
html[data-theme="duo"] .btn.secondary.sm { margin-bottom: 4px; }

/* 页签：文字正中对齐、阴影留出余量，别和隔壁连成一片 */
html[data-theme="duo"] .list-tab {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  line-height: 1 !important; text-align: center !important; margin-bottom: 4px;
  letter-spacing: 0 !important;
}
html[data-theme="duo"] .tabbar .tab-item {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  line-height: 1 !important; text-align: center !important;
}
/* 页签行给阴影留出空间 */
html[data-theme="duo"] .tabs, html[data-theme="duo"] .list-tabs, html[data-theme="duo"] .toolbar { padding-bottom: 2px; }

/* 下拉别被挤到显示不全 */
html[data-theme="duo"] #view select { min-width: 118px !important; padding-right: 26px !important; }

/* 阴影必须是硬边，不要带模糊 */
html[data-theme="duo"] .btn.secondary,
html[data-theme="duo"] .btn.secondary.sm { box-shadow: 0 3px 0 #e0e0e0 !important; filter: none !important; }
html[data-theme="duo"] .list-tab { box-shadow: 0 3px 0 #e6e6e6 !important; filter: none !important; }
html[data-theme="duo"] .tabbar .tab-item { box-shadow: 0 2px 0 #e6e6e6 !important; filter: none !important; }

/* 筛选标签不许被挤没 */
html[data-theme="duo"] .filters > label,
html[data-theme="duo"] .toolbar > label,
html[data-theme="duo"] .filter-label { white-space: nowrap !important; margin-right: 6px; flex: none; }
html[data-theme="duo"] #view select { min-width: 122px !important; }

/* ---------- 去 emoji 后的替代图形 ---------- */
/* 叶子：绿色椭圆 */
.plant-pot .leaf {
  position: absolute; width: 13px; height: 8px; border-radius: 60% 60% 60% 60% / 100% 100% 100% 100%;
  background: linear-gradient(135deg, #7ed321, #4e9d2d); display: block;
}
.plant-pot .leaf.l { left: 3px; transform: rotate(-18deg); }
.plant-pot .leaf.r { right: 3px; transform: rotate(18deg); }
@keyframes leafInL { from { transform: scale(.2) rotate(-18deg); opacity: 0 } to { transform: scale(1) rotate(-18deg); opacity: 1 } }
/* 开花：五瓣圆点 */
.plant-pot .bloom {
  position: absolute; left: 50%; bottom: 34px; width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%; background: radial-gradient(circle at 50% 50%, #ffd400 0 34%, #ffb400 35% 100%);
  box-shadow: 0 -7px 0 -3px #ffc400, 7px 0 0 -3px #ffc400, -7px 0 0 -3px #ffc400, 0 7px 0 -3px #ffc400;
  animation: bloomPop .7s cubic-bezier(.2,1.5,.5,1) both;
}
/* 水滴 */
.water-drop {
  position: absolute; top: -2px; width: 5px; height: 8px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: #1cb0f6; pointer-events: none; animation: dropFall 1.1s cubic-bezier(.4,0,.7,1) forwards;
}
/* 完成弹层里的对勾 */
.wb-done-emoji { font-size: 40px; color: #58cc02; font-weight: 900; }
/* 排名：改用文字后去掉大号数字样式 */
.rank-no { font-size: 13px; font-weight: 800; color: #777; white-space: nowrap; }

/* 自绘图标：和文字一起变粗，选中时更实 */
.nav-svg { display: block; width: 18px; height: 18px; flex: none; }
html[data-theme="duo"] .nav a .ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
html[data-theme="duo"] .nav a.active .nav-svg { stroke-width: 2.1; }
html[data-theme="duo"] .nav a:hover .nav-svg { stroke-width: 2.1; }

/* ================= 多邻国主题：严格调色板（只允许下列颜色） =================
   取自 App 截图的实测色：绿 #58CC02 / 深绿 #58A700 / 浅绿 #D7FFB8 / 绿线 #A5ED6E
   蓝 #1CB0F6 / 深蓝 #1899D6 / 浅蓝 #DDF4FF
   橙 #FF9600 / 黄 #FFC800 / 红 #FF4B4B / 紫 #CE82FF
   墨 #3C3C3C / 次 #777777 / 淡 #AFAFAF / 线 #E5E5E5 / 白 #FFFFFF */
html[data-theme="duo"] {
  --duo-main: #58CC02; --duo-dark: #58A700; --duo-soft: #D7FFB8; --duo-line-strong: #A5ED6E;
  --duo-blue: #1CB0F6; --duo-blue-dark: #1899D6; --duo-blue-soft: #DDF4FF;
  --duo-yellow: #FFC800; --duo-orange: #FF9600; --duo-red: #FF4B4B; --duo-purple: #CE82FF;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F7F7F7;
  --border: #E5E5E5; --border-strong: #E5E5E5;
  --text: #3C3C3C; --text-2: #777777; --muted: #AFAFAF;
  --accent: #58CC02; --accent-2: #58A700; --accent-weak: #D7FFB8;
  --green: #58CC02; --red: #FF4B4B; --amber: #FF9600; --blue: #1CB0F6;
  --radius: 16px; --radius-sm: 12px;
  --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
}
html[data-theme="duo"], html[data-theme="duo"] body { background: #FFFFFF !important; color: #3C3C3C !important; }
html[data-theme="duo"] .sidebar { background: #FFFFFF !important; border-right: 2px solid #E5E5E5 !important; }
html[data-theme="duo"] .sidebar-head,
html[data-theme="duo"] .topbar,
html[data-theme="duo"] .nav,
html[data-theme="duo"] .sidebar-foot { background: #FFFFFF !important; border-color: #E5E5E5 !important; }
html[data-theme="duo"] .nav-title,
html[data-theme="duo"] .nav a,
html[data-theme="duo"] .nav-gtitle { color: #3C3C3C !important; }
html[data-theme="duo"] .nav-title .nav-count,
html[data-theme="duo"] .nav-count { color: #777777 !important; }
html[data-theme="duo"] .nav a:hover { background: #F7F7F7 !important; }
html[data-theme="duo"] .nav a.active { background: #D7FFB8 !important; color: #58A700 !important; }
html[data-theme="duo"] .nav-svg, html[data-theme="duo"] .nav .ico { color: #AFAFAF !important; stroke: #AFAFAF; }
html[data-theme="duo"] .nav a.active .nav-svg, html[data-theme="duo"] .nav a.active .ico { color: #58A700 !important; stroke: #58A700; }
html[data-theme="duo"] .nav a:hover .nav-svg { stroke: #777777; }

/* 卡片：纯白 + #E5E5E5 线，无阴影 */
html[data-theme="duo"] .card,
html[data-theme="duo"] .kpi,
html[data-theme="duo"] .kpi2,
html[data-theme="duo"] .table-card,
html[data-theme="duo"] .cy-card,
html[data-theme="duo"] .path-card,
html[data-theme="duo"] .coin-ai,
html[data-theme="duo"] .ms-inner,
html[data-theme="duo"] .invalid-stats {
  background: #FFFFFF !important; border-color: #E5E5E5 !important; box-shadow: none !important;
}
/* 文字 */
html[data-theme="duo"] .page-head h1 { color: #3C3C3C !important; }
html[data-theme="duo"] .page-head p,
html[data-theme="duo"] .card-head h3,
html[data-theme="duo"] .cy-head h3 { color: #3C3C3C !important; }
html[data-theme="duo"] .muted,
html[data-theme="duo"] .kpi .label,
html[data-theme="duo"] .ms-chip span,
html[data-theme="duo"] .feed-time { color: #AFAFAF !important; }
html[data-theme="duo"] .kpi .value,
html[data-theme="duo"] .kpi2 .value,
html[data-theme="duo"] .ms-chip b { color: #3C3C3C !important; }
html[data-theme="duo"] .link,
html[data-theme="duo"] .row-link { color: #1CB0F6 !important; }
html[data-theme="duo"] .ms-chip.warn b { color: #FF9600 !important; }
html[data-theme="duo"] .ms-chip.danger b { color: #FF4B4B !important; }

/* 按钮 */
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) {
  background: #58CC02 !important; color: #FFFFFF !important; box-shadow: 0 4px 0 #58A700 !important;
}
html[data-theme="duo"] .btn:not(.ghost):not(.secondary):active { box-shadow: 0 1px 0 #58A700 !important; }
html[data-theme="duo"] .btn.secondary {
  background: #FFFFFF !important; color: #3C3C3C !important;
  border: 2px solid #E5E5E5 !important; box-shadow: 0 3px 0 #E5E5E5 !important;
}
html[data-theme="duo"] .btn.secondary:active { box-shadow: 0 1px 0 #E5E5E5 !important; }
html[data-theme="duo"] .btn.secondary:hover { background: #F7F7F7 !important; }

/* 页签 */
html[data-theme="duo"] .list-tab { background: #FFFFFF !important; color: #777777 !important; border: 2px solid #E5E5E5 !important; box-shadow: 0 3px 0 #E5E5E5 !important; }
html[data-theme="duo"] .list-tab.on { background: #58CC02 !important; color: #FFFFFF !important; border-color: #58CC02 !important; box-shadow: 0 3px 0 #58A700 !important; }
html[data-theme="duo"] .tabbar .tab-item { background: #FFFFFF !important; color: #777777 !important; box-shadow: 0 2px 0 #E5E5E5 !important; }
html[data-theme="duo"] .tabbar .tab-item.active { background: #58CC02 !important; color: #FFFFFF !important; box-shadow: 0 2px 0 #58A700 !important; }
html[data-theme="duo"] .tabbar .tab-item.active * { color: #FFFFFF !important; }

/* 表格 */
html[data-theme="duo"] table.data thead th { background: #FFFFFF !important; color: #777777 !important; border-bottom: 2px solid #E5E5E5 !important; }
html[data-theme="duo"] table.data tbody td { color: #3C3C3C !important; border-bottom: 1px solid #E5E5E5 !important; }
html[data-theme="duo"] table.data tbody tr:hover { background: #F7F7F7 !important; }
html[data-theme="duo"] .name-copy { color: #AFAFAF !important; }
html[data-theme="duo"] .name-link, html[data-theme="duo"] .cell-name a { color: #3C3C3C !important; }

/* 输入 */
html[data-theme="duo"] .input,
html[data-theme="duo"] select,
html[data-theme="duo"] textarea,
html[data-theme="duo"] .search-box {
  background: #FFFFFF !important; color: #3C3C3C !important; border: 2px solid #E5E5E5 !important;
}
html[data-theme="duo"] .input:focus,
html[data-theme="duo"] select:focus,
html[data-theme="duo"] textarea:focus,
html[data-theme="duo"] .search-box:focus-within {
  border-color: #1CB0F6 !important; box-shadow: none !important;
}
html[data-theme="duo"] select option { background: #FFFFFF; color: #3C3C3C; }

/* 进度条 / 图形：只用绿和灰 */
html[data-theme="duo"] .ms-bar, html[data-theme="duo"] .path-bar { background: #E5E5E5 !important; }
html[data-theme="duo"] .ms-bar i, html[data-theme="duo"] .path-bar i { background: #58CC02 !important; }
html[data-theme="duo"] .plant-pot .stem { background: #58CC02 !important; }
html[data-theme="duo"] .plant-pot .leaf { background: #58CC02 !important; }
html[data-theme="duo"] .plant-pot .bloom { background: #FFC800 !important; box-shadow: 0 -7px 0 -3px #FFC800, 7px 0 0 -3px #FFC800, -7px 0 0 -3px #FFC800, 0 7px 0 -3px #FFC800 !important; }
html[data-theme="duo"] .water-drop { background: #1CB0F6 !important; }
html[data-theme="duo"] .plant-energy { color: #1CB0F6 !important; }

/* 提示 / 状态色 */
html[data-theme="duo"] .chip, html[data-theme="duo"] .badge, html[data-theme="duo"] .pill {
  background: #FFFFFF !important; color: #777777 !important; border: 2px solid #E5E5E5 !important;
}
html[data-theme="duo"] .pill.ok { background: #D7FFB8 !important; color: #58A700 !important; border-color: #A5ED6E !important; }
html[data-theme="duo"] .text-danger, html[data-theme="duo"] .danger { color: #FF4B4B !important; }
html[data-theme="duo"] .text-warn { color: #FF9600 !important; }

/* 喜报 / 庆祝：白底 + 绿或黄点缀 */
html[data-theme="duo"] .cheer-card,
html[data-theme="duo"] .pc-card,
html[data-theme="duo"] .seed-card { background: #FFFFFF !important; border: 3px solid #E5E5E5 !important; box-shadow: none !important; }
html[data-theme="duo"] .cheer-kind { color: #58A700 !important; }
html[data-theme="duo"] .cheer-btn { background: #FFFFFF !important; border: 2px solid #E5E5E5 !important; color: #3C3C3C !important; box-shadow: 0 2px 0 #E5E5E5 !important; }
html[data-theme="duo"] .cheer-btn:hover { background: #F7F7F7 !important; }
html[data-theme="duo"] .cheer-glow { display: none !important; }
html[data-theme="duo"] .seed-title, html[data-theme="duo"] .pc-title { color: #3C3C3C !important; }
html[data-theme="duo"] .seed-emoji { color: #58CC02 !important; }

/* 按钮文字不许换行，宽度给足 */
html[data-theme="duo"] .btn { white-space: nowrap !important; min-width: 56px; }
html[data-theme="duo"] .btn.sm { min-width: 46px; }

/* 表格列宽别被筛选行挤压：允许横向滚动 */
html[data-theme="duo"] .table-wrap, html[data-theme="duo"] .table-scroll { overflow-x: auto; }
html[data-theme="duo"] table.data { min-width: 1240px; }
html[data-theme="duo"] #view select { min-width: 104px !important; }

html[data-theme="duo"] table.data { min-width: 1520px; }
html[data-theme="duo"] table.data thead th { white-space: nowrap; }
html[data-theme="duo"] table.data tbody td { white-space: nowrap; }

/* 跟进工作台按钮：文字居中 + 统一立体 */
html[data-theme="duo"] .wb-primary,
html[data-theme="duo"] .wb-actions .btn {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  line-height: 1 !important; text-align: center !important; white-space: nowrap;
  border-radius: 16px !important; font-weight: 900 !important;
}
html[data-theme="duo"] .wb-primary {
  background: #58CC02 !important; color: #FFFFFF !important; border: 0 !important;
  box-shadow: 0 4px 0 #58A700 !important; padding: 12px 22px !important; height: auto !important;
}
html[data-theme="duo"] .wb-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #58A700 !important; }
html[data-theme="duo"] .wb-actions .btn.secondary {
  box-shadow: 0 3px 0 #E5E5E5 !important; padding: 12px 18px !important; height: auto !important;
}

/* 工作台：底色也要在调色板内（纯白），去掉浅绿底 */
html[data-theme="duo"] .wb-mask,
html[data-theme="duo"] .wb-shell,
html[data-theme="duo"] .wb-card { background: #FFFFFF !important; }
html[data-theme="duo"] .wb-progress, html[data-theme="duo"] .wb-bar { background: #E5E5E5 !important; }
html[data-theme="duo"] .wb-bar i, html[data-theme="duo"] .wb-progress i { background: #58CC02 !important; }
html[data-theme="duo"] .wb-tag {
  background: #FFFFFF !important; color: #777777 !important; border: 2px solid #E5E5E5 !important;
}
html[data-theme="duo"] .wb-tag.danger, html[data-theme="duo"] .wb-tag.overdue {
  background: #FFFFFF !important; color: #FF4B4B !important; border-color: #FF4B4B !important;
}

/* ===== 多邻国"浅绿框"规则：浅绿边 → 更浅绿底 → 深绿字 ===== */
html[data-theme="duo"] {
  --duo-tint-bg: #D7FFB8;      /* 更浅绿底 */
  --duo-tint-line: #A5ED6E;    /* 浅绿边 */
  --duo-tint-fg: #58A700;      /* 更深绿字 */
}
html[data-theme="duo"] .pill,
html[data-theme="duo"] .chip,
html[data-theme="duo"] .badge,
html[data-theme="duo"] .tag,
html[data-theme="duo"] .wb-tag,
html[data-theme="duo"] .stage-pill,
html[data-theme="duo"] .ms-chip,
html[data-theme="duo"] .is-chip {
  background: var(--duo-tint-bg) !important;
  border: 2px solid var(--duo-tint-line) !important;
  color: var(--duo-tint-fg) !important;
  font-weight: 800 !important;
}
html[data-theme="duo"] .pill *,
html[data-theme="duo"] .chip *,
html[data-theme="duo"] .badge *,
html[data-theme="duo"] .tag *,
html[data-theme="duo"] .wb-tag * { color: var(--duo-tint-fg) !important; }
/* 中性标签保持灰（不参与浅绿规则） */
html[data-theme="duo"] .pill.muted,
html[data-theme="duo"] .chip.muted,
html[data-theme="duo"] .tag.muted {
  background: #FFFFFF !important; border-color: #E5E5E5 !important; color: #777777 !important;
}
/* 警示色标签同理：红边 → 浅红底 → 深红字（用调色板里唯一红） */
html[data-theme="duo"] .pill.danger,
html[data-theme="duo"] .wb-tag.danger,
html[data-theme="duo"] .wb-tag.overdue,
html[data-theme="duo"] .chip.danger {
  background: #FFFFFF !important; border-color: #FF4B4B !important; color: #FF4B4B !important;
}
/* 聚焦/选中：浅绿边 + 更浅绿底 */
html[data-theme="duo"] .input:focus,
html[data-theme="duo"] textarea:focus,
html[data-theme="duo"] select:focus {
  border-color: var(--duo-tint-line) !important;
  background: var(--duo-tint-bg) !important;
  color: var(--duo-tint-fg) !important;
  box-shadow: none !important;
}
/* 顶部页签选中：浅绿底 + 浅绿边 + 深绿字 */
html[data-theme="duo"] .tabbar .tab-item.active {
  background: var(--duo-tint-bg) !important;
  border: 2px solid var(--duo-tint-line) !important;
  color: var(--duo-tint-fg) !important;
  box-shadow: none !important;
}
html[data-theme="duo"] .tabbar .tab-item.active * { color: var(--duo-tint-fg) !important; }

/* 首页 KPI 卡：照多邻国"浅绿框"做——浅绿边 + 更浅绿底 + 深绿字 */
html[data-theme="duo"] .kpi,
html[data-theme="duo"] .kpi2 {
  background: var(--duo-tint-bg) !important;
  border: 2px solid var(--duo-tint-line) !important;
  box-shadow: none !important;
}
html[data-theme="duo"] .kpi .label,
html[data-theme="duo"] .kpi2 .label { color: var(--duo-tint-fg) !important; opacity: .85; }
html[data-theme="duo"] .kpi .value,
html[data-theme="duo"] .kpi2 .value { color: var(--duo-tint-fg) !important; }
html[data-theme="duo"] .kpi .foot,
html[data-theme="duo"] .kpi2 .foot,
html[data-theme="duo"] .kpi .sub,
html[data-theme="duo"] .kpi2 .sub { color: var(--duo-tint-fg) !important; opacity: .75; }

/* ===== 白按钮/白页签：对齐多邻国选项卡（实测：2px #E5E5E5 边 + 同色 4px 底边，常规字重） ===== */
html[data-theme="duo"] .btn.secondary,
html[data-theme="duo"] .list-tab,
html[data-theme="duo"] .tabbar .tab-item {
  background: #FFFFFF !important;
  border: 2px solid #E5E5E5 !important;
  color: #3C3C3C !important;
  font-weight: 600 !important;           /* 常规偏中，不是粗体 */
  font-size: 15px !important;
  letter-spacing: 0 !important;
  box-shadow: 0 4px 0 #E5E5E5 !important; /* 底边与边框同色，厚度约 2 倍边框 */
  border-radius: 16px !important;
}
html[data-theme="duo"] .btn.secondary.sm,
html[data-theme="duo"] .btn.sm {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 0 #E5E5E5 !important;
  border-radius: 12px !important;
}
html[data-theme="duo"] .list-tab,
html[data-theme="duo"] .tabbar .tab-item { padding: 6px 16px !important; }
html[data-theme="duo"] .btn.secondary { padding: 10px 18px !important; }
html[data-theme="duo"] .btn.secondary:active,
html[data-theme="duo"] .list-tab:active { transform: translateY(2px); box-shadow: 0 1px 0 #E5E5E5 !important; }

/* 选中态：绿底白字 + 深绿底边（与白按钮同一套几何） */
html[data-theme="duo"] .list-tab.on {
  background: #58CC02 !important; color: #FFFFFF !important; border-color: #58CC02 !important;
  box-shadow: 0 4px 0 #58A700 !important; font-weight: 700 !important;
}
html[data-theme="duo"] .tabbar .tab-item.active {
  background: #D7FFB8 !important; color: #58A700 !important; border-color: #A5ED6E !important;
  box-shadow: 0 3px 0 #A5ED6E !important; font-weight: 700 !important;
}

/* 白按钮高度对齐多邻国选项卡（更宽松） */
html[data-theme="duo"] .btn.secondary { padding: 11px 20px !important; min-height: 44px; }
html[data-theme="duo"] .btn.secondary.sm { padding: 6px 14px !important; min-height: 32px; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) { min-height: 44px; padding: 11px 20px !important; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary).sm { min-height: 32px; padding: 6px 14px !important; }

/* KPI 卡内部所有文字统一深绿（之前只改了 .value，实际类名是 .kpi2-val） */
html[data-theme="duo"] .kpi2-label,
html[data-theme="duo"] .kpi2-val,
html[data-theme="duo"] .kpi2-val small,
html[data-theme="duo"] .kpi2-sub,
html[data-theme="duo"] .kpi2 *, 
html[data-theme="duo"] .kpi-label,
html[data-theme="duo"] .kpi-val,
html[data-theme="duo"] .kpi-val small,
html[data-theme="duo"] .kpi-sub {
  color: #58A700 !important;
}
html[data-theme="duo"] .kpi2-sub,
html[data-theme="duo"] .kpi-sub { opacity: .78; }
/* 右上角小色点保持白底（不跟着变绿） */
html[data-theme="duo"] .kpi2-ico {
  background: #FFFFFF !important; color: #58CC02 !important; border-radius: 10px;
}
html[data-theme="duo"] .kpi2-ico.t-blue { color: #1CB0F6 !important; }
html[data-theme="duo"] .kpi2-ico.t-red { color: #FF4B4B !important; }
html[data-theme="duo"] .kpi2-ico.t-amber { color: #FF9600 !important; }
html[data-theme="duo"] .kpi2-ico.t-purple { color: #CE82FF !important; }

/* ============================================================
   多邻国设计系统 v2（整体重建，不再逐处打补丁）
   1) 字号整体放大、行高放松
   2) 间距放大、圆角统一
   3) 绿色只出现在"主操作/当前状态/进度"，其余全部白+灰
   4) 图标改为实心粗线双色
   ============================================================ */
html[data-theme="duo"] {
  --ds-radius-card: 20px;
  --ds-radius-btn: 16px;
  --ds-radius-input: 14px;
  --ds-gap: 16px;
  --ds-pad: 24px;
  --ds-line: #E5E5E5;
  --ds-ink: #3C3C3C;
  --ds-ink-2: #777777;
  --ds-ink-3: #AFAFAF;
  --ds-green: #58CC02;
  --ds-green-d: #58A700;
  --ds-green-l: #D7FFB8;
  --ds-green-line: #A5ED6E;
  --ds-blue: #1CB0F6;
  --ds-red: #FF4B4B;
  --ds-amber: #FF9600;
  --ds-yellow: #FFC800;
  font-size: 16px;
}
html[data-theme="duo"] body {
  font-size: 15px; line-height: 1.6; letter-spacing: 0;
  color: var(--ds-ink);
  -webkit-font-smoothing: antialiased;
}
/* ---------- 布局留白 ---------- */
html[data-theme="duo"] #view { padding: 28px 32px 40px !important; }
html[data-theme="duo"] .page-head { margin-bottom: 20px !important; }
html[data-theme="duo"] .page-head h1 { font-size: 30px !important; font-weight: 800 !important; letter-spacing: -.5px; }
html[data-theme="duo"] .page-head p { font-size: 14px !important; color: var(--ds-ink-2) !important; }
html[data-theme="duo"] .card,
html[data-theme="duo"] .table-card { padding: var(--ds-pad) !important; border-radius: var(--ds-radius-card) !important; }
/* ---------- 卡片：白底灰边，不再满屏绿 ---------- */
html[data-theme="duo"] .kpi,
html[data-theme="duo"] .kpi2 {
  background: #FFFFFF !important;
  border: 2px solid var(--ds-line) !important;
  border-radius: var(--ds-radius-card) !important;
  padding: 20px 22px !important;
  box-shadow: 0 3px 0 var(--ds-line) !important;
}
html[data-theme="duo"] .kpi2-label,
html[data-theme="duo"] .kpi-label { color: var(--ds-ink-2) !important; font-size: 14px !important; font-weight: 700 !important; }
html[data-theme="duo"] .kpi2-val,
html[data-theme="duo"] .kpi-val { color: var(--ds-ink) !important; font-size: 34px !important; font-weight: 800 !important; letter-spacing: -1px !important; }
html[data-theme="duo"] .kpi2-val small,
html[data-theme="duo"] .kpi-val small { color: var(--ds-ink-2) !important; font-size: 15px !important; font-weight: 700 !important; }
html[data-theme="duo"] .kpi2-sub,
html[data-theme="duo"] .kpi-sub { color: var(--ds-ink-3) !important; font-size: 13.5px !important; }
/* 只保留"今天的目"这一块的浅绿强调 */
html[data-theme="duo"] .goal-card,
html[data-theme="duo"] .today-goal { background: var(--ds-green-l) !important; border: 2px solid var(--ds-green-line) !important; border-radius: var(--ds-radius-card) !important; }
/* ---------- 表格：留白更大、字更大、圆角 ---------- */
html[data-theme="duo"] table.data thead th { font-size: 13px !important; font-weight: 800 !important; color: var(--ds-ink-3) !important; padding: 12px 14px !important; }
html[data-theme="duo"] table.data tbody td { font-size: 15px !important; padding: 14px 14px !important; }
html[data-theme="duo"] table.data tbody tr:hover { background: #FAFAFA !important; }
html[data-theme="duo"] .table-card { overflow: hidden; }
/* ---------- 按钮 ---------- */
html[data-theme="duo"] .btn { border-radius: var(--ds-radius-btn) !important; font-size: 16px !important; font-weight: 800 !important; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) { background: var(--ds-green) !important; color: #FFF !important; box-shadow: 0 4px 0 var(--ds-green-d) !important; }
html[data-theme="duo"] .btn.secondary { background: #FFF !important; color: var(--ds-ink) !important; border: 2px solid var(--ds-line) !important; box-shadow: 0 4px 0 var(--ds-line) !important; font-weight: 700 !important; }
html[data-theme="duo"] .btn.sm { font-size: 14px !important; box-shadow: 0 3px 0 var(--ds-line) !important; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary).sm { box-shadow: 0 3px 0 var(--ds-green-d) !important; }
/* ---------- 图标：实心双色、更粗 ---------- */
html[data-theme="duo"] .nav-svg { width: 20px; height: 20px; fill: rgba(88,204,2,.16); stroke-width: 2; }
html[data-theme="duo"] .nav a .ico { width: 24px; height: 24px; }
html[data-theme="duo"] .nav a { font-size: 15px !important; font-weight: 700 !important; padding: 9px 12px !important; border-radius: 14px !important; }
html[data-theme="duo"] .nav a.active { background: var(--ds-green-l) !important; color: var(--ds-green-d) !important; }
html[data-theme="duo"] .nav-svg, html[data-theme="duo"] .nav .ico { color: #7BBF52 !important; }
html[data-theme="duo"] .nav a.active .nav-svg, html[data-theme="duo"] .nav a.active .ico { color: var(--ds-green-d) !important; }
/* ---------- 页签：更大更圆 ---------- */
html[data-theme="duo"] .list-tab { font-size: 15px !important; font-weight: 700 !important; padding: 9px 18px !important; border-radius: var(--ds-radius-btn) !important; }
html[data-theme="duo"] .list-tab.on { font-weight: 800 !important; }
/* ---------- 输入 ---------- */
html[data-theme="duo"] .input, html[data-theme="duo"] select, html[data-theme="duo"] textarea {
  font-size: 15px !important; padding: 10px 14px !important; border-radius: var(--ds-radius-input) !important;
}

/* 摘要条：不要一堆绿块，数字用墨色，只有警示数字带色 */
html[data-theme="duo"] .ms-chip,
html[data-theme="duo"] .ms-chip.is-chip {
  background: transparent !important; border: 0 !important; color: var(--ds-ink-2) !important;
  box-shadow: none !important; padding: 0 14px !important;
}
html[data-theme="duo"] .ms-chip b { color: var(--ds-ink) !important; font-size: 26px !important; }
html[data-theme="duo"] .ms-chip span { color: var(--ds-ink-3) !important; font-size: 13.5px !important; }
html[data-theme="duo"] .ms-chip.warn b { color: var(--ds-amber) !important; }
html[data-theme="duo"] .ms-chip.danger b { color: var(--ds-red) !important; }
html[data-theme="duo"] .ms-inner { border: 2px solid var(--ds-line) !important; border-radius: var(--ds-radius-card) !important; box-shadow: 0 3px 0 var(--ds-line) !important; background: #FFF !important; }

/* 表格不再强制超宽，改为自适应列 + 允许横向滚动 */
html[data-theme="duo"] table.data { min-width: 0 !important; width: 100%; }
html[data-theme="duo"] .table-card { overflow-x: auto; }
html[data-theme="duo"] table.data tbody td, html[data-theme="duo"] table.data thead th { padding: 12px 10px !important; }

/* 筛选下拉：给足宽度，别把文字挤没 */
html[data-theme="duo"] #view select { min-width: 120px !important; padding: 8px 30px 8px 12px !important; font-size: 14px !important; }

/* 表格：保证所有列都在，窄屏用横向滚动 */
html[data-theme="duo"] .table-card { overflow-x: auto !important; overflow-y: visible !important; }
html[data-theme="duo"] table.data { min-width: 1420px !important; table-layout: auto !important; }
html[data-theme="duo"] table.data th, html[data-theme="duo"] table.data td { white-space: nowrap; }

/* 分页下拉别被压窄 */
html[data-theme="duo"] .pager select, html[data-theme="duo"] .table-foot select, html[data-theme="duo"] #page-size {
  min-width: 88px !important; padding: 6px 26px 6px 10px !important;
}

/* ===== 紧凑化：一屏看到 20 行 ===== */
html[data-theme="duo"] { font-size: 14px; }
html[data-theme="duo"] #view { padding: 14px 20px 24px !important; }
html[data-theme="duo"] .page-head { margin-bottom: 10px !important; }
html[data-theme="duo"] .page-head h1 { font-size: 20px !important; }

/* 摘要条更矮 */
html[data-theme="duo"] .ms-inner { padding: 8px 4px !important; border-radius: 16px !important; }
html[data-theme="duo"] .ms-chip { padding: 0 12px !important; }
html[data-theme="duo"] .ms-chip b { font-size: 22px !important; letter-spacing: -.5px; }
html[data-theme="duo"] .ms-chip span { font-size: 12px !important; }

/* 筛选行：所有块统一 32px 高、单行、等大 */
html[data-theme="duo"] .list-tab,
html[data-theme="duo"] .tabbar .tab-item {
  height: 32px !important; min-height: 32px !important;
  padding: 0 16px !important; font-size: 13.5px !important; font-weight: 700 !important;
  line-height: 32px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
  white-space: nowrap !important; flex: none !important;
  border-radius: 16px !important; box-shadow: 0 2px 0 #E5E5E5 !important;
}
html[data-theme="duo"] .list-tab.on { box-shadow: 0 2px 0 #58A700 !important; }
html[data-theme="duo"] #view select,
html[data-theme="duo"] .filters select,
html[data-theme="duo"] .toolbar select,
html[data-theme="duo"] .filters .input,
html[data-theme="duo"] .toolbar .input {
  height: 32px !important; min-height: 32px !important; font-size: 13.5px !important;
  padding: 0 28px 0 12px !important; line-height: 32px !important;
}
html[data-theme="duo"] .btn { height: 32px !important; min-height: 32px !important; font-size: 13.5px !important; padding: 0 16px !important; }
html[data-theme="duo"] .btn.sm { height: 26px !important; min-height: 26px !important; font-size: 12.5px !important; padding: 0 10px !important; }

/* 表格：行高压到 30px 左右，字 13.5，一屏 20 行 */
html[data-theme="duo"] .table-card { border-radius: 16px !important; }
html[data-theme="duo"] table.data thead th {
  font-size: 12.5px !important; padding: 8px 10px !important; height: 34px !important;
}
html[data-theme="duo"] table.data tbody td {
  font-size: 13.5px !important; padding: 5px 10px !important; height: 32px !important; line-height: 22px !important;
}
html[data-theme="duo"] table.data tbody tr { height: 32px !important; }
html[data-theme="duo"] .table-card .btn.sm,
html[data-theme="duo"] table.data .btn { height: 24px !important; min-height: 24px !important; font-size: 12px !important; padding: 0 9px !important; }

/* ===== 再紧凑一档 + 阴影减薄 ===== */
html[data-theme="duo"] table.data tbody td {
  font-size: 13px !important; padding: 3px 10px !important; height: 28px !important; line-height: 20px !important;
}
html[data-theme="duo"] table.data thead th { font-size: 12px !important; padding: 6px 10px !important; height: 28px !important; }
html[data-theme="duo"] table.data tbody tr { height: 28px !important; }
html[data-theme="duo"] .table-card .btn, html[data-theme="duo"] table.data .btn {
  height: 22px !important; min-height: 22px !important; font-size: 11.5px !important; padding: 0 8px !important;
  border-radius: 8px !important; box-shadow: 0 1px 0 #E5E5E5 !important; font-weight: 700 !important;
}

/* 阴影整体减薄：从 4px 厚边降到 2px，小元素 1px */
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) { box-shadow: 0 2px 0 #58A700 !important; height: 28px !important; min-height: 28px !important; font-size: 13px !important; padding: 0 14px !important; }
html[data-theme="duo"] .btn.secondary { box-shadow: 0 2px 0 #E5E5E5 !important; height: 28px !important; min-height: 28px !important; font-size: 13px !important; padding: 0 14px !important; border-width: 2px !important; }
html[data-theme="duo"] .list-tab, html[data-theme="duo"] .tabbar .tab-item {
  height: 28px !important; min-height: 28px !important; line-height: 28px !important;
  font-size: 12.5px !important; padding: 0 14px !important; box-shadow: 0 1px 0 #E5E5E5 !important;
}
html[data-theme="duo"] .list-tab.on { box-shadow: 0 1px 0 #58A700 !important; }
html[data-theme="duo"] .card, html[data-theme="duo"] .table-card, html[data-theme="duo"] .ms-inner { box-shadow: 0 2px 0 #E5E5E5 !important; }
html[data-theme="duo"] .kpi, html[data-theme="duo"] .kpi2 { box-shadow: 0 2px 0 #E5E5E5 !important; }
/* 输入框不加厚边 */
html[data-theme="duo"] .input, html[data-theme="duo"] select, html[data-theme="duo"] textarea { box-shadow: none !important; }
html[data-theme="duo"] #view select, html[data-theme="duo"] .filters .input, html[data-theme="duo"] .toolbar .input {
  height: 28px !important; min-height: 28px !important; font-size: 12.5px !important; line-height: 28px !important;
}
html[data-theme="duo"] .ms-chip b { font-size: 20px !important; }
html[data-theme="duo"] .ms-inner { padding: 6px 2px !important; }

/* 一页 20 行，行距放宽一点，看着不挤 */
html[data-theme="duo"] table.data tbody td { padding: 6px 10px !important; height: 34px !important; font-size: 13.5px !important; }
html[data-theme="duo"] table.data tbody tr { height: 34px !important; }
html[data-theme="duo"] table.data thead th { padding: 8px 10px !important; height: 32px !important; }
html[data-theme="duo"] .table-card .btn, html[data-theme="duo"] table.data .btn { height: 24px !important; min-height: 24px !important; }

/* 列多了，给表格足够宽度，别让"下次跟进"被切 */
html[data-theme="duo"] table.data { min-width: 1600px !important; }
html[data-theme="duo"] table.data th, html[data-theme="duo"] table.data td { white-space: nowrap; }
html[data-theme="duo"] .table-card { overflow-x: auto !important; }

/* 单元格不再截断（之前 .table-scroll 给 td 加了 max-width:260 + ellipsis） */
html[data-theme="duo"] .table-scroll .data tbody td,
html[data-theme="duo"] .table-scroll table.data tbody td,
html[data-theme="duo"] table.data tbody td {
  max-width: none !important; overflow: visible !important; text-overflow: clip !important; white-space: nowrap !important;
}
html[data-theme="duo"] table.data { table-layout: auto !important; }

/* 表头排序小按钮在紧凑模式下隐藏，给列名腾地方 */
html[data-theme="duo"] table.data thead th .th-fbtn { display: none !important; }
html[data-theme="duo"] table.data thead th { overflow: visible !important; }
html[data-theme="duo"] table.data td .due-flag { margin-right: 4px; }
/* 日期列给足宽度 */
html[data-theme="duo"] table.data td, html[data-theme="duo"] table.data th { min-width: 60px; }

/* 让整表适配容器宽度：长文本列省略，其余列完整 */
html[data-theme="duo"] table.data { min-width: 100% !important; width: 100% !important; }
html[data-theme="duo"] table.data tbody td:nth-child(11),
html[data-theme="duo"] table.data thead th:nth-child(11) {
  max-width: 230px !important; overflow: hidden !important; text-overflow: ellipsis !important;
}
html[data-theme="duo"] table.data tbody td:nth-child(12),
html[data-theme="duo"] table.data thead th:nth-child(12) { min-width: 118px !important; }
html[data-theme="duo"] table.data tbody td:nth-child(13),
html[data-theme="duo"] table.data thead th:nth-child(13) { min-width: 210px !important; }

/* ===== 侧栏字体缩小 ===== */
html[data-theme="duo"] .nav a {
  font-size: 13px !important; font-weight: 600 !important;
  padding: 5px 10px !important; border-radius: 10px !important; margin: 1px 0 !important;
  line-height: 1.4 !important;
}
html[data-theme="duo"] .nav a.active { font-weight: 800 !important; }
html[data-theme="duo"] .nav-title,
html[data-theme="duo"] .nav-gtitle { font-size: 13px !important; font-weight: 800 !important; }
html[data-theme="duo"] .nav-count { font-size: 11px !important; padding: 1px 7px !important; }
html[data-theme="duo"] .nav-svg { width: 15px !important; height: 15px !important; }
html[data-theme="duo"] .nav a .ico, html[data-theme="duo"] .nav-gico { width: 18px !important; height: 18px !important; display: inline-flex; align-items: center; justify-content: center; }
html[data-theme="duo"] .nav-links { padding-left: 8px !important; }
html[data-theme="duo"] .nav-group { margin-bottom: 2px !important; }
html[data-theme="duo"] .sidebar-head { padding: 10px 14px !important; }
html[data-theme="duo"] .nav-tool-btn { font-size: 11.5px !important; padding: 3px 10px !important; }

/* ===== 全屏看表 ===== */
body.table-fullscreen .table-card {
  position: fixed !important; inset: 0 !important; z-index: 1200 !important;
  margin: 0 !important; padding: 12px 16px 16px !important; border-radius: 0 !important;
  border: 0 !important; background: #FFFFFF !important; box-shadow: none !important;
  overflow: auto !important;
}
body.table-fullscreen .table-card table.data { min-width: 100% !important; }
body.table-fullscreen #tfs-exit {
  position: fixed; top: 10px; right: 18px; z-index: 1300;
  display: flex; align-items: center; gap: 10px;
  background: #FFFFFF; border: 2px solid #E5E5E5; border-radius: 14px;
  padding: 6px 8px 6px 14px; box-shadow: 0 2px 0 #E5E5E5;
  font-size: 12.5px; color: #777;
}
body.table-fullscreen .table-scroll { overflow: visible !important; }

/* 全屏层级与布局修正 */
body.table-fullscreen .table-card {
  z-index: 2000 !important;
  display: flex; flex-direction: column;
  padding: 8px 12px 0 !important;
}
body.table-fullscreen .table-card .table-scroll { flex: 1 1 auto; overflow: auto !important; }
body.table-fullscreen .table-card .table-foot,
body.table-fullscreen .table-card .pager {
  position: sticky; bottom: 0; background: #FFFFFF; z-index: 3;
  border-top: 2px solid #E5E5E5; padding: 6px 4px;
}
body.table-fullscreen .sidebar { z-index: 1 !important; }

/* 全屏时隐藏侧栏和顶栏，退出按钮提到最上层 */
body.table-fullscreen .sidebar,
body.table-fullscreen .topbar { display: none !important; }
body.table-fullscreen #app, body.table-fullscreen .shell { display: block !important; }
body.table-fullscreen .main { margin-left: 0 !important; width: 100% !important; }
body.table-fullscreen #view { padding: 0 !important; }
body.table-fullscreen #tfs-exit { z-index: 2600 !important; }

/* 侧栏文字变浅：未选中 #777，选中深绿 */
html[data-theme="duo"] .nav a { color: #777777 !important; font-weight: 600 !important; }
html[data-theme="duo"] .nav a:hover { color: #58A700 !important; }
html[data-theme="duo"] .nav a.active { color: #58A700 !important; font-weight: 800 !important; }
html[data-theme="duo"] .nav-title,
html[data-theme="duo"] .nav-gtitle { color: #777777 !important; font-weight: 700 !important; }
html[data-theme="duo"] .nav-group:has(a.active) .nav-gtitle,
html[data-theme="duo"] .nav-group:has(a.active) .nav-title { color: #58A700 !important; }
html[data-theme="duo"] .nav-count { color: #AFAFAF !important; border-color: #E5E5E5 !important; }
html[data-theme="duo"] .nav-svg, html[data-theme="duo"] .nav .ico { color: #B5CDA3 !important; }
html[data-theme="duo"] .nav a.active .nav-svg, html[data-theme="duo"] .nav a.active .ico { color: #58A700 !important; }
html[data-theme="duo"] .nav a:hover .nav-svg, html[data-theme="duo"] .nav a:hover .ico { color: #58CC02 !important; }

/* 文字灰阶改用"极简"主题那套（#101828 / #475467 / #7c8698），绿只做强调 */
html[data-theme="duo"] {
  --text: #101828;
  --text-2: #475467;
  --muted: #7C8698;
  --border: #E6E9EF;
}
html[data-theme="duo"] body { color: #101828 !important; }
html[data-theme="duo"] .nav a { color: #475467 !important; }
html[data-theme="duo"] .nav-title, html[data-theme="duo"] .nav-gtitle { color: #475467 !important; }
html[data-theme="duo"] .nav-count { color: #7C8698 !important; }
html[data-theme="duo"] .page-head h1 { color: #101828 !important; }
html[data-theme="duo"] .page-head p { color: #7C8698 !important; }
html[data-theme="duo"] table.data thead th { color: #7C8698 !important; }
html[data-theme="duo"] table.data tbody td { color: #101828 !important; }
html[data-theme="duo"] .kpi2-label, html[data-theme="duo"] .kpi2-sub,
html[data-theme="duo"] .ms-chip span { color: #7C8698 !important; }
html[data-theme="duo"] .kpi2-val, html[data-theme="duo"] .ms-chip b { color: #101828 !important; }

/* 表头筛选/排序按钮恢复显示 */
html[data-theme="duo"] table.data thead th .th-fbtn { display: inline-flex !important; opacity: .55; }
html[data-theme="duo"] table.data thead th .th-fbtn:hover { opacity: 1; }

/* ===== 全屏：整段内容（筛选 + 表格）铺满，只隐藏侧栏和顶栏 ===== */
body.table-fullscreen #view {
  position: fixed !important; inset: 0 !important; z-index: 2000 !important;
  background: #FFFFFF !important; padding: 10px 16px 0 !important;
  overflow: auto !important; display: flex; flex-direction: column;
}
body.table-fullscreen .table-card {
  position: static !important; inset: auto !important;
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  padding: 4px 0 0 !important; margin: 0 !important; overflow: hidden !important;
}
body.table-fullscreen .table-card .table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto !important; }
body.table-fullscreen .table-card .pager { position: sticky; bottom: 0; background: #FFF; border-top: 2px solid #E5E5E5; padding: 6px 2px; }

/* 全屏退出按钮挪到右下角，别压住工具栏 */
body.table-fullscreen #tfs-exit {
  top: auto !important; bottom: 16px !important; right: 20px !important;
  padding: 6px 8px 6px 12px !important; font-size: 12px !important;
}

/* ===== 顶部浅绿小块：严格用 App 那套（底 #D7FFB8 / 边 #A5ED6E / 字 #58A700） ===== */
html[data-theme="duo"] .tc-ver,
html[data-theme="duo"] .env-chip,
html[data-theme="duo"] .tenant-tag,
html[data-theme="duo"] .tag-soft,
html[data-theme="duo"] .soft-chip {
  background: #D7FFB8 !important;
  border: 2px solid #A5ED6E !important;
  color: #58A700 !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  padding: 1px 8px !important;
  line-height: 1.5 !important;
}
html[data-theme="duo"] .env-chip { border-radius: 999px !important; padding: 3px 12px !important; font-size: 12.5px !important; }
html[data-theme="duo"] .env-chip * { color: #58A700 !important; }
/* 头像底色也用浅绿 */
html[data-theme="duo"] .avatar, html[data-theme="duo"] .user-ava {
  background: #D7FFB8 !important; color: #58A700 !important; border: 2px solid #A5ED6E !important;
}

/* ===== 边框统一减细：2px → 1px，厚边阴影同步减到 1px ===== */
html[data-theme="duo"] .card,
html[data-theme="duo"] .table-card,
html[data-theme="duo"] .kpi,
html[data-theme="duo"] .kpi2,
html[data-theme="duo"] .ms-inner,
html[data-theme="duo"] .sidebar,
html[data-theme="duo"] .topbar,
html[data-theme="duo"] .sidebar-head,
html[data-theme="duo"] .sidebar-foot,
html[data-theme="duo"] .search-box,
html[data-theme="duo"] .btn.secondary,
html[data-theme="duo"] .list-tab,
html[data-theme="duo"] .tabbar .tab-item,
html[data-theme="duo"] .input,
html[data-theme="duo"] select,
html[data-theme="duo"] textarea,
html[data-theme="duo"] .pill,
html[data-theme="duo"] .chip,
html[data-theme="duo"] .badge,
html[data-theme="duo"] .tag,
html[data-theme="duo"] .wb-tag,
html[data-theme="duo"] .tc-ver,
html[data-theme="duo"] .env-chip,
html[data-theme="duo"] .avatar,
html[data-theme="duo"] .user-ava {
  border-width: 1px !important;
}
html[data-theme="duo"] .card,
html[data-theme="duo"] .table-card,
html[data-theme="duo"] .kpi,
html[data-theme="duo"] .kpi2,
html[data-theme="duo"] .ms-inner { box-shadow: 0 1px 0 #E5E5E5 !important; }
html[data-theme="duo"] .btn.secondary,
html[data-theme="duo"] .list-tab,
html[data-theme="duo"] .tabbar .tab-item { box-shadow: 0 1px 0 #E5E5E5 !important; }
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) { box-shadow: 0 1px 0 #58A700 !important; }
html[data-theme="duo"] .list-tab.on { box-shadow: 0 1px 0 #58A700 !important; }
html[data-theme="duo"] table.data thead th { border-bottom-width: 1px !important; }
html[data-theme="duo"] table.data tbody td { border-bottom-width: 1px !important; }

/* ===== 内容区恢复淡绿底（卡片保持纯白） ===== */
html[data-theme="duo"] body,
html[data-theme="duo"] #view,
html[data-theme="duo"] .main {
  background: #F1FBE3 !important;
}
html[data-theme="duo"] .sidebar,
html[data-theme="duo"] .sidebar-head,
html[data-theme="duo"] .sidebar-foot,
html[data-theme="duo"] .topbar,
html[data-theme="duo"] .card,
html[data-theme="duo"] .table-card,
html[data-theme="duo"] .kpi,
html[data-theme="duo"] .kpi2,
html[data-theme="duo"] .ms-inner {
  background: #FFFFFF !important;
}

/* ===== 让数据页"像多邻国"的四个细节 ===== */
/* 1) 图标按钮：浅灰底 + 圆角，图标粗一点 */
html[data-theme="duo"] .icon-btn {
  width: 32px; height: 32px; border-radius: 10px;
  background: #F7F7F7 !important; border: 1px solid #E5E5E5 !important;
  color: #777777 !important; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: none !important;
}
html[data-theme="duo"] .icon-btn:hover { background: #D7FFB8 !important; border-color: #A5ED6E !important; color: #58A700 !important; }
html[data-theme="duo"] .icon-btn svg { stroke-width: 2.2; }

/* 2) 复选框：圆角方块，选中变绿 */
html[data-theme="duo"] input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 17px; height: 17px; border-radius: 5px;
  border: 1px solid #E5E5E5 !important; background: #FFFFFF !important;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  position: relative; transition: background .12s, border-color .12s;
  vertical-align: middle;
}
html[data-theme="duo"] input[type="checkbox"]:checked {
  background: #58CC02 !important; border-color: #58CC02 !important;
}
html[data-theme="duo"] input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 5px; top: 1.5px;
  width: 4px; height: 9px; border: solid #FFFFFF; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
html[data-theme="duo"] input[type="checkbox"]:focus-visible { outline: 2px solid #A5ED6E; outline-offset: 1px; }

/* 3) 表格里的公司名：不用蓝色链接，用墨色粗体（多邻国不在列表里放蓝链） */
html[data-theme="duo"] table.data tbody td a,
html[data-theme="duo"] table.data tbody td .link,
html[data-theme="duo"] table.data tbody td .cell-link,
html[data-theme="duo"] table.data tbody td .name-link {
  color: #101828 !important; font-weight: 700 !important; text-decoration: none !important;
}
html[data-theme="duo"] table.data tbody td a:hover { color: #58A700 !important; }

/* 4) 筛选页签统一：未选白底灰边、选中绿底白字，同高同圆角 */
html[data-theme="duo"] .list-tab {
  height: 32px !important; min-height: 32px !important; padding: 0 16px !important;
  font-size: 13.5px !important; font-weight: 700 !important; border-radius: 16px !important;
  box-shadow: none !important; border: 1px solid #E5E5E5 !important;
  background: #FFFFFF !important; color: #475467 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
}
html[data-theme="duo"] .list-tab.on {
  background: #58CC02 !important; border-color: #58CC02 !important; color: #FFFFFF !important;
  font-weight: 800 !important;
}

/* ===== 清掉多邻国没有的蓝色（筛选条、激活列头、图标按钮） ===== */
html[data-theme="duo"] .afchip {
  background: #D7FFB8 !important; color: #58A700 !important;
  border: 1px solid #A5ED6E !important; border-radius: 999px !important;
  font-weight: 700 !important; height: 28px !important; padding: 0 10px !important;
}
html[data-theme="duo"] .afchip:hover { background: #CBF2A2 !important; }
html[data-theme="duo"] .af-x { color: #58A700 !important; opacity: .8; }
html[data-theme="duo"] .af-x:hover { opacity: 1; }
html[data-theme="duo"] .afbar-lb { color: #7C8698 !important; font-size: 12.5px !important; }
html[data-theme="duo"] .nav-group:not(.collapsed) > .nav-title .nav-gico { color: #AFAFAF !important; }
html[data-theme="duo"] th.col-th.th-active .th-label,
html[data-theme="duo"] th.col-th.has-cond .th-label,
html[data-theme="duo"] th.col-th.th-active,
html[data-theme="duo"] .th-fbtn.on,
html[data-theme="duo"] th.col-th.th-active .th-fbtn { color: #58A700 !important; }
html[data-theme="duo"] #bell { background: #FFFFFF !important; border-color: #E5E5E5 !important; color: #475467 !important; }
html[data-theme="duo"] #bell:hover { background: #D7FFB8 !important; color: #58A700 !important; border-color: #A5ED6E !important; }
html[data-theme="duo"] .bell-badge { background: #FF4B4B !important; color: #FFFFFF !important; }

/* ===== 正文墨色由 #101828 调淡到 #3C3C3C（多邻国正文色） ===== */
html[data-theme="duo"] body,
html[data-theme="duo"] table.data tbody td,
html[data-theme="duo"] table.data tbody td a,
html[data-theme="duo"] table.data tbody td .link,
html[data-theme="duo"] table.data tbody td .cell-link,
html[data-theme="duo"] table.data tbody td .name-link,
html[data-theme="duo"] .btn.secondary,
html[data-theme="duo"] .list-tab,
html[data-theme="duo"] .tabbar .tab-item,
html[data-theme="duo"] select,
html[data-theme="duo"] .input,
html[data-theme="duo"] textarea,
html[data-theme="duo"] .page-head h1,
html[data-theme="duo"] .kpi2-val,
html[data-theme="duo"] .ms-chip b,
html[data-theme="duo"] .ms-chip b,
html[data-theme="duo"] .chip,
html[data-theme="duo"] .pill,
html[data-theme="duo"] .badge,
html[data-theme="duo"] .tag {
  color: #3C3C3C !important;
}
html[data-theme="duo"] table.data tbody td, html[data-theme="duo"] table.data tbody td a { font-weight: 600 !important; }
html[data-theme="duo"] .kpi2-val, html[data-theme="duo"] .ms-chip b { font-weight: 800 !important; }

/* 正文墨色再淡一档：#3C3C3C → #4B4B4B */
html[data-theme="duo"] body,
html[data-theme="duo"] table.data tbody td,
html[data-theme="duo"] table.data tbody td a,
html[data-theme="duo"] table.data tbody td .link,
html[data-theme="duo"] table.data tbody td .cell-link,
html[data-theme="duo"] table.data tbody td .name-link,
html[data-theme="duo"] .btn.secondary,
html[data-theme="duo"] .list-tab,
html[data-theme="duo"] .tabbar .tab-item,
html[data-theme="duo"] select,
html[data-theme="duo"] .input,
html[data-theme="duo"] textarea,
html[data-theme="duo"] .page-head h1,
html[data-theme="duo"] .kpi2-val,
html[data-theme="duo"] .ms-chip b,
html[data-theme="duo"] .chip,
html[data-theme="duo"] .pill,
html[data-theme="duo"] .badge,
html[data-theme="duo"] .tag {
  color: #4B4B4B !important;
}

/* ===== 字再小一档、行距更紧 ===== */
html[data-theme="duo"] table.data tbody td {
  font-size: 12.5px !important; padding: 3px 8px !important; height: 30px !important; line-height: 20px !important;
}
html[data-theme="duo"] table.data tbody tr { height: 30px !important; }
html[data-theme="duo"] table.data thead th { font-size: 12px !important; padding: 6px 8px !important; height: 30px !important; }
html[data-theme="duo"] .table-card .btn, html[data-theme="duo"] table.data .btn {
  height: 21px !important; min-height: 21px !important; font-size: 11.5px !important; padding: 0 7px !important;
}
html[data-theme="duo"] .btn, html[data-theme="duo"] .list-tab { font-size: 12.5px !important; }
html[data-theme="duo"] .btn { height: 28px !important; min-height: 28px !important; padding: 0 12px !important; }
html[data-theme="duo"] .list-tab { height: 28px !important; min-height: 28px !important; padding: 0 14px !important; }
html[data-theme="duo"] .nav a { font-size: 12.5px !important; padding: 4px 10px !important; }
html[data-theme="duo"] .nav-title, html[data-theme="duo"] .nav-gtitle { font-size: 12.5px !important; }
html[data-theme="duo"] .ms-chip b { font-size: 19px !important; }
html[data-theme="duo"] .kpi2-val { font-size: 26px !important; }

/* ===== 再小一档 ===== */
html[data-theme="duo"] table.data tbody td {
  font-size: 11.5px !important; padding: 2px 6px !important; height: 26px !important; line-height: 18px !important;
}
html[data-theme="duo"] table.data tbody tr { height: 26px !important; }
html[data-theme="duo"] table.data thead th { font-size: 11px !important; padding: 5px 6px !important; height: 26px !important; }
html[data-theme="duo"] .table-card .btn, html[data-theme="duo"] table.data .btn {
  height: 19px !important; min-height: 19px !important; font-size: 10.5px !important; padding: 0 6px !important;
}
html[data-theme="duo"] .btn, html[data-theme="duo"] .list-tab { font-size: 11.5px !important; }
html[data-theme="duo"] .btn { height: 26px !important; min-height: 26px !important; padding: 0 10px !important; }
html[data-theme="duo"] .list-tab { height: 26px !important; min-height: 26px !important; padding: 0 12px !important; }
html[data-theme="duo"] #view select, html[data-theme="duo"] .filters .input, html[data-theme="duo"] .toolbar .input {
  height: 26px !important; min-height: 26px !important; font-size: 11.5px !important; line-height: 26px !important;
}
html[data-theme="duo"] .nav a { font-size: 12px !important; padding: 3px 8px !important; }
html[data-theme="duo"] .nav-title, html[data-theme="duo"] .nav-gtitle { font-size: 12px !important; }
html[data-theme="duo"] .ms-chip b { font-size: 18px !important; }
html[data-theme="duo"] .ms-chip span { font-size: 11.5px !important; }

/* ===== 全面减重：不再加粗 ===== */
html[data-theme="duo"] body { font-weight: 400 !important; }
html[data-theme="duo"] table.data tbody td,
html[data-theme="duo"] table.data tbody td a,
html[data-theme="duo"] table.data tbody td .link,
html[data-theme="duo"] table.data tbody td .name-link { font-weight: 400 !important; }
html[data-theme="duo"] table.data thead th { font-weight: 600 !important; }
html[data-theme="duo"] .btn, html[data-theme="duo"] .btn.secondary,
html[data-theme="duo"] .btn:not(.ghost):not(.secondary) { font-weight: 500 !important; }
html[data-theme="duo"] .list-tab { font-weight: 500 !important; }
html[data-theme="duo"] .list-tab.on { font-weight: 600 !important; }
html[data-theme="duo"] .nav a { font-weight: 500 !important; }
html[data-theme="duo"] .nav a.active { font-weight: 600 !important; }
html[data-theme="duo"] .nav-title, html[data-theme="duo"] .nav-gtitle { font-weight: 600 !important; }
html[data-theme="duo"] .page-head h1 { font-weight: 600 !important; }
html[data-theme="duo"] .kpi2-val, html[data-theme="duo"] .ms-chip b { font-weight: 600 !important; }
html[data-theme="duo"] .ms-chip span, html[data-theme="duo"] .kpi2-label { font-weight: 500 !important; }
html[data-theme="duo"] .chip, html[data-theme="duo"] .pill,
html[data-theme="duo"] .badge, html[data-theme="duo"] .tag,
html[data-theme="duo"] .afchip { font-weight: 500 !important; }
html[data-theme="duo"] .env-chip, html[data-theme="duo"] .tc-ver { font-weight: 500 !important; }

/* ===== 管理员详情布局编辑 / AI 面板 ===== */
html[data-theme="duo"] . { lay-tip }
html[data-theme="duo"] . { lay-list }
html[data-theme="duo"] .lay-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid #E5E5E5; background: #FFFFFF; font-size: 13px; cursor: grab;
}
html[data-theme="duo"] . { lay-row:last-child }
html[data-theme="duo"] . { lay-row.dragging }
html[data-theme="duo"] . { lay-drag }
html[data-theme="duo"] . { lay-key }
html[data-theme="duo"] . { lai-log }
html[data-theme="duo"] . { lai-msg }
html[data-theme="duo"] . { lai-msg.ai }
html[data-theme="duo"] . { lai-msg.me }

/* ===== 详情右侧「最近跟进」面板：按竖排布局，避免挤在一起 ===== */
html[data-theme="duo"] .detail-aside .flw-tools {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  border-top: 1px solid #F1F4F9; padding-top: 10px;
}
html[data-theme="duo"] . { detail-aside .flw-tools > * }
html[data-theme="duo"] .detail-aside .flw-sel,
html[data-theme="duo"] .detail-aside .flw-stage,
html[data-theme="duo"] .detail-aside .flw-next,
html[data-theme="duo"] . { detail-aside .btn }
html[data-theme="duo"] . { detail-aside .flw-due }
html[data-theme="duo"] . { detail-aside .flw-due .flw-next }
html[data-theme="duo"] . { detail-aside .flw-geo }
html[data-theme="duo"] . { detail-aside .flw-auto-tip }
html[data-theme="duo"] . { detail-aside .flw-btn }
html[data-theme="duo"] . { detail-aside .flw-todo-btn }

/* 跟进面板整体留白 */
html[data-theme="duo"] .detail-aside .flw-tools select,
html[data-theme="duo"] .detail-aside .flw-tools input[type="datetime-local"] {
  height: 32px; border: 1px solid #E5E5E5; border-radius: 10px; background: #fff;
  font-size: 12.5px; color: #3C3C3C; padding: 0 10px;
}
html[data-theme="duo"] . { detail-aside .flw-tools select }

/* ===== 详情右栏「最近跟进」：卡片化、层次更清楚 ===== */
html[data-theme="duo"] . { detail-aside }
html[data-theme="duo"] .detail-aside .dsec-title {
  font-size: 13px !important; font-weight: 700 !important; color: #3C3C3C !important;
  margin: 0 0 10px !important; display: flex; align-items: center; gap: 6px;
}
html[data-theme="duo"] .detail-aside .dsec-title::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px; background: #58CC02;
}
html[data-theme="duo"] .detail-aside .flw-panel {
  background: #FFFFFF; border: 1px solid #E5E5E5; border-radius: 16px;
  box-shadow: 0 1px 0 #E5E5E5; overflow: hidden;
}
html[data-theme="duo"] . { detail-aside .flw-list }

/* 时间线条目 */
html[data-theme="duo"] . { detail-aside .feed-group }
html[data-theme="duo"] . { detail-aside .feed-day-label }
html[data-theme="duo"] .detail-aside .feed-day-label span {
  display: inline-block; background: #D7FFB8; color: #58A700;
  font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
}
html[data-theme="duo"] . { detail-aside .feed-track }
html[data-theme="duo"] . { detail-aside .feed-item }
html[data-theme="duo"] . { detail-aside .feed-item:last-child }
html[data-theme="duo"] . { detail-aside .feed-axis }
html[data-theme="duo"] . { detail-aside .feed-main }
html[data-theme="duo"] . { detail-aside .feed-head }
html[data-theme="duo"] . { detail-aside .feed-head b }
html[data-theme="duo"] . { detail-aside .feed-verb }
html[data-theme="duo"] . { detail-aside .feed-time }
html[data-theme="duo"] . { detail-aside .feed-content }
html[data-theme="duo"] . { detail-aside .feed-meta }
html[data-theme="duo"] .detail-aside .feed-meta span {
  background: #F7F7F7; border-radius: 999px; padding: 1px 8px;
  font-size: 11px; color: #7C8698;
}
html[data-theme="duo"] .detail-aside .feed-empty, .detail-aside .flw-empty {
  font-size: 12.5px; color: #AFAFAF; padding: 12px 2px 16px;
}

/* 输入区 */
html[data-theme="duo"] . { detail-aside .flw-compose }
html[data-theme="duo"] .detail-aside .flw-input {
  width: 100%; border: 1px solid #E5E5E5; border-radius: 12px; background: #FBFDF8;
  padding: 10px 12px; font-size: 13px; line-height: 1.6; min-height: 84px; resize: vertical;
}
html[data-theme="duo"] . { detail-aside .flw-input:focus }
html[data-theme="duo"] . { detail-aside .flw-tools }
html[data-theme="duo"] . { detail-aside .flw-auto-tip }
html[data-theme="duo"] . { detail-aside .due-chip }
html[data-theme="duo"] . { detail-aside .due-chip:hover }
html[data-theme="duo"] . { detail-aside .due-chip.on }
html[data-theme="duo"] . { detail-aside .flw-geo }
html[data-theme="duo"] .detail-aside .flw-btn {
  height: 40px; border-radius: 14px; font-size: 14px; font-weight: 700;
  background: #58CC02; color: #fff; border: 0; box-shadow: 0 2px 0 #58A700;
}
html[data-theme="duo"] . { detail-aside .flw-btn:active }

/* AI 筛选输入区 */
html[data-theme="duo"] . { ai-filter }
html[data-theme="duo"] . { ai-filter .input }
html[data-theme="duo"] . { ai-filter .input::placeholder }

/* AI 筛选单独占一行，不挤占普通筛选控件 */
html[data-theme="duo"] . { toolbar }
html[data-theme="duo"] .toolbar .ai-filter {
  flex: 1 0 100%; order: 99; margin: 6px 0 0 0 !important;
  display: flex; gap: 8px; align-items: center;
}
html[data-theme="duo"] . { toolbar .ai-filter .input }
html[data-theme="duo"] . { toolbar .ai-filter .btn }
/* 普通筛选控件别被压成竖排 */
html[data-theme="duo"] . { toolbar > label, .toolbar > div }
html[data-theme="duo"] . { toolbar > .spacer }
html[data-theme="duo"] . { toolbar .btn.secondary#apply }

/* AI 筛选：独立一整行 */
html[data-theme="duo"] .ai-filter-row {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 4px; padding: 8px 12px;
  background: #FFFFFF; border: 1px solid #E5E5E5; border-radius: 14px;
  box-shadow: 0 1px 0 #E5E5E5;
}
html[data-theme="duo"] .ai-filter-badge {
  flex: none; background: #58CC02; color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 2px 8px; border-radius: 8px; letter-spacing: .5px;
}
html[data-theme="duo"] .ai-filter-row .input {
  flex: 1; min-width: 0; height: 34px; border: 0; background: transparent; padding: 0 4px;
  font-size: 13px;
}
html[data-theme="duo"] . { ai-filter-row .input:focus }
html[data-theme="duo"] . { ai-filter-row .btn }

/* 必填项未填时的高亮 */
html[data-theme="duo"] . { form-item.req-missing > label }
html[data-theme="duo"] .form-item.req-missing .input,
html[data-theme="duo"] .form-item.req-missing select,
html[data-theme="duo"] .form-item.req-missing textarea {
  border-color: #FF4B4B !important;
  background: #FFF7F7 !important;
  box-shadow: 0 0 0 3px rgba(255, 75, 75, .12) !important;
}
@keyframes reqShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
html[data-theme="duo"] . { form-item.req-missing }

/* 对话框里的只读字段 */
html[data-theme="duo"] . { cf-input.cf-readonly }

/* ===== 跟进记录评论（朋友圈式） ===== */
html[data-theme="duo"] . { fc-wrap }
html[data-theme="duo"] . { fc-head }
html[data-theme="duo"] . { fc-count }
html[data-theme="duo"] .fc-toggle {
  border: 0; background: transparent; color: #58A700; font-size: 11.5px;
  font-weight: 700; cursor: pointer; padding: 0;
}
html[data-theme="duo"] . { fc-toggle:hover }
html[data-theme="duo"] . { fc-body }
html[data-theme="duo"] . { fc-body.hidden }
html[data-theme="duo"] . { fc-list }
html[data-theme="duo"] . { fc-item }
html[data-theme="duo"] . { fc-item.is-reply }
html[data-theme="duo"] . { fc-item.is-reply .fc-who::before }
html[data-theme="duo"] . { fc-who }
html[data-theme="duo"] . { fc-text }
html[data-theme="duo"] . { fc-time }
html[data-theme="duo"] .fc-reply {
  border: 0; background: transparent; color: #7C8698; font-size: 11px;
  cursor: pointer; margin-left: 6px; padding: 0;
}
html[data-theme="duo"] . { fc-reply:hover }
html[data-theme="duo"] . { fc-empty }
html[data-theme="duo"] . { fc-compose }
html[data-theme="duo"] .fc-input {
  flex: 1; height: 28px; border: 1px solid #E5E5E5; border-radius: 8px;
  padding: 0 8px; font-size: 12px; background: #fff;
}
html[data-theme="duo"] . { fc-input:focus }
html[data-theme="duo"] .fc-reply-to {
  font-size: 11px; color: #58A700; background: #D7FFB8; border-radius: 999px;
  padding: 2px 8px; cursor: pointer; white-space: nowrap;
}
html[data-theme="duo"] . { fc-reply-to.hidden }
html[data-theme="duo"] . { fc-send }

/* 客户分级规则 */
html[data-theme="duo"] . { grade-grid }
html[data-theme="duo"] . { grade-grid label }
html[data-theme="duo"] . { grade-grid .input }
html[data-theme="duo"] .grade-note {
  margin-top: 12px; padding: 10px 12px; background: #F7FBF3;
  border: 1px solid #EFF3EA; border-radius: 12px; font-size: 12.5px; color: #3C3C3C; line-height: 1.8;
}

/* 转化状态审批列表 */
html[data-theme="duo"] . { cva-list }
html[data-theme="duo"] . { cva-row }
html[data-theme="duo"] . { cva-main }
html[data-theme="duo"] . { cva-tag }
html[data-theme="duo"] . { cva-reason }
html[data-theme="duo"] . { cva-meta }
html[data-theme="duo"] . { cva-actions }
