/* =========================================================
   企业私域客户分层运营分析系统 v1.0
   设计语言：层屿 Stratum — 深松墨 + 青玉 + 琥珀
   ========================================================= */

@font-face { font-family: 'Inter'; src: url('../fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --ink: #0C1F1B;
  --ink-2: #16332C;
  --jade: #0E8C6E;
  --jade-deep: #0A6B55;
  --jade-soft: #E6F4EF;
  --amber: #D99A3E;
  --amber-soft: #FBF2E3;
  --brick: #C25B44;
  --brick-soft: #FBECE8;
  --steel: #3E7CB1;
  --steel-soft: #EAF1F8;
  --paper: #F2F5F3;
  --card: #FFFFFF;
  --line: #E4EAE6;
  --line-2: #EDF1EE;
  --text: #1B2A26;
  --text-2: #5B6B66;
  --text-3: #8A9893;
  --shadow-sm: 0 1px 2px rgba(12, 43, 35, .04);
  --shadow: 0 12px 32px -18px rgba(12, 43, 35, .25);
  --shadow-lg: 0 28px 70px -30px rgba(8, 32, 26, .45);
  --radius: 16px;
  --sidebar: 238px;
  --font: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; color: var(--text); }
::selection { background: #CDEBE0; }
.fa-solid, .fa-regular, .fa-brands { line-height: 1; }

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

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: #0A241F;
  color: #D7E5E0;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(1100px 420px at -30% -6%, rgba(28, 116, 92, .38), transparent 62%),
    radial-gradient(700px 340px at 120% 107%, rgba(217, 154, 62, .13), transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='238' height='260' viewBox='0 0 238 260'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1'%3E%3Cpath d='M-30 96c60-46 120-40 160 6s90 52 140 12'/%3E%3Cpath d='M-30 126c60-46 120-40 160 6s90 52 140 12'/%3E%3Cpath d='M-30 156c60-46 120-40 160 6s90 52 140 12'/%3E%3Cpath d='M-30 186c60-46 120-40 160 6s90 52 140 12'/%3E%3Cpath d='M-30 216c60-46 120-40 160 6s90 52 140 12'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: cover, cover, 238px 260px;
  background-position: left top, right bottom, left 120px;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, #17A382, #0A6B55); display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgba(23, 163, 130, .9); flex: 0 0 38px; position: relative; overflow: hidden; }
.brand-mark::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.35), transparent 45%); }
.brand-mark span { display: block; width: 18px; height: 2px; background: #EAF6F1; border-radius: 2px; position: absolute; left: 10px; box-shadow: 0 -5px 0 #EAF6F1, 0 5px 0 #EAF6F1; }
.brand-mark span:nth-child(2) { width: 12px; box-shadow: 0 -5px 0 #EAF6F1, 0 5px 0 #EAF6F1; }
.brand-text b { display: block; font-size: 14.5px; color: #F2FAF6; letter-spacing: .02em; font-weight: 700; }
.brand-text small { display: block; font-size: 9.5px; color: rgba(215, 229, 224, .52); letter-spacing: .22em; text-transform: uppercase; margin-top: 2px; }

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 18px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 4px; }
.nav-group { margin-top: 15px; }
.nav-group:first-child { margin-top: 2px; }
.nav-group-title { display: flex; align-items: center; gap: 8px; padding: 0 10px 7px; font-size: 10px; letter-spacing: .13em; color: rgba(215, 229, 224, .42); font-weight: 600; }
.nav-group-title i { font-size: 9px; opacity: .8; }
.nav-group-title em { font-style: normal; font-family: var(--font); font-size: 9px; margin-left: auto; opacity: .5; letter-spacing: .05em; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: rgba(226, 240, 235, .74); font-size: 12.6px; position: relative; transition: .18s; margin-bottom: 1px; }
.nav-item i { width: 17px; text-align: center; font-size: 12.5px; opacity: .78; }
.nav-item span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: linear-gradient(100deg, rgba(25, 122, 96, .55), rgba(20, 88, 72, .22)); color: #F4FFFB; box-shadow: inset 0 0 0 1px rgba(110, 214, 180, .16); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--amber); }
.nav-item.active i { color: #F0BC69; opacity: 1; }
.nav-foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 10.5px; color: rgba(215, 229, 224, .38); display: flex; align-items: center; justify-content: space-between; }
.nav-foot b { color: rgba(232, 244, 239, .72); font-weight: 500; }

.main { margin-left: var(--sidebar); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar { height: 62px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; padding: 0 26px; position: sticky; top: 0; z-index: 40; }
.crumb { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-3); min-width: 0; }
.crumb i { font-size: 9px; opacity: .55; }
.crumb b { color: var(--text); font-weight: 600; white-space: nowrap; }
.top-search { margin-left: auto; position: relative; width: 268px; }
.top-search input { width: 100%; height: 34px; border: 1px solid var(--line); background: #F7F9F8; border-radius: 20px; padding: 0 14px 0 34px; outline: none; transition: .2s; font-size: 12.5px; }
.top-search input:focus { background: #fff; border-color: #B9DCD0; box-shadow: 0 0 0 3px rgba(14, 140, 110, .08); }
.top-search > i { position: absolute; left: 13px; top: 11px; font-size: 11.5px; color: var(--text-3); }
.search-pop { position: absolute; top: 42px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 80; max-height: 360px; overflow: auto; }
.search-pop.show { display: block; }
.search-pop a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 12.5px; }
.search-pop a:hover { background: var(--jade-soft); }
.search-pop small { margin-left: auto; color: var(--text-3); font-size: 11px; }

.top-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #4C5F58; background: #F5F8F6; border: 1px solid var(--line); position: relative; transition: .18s; }
.top-icon:hover { background: #fff; color: var(--jade); border-color: #CDE4DA; }
.top-icon .dot { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; background: var(--brick); border-radius: 50%; border: 1.5px solid #fff; }
.top-icon .badge { position: absolute; top: -3px; right: -4px; background: var(--brick); color: #fff; font-size: 9px; min-width: 15px; height: 15px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; border: 1.5px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 4px 4px 10px; border-radius: 22px; border: 1px solid var(--line); background: #fff; position: relative; }
.user-chip:hover { border-color: #CDE4DA; }
.user-chip .u-name { font-size: 12px; font-weight: 600; line-height: 1.2; }
.user-chip .u-role { font-size: 10px; color: var(--text-3); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; flex: 0 0 auto; letter-spacing: .02em; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.user-menu { position: absolute; right: 0; top: 44px; width: 178px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 90; }
.user-menu.show { display: block; }
.user-menu a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; font-size: 12.5px; }
.user-menu a:hover { background: #F4F8F5; }
.user-menu a.danger { color: var(--brick); }
.user-menu .sep { height: 1px; background: var(--line-2); margin: 4px 6px; }

.content { padding: 22px 26px 40px; max-width: 1720px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 18px; }
.eyebrow { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--jade); font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.eyebrow::before { content: ''; width: 16px; height: 1.5px; background: var(--jade); display: inline-block; }
.page-title { font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin: 0; color: #10231D; line-height: 1.18; }
.page-sub { font-size: 12.5px; color: var(--text-2); margin: 5px 0 0; max-width: 760px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: #2B3D37; font-size: 12.5px; font-weight: 500; transition: .18s; white-space: nowrap; }
.btn:hover { border-color: #BFD9CE; background: #FAFDFB; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn i { font-size: 11.5px; }
.btn-primary { background: linear-gradient(135deg, #129274, #0A6B55); border-color: #0A6B55; color: #fff; box-shadow: 0 10px 22px -14px rgba(14, 140, 110, .9); }
.btn-primary:hover { background: linear-gradient(135deg, #14A181, #0B7359); border-color: #0B7359; color: #fff; }
.btn-amber { background: linear-gradient(135deg, #E5AA54, #C98222); border-color: #C98222; color: #fff; }
.btn-amber:hover { color: #fff; border-color: #C98222; }
.btn-danger { color: var(--brick); border-color: #F0D3CB; background: #FFF7F5; }
.btn-danger:hover { background: #FDEDE9; border-color: #E7B9AC; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #EBF2EE; border-color: transparent; }
.btn-icon { width: 30px; height: 30px; padding: 0; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.btn-group button { border: 0; background: transparent; height: 32px; padding: 0 13px; font-size: 12px; color: var(--text-2); border-right: 1px solid var(--line); }
.btn-group button:last-child { border-right: 0; }
.btn-group button.on { background: #0E2E27; color: #fff; }

/* ---------- 卡片与栅格 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 0; }
.card-title { font-size: 14px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.card-sub { font-size: 11.5px; color: var(--text-3); margin: 3px 0 0; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.card-body { padding: 16px 18px 18px; }
.card-body.tight { padding-top: 10px; }
.card-foot { border-top: 1px solid var(--line-2); padding: 11px 18px; font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g23 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g32 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.mb14 { margin-bottom: 14px; }
.mb18 { margin-bottom: 18px; }
.mt14 { margin-top: 14px; }
.span2 { grid-column: span 2; }

/* ---------- KPI ---------- */
.kpi { position: relative; overflow: hidden; padding: 16px 17px 14px; border-radius: 15px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.kpi::after { content: ''; position: absolute; inset: auto -18px -30px auto; width: 120px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(14, 140, 110, .09), transparent 68%); }
.kpi.tint-amber::after { background: radial-gradient(circle, rgba(217, 154, 62, .14), transparent 68%); }
.kpi.tint-steel::after { background: radial-gradient(circle, rgba(62, 124, 177, .12), transparent 68%); }
.kpi.tint-brick::after { background: radial-gradient(circle, rgba(194, 91, 68, .11), transparent 68%); }
.kpi-top { display: flex; align-items: center; gap: 8px; }
.kpi-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--jade-soft); color: var(--jade); font-size: 12px; }
.tint-amber .kpi-ico { background: var(--amber-soft); color: #B97A1E; }
.tint-steel .kpi-ico { background: var(--steel-soft); color: var(--steel); }
.tint-brick .kpi-ico { background: var(--brick-soft); color: var(--brick); }
.kpi-label { font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.kpi-value { font-family: 'Inter', var(--font); font-size: 27px; font-weight: 700; letter-spacing: -.035em; margin-top: 9px; line-height: 1; color: #10231D; display: flex; align-items: baseline; gap: 5px; }
.kpi-value small { font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.kpi-meta { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 11px; color: var(--text-3); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 20px; background: var(--jade-soft); color: var(--jade-deep); }
.delta.down { background: var(--brick-soft); color: var(--brick); }
.delta.flat { background: #F0F3F1; color: var(--text-2); }
.spark { height: 34px; margin-top: 6px; }

/* ---------- 表格 ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .grow { flex: 1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 11px; color: var(--text-2); font-weight: 500; }
.input, .select, .textarea { height: 33px; border: 1px solid var(--line); border-radius: 8px; background: #FBFCFB; padding: 0 10px; outline: none; transition: .18s; }
.select { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A9893' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.textarea { height: auto; padding: 9px 10px; resize: vertical; min-height: 74px; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: #9FD2C1; background: #fff; box-shadow: 0 0 0 3px rgba(14, 140, 110, .08); }
.input.w160 { width: 160px; }
.input.w220 { width: 220px; }
.input.w120 { width: 120px; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 11px; top: 10px; font-size: 11px; color: var(--text-3); }
.search-box input { padding-left: 30px; width: 228px; }

.table-wrap { overflow: auto; border-radius: 0 0 var(--radius) var(--radius); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.data thead th { position: sticky; top: 0; background: #F7FAF8; color: #63746E; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 2; }
table.data tbody td { padding: 9px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: #2C3E38; }
table.data tbody tr:hover td { background: #F8FCFA; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.right, table.data th.right { text-align: right; }
table.data td.num { font-family: 'Inter', var(--font); font-variant-numeric: tabular-nums; }
table.data .muted { color: var(--text-3); }
table.data td.actions { white-space: nowrap; text-align: right; }
.row-link { color: #123D32; font-weight: 600; border-bottom: 1px dashed #C7DCD3; cursor: pointer; }
.row-link:hover { color: var(--jade); border-bottom-color: var(--jade); }
.sub-line { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.cell-flex { display: flex; align-items: center; gap: 9px; }
.pager { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--text-3); }
.pager .pages { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.pager .pages button { min-width: 27px; height: 27px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 11.5px; color: var(--text-2); }
.pager .pages button.on { background: #0E2E27; color: #fff; border-color: #0E2E27; }
.pager .pages button:disabled { opacity: .4; cursor: default; }
.empty { padding: 44px 20px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.empty i { display: block; font-size: 24px; margin-bottom: 8px; opacity: .35; }

/* ---------- 胶囊 / 分层 ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 20px; font-size: 10.5px; font-weight: 600; white-space: nowrap; background: #F1F4F2; color: #51625C; }
.pill::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.ok { background: #E8F5EF; color: #0A7A5E; }
.pill.info { background: #EAF2FA; color: #2F6F9E; }
.pill.warn { background: #FCF2E1; color: #AD741B; }
.pill.danger { background: #FBECE8; color: #B4503A; }
.pill.muted { background: #F1F3F2; color: #6C7A75; }
.pill.plain { background: transparent; padding: 0; }
.pill.plain::before { display: none; }
.tier-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; }
.tier-badge { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-family: 'Inter'; font-weight: 700; }
.tier-S .tier-badge, .tier-badge.tier-S { background: linear-gradient(140deg, #0E8C6E, #096049); }
.tier-A .tier-badge, .tier-badge.tier-A { background: linear-gradient(140deg, #4A8BC2, #31658F); }
.tier-B .tier-badge, .tier-badge.tier-B { background: linear-gradient(140deg, #8B9C92, #667870); }
.tier-C .tier-badge, .tier-badge.tier-C { background: linear-gradient(140deg, #DDA84F, #B9822A); }
.tier-D .tier-badge, .tier-badge.tier-D { background: linear-gradient(140deg, #C9694F, #A1442F); }
.tier-S { color: #0A6B55; }
.tier-A { color: #31658F; }
.tier-B { color: #5C6D65; }
.tier-C { color: #A9761F; }
.tier-D { color: #A1442F; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; background: #F3F7F5; border: 1px solid #E4ECE8; color: #4D625A; font-size: 10.5px; }
.tag-chip i { font-size: 8px; opacity: .6; }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ---------- 图表 ---------- */
.chart { width: 100%; display: block; }
.chart-box { position: relative; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.chart-tip { position: fixed; z-index: 500; background: rgba(9, 30, 25, .94); color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 11px; pointer-events: none; opacity: 0; transition: .12s; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); white-space: nowrap; }
.chart-tip.show { opacity: 1; }
.chart-tip b { font-family: 'Inter'; }

/* ---------- 进度 / 分层条 ---------- */
.progress { height: 6px; background: #EDF2EF; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #17A382, #0E8C6E); }
.progress.amber > i { background: linear-gradient(90deg, #E9BC6D, #D99A3E); }
.progress.steel > i { background: linear-gradient(90deg, #6FA6CE, #3E7CB1); }
.progress.brick > i { background: linear-gradient(90deg, #DA8B75, #C25B44); }
.stack-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: #EEF2F0; }
.stack-bar > i { display: block; height: 100%; }
.stack-legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.stack-legend div { font-size: 10.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.stack-legend b { font-family: 'Inter'; font-size: 12px; color: var(--text); font-weight: 650; }

.stat-tile { padding: 12px 14px; border-radius: 11px; background: #F7FAF8; border: 1px solid #EDF2EF; }
.stat-tile .st-label { font-size: 10.5px; color: var(--text-3); }
.stat-tile .st-value { font-family: 'Inter'; font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-top: 3px; }
.stat-row { display: flex; gap: 10px; }
.stat-row > * { flex: 1; }

/* ---------- 时间线 / 步骤 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 1px; background: linear-gradient(#CFE3DA, #EAF1ED); }
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: -18px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #A8D2C2; box-shadow: 0 0 0 3px #F4F9F6; }
.tl-item.hot::before { border-color: var(--amber); }
.tl-time { font-size: 10px; color: var(--text-3); font-family: 'Inter'; }
.tl-title { font-size: 12.5px; font-weight: 600; margin-top: 1px; }
.tl-desc { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.steps { display: flex; gap: 0; }
.step { flex: 1; position: relative; padding-top: 26px; font-size: 11px; color: var(--text-2); }
.step::before { content: ''; position: absolute; top: 8px; left: 0; right: 0; height: 1px; background: #E3EBE7; }
.step::after { content: ''; position: absolute; top: 4px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #C9DCD4; }
.step b { display: block; font-size: 11.5px; color: var(--text); font-weight: 600; }
.step.done::after { background: var(--jade); border-color: var(--jade); }
.step.done::before { background: #B7DCCD; }
.step.now::after { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 3px rgba(217,154,62,.16); }

/* ---------- 列表卡片 ---------- */
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-row .t { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .s { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.rank-no { width: 18px; height: 18px; border-radius: 5px; background: #F0F4F2; color: #6D7C76; font-family: 'Inter'; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.rank-no.top { background: #0E2E27; color: #F3C170; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 2px; }
.tabs button { border: 0; background: transparent; padding: 10px 13px; font-size: 12.5px; color: var(--text-2); position: relative; font-weight: 500; }
.tabs button.on { color: #0C3A2E; font-weight: 650; }
.tabs button.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--jade); border-radius: 2px; }
.tabs .count { font-size: 9.5px; background: #F0F4F2; border-radius: 8px; padding: 1px 5px; margin-left: 4px; color: var(--text-3); }

/* ---------- 弹窗 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8, 28, 23, .5); backdrop-filter: blur(5px); z-index: 300; display: none; align-items: center; justify-content: center; padding: 30px; }
.overlay.show { display: flex; }
.modal { width: 560px; max-width: 100%; max-height: calc(100vh - 60px); background: #fff; border-radius: 20px; box-shadow: 0 40px 100px -30px rgba(0, 20, 14, .6), 0 0 0 1px rgba(255,255,255,.4); display: flex; flex-direction: column; animation: pop .24s cubic-bezier(.2,.8,.3,1); overflow: hidden; }
.modal.lg { width: 780px; }
.modal.xl { width: 1000px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); position: relative; background: linear-gradient(180deg, #F8FBF9, #fff); }
.modal-head .eyebrow { margin-bottom: 4px; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.modal-head p { margin: 4px 0 0; font-size: 11.5px; color: var(--text-3); }
.modal-close { position: absolute; right: 14px; top: 14px; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text-2); display: grid; place-items: center; font-size: 11px; }
.modal-close:hover { background: #F4F8F5; }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-foot { padding: 13px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: #FCFDFC; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .half { grid-column: span 1; }
.form-tip { font-size: 10.5px; color: var(--text-3); margin-top: 4px; }
.section-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 650; margin: 6px 0 2px; grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.check-row { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 11.5px; background: #FBFCFB; cursor: pointer; }
.check-chip input { accent-color: var(--jade); margin: 0; }
.check-chip:has(input:checked) { border-color: #9FD2C1; background: #F1FAF6; color: #0A6B55; }

/* ---------- 抽屉 ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(8, 28, 23, .44); backdrop-filter: blur(4px); z-index: 310; display: none; }
.drawer-overlay.show { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 640px; max-width: 94vw; background: #fff; z-index: 320; box-shadow: -30px 0 80px -30px rgba(0, 20, 14, .5); display: none; flex-direction: column; animation: slidein .26s cubic-bezier(.2,.8,.3,1); }
.drawer.wide { width: 820px; }
.drawer.show { display: flex; }
@keyframes slidein { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, #F7FBF9, #fff); position: relative; }
.drawer-head h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.drawer-head .sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px 26px; }
.drawer-foot { padding: 12px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; background: #FCFDFC; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 18px; }
.detail-item { font-size: 12px; }
.detail-item .k { font-size: 10.5px; color: var(--text-3); margin-bottom: 2px; }
.detail-item .v { color: #22332D; font-weight: 500; }
.detail-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 14px; }
.detail-block h4 { margin: 0 0 10px; font-size: 12px; font-weight: 650; display: flex; align-items: center; gap: 7px; color: #17453A; }
.detail-block h4 i { color: var(--jade); font-size: 11px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 600; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 240px; max-width: 380px; background: #0D2A23; color: #EAF6F1; border-radius: 11px; padding: 11px 14px; font-size: 12.5px; box-shadow: 0 18px 38px -18px rgba(0,0,0,.6); display: flex; align-items: center; gap: 9px; animation: toastin .2s ease; }
.toast i { color: #5FD3AE; }
.toast.err { background: #3B1C16; }
.toast.err i { color: #F39B86; }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 空态 / 提示 ---------- */
.note { display: flex; gap: 9px; padding: 11px 13px; border-radius: 10px; background: #F5F9F7; border: 1px dashed #D5E4DD; font-size: 11.5px; color: var(--text-2); }
.note i { color: var(--jade); margin-top: 2px; }
.note.amber { background: var(--amber-soft); border-color: #EFDCB9; }
.note.amber i { color: #B97A1E; }
.insight { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; background: linear-gradient(120deg, #F2FAF6, #FBFDFC); border-left: 2px solid var(--jade); font-size: 11.5px; color: #33534A; }
.insight i { color: var(--jade); margin-top: 2px; }
.insight b { color: #0A4D3B; }

/* ---------- 卡片网格（客户/素材/模板） ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 12px; padding: 16px; }
.ent-card { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; transition: .2s; position: relative; }
.ent-card:hover { border-color: #C6DFD4; box-shadow: 0 14px 30px -22px rgba(10, 54, 42, .5); transform: translateY(-2px); }
.ent-top { height: 62px; position: relative; overflow: hidden; background: linear-gradient(120deg, #0D3A2F, #175F4C); }
.ent-top::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 120% at 100% 0%, rgba(217,154,62,.33), transparent 60%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='70'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09'%3E%3Cpath d='M-10 58C40 30 90 44 130 26s80-6 120-22'/%3E%3Cpath d='M-10 70C40 42 90 56 130 38s80-6 120-22'/%3E%3C/g%3E%3C/svg%3E"); }
.ent-avatar { position: absolute; left: 14px; bottom: -16px; width: 42px; height: 42px; border-radius: 12px; border: 2px solid #fff; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }
.ent-body { padding: 24px 14px 13px; }
.ent-name { font-size: 13.5px; font-weight: 650; }
.ent-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.ent-stats { display: flex; gap: 14px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ent-stats div { font-size: 10px; color: var(--text-3); }
.ent-stats b { display: block; font-family: 'Inter'; font-size: 13px; color: var(--text); font-weight: 650; }
.ent-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; min-height: 22px; }
.cover { height: 128px; position: relative; display: grid; place-items: center; overflow: hidden; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.22), transparent 55%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='140'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.18'%3E%3Ccircle cx='250' cy='20' r='60'/%3E%3Ccircle cx='250' cy='20' r='90'/%3E%3Ccircle cx='250' cy='20' r='120'/%3E%3C/g%3E%3C/svg%3E"); }
.cover i { font-size: 30px; color: rgba(255,255,255,.88); z-index: 1; }
.cover .cover-badge { position: absolute; left: 10px; top: 10px; z-index: 2; background: rgba(10, 36, 31, .45); backdrop-filter: blur(4px); color: #fff; font-size: 10px; padding: 3px 7px; border-radius: 5px; }
.cover .cover-dur { position: absolute; right: 10px; bottom: 9px; z-index: 2; background: rgba(10, 36, 31, .45); color: #fff; font-size: 9.5px; padding: 2px 6px; border-radius: 4px; font-family: 'Inter'; }

/* ---------- 看板 ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.kb-col { background: #EDF2EF; border-radius: 13px; padding: 10px; min-height: 200px; }
.kb-head { display: flex; align-items: center; gap: 7px; padding: 2px 4px 9px; font-size: 11.5px; font-weight: 650; color: #465A53; }
.kb-head .cnt { margin-left: auto; font-family: 'Inter'; font-size: 10px; background: #fff; border-radius: 8px; padding: 1px 6px; color: var(--text-3); }
.kb-card { background: #fff; border: 1px solid #E2EAE6; border-radius: 10px; padding: 10px 11px; margin-bottom: 8px; font-size: 11.5px; box-shadow: var(--shadow-sm); cursor: pointer; transition: .18s; }
.kb-card:hover { border-color: #BADACD; transform: translateY(-1px); }
.kb-card .t { font-weight: 600; font-size: 12px; margin-bottom: 4px; display: flex; gap: 6px; align-items: flex-start; }
.kb-card .meta { display: flex; justify-content: space-between; align-items: center; color: var(--text-3); font-size: 10px; margin-top: 6px; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D3DFD9; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  :root { --sidebar: 0px; }
  .sidebar { transform: translateX(-100%); transition: .25s; width: 238px; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .g3, .g23, .g32, .g2 { grid-template-columns: 1fr; }
  .top-search { display: none; }
}
@media (max-width: 760px) {
  .content { padding: 16px 14px 32px; }
  .g4, .g5, .stat-row, .stack-legend { grid-template-columns: 1fr 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-actions { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
