/* =========================================================================
   火灵CRM · 设计系统
   深色渐变侧栏 + 蓝色主色 + 卡片化内容区，对齐原系统视觉语言
   ========================================================================= */
:root {
  --sidebar-bg: linear-gradient(180deg, #0e1a2f 0%, #162d4d 100%);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-soft: #eff6ff;
  --text-main: #0f172a;
  --text-sub: #64748b;
  --text-mute: #94a3b8;
  --bg-main: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --purple: #7c3aed;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --sidebar-w: 232px;
  --topbar-h: 60px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font); background: var(--bg-main); color: var(--text-main);
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
button { cursor: pointer; }
::selection { background: #bfdbfe; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ 登录页 ============================ */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 12% 12%, rgba(37, 99, 235, .35), transparent 60%),
    radial-gradient(800px 500px at 88% 85%, rgba(124, 58, 237, .28), transparent 60%),
    linear-gradient(135deg, #0b1120 0%, #0f172a 45%, #1e3a8a 100%);
  padding: 24px; position: relative; overflow: hidden;
}
.login-body::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .06) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(circle at 50% 45%, #000 30%, transparent 78%);
}
.login-shell {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr; width: min(980px, 100%);
  min-height: 560px; border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .55); background: #fff;
}
.login-hero {
  background: linear-gradient(160deg, #0f172a 0%, #172554 60%, #1d4ed8 140%);
  color: #e2e8f0; padding: 46px 44px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.login-hero::after {
  content: ""; position: absolute; width: 380px; height: 380px; right: -140px; bottom: -160px;
  background: radial-gradient(circle, rgba(59, 130, 246, .55), transparent 66%); border-radius: 50%;
}
.login-hero::before {
  content: ""; position: absolute; width: 260px; height: 260px; left: -100px; top: -80px;
  background: radial-gradient(circle, rgba(14, 165, 233, .32), transparent 66%); border-radius: 50%;
}
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-logo {
  width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(140deg, #3b82f6, #6366f1);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .45);
}
.login-brand-name { font-size: 19px; font-weight: 700; letter-spacing: .3px; color: #fff; }
.login-brand-name small { display: block; font-size: 11px; color: #93c5fd; font-weight: 400; letter-spacing: 1.4px; }
.login-hero h1 { font-size: 32px; line-height: 1.35; margin: 52px 0 14px; color: #fff; position: relative; z-index: 1; font-weight: 700; }
.login-hero h1 em { font-style: normal; color: #60a5fa; }
.login-hero p { color: #cbd5e1; font-size: 13.5px; line-height: 1.9; position: relative; z-index: 1; max-width: 340px; }
.login-points { margin-top: auto; display: grid; gap: 13px; position: relative; z-index: 1; padding-top: 24px; }
.login-point { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #cbd5e1; }
.login-point i {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: rgba(96, 165, 250, .16);
  border: 1px solid rgba(96, 165, 250, .32); display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 13px;
}
.login-hero-foot { margin-top: 22px; font-size: 11.5px; color: #64748b; position: relative; z-index: 1; }
.login-mock {
  margin-top: 30px; border-radius: 14px; padding: 14px 16px 10px; position: relative; z-index: 1;
  background: rgba(15, 23, 42, .55); border: 1px solid rgba(96, 165, 250, .28);
  box-shadow: 0 18px 40px rgba(2, 6, 23, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px); max-width: 380px;
}
.lm-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #93c5fd; letter-spacing: .5px; }
.lm-dot { color: #34d399; font-size: 10px; letter-spacing: 0; }
.lm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 9px 0 4px; }
.lm-kpis b { display: block; font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -.3px; line-height: 1.2; }
.lm-kpis b small { font-size: 10px; color: #93c5fd; font-weight: 500; margin-left: 1px; }
.lm-kpis span { font-size: 10px; color: #94a3b8; }
.lm-chart { width: 100%; height: 52px; display: block; margin-top: 3px; }
.lm-foot { display: flex; gap: 12px; align-items: center; font-size: 9.5px; color: #64748b; padding-top: 5px; border-top: 1px solid rgba(148, 163, 184, .14); margin-top: 3px; }
.lm-foot span:first-child { color: #93c5fd; }
.lm-foot span:nth-child(2) { color: #6ee7b7; }
.login-card { padding: 44px 42px 30px; display: flex; flex-direction: column; }
.login-card h2 { font-size: 22px; font-weight: 700; color: #0f172a; }
.login-card .sub { color: var(--text-sub); font-size: 12.5px; margin: 6px 0 26px; }
.login-card .form-item { margin-bottom: 15px; }
.login-card .form-item label { font-size: 12.5px; }
.login-msg { min-height: 20px; font-size: 12.5px; color: var(--danger); margin: 2px 0 8px; }
.login-card .btn { height: 42px; font-size: 15px; letter-spacing: 4px; }
.login-extras { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--text-sub); }
.login-extras a { font-size: 12.5px; }
.login-demo {
  margin-top: auto; padding: 11px 13px; border-radius: 9px; background: #f8fafc; border: 1px dashed #cbd5e1;
  font-size: 12px; color: var(--text-sub); line-height: 1.75;
}
.login-demo b { color: #334155; }
.login-demo code { background: #e2e8f0; padding: 1px 5px; border-radius: 4px; color: #0f172a; font-size: 11.5px; }
.login-foot { text-align: center; color: #94a3b8; font-size: 11.5px; margin-top: 14px; }
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; min-height: 0; max-width: 440px; }
  .login-hero { display: none; }
  .login-card { padding: 34px 26px 24px; }
}

/* ============================ 应用骨架 ============================ */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  background: var(--sidebar-bg); color: #cbd5e1; display: flex; flex-direction: column;
  transition: width .2s ease; box-shadow: 4px 0 24px rgba(2, 6, 23, .18);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px; border-bottom: 1px solid rgba(148, 163, 184, .13); }
.sidebar-logo {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(140deg, #3b82f6, #6366f1); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .4);
}
.sidebar-brand-text { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.25; white-space: nowrap; }
.sidebar-brand-text small { display: block; font-size: 10px; color: #7dd3fc; font-weight: 400; letter-spacing: .8px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px 18px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .28); }
.nav-group { margin-bottom: 4px; }
.nav-group-title {
  font-size: 10.5px; letter-spacing: 1.6px; color: #64748b; padding: 12px 12px 6px;
  text-transform: uppercase; white-space: nowrap; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 1px 0;
  border-radius: 9px; color: #cbd5e1; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s; position: relative; border: 1px solid transparent;
}
.nav-item .nav-ico { width: 20px; text-align: center; font-size: 15px; flex: 0 0 auto; filter: saturate(.9); }
.nav-item .nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item .nav-count {
  font-size: 10.5px; background: #dc2626; color: #fff; border-radius: 9px; padding: 0 6px; line-height: 16px;
}
.nav-item:hover { background: rgba(148, 163, 184, .12); color: #f1f5f9; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, .95), rgba(59, 130, 246, .72));
  color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .32); border-color: rgba(147, 197, 253, .25);
}
.nav-item.active .nav-ico { filter: none; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(148, 163, 184, .13); font-size: 10.5px; color: #64748b; line-height: 1.7; }
.sidebar-foot b { color: #94a3b8; font-weight: 600; }
.sidebar-collapse {
  position: absolute; right: -11px; top: 78px; width: 22px; height: 22px; border-radius: 50%;
  background: #1e293b; border: 1px solid #334155; color: #94a3b8; display: flex; align-items: center;
  justify-content: center; font-size: 12px; z-index: 61; transition: transform .2s;
}
.sidebar-collapse:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
body.side-collapsed { --sidebar-w: 66px; }
body.side-collapsed .sidebar-brand { padding: 18px 15px; justify-content: center; }
body.side-collapsed .sidebar-brand-text,
body.side-collapsed .nav-group-title,
body.side-collapsed .nav-label,
body.side-collapsed .nav-count,
body.side-collapsed .sidebar-foot { display: none; }
body.side-collapsed .nav-item { justify-content: center; padding: 10px 0; }
body.side-collapsed .sidebar-collapse { transform: rotate(180deg); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin .2s; }
.topbar {
  height: var(--topbar-h); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px;
  padding: 0 22px; position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}
.topbar-title { font-size: 16px; font-weight: 700; color: #0f172a; white-space: nowrap; }
.topbar-title small { font-size: 11.5px; color: var(--text-sub); font-weight: 400; margin-left: 8px; }
.topbar-search { position: relative; margin-left: 6px; width: min(340px, 28vw); }
.topbar-search input {
  width: 100%; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: #f8fafc;
  padding: 0 12px 0 34px; font-size: 12.5px; outline: none; transition: all .15s;
}
.topbar-search input:focus { background: #fff; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.topbar-search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 13px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: #475569;
  position: relative; transition: all .15s;
}
.icon-btn:hover { border-color: #93c5fd; background: var(--primary-soft); color: var(--primary); }
.icon-btn .dot {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; border-radius: 8px;
  background: #dc2626; color: #fff; font-size: 10px; line-height: 16px; padding: 0 4px; text-align: center;
  border: 2px solid #fff;
}
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.user-chip:hover { background: #f8fafc; border-color: var(--border); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, #2563eb, #7c3aed);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
  flex: 0 0 auto;
}
.user-meta { line-height: 1.3; }
.user-meta b { display: block; font-size: 12.5px; font-weight: 600; color: #1e293b; }
.user-meta span { font-size: 10.5px; color: var(--text-sub); }
.dropdown {
  position: absolute; right: 20px; top: 54px; min-width: 190px; background: #fff; border: 1px solid var(--border);
  border-radius: 11px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 90; display: none;
}
.dropdown.open { display: block; }
.dropdown-item { padding: 8px 11px; border-radius: 7px; font-size: 13px; color: #334155; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.dropdown-item:hover { background: #f1f5f9; color: var(--primary); }
.dropdown-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.dropdown-item.danger { color: var(--danger); }

.content { padding: 20px 22px 36px; flex: 1; min-width: 0; }
.content-inner { max-width: 1560px; margin: 0 auto; }

/* ============================ 通用组件 ============================ */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 21px; font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: 9px; }
.page-head h1 .em { font-size: 22px; }
.page-sub { color: var(--text-sub); font-size: 12.5px; margin-top: 3px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: 12px; color: var(--text-sub); margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.breadcrumb b { color: #334155; font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px;
  padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: #fff;
  color: #334155; font-size: 13px; font-weight: 500; white-space: nowrap; transition: all .15s;
}
.btn:hover { border-color: #93c5fd; color: var(--primary); background: #f8fbff; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .24); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-soft { background: var(--primary-soft); border-color: #bfdbfe; color: var(--primary-dark); }
.btn-soft:hover { background: #dbeafe; }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; border-color: #fca5a5; color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-sub); }
.btn-ghost:hover { background: #f1f5f9; color: var(--primary); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }

.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px 0; }
.card-title { font-size: 14px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 7px; }
.card-title small { font-size: 11.5px; color: var(--text-sub); font-weight: 400; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 10px 14px; }
.card-link { font-size: 12px; color: var(--text-sub); cursor: pointer; }
.card-link:hover { color: var(--primary); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; min-height: 104px;
}
.kpi::after {
  content: ""; position: absolute; right: -26px; top: -34px; width: 96px; height: 96px; border-radius: 50%;
  background: var(--accent, #2563eb); opacity: .07;
}
.kpi-label { font-size: 12px; color: var(--text-sub); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 25px; font-weight: 700; letter-spacing: -.6px; margin-top: 5px; color: #0f172a; line-height: 1.25; }
.kpi-value small { font-size: 12px; font-weight: 500; color: var(--text-sub); margin-left: 3px; letter-spacing: 0; }
.kpi-foot { font-size: 11.5px; color: var(--text-sub); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.kpi-foot .up { color: var(--success); font-weight: 600; }
.kpi-foot .down { color: var(--danger); font-weight: 600; }
.kpi-ico {
  position: absolute; right: 13px; top: 12px; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, #fff);
}
.kpi.mini { min-height: 86px; padding: 12px 14px; }
.kpi.mini .kpi-value { font-size: 20px; }

.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}
.toolbar .spacer { flex: 1; }
.search-box { position: relative; min-width: 210px; }
.search-box input { height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px 0 31px; font-size: 12.5px; outline: none; width: 100%; background: #f8fafc; }
.search-box input:focus { background: #fff; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.search-box i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-style: normal; color: #94a3b8; font-size: 12px; }
.filter-select {
  height: 32px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #334155;
  padding: 0 26px 0 10px; font-size: 12.5px; outline: none; 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' stroke='%2394a3b8' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.filter-select:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); overflow: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.table th {
  position: sticky; top: 0; z-index: 2; background: #f8fafc; color: #475569; text-align: left;
  font-weight: 600; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--border);
  font-size: 11.5px; letter-spacing: .2px;
}
.table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #334155; }
.table tbody tr { transition: background .12s; cursor: pointer; }
.table tbody tr:hover { background: #f8fbff; }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .muted { color: var(--text-sub); }
.table .strong { font-weight: 600; color: #0f172a; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions .btn { margin-left: 4px; }
.table-compact td { padding: 8px 10px; }
.table-empty { padding: 46px 20px; text-align: center; color: var(--text-sub); }
.table-empty .em { font-size: 34px; display: block; margin-bottom: 6px; opacity: .7; }
.link { color: var(--primary); cursor: pointer; font-weight: 500; }
.link:hover { text-decoration: underline; }
.sub { color: var(--text-sub); font-size: 11.5px; }
.mono { font-variant-numeric: tabular-nums; font-family: "Consolas", "SF Mono", monospace; font-size: 12px; }

.tag {
  display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 7px; border-radius: 5px;
  font-size: 11px; font-weight: 500; white-space: nowrap; background: #f1f5f9; color: #475569;
  border: 1px solid transparent;
}
.tag-blue { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
.tag-green { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.tag-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tag-red { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.tag-purple { background: #f5f3ff; color: #6d28d9; border-color: #ede9fe; }
.tag-slate { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.tag-cyan { background: #ecfeff; color: #0e7490; border-color: #cffafe; }
.tag-lg { height: 24px; font-size: 11.5px; padding: 0 9px; border-radius: 6px; }
.dot-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.dot-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: #fff; border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); font-size: 12px; color: var(--text-sub); flex-wrap: wrap; }
.pager-btns { display: flex; gap: 4px; align-items: center; }
.pager-btn { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border); background: #fff; color: #475569; font-size: 12px; }
.pager-btn:hover { border-color: #93c5fd; color: var(--primary); }
.pager-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-btn[disabled] { opacity: .45; pointer-events: none; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px 16px; }
.form-item { min-width: 0; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { display: block; font-size: 12.5px; color: #475569; margin-bottom: 5px; font-weight: 500; }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 8px;
  outline: none; background: #fff; transition: all .15s; font-size: 13px; color: #0f172a;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.form-item textarea { resize: vertical; min-height: 74px; line-height: 1.65; }
.form-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); }
.form-item .hint { font-size: 11px; color: var(--text-mute); margin-top: 4px; line-height: 1.6; }
.form-item .err { font-size: 11.5px; color: var(--danger); margin-top: 3px; }
.check-row { display: flex; align-items: center; gap: 7px; padding-top: 7px; }
.check-row label { margin: 0; color: #334155; }
.form-section-title {
  grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: #334155; border-bottom: 1px solid var(--border);
  padding-bottom: 6px; margin-top: 4px; display: flex; align-items: center; gap: 6px;
}
.form-section-title::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--primary); }

/* 弹窗 / 抽屉 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .48); backdrop-filter: blur(2px);
  z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px 24px; overflow-y: auto;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; box-shadow: 0 30px 70px rgba(15, 23, 42, .35);
  width: min(760px, 100%); animation: modalIn .18s ease; overflow: hidden;
}
.modal.wide { width: min(980px, 100%); }
.modal.narrow { width: min(460px, 100%); }
@keyframes modalIn { from { transform: translateY(10px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-head .sub { margin-top: 2px; }
.modal-close { border: none; background: transparent; font-size: 21px; line-height: 1; color: #94a3b8; width: 30px; height: 30px; border-radius: 7px; }
.modal-close:hover { background: #f1f5f9; color: #334155; }
.modal-body { padding: 18px 20px; max-height: 68vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--border); background: #f8fafc; }
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 180; display: none; }
.drawer-mask.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(980px, 94vw); background: #f8fafc; z-index: 190;
  box-shadow: -20px 0 50px rgba(15, 23, 42, .22); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s ease;
}
.drawer.open { transform: none; }
.drawer-head { background: #fff; border-bottom: 1px solid var(--border); padding: 16px 20px; display: flex; align-items: flex-start; gap: 12px; }
.drawer-head h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drawer-head .sub { margin-top: 3px; color: var(--text-sub); font-size: 12px; }
.drawer-close { margin-left: auto; border: none; background: #f1f5f9; color: #64748b; width: 30px; height: 30px; border-radius: 8px; font-size: 18px; }
.drawer-close:hover { background: #e2e8f0; color: #0f172a; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 30px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); background: #fff; padding: 0 20px; overflow-x: auto; }
.tab {
  padding: 10px 13px; font-size: 12.5px; color: var(--text-sub); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; font-weight: 500;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab .cnt { font-size: 10.5px; background: #f1f5f9; color: #64748b; border-radius: 8px; padding: 0 5px; margin-left: 4px; }
.tab.active .cnt { background: #dbeafe; color: #1d4ed8; }

/* 描述列表 / 时间线 / 图表 */
.desc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; }
.desc-item { min-width: 0; }
.desc-item .k { font-size: 11.5px; color: var(--text-mute); }
.desc-item .v { font-size: 13px; color: #1e293b; margin-top: 2px; word-break: break-all; }
.desc-item.full { grid-column: 1 / -1; }
.section-title { font-size: 13px; font-weight: 700; color: #1e293b; margin: 18px 0 10px; display: flex; align-items: center; gap: 7px; }
.section-title:first-child { margin-top: 0; }
.section-title .line { flex: 1; height: 1px; background: var(--border); }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 1px; background: #e2e8f0; }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #93c5fd; }
.tl-item.primary::before { border-color: var(--primary); background: var(--primary); }
.tl-time { font-size: 11px; color: var(--text-mute); }
.tl-title { font-size: 12.5px; color: #334155; margin-top: 2px; }
.tl-desc { font-size: 12px; color: var(--text-sub); margin-top: 3px; line-height: 1.7; }

.chart-wrap { position: relative; width: 100%; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-sub); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.chart-grid-line { stroke: #eef2f7; stroke-width: 1; }
.chart-axis-text { fill: #94a3b8; font-size: 10.5px; }
.chart-bar { transition: opacity .15s; }
.chart-bar:hover { opacity: .8; }
.chart-tip { position: absolute; pointer-events: none; background: #0f172a; color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 5px; opacity: 0; transition: opacity .12s; white-space: nowrap; z-index: 5; }

.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: flex; align-items: center; gap: 10px; }
.funnel-name { width: 70px; font-size: 12px; color: var(--text-sub); flex: 0 0 auto; }
.funnel-track { flex: 1; height: 26px; background: #f1f5f9; border-radius: 6px; overflow: hidden; position: relative; }
.funnel-fill { height: 100%; border-radius: 6px; transition: width .5s; display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; color: #fff; font-size: 10.5px; min-width: 2px; }
.funnel-val { width: 96px; flex: 0 0 auto; text-align: right; font-size: 11.5px; color: #475569; font-variant-numeric: tabular-nums; }
.funnel-val b { font-weight: 600; }

.progress { height: 6px; background: #eef2f7; border-radius: 4px; overflow: hidden; min-width: 60px; }
.progress > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.progress.green > i { background: linear-gradient(90deg, #4ade80, #16a34a); }
.progress.amber > i { background: linear-gradient(90deg, #fbbf24, #d97706); }

.list-clean { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.list-row:last-child { border-bottom: none; }
.list-row .main-t { flex: 1; min-width: 0; }
.list-row .t1 { font-size: 12.5px; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .t2 { font-size: 11px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.list-row .right { text-align: right; font-size: 11.5px; color: var(--text-sub); flex: 0 0 auto; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-tile {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; align-items: center;
  gap: 9px; cursor: pointer; background: #fff; transition: all .15s; font-size: 12.5px; color: #334155;
}
.quick-tile:hover { border-color: #93c5fd; box-shadow: 0 4px 14px rgba(37, 99, 235, .1); transform: translateY(-1px); color: var(--primary); }
.quick-tile .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.quick-tile small { display: block; color: var(--text-mute); font-size: 10.5px; }

.empty { padding: 34px 16px; text-align: center; color: var(--text-sub); font-size: 12.5px; }
.empty .em { font-size: 30px; display: block; margin-bottom: 5px; opacity: .65; }
.loading { padding: 40px; text-align: center; color: var(--text-sub); font-size: 12.5px; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid #dbeafe; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #0f172a; color: #fff; font-size: 12.5px; padding: 9px 16px; border-radius: 9px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .3); animation: toastIn .2s ease; display: flex; align-items: center; gap: 7px;
}
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }
.toast.warn { background: #92400e; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 其他 */
.pill-tabs { display: inline-flex; background: #f1f5f9; border-radius: 9px; padding: 3px; gap: 2px; }
.pill-tab { border: none; background: transparent; padding: 5px 12px; border-radius: 7px; font-size: 12px; color: var(--text-sub); }
.pill-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.split-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.split-23 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.text-sub { color: var(--text-sub); } .text-danger { color: var(--danger); } .text-success { color: var(--success); }
.fs12 { font-size: 12px; } .fs11 { font-size: 11px; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

/* 360 头部 */
.cust-hero {
  background: linear-gradient(120deg, #fff 0%, #f8fbff 55%, #eff6ff 100%);
  border: 1px solid #dbeafe; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
  display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
}
.cust-avatar {
  width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(140deg, #3b82f6, #6366f1);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; flex: 0 0 auto;
}
.cust-hero-main { flex: 1; min-width: 220px; }
.cust-hero-main h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cust-hero-main .tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.cust-hero-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.cust-stat { text-align: right; }
.cust-stat b { display: block; font-size: 17px; font-weight: 700; color: #0f172a; }
.cust-stat span { font-size: 10.5px; color: var(--text-sub); }
.mini-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.mini-kpi { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.mini-kpi .k { font-size: 10.5px; color: var(--text-mute); }
.mini-kpi .v { font-size: 15px; font-weight: 700; margin-top: 1px; }

.status-dot { display: inline-flex; align-items: center; gap: 5px; }
.status-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; }
.status-dot.green::before { background: #16a34a; }
.status-dot.amber::before { background: #d97706; }
.status-dot.red::before { background: #dc2626; }
.status-dot.blue::before { background: #2563eb; }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-height: 120px; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: #475569; padding: 2px 4px 8px; }
.kanban-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; margin-bottom: 7px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); cursor: pointer; }
.kanban-card:hover { border-color: #93c5fd; box-shadow: 0 4px 12px rgba(37, 99, 235, .1); }
.kanban-card .t { font-size: 12px; color: #1e293b; font-weight: 500; line-height: 1.5; }
.kanban-card .m { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: var(--text-mute); }

/* 报表 */
.report-hero { background: linear-gradient(120deg, #0f172a, #1e3a8a 70%, #2563eb); color: #fff; border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.report-hero h2 { font-size: 17px; font-weight: 700; }
.report-hero p { color: #bfdbfe; font-size: 12px; margin-top: 3px; }
.report-hero .kpis { display: flex; gap: 26px; margin-left: auto; flex-wrap: wrap; }
.report-hero .kpis b { display: block; font-size: 20px; font-weight: 700; }
.report-hero .kpis span { font-size: 10.5px; color: #93c5fd; }

/* 登录后的首屏动画 */
.fade-in { animation: fadeIn .22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 响应式 */
@media (max-width: 1280px) {
  .split-2, .split-23 { grid-template-columns: 1fr; }
  .split-3 { grid-template-columns: 1fr 1fr; }
  .desc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 66px; }
  .sidebar-brand { padding: 18px 15px; justify-content: center; }
  .sidebar-brand-text, .nav-group-title, .nav-label, .nav-count, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 10px 0; }
  .sidebar-collapse { display: none; }
  .topbar-search { display: none; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .content { padding: 14px 12px 28px; }
  .topbar { padding: 0 12px; }
  .user-meta { display: none; }
  .page-head h1 { font-size: 18px; }
  .form-grid, .form-grid-3, .desc-grid { grid-template-columns: 1fr; }
  .mini-kpi-row { grid-template-columns: 1fr 1fr; }
  .split-3 { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .drawer { width: 100vw; }
  .table th, .table td { padding: 8px 9px; }
  .report-hero .kpis { margin-left: 0; gap: 18px; }
}

/* 2.0 现代主题隐藏经典原版专属元素；经典主题下由 classic/compat.css 打开 */
.top-tabbar, .mid-zone, .classic-top-action { display: none; }

/* 全局卡片布局（经典/现代通用） */
.cl-card { position: relative; }
.cl-drag-handle { cursor: grab; }
.cl-card.cl-draggable .cl-drag-handle { cursor: grab; }
.cl-card.cl-draggable .cl-drag-handle:active { cursor: grabbing; }
.cl-card.cl-placeholder { opacity: .28; }
.cl-ghost { position: fixed; z-index: 12000; pointer-events: none; opacity: .92; box-shadow: 0 18px 50px rgba(15,23,42,.28); border-radius: 14px; overflow: hidden; }
.cl-resize-handle { position: absolute; right: 1px; bottom: 1px; width: 16px; height: 16px; cursor: nwse-resize; z-index: 5; opacity: .35; background: linear-gradient(135deg, transparent 48%, #94a3b8 50%, #94a3b8 58%, transparent 60%); border-bottom-right-radius: 10px; }
.cl-card:hover .cl-resize-handle { opacity: .9; }
#cl-toolbar.cl-layout-toolbar { position: fixed; right: 18px; bottom: 18px; z-index: 11000; display: flex; align-items: center; gap: 8px; background: #0f172a; color: #e2e8f0; padding: 6px; border-radius: 12px; box-shadow: 0 10px 30px rgba(15,23,42,.3); font-size: 12px; }
#cl-toolbar.cl-layout-toolbar.open { padding: 8px 12px; }
#cl-toolbar button { background: rgba(59,130,246,.18); border: 1px solid rgba(147,197,253,.35); color: #dbeafe; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
#cl-toolbar button:hover { background: rgba(59,130,246,.35); }
#cl-toolbar #cl-fab { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 16px; }
#cl-toolbar #cl-toggle.cl-active { background: #16a34a; border-color: #4ade80; color: #fff; }
#cl-toolbar .cl-lbl { opacity: .7; }
body.theme-classic #cl-toolbar.cl-layout-toolbar { background: rgba(15,23,42,.94); }

/* 联络工作台：树形分类 */
.wb-wrap { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; align-items: start; }
.wb-tree-card { padding: 10px 8px; position: sticky; top: 16px; }
.wb-main { padding: 14px 16px; min-width: 0; }
.wb-main-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.wb-main-head .card-title { border: 0; padding: 0; margin: 0; font-size: 16px; }
.wb-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-tools .search-box { min-width: 210px; }
.wb-tree { font-size: 13px; }
.wb-node { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 7px; cursor: pointer; color: var(--text-sub, #475569); margin: 1px 0; }
.wb-node:hover { background: rgba(37,99,235,.07); color: var(--primary, #2563eb); }
.wb-node.active { background: var(--primary, #2563eb); color: #fff; }
.wb-node.active .wb-cnt { color: #fff; }
.wb-node-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-cnt { font-size: 11px; color: #94a3b8; }
.wb-group { margin-top: 7px; }
.wb-group-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 9px; color: #64748b; font-weight: 600; cursor: pointer; border-radius: 6px; }
.wb-group-head:hover { background: rgba(148,163,184,.1); }
.wb-caret { font-size: 11px; color: #94a3b8; }
.wb-children { padding-left: 8px; }
.wb-custom { border-top: 1px dashed var(--border, #e2e8f0); margin-top: 10px; padding-top: 8px; }
.wb-add { border: 1px solid #cbd5e1; background: #fff; color: #2563eb; border-radius: 6px; width: 22px; height: 22px; line-height: 18px; cursor: pointer; padding: 0; }
.wb-add:hover { background: #eff6ff; }
.wb-del { display: none; color: #ef4444; font-size: 14px; padding: 0 2px; }
.wb-node:hover .wb-del { display: inline; }
.wb-node.active .wb-del { color: #fecaca; }
.wb-empty { color: #94a3b8; font-size: 11.5px; padding: 6px 9px; }
.wb-table { font-size: 12.5px; }
.wb-table td { vertical-align: middle; }
body.theme-classic .wb-tree-card { padding: 10px 8px; }
body.theme-classic .wb-main { padding: 14px 16px; }
@media (max-width: 960px) {
  .wb-wrap { grid-template-columns: 1fr; }
  .wb-tree-card { position: static; }
}

/* 客户详情原型版（原版 1:1 布局） */
#c360-proto { position: fixed; inset: 0; z-index: 16000; background: #eef2f7; overflow: auto; }
#c360-proto .proto-inner { max-width: 1480px; margin: 0 auto; padding: 18px 26px 60px; }
#c360-proto .proto-top { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(15,23,42,.05); flex-wrap: wrap; }
#c360-proto .proto-title { flex: 1; min-width: 260px; }
#c360-proto .proto-title h2 { margin: 0 0 4px; font-size: 20px; color: #0f172a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#c360-proto .proto-title .sub { color: #64748b; font-size: 12px; }
#c360-proto .proto-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#c360-proto .detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
#c360-proto .proto-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
#c360-proto .card { margin: 0; padding: 16px 18px; box-shadow: 0 2px 10px rgba(15,23,42,.05); }
#c360-proto .card-title { font-size: 14px; margin-bottom: 10px; }
#c360-proto .proto-info .detail-row { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; font-size: 12.5px; }
#c360-proto .proto-info .detail-row .k { width: 96px; color: #64748b; flex: 0 0 96px; }
#c360-proto .proto-info .detail-row .v { flex: 1; color: #0f172a; word-break: break-all; }
#c360-proto .tbl { font-size: 12.5px; }
#c360-proto .tbl th, #c360-proto .tbl td { padding: 7px 8px; }
#c360-proto .tbl-empty { padding: 12px 0; color: #94a3b8; font-size: 12px; }
body.theme-classic #c360-proto .card { padding: 16px 18px; }
body.theme-classic #c360-proto .proto-top { border-radius: 8px; }
@media (max-width: 1100px) { #c360-proto .detail-grid { grid-template-columns: 1fr; } }

/* 全局列表视图：所有卡片页切换为单列紧凑列表 */
body.view-list .kpi-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
body.view-list .kpi { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px !important; min-height: 0 !important; }
body.view-list .kpi .kpi-label { flex: 0 0 190px; margin: 0; }
body.view-list .kpi .kpi-value { flex: 0 0 118px; margin: 0; font-size: 21px; line-height: 1.25; }
body.view-list .kpi .kpi-foot { flex: 1 1 220px; margin: 0; text-align: left; }
body.view-list .kpi .spark { display: none; }
body.view-list .kpi .cl-resize-handle { display: none; }
body.view-list .split-2,
body.view-list .split-3,
body.view-list .split-23,
body.view-list .quick-grid,
body.view-list .mini-kpi-row,
body.view-list .detail-grid { grid-template-columns: 1fr !important; }
body.view-list .stack { gap: 0 !important; }
body.view-list .card { width: auto !important; min-height: 0 !important; margin: 0 0 10px !important; padding: 10px 14px !important; border-radius: 9px !important; box-shadow: none !important; }
body.view-list .card > .card-head,
body.view-list .card > .card-title { padding: 0 0 8px !important; margin: 0 0 8px !important; }
body.view-list .card > .card-body { padding: 0 !important; }
body.view-list .card .cl-resize-handle { display: none; }
body.view-list .wb-main,
body.view-list .wb-tree-card { padding: 10px 14px !important; }
body.view-list #c360-proto .card { padding: 12px 14px !important; }
body.view-list #c360-proto .proto-col { gap: 8px; }
body.view-list .proto-top { padding: 10px 14px; }
@media (max-width: 720px) {
  body.view-list .kpi .kpi-label { flex-basis: 140px; }
  body.view-list .kpi .kpi-value { flex-basis: 100px; }
}

/* 关联字段穿透 */
a.drill-link { color: #2563eb; text-decoration: none; border-bottom: 1px dashed rgba(37,99,235,.45); cursor: pointer; }
a.drill-link:hover { color: #1d4ed8; border-bottom-color: #1d4ed8; }

.cust-name-line { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }

/* 客户名称与信用徽标排成一行 */
.cust-name-line { display: flex; align-items: center; gap: 0; flex-wrap: nowrap; }

.wb-edit { display: inline; color: #0891b2; font-size: 13px; padding: 0 2px; cursor: pointer; opacity: .35; }
.wb-node:hover .wb-edit { opacity: 1; }
body.is-mobile .wb-edit { display: inline; }

/* 项目详情/任务看板纳入全局列表视图 */
body.view-list .kanban { grid-template-columns: 1fr !important; overflow-x: visible; }
body.view-list .kanban-col { min-width: 0; }
body.view-list #drawer .cust-hero { padding: 12px 14px; }
