:root {
  --ink: #17231f;
  --muted: #738079;
  --line: #dfe5e1;
  --paper: #f4f6f4;
  --green: #245b49;
  --green-2: #3c7a63;
  --green-soft: #e7f1ec;
  --amber: #a97625;
  --amber-soft: #fbf1dc;
  --red: #b64840;
  --red-soft: #faeae8;
  --sidebar: #173c31;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 14px; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: 214px;
  display: flex; flex-direction: column; padding: 22px 14px 16px;
  color: #d8e4df; background: var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; color: var(--sidebar); background: #e4ce91; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { color: white; font-size: 15px; letter-spacing: .5px; white-space: nowrap; }
.brand span { margin-top: 2px; color: #91a99f; font-size: 11px; }
.nav-list, .sidebar-section { display: grid; gap: 4px; }
.nav-item {
  position: relative; width: 100%; height: 41px; display: flex; align-items: center; gap: 11px;
  padding: 0 11px; border: 0; border-radius: 8px; color: #a9beb6; background: transparent; text-align: left;
}
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.08); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; width: 3px; height: 22px; background: #e4ce91; border-radius: 0 3px 3px 0; }
.nav-icon { width: 18px; text-align: center; font-size: 16px; }
.nav-badge { margin-left: auto; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 20px; color: white; background: #b95349; font-size: 10px; }
.sidebar-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.09); }
.section-label { padding: 0 11px 8px; color: #6f8c81; font-size: 11px; letter-spacing: 1.2px; }
.sidebar-spacer { flex: 1; }
.business-switcher { padding: 12px 7px; margin-bottom: 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.035); }
.business-switcher > span { display: block; padding: 0 5px 7px; color: #789187; font-size: 10px; letter-spacing: .8px; }
.business-switcher button { width: 100%; height: 33px; display: flex; align-items: center; gap: 8px; padding: 0 7px; border: 0; border-radius: 6px; color: #9bb1a8; background: transparent; text-align: left; }
.business-switcher button:hover { color: white; background: rgba(255,255,255,.06); }
.business-switcher button.active { color: white; background: rgba(228,206,145,.13); }
.business-switcher i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; color: #bfd0c9; background: rgba(255,255,255,.08); font-size: 10px; font-style: normal; }
.business-switcher button.active i { color: #173c31; background: #e4ce91; }
.business-switcher b { font-size: 12px; font-weight: 600; }
.user-card { display: flex; align-items: center; gap: 9px; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.09); }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: #dce9e3; font-weight: 700; }
.user-card strong, .user-card span { display: block; }
.user-card strong { color: white; font-size: 13px; }.user-card span { margin-top: 2px; color: #789188; font-size: 10px; }
.user-card button { margin-left: auto; border: 0; color: #8da399; background: transparent; }

.main { min-width: 0; flex: 1; margin-left: 214px; }
.topbar {
  height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 25px;
  border-bottom: 1px solid var(--line); background: white;
}
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 11px; }
.breadcrumb span, .breadcrumb b { color: #99a49e; font-weight: 400; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 33px; height: 33px; border: 0; border-radius: 7px; color: #5e6b65; background: transparent; font-size: 18px; }
.icon-btn i { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.primary-btn, .secondary-btn, .head-actions select {
  height: 34px; padding: 0 13px; border-radius: 7px; font-size: 11px;
}
.primary-btn { border: 1px solid var(--green); color: white; background: var(--green); font-weight: 700; }
.secondary-btn, .head-actions select { border: 1px solid #d5ddd8; color: #46544d; background: white; }

.workspace-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 22px 25px 17px; }
.eyebrow { color: #9a8050; font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.workspace-head h1 { margin: 5px 0 4px; font-family: SimSun, serif; font-size: 25px; }
.title-line { display: flex; align-items: center; gap: 12px; margin-top: 5px; }
.title-line h1 { margin: 0; }
.view-tabs button b { font-weight: inherit; }
.workspace-head p { margin: 0; color: var(--muted); font-size: 10px; }
.head-actions { display: flex; gap: 7px; }
.period-switch { display: flex; height: 34px; padding: 3px; border: 1px solid #d5ddd8; border-radius: 7px; background: white; }
.period-switch button { min-width: 44px; padding: 0 9px; border: 0; border-radius: 5px; color: #76827c; background: transparent; font-size: 11px; }
.period-switch button.active { color: white; background: var(--green); font-weight: 700; }

.summary-bar {
  display: grid; grid-template-columns: 1.08fr repeat(4, 1fr) .9fr;
  margin: 0 25px 13px; border: 1px solid var(--line); border-radius: 9px; background: white;
}
.summary-item { min-width: 0; padding: 13px 15px; border-right: 1px solid #e8ece9; }
.summary-item:last-child { border-right: 0; }
.summary-item > span { display: block; margin-bottom: 6px; color: #7b8781; font-size: 11px; }
.summary-item strong { font-family: Georgia, serif; font-size: 18px; }
.summary-item strong small { color: #9ba49f; font-size: 10px; font-weight: 400; }
.summary-item em { float: right; margin-top: 4px; font-size: 10px; font-style: normal; }
.summary-progress { height: 4px; margin-top: 9px; border-radius: 5px; background: #edf0ee; }
.summary-progress i { display: block; height: 100%; border-radius: 5px; background: var(--green-2); }
.good { color: var(--green-2); }.watch { color: var(--amber); }.risk { color: var(--red); }
.status-counts { display: flex; gap: 6px; }
.status-counts b { width: 29px; height: 24px; display: grid; place-items: center; border-radius: 5px; font-size: 11px; }
.status-counts .green { color: var(--green); background: var(--green-soft); }
.status-counts .yellow { color: var(--amber); background: var(--amber-soft); }
.status-counts .red { color: var(--red); background: var(--red-soft); }

.table-workbench { margin: 0 25px 30px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: 0 8px 25px rgba(26,50,41,.045); }
.workbench-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.view-tabs { display: flex; align-self: stretch; }
.view-tabs button { position: relative; padding: 0 13px; border: 0; color: #78847e; background: transparent; font-size: 10px; }
.view-tabs button span { margin-left: 4px; color: #a3aca7; }
.view-tabs button.active { color: var(--ink); font-weight: 700; }
.view-tabs button.active::after { content: ""; position: absolute; right: 11px; bottom: -10px; left: 11px; height: 2px; background: var(--green); }
.toolbar-actions { display: flex; align-items: center; gap: 6px; }
.search-box { width: 180px; height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #d8dfdb; border-radius: 6px; color: #97a19b; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; font-size: 11px; }
.toolbar-actions select, .density-btn, .columns-btn { height: 34px; padding: 0 11px; border: 1px solid #d8dfdb; border-radius: 6px; color: #56635c; background: white; font-size: 11px; }
.density-btn.active { color: var(--green); border-color: #b8cec4; background: var(--green-soft); }
.active-filters { min-height: 43px; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-bottom: 1px solid var(--line); background: #fafbfa; }
.filter-label { margin-right: 4px; color: #8b9690; font-size: 11px; }
.filter-chip { height: 29px; padding: 0 11px; border: 1px solid #dde3df; border-radius: 14px; color: #68756e; background: white; font-size: 10px; }
.filter-chip.active { color: var(--green); border-color: #b8cec4; background: var(--green-soft); font-weight: 700; }
.table-hint { margin-left: auto; color: #9ba49f; font-size: 10px; }

.goal-table-wrap { max-height: calc(100vh - 306px); min-height: 420px; overflow: auto; }
.goal-table { min-width: 1530px; width: 100%; border-collapse: separate; border-spacing: 0; white-space: nowrap; }
.goal-table.operations-table { width: max-content; min-width: 100%; table-layout: fixed; }
.goal-table.operations-table .select-col { width: 36px; min-width: 36px; max-width: 36px; }
.goal-table.operations-table .entity-col { left: 36px; width: 186px; min-width: 186px; max-width: 186px; }
.goal-table.operations-table th:nth-child(3),
.goal-table.operations-table td:nth-child(3) { width: 76px; min-width: 76px; max-width: 76px; }
.goal-table.operations-table th:nth-child(n+4):nth-child(-n+7),
.goal-table.operations-table td:nth-child(n+4):nth-child(-n+7) { width: 70px; min-width: 70px; max-width: 70px; }
.goal-table.operations-table th:nth-child(n+8):nth-child(-n+10),
.goal-table.operations-table td:nth-child(n+8):nth-child(-n+10) { width: 92px; min-width: 92px; max-width: 92px; }
.goal-table.operations-table th:nth-child(n+11):nth-child(-n+13),
.goal-table.operations-table td:nth-child(n+11):nth-child(-n+13) { width: 86px; min-width: 86px; max-width: 86px; }
.goal-table.operations-table th:nth-child(14),
.goal-table.operations-table td:nth-child(14) { width: 112px; min-width: 112px; max-width: 112px; }
.goal-table.operations-table .action-col,
.goal-table.operations-table td:last-child { width: 36px; min-width: 36px; max-width: 36px; padding-right: 4px; padding-left: 4px; }
.goal-table.operations-table th,
.goal-table.operations-table td { padding-right: 8px; padding-left: 8px; }
.goal-table.channel-table { min-width: 1180px; table-layout: fixed; }
.goal-table.channel-table .channel-name-col { width: 180px; min-width: 180px; max-width: 180px; }
.goal-table.channel-table .channel-number-col { width: 72px; min-width: 72px; max-width: 72px; padding-right: 8px; padding-left: 8px; }
.goal-table.channel-table .channel-rate-col { width: 88px; min-width: 88px; max-width: 88px; padding-right: 8px; padding-left: 8px; }
.goal-table.channel-table .visit-narrow { width: 70px; min-width: 70px; max-width: 70px; padding-right: 8px; padding-left: 8px; }
.goal-table.channel-table .channel-status-col { width: 86px; min-width: 86px; max-width: 86px; padding-right: 7px; padding-left: 7px; }
.goal-table.channel-table .action-col,
.goal-table.channel-table td:last-child { width: 38px; min-width: 38px; max-width: 38px; padding-right: 4px; padding-left: 4px; }
.goal-table.service-table { min-width: 1320px; }
.goal-table th, .goal-table td { border-right: 1px solid #edf0ee; border-bottom: 1px solid #e7ebe8; }
.goal-table th:last-child, .goal-table td:last-child { border-right: 0; }
.goal-table thead { position: sticky; top: 0; z-index: 8; }
.goal-table th { height: 38px; padding: 0 12px; color: #65736c; background: #f7f9f7; text-align: left; font-size: 11px; font-weight: 700; }
.goal-table .group-head th { height: 35px; text-align: center; color: #526159; background: #eef2ef; letter-spacing: .3px; font-size: 11px; }
.goal-table .group-head .sticky-col { text-align: left; }
.group-volume { box-shadow: inset 0 2px #6f9e8a; }
.group-efficiency { box-shadow: inset 0 2px #b69b63; }
.group-forecast { box-shadow: inset 0 2px #7e91a2; }
.goal-table td { height: 52px; padding: 0 12px; color: #3f4d46; background: white; font-size: 12px; }
.goal-table tbody tr:hover td { background: #f7faf8; }
.goal-table tbody tr.status-red td:first-child { box-shadow: inset 3px 0 var(--red); }
.goal-table tbody tr.status-yellow td:first-child { box-shadow: inset 3px 0 #d09a40; }
.goal-table .sticky-col { position: sticky; z-index: 5; background: inherit; }
.goal-table thead .sticky-col { z-index: 12; background: #f7f9f7; }
.goal-table thead .group-head .sticky-col { background: #eef2ef; }
.select-col { left: 0; width: 38px; min-width: 38px; text-align: center !important; }
.entity-col { left: 38px; width: 205px; min-width: 205px; box-shadow: 3px 0 5px rgba(28,50,42,.035); }
.action-col { width: 38px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.muted-num { color: #7d8982 !important; }
.target-b { color: var(--ink) !important; background: #fafcfb !important; font-weight: 700; }
.actual-cell strong { color: var(--ink); font-size: 14px; }
.actual-cell small { display: block; margin-top: 3px; color: #929d97; font-size: 9px; font-weight: 400; }
.stretch-c { color: #745c22 !important; background: #fdf9ed !important; font-weight: 700; }
.entity { display: flex; align-items: center; gap: 7px; }
.entity strong, .entity span { display: block; }
.entity strong { color: var(--ink); font-size: 12px; }
.entity div:last-child > span { margin-top: 3px; color: #8e9993; font-size: 9px; }
.expand-btn { width: 18px; height: 18px; display: grid; place-items: center; padding: 0; border: 0; color: #75827b; background: transparent; font-size: 17px; transition: transform .15s; }
.expand-btn.open { transform: rotate(90deg); }
.team-avatar, .person-avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 6px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; }
.person-entity { padding-left: 25px; }
.service-entity.depth-group { padding-left: 25px; }
.service-entity.depth-person { padding-left: 55px; }
.service-entity .expand-placeholder { width: 18px; min-width: 18px; }
.service-entity.depth-group .tree-joint, .service-entity.depth-person .tree-joint { width: 12px; min-width: 12px; height: 20px; margin-left: -7px; border-bottom: 1px solid #ccd4cf; border-left: 1px solid #ccd4cf; }
.company-row td { background: #fff; font-weight: 500; }
.group-row td { background: #fafcfb; }
.employee-row td { background: #f7f9f8; }
.person-avatar { color: #6f7b75; background: #eef1ef; }
.tree-joint { width: 12px; height: 20px; margin-left: -7px; border-bottom: 1px solid #ccd4cf; border-left: 1px solid #ccd4cf; }
.person-row td { height: 37px; color: #68746e; background: #fbfcfb; }
.person-row .sticky-col { background: #fbfcfb; }
.type-tag { padding: 4px 7px; border-radius: 4px; color: #68756e; background: #f0f3f1; font-size: 10px; }
.cell-progress { min-width: 80px; }
.cell-progress > span { display: block; margin-bottom: 4px; font-weight: 700; }
.cell-progress i { position: relative; display: block; width: 80px; height: 3px; border-radius: 4px; background: #e9edeb; }
.cell-progress i b { display: block; height: 100%; border-radius: 4px; background: var(--green-2); }
.cell-progress.yellow i b { background: #c38d36; }.cell-progress.red i b { background: var(--red); }
.cell-progress i em { position: absolute; top: -2px; width: 1px; height: 7px; background: #89958e; }
.gap { display: inline-block; min-width: 44px; padding: 3px 5px; border-radius: 4px; text-align: right; font-weight: 700; }
.gap.positive { color: var(--green); background: var(--green-soft); }.gap.negative { color: var(--red); background: var(--red-soft); }
.efficiency-cell strong, .efficiency-cell small, .forecast-cell strong, .forecast-cell small { display: block; }
.efficiency-cell strong, .forecast-cell strong { color: #33413a; }
.efficiency-cell small, .forecast-cell small { margin-top: 3px; color: #929d97; font-size: 9px; font-weight: 400; }
.level-badge { display: inline-grid; min-width: 42px; height: 24px; place-items: center; border-radius: 4px; font-size: 10px; font-weight: 800; }
.level-a { color: #795f20; background: #f5e7b9; }.level-b { color: var(--green); background: var(--green-soft); }
.level-c { color: #775d1a; background: #f3e3a9; }.level-undera { color: var(--red); background: var(--red-soft); }
.combined-status { display: flex; align-items: center; gap: 5px; }
.goal-level-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.goal-level-list div { padding: 11px; border: 1px solid var(--line); border-radius: 7px; }
.goal-level-list b, .goal-level-list strong { display: block; }
.goal-level-list b { color: #7a867f; font-size: 8px; }.goal-level-list strong { margin-top: 5px; font-family: Georgia,serif; font-size: 17px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.status-pill i, .status-dot { width: 5px; height: 5px; border-radius: 50%; }
.status-pill.green { color: var(--green); background: var(--green-soft); }.status-pill.green i, .status-dot.green { background: var(--green-2); }
.status-pill.yellow { color: var(--amber); background: var(--amber-soft); }.status-pill.yellow i, .status-dot.yellow { background: #c18b32; }
.status-pill.red { color: var(--red); background: var(--red-soft); }.status-pill.red i, .status-dot.red { background: var(--red); }
.row-action { width: 25px; height: 25px; border: 0; border-radius: 5px; color: #7b8780; background: transparent; }
.row-action:hover { background: #edf1ee; }
.comfortable .goal-table td { height: 54px; }.comfortable .person-row td { height: 46px; }
.empty-state { padding: 70px; color: #909a95; text-align: center; }
.table-footer { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: #89948e; font-size: 10px; }
.table-footer strong { color: var(--ink); }
.pagination { display: flex; align-items: center; gap: 8px; }.pagination button { width: 25px; height: 25px; border: 1px solid #dde3df; border-radius: 5px; background: white; }

.drawer { position: fixed; inset: 0 -430px 0 auto; z-index: 40; width: min(410px, 92vw); padding: 23px; overflow-y: auto; background: white; box-shadow: -15px 0 45px rgba(20,43,34,.15); transition: right .25s ease; }
.drawer.open { right: 0; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; }
.drawer-head span { color: #9a8050; font-size: 8px; font-weight: 800; letter-spacing: 1.5px; }
.drawer-head h2 { margin: 5px 0 0; font-family: SimSun, serif; font-size: 20px; }
.drawer-head button { width: 30px; height: 30px; border: 0; border-radius: 6px; color: #637069; background: transparent; font-size: 21px; }
.drawer-meta { display: flex; gap: 6px; margin: 18px 0; }.drawer-meta span { padding: 4px 7px; border-radius: 4px; color: #67746d; background: #f0f3f1; font-size: 8px; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-grid div { padding: 13px; border: 1px solid var(--line); border-radius: 7px; }
.drawer-grid span, .drawer-grid strong { display: block; }.drawer-grid span { color: #87928c; font-size: 8px; }.drawer-grid strong { margin-top: 7px; font-family: Georgia, serif; font-size: 19px; }
.drawer-section { padding: 19px 0; border-bottom: 1px solid var(--line); }.drawer-section h3 { margin: 0 0 13px; font-size: 10px; }
.abc-track { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; height: 7px; overflow: visible; border-radius: 7px; }
.abc-track i.c { background: var(--red-soft); }.abc-track i.b { background: var(--amber-soft); }.abc-track i.a { background: var(--green-soft); }
.abc-track b { position: absolute; top: -4px; width: 2px; height: 15px; background: var(--ink); }
.abc-labels { display: flex; justify-content: space-between; margin-top: 8px; color: #79857e; font-size: 8px; }
.member-line { display: grid; grid-template-columns: 90px 1fr 8px; gap: 10px; align-items: center; padding: 8px 0; }
.member-line strong, .member-line div > span { display: block; }.member-line strong { font-size: 9px; }.member-line div > span { margin-top: 2px; color: #96a09b; font-size: 7px; }
.member-progress { display: flex; align-items: center; gap: 8px; }.member-progress i { flex: 1; height: 4px; border-radius: 4px; background: #e9edeb; }.member-progress i b { display: block; height: 100%; border-radius: 4px; background: var(--green-2); }.member-progress > span { width: 34px; color: #617068; font-size: 8px; }
.drawer-advice { margin-top: 18px; padding: 13px; border-radius: 7px; color: #665738; background: var(--amber-soft); font-size: 9px; line-height: 1.6; }.drawer-advice p { margin: 5px 0 0; }
.popover { position: fixed; z-index: 50; width: 190px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 12px 30px rgba(20,40,32,.14); }
.popover[hidden] { display: none; }.popover strong { display: block; margin-bottom: 8px; font-size: 10px; }.popover label { display: flex; align-items: center; gap: 7px; padding: 6px 0; color: #59675f; font-size: 9px; }
.toast { position: fixed; left: 50%; bottom: -60px; z-index: 70; transform: translateX(-50%); padding: 10px 17px; border-radius: 7px; color: white; background: var(--sidebar); font-size: 10px; transition: bottom .25s; }.toast.show { bottom: 24px; }

.business-workspace { padding: 25px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.page-intro h1 { margin: 5px 0 5px; font-family: SimSun, serif; font-size: 26px; }
.page-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.db-status { padding: 7px 10px; border-radius: 14px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 700; }
.form-panel { padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 24px rgba(25,47,39,.04); }
.form-section-title { display: flex; align-items: baseline; gap: 9px; margin-bottom: 14px; }
.form-section-title strong { font-size: 14px; }.form-section-title span { color: #8b9690; font-size: 10px; }
.split-title { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.lead-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.lead-form-grid label > span { display: block; margin: 0 0 6px 2px; color: #66736c; font-size: 11px; font-weight: 700; }
.lead-form-grid input, .lead-form-grid select, .lead-form-grid textarea {
  width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #d7dfda; border-radius: 7px; outline: 0; color: #34423a; background: white;
}
.lead-form-grid input:focus, .lead-form-grid select:focus, .lead-form-grid textarea:focus { border-color: #77a28f; box-shadow: 0 0 0 3px var(--green-soft); }
.lead-form-grid textarea { resize: vertical; }
.lead-form-grid .span-2 { grid-column: span 2; }
.assignment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.lead-toolbar { display: grid; grid-template-columns: 170px 150px 150px 140px minmax(200px,1fr); gap: 8px; padding: 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; background: white; }
.lead-toolbar select, .lead-toolbar input { height: 36px; padding: 0 10px; border: 1px solid #d8dfdb; border-radius: 6px; background: white; }
.lead-table-shell { overflow: auto; max-height: calc(100vh - 235px); border: 1px solid var(--line); border-radius: 0 0 9px 9px; background: white; }
.lead-table { min-width: 1450px; width: 100%; border-collapse: separate; border-spacing: 0; }
.lead-table thead { position: sticky; top: 0; z-index: 2; }
.lead-table th { height: 41px; padding: 0 10px; color: #68756e; background: #f2f5f3; text-align: left; font-size: 11px; }
.lead-table td { max-width: 190px; height: 48px; padding: 7px 10px; overflow: hidden; border-top: 1px solid #e8ece9; color: #435149; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.lead-table tbody tr:hover td { background: #f8faf9; }
.lead-status { display: inline-flex; padding: 4px 8px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 700; }
.lead-status.pending { color: var(--amber); background: var(--amber-soft); }
.lead-status.invalid { color: var(--red); background: var(--red-soft); }
.edit-lead-btn { height: 28px; padding: 0 9px; border: 1px solid #cbd6d0; border-radius: 5px; color: var(--green); background: white; font-size: 10px; }
.analytics-summary { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 13px; }
.analysis-kpi { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.analysis-kpi span, .analysis-kpi strong, .analysis-kpi small { display: block; }
.analysis-kpi span { color: #7c8982; font-size: 10px; }.analysis-kpi strong { margin: 8px 0 4px; font-family: Georgia,serif; font-size: 25px; }.analysis-kpi small { color: #95a09a; font-size: 9px; }
.analytics-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.analysis-card { min-height: 250px; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.analysis-card h3 { margin: 0 0 16px; font-size: 13px; }
.analysis-select { width: 100%; height: 34px; margin: -5px 0 14px; padding: 0 9px; border: 1px solid #d7dfda; border-radius: 6px; background: white; }
.rank-chart { display: grid; gap: 11px; }
.rank-item { display: grid; grid-template-columns: 90px 1fr 32px; gap: 8px; align-items: center; }
.rank-item span { overflow: hidden; color: #5f6c65; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.rank-item i { height: 7px; overflow: hidden; border-radius: 6px; background: #edf1ef; }
.rank-item i b { display: block; height: 100%; border-radius: 6px; background: var(--green-2); }
.rank-item strong { text-align: right; font-size: 10px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(18,38,31,.48); backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(720px,95vw); max-height: 90vh; padding: 22px; overflow-y: auto; border-radius: 12px; background: white; box-shadow: 0 24px 70px rgba(15,35,27,.25); }
.lead-edit-modal .drawer-head { margin-bottom: 20px; }

.sheet-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 24px rgba(25,47,39,.04); }
.sheet-toolbar { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.sheet-toolbar strong, .sheet-toolbar span { display: block; }
.sheet-toolbar strong { color: var(--ink); font-size: 13px; }
.sheet-toolbar span { margin-top: 3px; color: #8b9690; font-size: 10px; }
.sheet-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.template-select { height: 34px; min-width: 150px; padding: 0 9px; border: 1px solid #cbd7d1; border-radius: 6px; color: #33443c; background: white; }
.sheet-toolbar-actions .draft-count { margin: 0 4px 0 0; padding: 5px 8px; border-radius: 12px; color: var(--green); background: var(--green-soft); white-space: nowrap; font-weight: 700; }
.online-sheet-shell { max-height: calc(100vh - 240px); min-height: 410px; overflow: auto; }
.online-sheet { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.online-sheet thead { position: sticky; top: 0; z-index: 5; }
.online-sheet th { height: 39px; padding: 0 8px; border-right: 1px solid #dfe5e1; border-bottom: 1px solid #d8dfdb; color: #58675f; background: #f2f5f3; text-align: left; white-space: nowrap; font-size: 11px; }
.online-sheet td { height: 39px; padding: 0; border-right: 1px solid #e4e9e6; border-bottom: 1px solid #e4e9e6; background: white; }
.online-sheet tbody tr:hover td { background: #f8fbf9; }
.online-sheet tbody tr.is-draft td { background: #fffdf6; }
.online-sheet tbody tr.is-saving td { background: #f5f9f7; }
.online-sheet tbody tr.is-error td { background: #fff5f3; }
.online-sheet .sheet-index { position: sticky; left: 0; z-index: 3; width: 46px; min-width: 46px; text-align: center; background: #f7f9f7; }
.online-sheet thead .sheet-index { z-index: 7; background: #eaf0ec; }
.online-sheet .sheet-action { width: 106px; min-width: 106px; }
.entry-sheet .sheet-action { position: sticky; right: 0; z-index: 3; border-left: 1px solid #d7dfda; background: #f7f9f7; box-shadow: -5px 0 10px rgba(30,52,43,.06); }
.entry-sheet thead .sheet-action { z-index: 8; background: #eaf0ec; }
.entry-sheet tbody tr:hover .sheet-action { background: #f2f7f4; }
.entry-sheet tbody tr.is-draft .sheet-action { background: #fffaf0; }
.sheet-row-number { color: #8a9690; text-align: center; font-size: 10px; }
.sheet-cell-input, .sheet-cell-select {
  width: 100%; height: 38px; padding: 0 8px; border: 0; border-radius: 0; outline: 0;
  color: #35433c; background: transparent; font-family: inherit; font-size: 11px;
}
.sheet-cell-input::placeholder { color: #aeb7b2; }
.sheet-cell-input:focus, .sheet-cell-select:focus { position: relative; z-index: 2; box-shadow: inset 0 0 0 2px #5d927b; background: white; }
.sheet-cell-input[readonly] { color: #849089; background: #f7f9f8; cursor: default; }
.sheet-cell-select { padding-right: 24px; cursor: pointer; }
.sheet-save-button { height: 27px; padding: 0 9px; border: 1px solid var(--green); border-radius: 5px; color: white; background: var(--green); font-size: 10px; font-weight: 700; }
.sheet-save-button:disabled { border-color: #cbd5d0; color: #849089; background: #e9eeeb; cursor: wait; }
.sheet-save-state { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 7px; color: #7b8781; white-space: nowrap; font-size: 10px; }
.sheet-save-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b5beb9; }
.sheet-save-state.saved { color: var(--green); }.sheet-save-state.saved::before { background: var(--green-2); }
.sheet-save-state.saving { color: #7d6a3c; }.sheet-save-state.saving::before { background: #c89c45; }
.sheet-save-state.error { color: var(--red); }.sheet-save-state.error::before { background: var(--red); }
.entry-sheet { min-width: 2450px; }
.entry-sheet th:nth-child(2), .entry-sheet td:nth-child(2) { width: 116px; min-width: 116px; }
.entry-sheet th:nth-child(3), .entry-sheet td:nth-child(3) { width: 108px; min-width: 108px; }
.entry-sheet th:nth-child(4), .entry-sheet td:nth-child(4) { width: 110px; min-width: 110px; }
.entry-sheet th:nth-child(5), .entry-sheet td:nth-child(5) { width: 125px; min-width: 125px; }
.entry-sheet th:nth-child(6), .entry-sheet td:nth-child(6) { width: 135px; min-width: 135px; }
.entry-sheet th:nth-child(7), .entry-sheet td:nth-child(7) { width: 112px; min-width: 112px; }
.entry-sheet th:nth-child(8), .entry-sheet td:nth-child(8) { width: 135px; min-width: 135px; }
.entry-sheet th:nth-child(9), .entry-sheet td:nth-child(9),
.entry-sheet th:nth-child(10), .entry-sheet td:nth-child(10),
.entry-sheet th:nth-child(11), .entry-sheet td:nth-child(11) { width: 118px; min-width: 118px; }
.entry-sheet th:nth-child(12), .entry-sheet td:nth-child(12),
.entry-sheet th:nth-child(15), .entry-sheet td:nth-child(15) { width: 210px; min-width: 210px; }
.entry-sheet th:nth-child(13), .entry-sheet td:nth-child(13) { width: 135px; min-width: 135px; }
.entry-sheet th:nth-child(14), .entry-sheet td:nth-child(14) { width: 112px; min-width: 112px; }
.follow-sheet { min-width: 2550px; }
.follow-sheet th, .follow-sheet td { width: 118px; min-width: 118px; }
.follow-sheet th:nth-child(2), .follow-sheet td:nth-child(2),
.follow-sheet th:nth-child(5), .follow-sheet td:nth-child(5) { width: 126px; min-width: 126px; }
.follow-sheet th:nth-child(7), .follow-sheet td:nth-child(7),
.follow-sheet th:nth-child(8), .follow-sheet td:nth-child(8) { width: 132px; min-width: 132px; }
.follow-sheet th:nth-child(11), .follow-sheet td:nth-child(11),
.follow-sheet th:nth-child(12), .follow-sheet td:nth-child(12),
.follow-sheet th:nth-child(13), .follow-sheet td:nth-child(13) { width: 145px; min-width: 145px; }
.follow-sheet th:nth-child(17), .follow-sheet td:nth-child(17),
.follow-sheet th:nth-child(20), .follow-sheet td:nth-child(20) { width: 220px; min-width: 220px; }
.lead-table-shell.online-sheet-shell { border-radius: 0 0 9px 9px; }
.lead-table.online-sheet td { max-width: none; height: 39px; padding: 0; overflow: visible; text-overflow: clip; }

body.entry-focus-mode { overflow: hidden; }
body.entry-focus-mode .sidebar,
body.entry-focus-mode .topbar { display: none; }
body.entry-focus-mode .main { margin-left: 0; }
body.entry-focus-mode .business-workspace[data-workspace-view="entry"] { height: 100vh; padding: 10px; }
body.entry-focus-mode .business-workspace[data-workspace-view="entry"] .sheet-panel { height: calc(100vh - 20px); border-radius: 7px; }
body.entry-focus-mode .entry-sheet-shell { max-height: none; height: calc(100vh - 73px); }

.dictionary-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 14px; }
.dictionary-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 24px rgba(25,47,39,.04); }
.dictionary-head { min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.dictionary-head strong, .dictionary-head span { display: block; }
.dictionary-head strong { font-size: 14px; }
.dictionary-head span { margin-top: 4px; color: #89958f; font-size: 10px; }
.dictionary-list { max-height: calc(100vh - 225px); overflow: auto; }
.dictionary-row { display: grid; grid-template-columns: 180px minmax(180px,1fr) 100px 75px 90px; gap: 12px; align-items: center; min-height: 58px; padding: 9px 15px; border-bottom: 1px solid #e8ece9; }
.dictionary-row:last-child { border-bottom: 0; }
.dictionary-key span { display: inline-block; margin-right: 7px; padding: 3px 6px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; }
.dictionary-key code { color: #75817b; font-size: 10px; }
.dictionary-label-input, .dictionary-create input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #d7dfda; border-radius: 6px; outline: 0; color: #35433c; background: white; }
.dictionary-type-select, .dictionary-create select { width: 100%; height: 36px; padding: 0 8px; border: 1px solid #d7dfda; border-radius: 6px; color: #35433c; background: white; }
.dictionary-label-input:focus, .dictionary-create input:focus { border-color: #77a28f; box-shadow: 0 0 0 3px var(--green-soft); }
.dictionary-switch { display: flex; align-items: center; gap: 6px; color: #59675f; font-size: 10px; }
.dictionary-create { align-self: start; }
.dictionary-create form { display: grid; gap: 14px; padding: 16px; }
.dictionary-create label > span { display: block; margin: 0 0 6px 2px; color: #65736c; font-size: 11px; font-weight: 700; }
.dictionary-create button { width: 100%; }
.required-check { display: flex; align-items: center; gap: 8px; color: #59675f; font-size: 11px; }
.required-check span { margin: 0 !important; }
.template-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.template-tabs button { height: 34px; padding: 0 14px; border: 1px solid #d4ddd8; border-radius: 17px; color: #5d6a63; background: white; font-size: 11px; }
.template-tabs button.active { border-color: var(--green); color: white; background: var(--green); font-weight: 700; }
.common-field-strip { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 15px; border-bottom: 1px solid var(--line); background: #fafcfb; }
.common-field-strip::before { content: "固定通用字段"; width: 100%; margin-bottom: 3px; color: #7e8a84; font-size: 10px; font-weight: 700; }
.common-field-strip span { padding: 4px 7px; border-radius: 4px; color: #52645b; background: #eaf1ed; font-size: 9px; }

.org-head-actions { display: flex; align-items: center; gap: 8px; }
.integration-status { padding: 6px 9px; border-radius: 13px; color: var(--amber); background: var(--amber-soft); font-size: 10px; }
.integration-status.ready { color: var(--green); background: var(--green-soft); }
.organization-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 13px; margin: 0 25px 28px; }
.org-tree-card, .org-main-card { min-height: calc(100vh - 165px); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 24px rgba(25,47,39,.04); }
.org-card-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.org-card-head strong, .org-card-head span { display: block; }
.org-card-head strong { font-size: 13px; }.org-card-head span { margin-top: 3px; color: #8c9791; font-size: 9px; }
.org-tree { padding: 9px; }
.org-tree button { width: 100%; min-height: 35px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 0; border-radius: 6px; color: #58665f; background: transparent; text-align: left; font-size: 11px; }
.org-tree button:hover, .org-tree button.active { color: var(--green); background: var(--green-soft); font-weight: 700; }
.org-tree button span { margin-left: auto; color: #96a09b; font-size: 9px; }
.org-tree .depth-1 { padding-left: 24px; }.org-tree .depth-2 { padding-left: 40px; }
.org-tabs { height: 52px; display: flex; gap: 22px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.org-tabs button { position: relative; border: 0; color: #7b8781; background: transparent; font-size: 11px; }
.org-tabs button.active { color: var(--ink); font-weight: 700; }
.org-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--green); }
.org-toolbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.org-toolbar strong, .org-toolbar span { display: block; }.org-toolbar span { margin-top: 3px; color: #89948e; font-size: 9px; }
.org-table-shell { max-height: calc(100vh - 275px); overflow: auto; border-top: 1px solid var(--line); }
.org-table { width: 100%; border-collapse: collapse; }
.org-table th { height: 39px; padding: 0 12px; color: #75817b; background: #f5f7f5; text-align: left; font-size: 10px; }
.org-table td { height: 50px; padding: 6px 12px; border-top: 1px solid #e8ece9; color: #4d5a53; font-size: 11px; }
.org-user { display: flex; align-items: center; gap: 8px; }.org-user strong, .org-user span { display: block; }.org-user span { margin-top: 2px; color: #909a95; font-size: 9px; }
.source-badge { display: inline-flex; padding: 4px 7px; border-radius: 4px; color: #6f7b75; background: #eef2ef; font-size: 9px; }
.source-badge.feishu { color: #3464a3; background: #e9f1fb; }
.org-table select { height: 30px; padding: 0 7px; border: 1px solid #d5ddd8; border-radius: 5px; background: white; font-size: 10px; }
.role-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 218px); }
.role-list { padding: 10px; border-right: 1px solid var(--line); }
.role-list button { width: 100%; padding: 11px; border: 0; border-radius: 7px; color: #59665f; background: transparent; text-align: left; }
.role-list button strong, .role-list button span { display: block; }.role-list button span { margin-top: 4px; color: #929c97; font-size: 9px; }
.role-list button.active { color: var(--green); background: var(--green-soft); }
.permission-grid { display: grid; grid-template-columns: repeat(2,minmax(180px,1fr)); gap: 8px; padding: 16px; }
.permission-grid label { display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; color: #536159; font-size: 11px; }
.goal-create-modal { width: min(900px,96vw); }
.goal-form-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; margin-top: 18px; }
.goal-form-grid label > span { display: block; margin: 0 0 6px 2px; color: #68756e; font-size: 10px; font-weight: 700; }
.goal-form-grid input, .goal-form-grid select { width: 100%; height: 36px; padding: 0 9px; border: 1px solid #d6ded9; border-radius: 6px; background: white; }
.goal-assignment-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 9px; }
.goal-assignment-head strong, .goal-assignment-head span { display: block; }.goal-assignment-head span { margin-top: 3px; color: #8c9791; font-size: 9px; }
.goal-assignment-shell { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.goal-assignment-table { width: 100%; border-collapse: collapse; }
.goal-assignment-table th, .goal-assignment-table td { height: 42px; padding: 0 12px; border-bottom: 1px solid #e7ebe8; text-align: left; font-size: 11px; }
.goal-assignment-table th { position: sticky; top: 0; background: #f3f6f4; color: #6b7771; }
.goal-assignment-table input { width: 100%; height: 30px; padding: 0 8px; border: 1px solid #d7dfda; border-radius: 5px; text-align: right; }
.goal-assignment-table tfoot td { position: sticky; bottom: 0; color: var(--ink); background: #edf4f0; font-weight: 800; }
.feishu-config-modal { width: min(760px,96vw); }
.feishu-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.feishu-config-grid label:last-child { grid-column: 1 / -1; }
.feishu-config-grid label > span { display: block; margin: 0 0 6px 2px; color: #65736c; font-size: 10px; font-weight: 700; }
.feishu-config-grid input { width: 100%; height: 37px; padding: 0 10px; border: 1px solid #d5ddd8; border-radius: 6px; outline: 0; }
.feishu-config-grid input:focus { border-color: #77a28f; box-shadow: 0 0 0 3px var(--green-soft); }
.feishu-config-grid small { display: block; margin: 5px 0 0 2px; color: #909a95; font-size: 9px; }
.feishu-preview-head { display: flex; align-items: center; justify-content: space-between; margin: 19px 0 8px; }
.feishu-preview-head strong, .feishu-preview-head span { display: block; }.feishu-preview-head span { margin-top: 3px; color: #89948e; font-size: 9px; }
.feishu-team-preview { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.feishu-team-row { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid #e7ebe8; color: #536159; font-size: 11px; }
.feishu-team-row:last-child { border-bottom: 0; }.feishu-team-row span { margin-left: auto; color: #8d9892; font-size: 9px; }

@media (max-width: 1000px) {
  .sidebar { width: 66px; padding-inline: 10px; }
  .brand > div:last-child, .nav-item span:not(.nav-icon):not(.nav-badge), .section-label, .user-card > div:not(.avatar), .user-card button { display: none; }
  .business-switcher > span, .business-switcher b { display: none; }
  .business-switcher { padding: 6px 4px; }
  .business-switcher button { justify-content: center; padding: 0; }
  .brand { padding-inline: 5px; }.nav-item { justify-content: center; padding: 0; }.nav-item.active::before { left: -10px; }
  .nav-badge { position: absolute; top: 2px; right: 3px; display: grid !important; }
  .main { margin-left: 66px; }
  .summary-bar { grid-template-columns: repeat(3, 1fr); }.summary-item:nth-child(3) { border-right: 0; }
  .toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .lead-form-grid { grid-template-columns: repeat(2,1fr); }
  .analytics-grid { grid-template-columns: repeat(2,1fr); }
  .organization-layout { grid-template-columns: 210px minmax(0,1fr); }
}
@media (max-width: 720px) {
  .workspace-head, .workbench-toolbar { align-items: flex-start; flex-direction: column; }
  .summary-bar { grid-template-columns: repeat(2, 1fr); }.summary-item:nth-child(odd) { border-right: 1px solid #e8ece9; }
  .summary-item:nth-child(even) { border-right: 0; }
  .toolbar-actions { width: 100%; justify-content: flex-start; }.search-box { width: 100%; }
  .table-hint { display: none; }
  .lead-form-grid, .assignment-grid, .analytics-summary, .analytics-grid { grid-template-columns: 1fr; }
  .lead-form-grid .span-2 { grid-column: auto; }
  .lead-toolbar { grid-template-columns: 1fr; }
  .organization-layout, .role-layout, .goal-form-grid, .feishu-config-grid { grid-template-columns: 1fr; }
  .feishu-config-grid label:last-child { grid-column: auto; }
}
