/* 大心华 enterprise admin palette (market-standard)
 * Primary #1677FF | Deep/hover #0958D9 | Sidebar slate #001529
 * Page #F5F5F5 | Card #FFFFFF | Text #1F1F1F / #8C8C8C | Border #E8E8E8
 * Brand red reserved for logo only; semantic danger #FF4D4F; success greens kept
 */
:root {
  --ink: #1f1f1f;
  --muted: #8c8c8c;
  --deep: #0958d9;
  --deep-2: #1677ff;
  --gold: #69b1ff;
  --gold-soft: #e6f4ff;
  --paper: #f5f5f5;
  --panel: rgba(255,255,255,.88);
  --line: rgba(9, 88, 217, .12);
  --shadow: 0 24px 70px rgba(0, 21, 41, .13);
  --red: #ff4d4f;
  --green: #218b61;
  --blue: #2f6fa7;
  --orange: #d98f1f;
  --violet: #8667c8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 4%, rgba(22, 119, 255,.10), transparent 28rem),
    radial-gradient(circle at 95% 10%, rgba(22, 119, 255, .08), transparent 31rem),
    linear-gradient(135deg, #f5f5f5 0%, #f0f2f5 48%, #fafafa 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

a { color: inherit; text-decoration: none; }

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 20px 18px 24px 8px;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 16px;
}

.public-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 32px 18px;
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  height: calc(100vh - 40px);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 0 28px 28px 0;
  padding: 22px 16px;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(255,255,255,.13), transparent 36%),
    linear-gradient(180deg, #001529 0%, #002140 100%);
  box-shadow: var(--shadow);
}

.sidebar:after {
  content: "";
  position: absolute;
  left: 110px;
  bottom: -74px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(145, 202, 255,.24);
  pointer-events: none;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  z-index: 1;
}

.brand-mark {
  width: 56px;
  height: 72px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--deep);
  background: linear-gradient(135deg, #fff8e4, #69b1ff);
  font-weight: 900;
  font-size: 23px;
  box-shadow: 0 14px 28px rgba(0,0,0,.18);
}

.brand-mark-img {
  padding: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}
.brand-mark-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.64);
  font-size: 12px;
}

.side-nav {
  position: relative;
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  gap: 8px;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.3) transparent;
}

.side-nav::-webkit-scrollbar {
  width: 5px;
}

.side-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255,255,255,.3);
}

.side-nav a {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 15px;
  color: rgba(255,255,255,.76);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.side-nav a.active,
.side-nav a:hover {
  color: #001529;
  background: linear-gradient(135deg, #e6f4ff, #91caff);
  box-shadow: 0 12px 26px rgba(0,0,0,.16);
  font-weight: 900;
}

.side-nav small {
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-size: 11px;
}

.side-nav a.active small,
.side-nav a:hover small {
  background: #001529;
  color: #fff;
}

.nav-group {
  display: grid;
  gap: 6px;
  margin: 4px 0 2px;
  padding: 8px 0 2px;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-group-label {
  padding: 0 14px 2px;
  color: rgba(255,255,255,.45);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pill-biz {
  background: #e6f4ff !important;
  color: #0958d9 !important;
  border: 1px solid #91caff;
}
.biz-followup-preview {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f8fc;
  border: 1px solid #d6e4f0;
}
.biz-followup-preview strong {
  display: block;
  margin-bottom: 6px;
  color: #1d39c4;
  font-size: 13px;
}
.biz-followup-preview p {
  margin: 0 0 6px;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.hero-actions .active-ghost,
a.active-ghost {
  background: #e6f4ff;
  color: #003eb3;
  border-color: #91caff;
  font-weight: 800;
}

.role-card {
  position: relative;
  flex: 0 0 auto;
  z-index: 1;
  margin-top: 12px;
  padding: 17px;
  border-radius: 22px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
}

.role-card b {
  display: block;
  color: #fff1c9;
  margin-bottom: 8px;
  font-size: 13px;
}

.role-card p {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  line-height: 1.7;
}

.self-account-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,241,201,.45);
  cursor: pointer;
}
.self-account-link:hover {
  color: #fff;
  border-bottom-color: #fff1c9;
}
.self-account-hint {
  display: block;
  margin: -2px 0 8px;
  color: rgba(255,241,201,.7);
  font-size: 11px;
}
.import-panel .import-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-top: 8px;
}
.import-panel .import-form label {
  flex: 1 1 240px;
  display: grid;
  gap: 6px;
}
.import-panel .import-hint,
.import-panel .muted {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  min-height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 0 4px;
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -.04em;
}

.topbar p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search {
  width: clamp(210px, 24vw, 320px);
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.76);
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  box-shadow: 0 10px 28px rgba(40, 28, 26, .06);
}

.avatar,
.logout-link {
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--deep);
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(40, 28, 26, .08);
}

.avatar {
  width: 48px;
}

.logout-link {
  padding: 0 16px;
}

.flash-wrap {
  display: grid;
  gap: 8px;
}

.flash {
  padding: 12px 16px;
  border-radius: 14px;
  background: #ecf8f1;
  border: 1px solid #b9dfc8;
  color: var(--deep);
}

.flash.error {
  background: #fff1f0;
  border-color: #ffccc7;
  color: var(--red);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(255,255,255,.08), transparent 42%),
    linear-gradient(135deg, #003a8c 0%, #1677ff 100%);
  box-shadow: var(--shadow);
}

.marketing-hero {
  min-height: 280px;
  display: grid;
  grid-template-columns: 1.16fr .84fr;
}

.hero:after {
  content: "";
  position: absolute;
  right: 310px;
  top: -52px;
  width: 205px;
  height: 430px;
  transform: rotate(18deg);
  background: rgba(255,255,255,.07);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero.compact {
  padding: 24px 28px;
  min-height: auto;
}

.eyebrow {
  color: #f4d6a1;
  font-weight: 900;
  letter-spacing: .08em;
}

.hero h2 {
  margin: 8px 0;
  font-size: 35px;
  line-height: 1.22;
  letter-spacing: -.05em;
}

.hero p {
  width: min(100%, 700px);
  margin: 14px 0 20px;
  color: rgba(255,255,255,.8);
  line-height: 1.75;
  font-size: 14px;
}

.hero-actions,
.hero-tags,
.tabs,
.status-tabs,
.inline-forms {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-tags a,
.hero .ghost {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.17);
  color: rgba(255,255,255,.88);
  font-size: 13px;
  font-weight: 800;
}

.hero-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radar-card {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
}

.radar-card b {
  display: block;
  margin-bottom: 8px;
  color: #ffe8b5;
}

.radar-card p {
  width: auto;
  margin: 0;
  font-size: 13px;
}

.quick-tile {
  min-height: 78px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff6dd, #e5bd72);
  color: #001529;
  display: grid;
  align-content: center;
  gap: 6px;
}

.quick-tile strong {
  font-weight: 900;
}

.quick-tile span {
  color: rgba(23,59,48,.68);
  font-size: 12px;
  font-weight: 800;
}

.stats-grid,
.payment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.marketing-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 0;
}

.deal-range-panel {
  margin: 18px 0 20px;
}

.deal-range-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 16px;
}

.deal-range-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.deal-range-shortcuts .pill.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.deal-range-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.deal-range-form label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.deal-range-form input[type="date"] {
  width: 100%;
}

.deal-range-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.filter-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.filter-date input[type="date"] {
  min-width: 140px;
}

@media (max-width: 900px) {
  .deal-range-summary,
  .deal-range-form {
    grid-template-columns: 1fr;
  }
}

.stat,
.card,
.lead-card,
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 0;
}

.stat {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 18px;
  border-radius: 24px;
}

.stat:before {
  content: "";
  position: absolute;
  left: 18px;
  top: 17px;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

.stat span {
  display: block;
  margin-top: 17px;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 29px;
  letter-spacing: -.04em;
}

.stat small {
  color: var(--green);
  font-weight: 800;
  font-size: 12px;
}

.stat.green strong { color: var(--green); }
.stat.warn strong { color: var(--orange); }
.stat.danger strong { color: var(--red); }
.stat.gold strong { color: var(--gold); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.layout {
  display: grid;
  grid-template-columns: minmax(310px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.main-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.card {
  border-radius: 30px;
  padding: 22px;
}

.card h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.03em;
}

.card p {
  color: var(--muted);
  line-height: 1.55;
}

.section-head,
.lead-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.section-head {
  margin-bottom: 18px;
}

.section-head p {
  margin: 6px 0 0;
  font-size: 13px;
}

.pill {
  min-height: 30px;
  border-radius: 999px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  background: #f2e4c4;
  color: var(--deep);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.form-grid,
.settings-grid,
.filter-grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-entry-form {
  gap: 11px;
}

label span {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(9, 88, 217, .12);
  background: rgba(255,255,255,.9);
  border-radius: 14px;
  padding: 12px;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(22, 119, 255, .52);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, .1);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.wide { grid-column: 1 / -1; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
}

button,
.primary,
.mini-link,
.ghost,
.topbar nav a,
.topbar nav span {
  cursor: pointer;
  font-weight: 900;
}

button,
.primary {
  border: 1px solid var(--deep);
  background: var(--deep);
  color: #fff;
  border-radius: 14px;
  padding: 11px 15px;
}

button:hover,
.mini-link:hover,
.primary:hover {
  transform: translateY(-1px);
}

.lead-list {
  display: grid;
  gap: 14px;
}

.lead-card {
  border-radius: 22px;
  padding: 18px;
}

.lead-card h4 {
  margin: 0 0 6px;
  font-size: 20px;
}

.lead-card p {
  margin: 8px 0;
}

.lead-consult {
  color: var(--ink) !important;
}

.pill-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.follow-summary {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #e5dccd;
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  background: #fffaf1;
}

.follow-summary strong {
  color: var(--green);
}

.follow-summary span,
.follow-summary small {
  color: var(--muted);
}

.follow-summary p {
  margin: 0;
}

.empty-follow {
  color: var(--muted);
  border-left-color: var(--line);
  background: #f7f4f2;
}

.health-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.health-chip {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 11px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.health-today {
  color: #135200;
  background: #f6ffed;
  border-color: #b7eb8f;
}

.health-recent {
  color: #0958d9;
  background: #e6f4ff;
  border-color: #91caff;
}

.health-aging {
  color: #ad6800;
  background: #fff7e6;
  border-color: #ffd591;
}

.health-overdue {
  color: #a8071a;
  background: #fff1f0;
  border-color: #ffa39e;
}

.health-never {
  color: #595959;
  background: #f5f5f5;
  border-color: #d9d9d9;
}

.health-closed {
  color: #08979c;
  background: #e6fffb;
  border-color: #87e8de;
}

.follow-health-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f0f5ff;
  border: 1px solid rgba(22, 119, 255, .12);
}

.follow-health-row span {
  display: grid;
  gap: 2px;
  min-width: 120px;
}

.follow-health-row small {
  color: var(--muted);
  font-size: 12px;
}

.follow-health-row b {
  color: var(--ink);
  font-size: 13px;
}

.lead-card-focus {
  outline: 2px solid var(--deep-2);
  box-shadow: 0 0 0 6px rgba(22, 119, 255, .18), var(--shadow);
  transition: box-shadow .35s ease, outline-color .35s ease;
}

/* 线索等级 A/B/C/D — A 深红 / B 橘色 / C 浅黄 / D 浅灰 */
.lead-card.lead-level-A {
  border-left: 8px solid #b71c1c;
  background: linear-gradient(90deg, #ef9a9a 0%, #ffcdd2 38%, #ffffff 68%);
  box-shadow: inset 0 0 0 1px rgba(183, 28, 28, .14);
}
.lead-card.lead-level-B {
  border-left: 8px solid #ef6c00;
  background: linear-gradient(90deg, #ffcc80 0%, #fff3e0 38%, #ffffff 68%);
  box-shadow: inset 0 0 0 1px rgba(239, 108, 0, .12);
}
.lead-card.lead-level-C {
  border-left: 8px solid #fbc02d;
  background: linear-gradient(90deg, #fff59d 0%, #fff9c4 38%, #ffffff 68%);
  box-shadow: inset 0 0 0 1px rgba(251, 192, 45, .14);
}
.lead-card.lead-level-D {
  border-left: 8px solid #9e9e9e;
  background: linear-gradient(90deg, #e0e0e0 0%, #eeeeee 38%, #fafafa 68%);
  box-shadow: inset 0 0 0 1px rgba(158, 158, 158, .12);
}

.lead-level-chip {
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  white-space: nowrap;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.lead-level-chip.lead-level-A {
  color: #fff;
  background: #c62828;
  border-color: #b71c1c;
}
.lead-level-chip.lead-level-B {
  color: #fff;
  background: #fb8c00;
  border-color: #ef6c00;
}
.lead-level-chip.lead-level-C {
  color: #5d4037;
  background: #fff9c4;
  border-color: #fbc02d;
}
.lead-level-chip.lead-level-D {
  color: #424242;
  background: #eeeeee;
  border-color: #bdbdbd;
}

/* 工商私有池表格行按等级着色（复用 lead.level） */
table.biz-sheet tbody tr.biz-row.lead-level-A {
  background: #ffcdd2;
  border-left: 4px solid #b71c1c;
}
table.biz-sheet tbody tr.biz-row.lead-level-B {
  background: #fff3e0;
  border-left: 4px solid #fb8c00;
}
table.biz-sheet tbody tr.biz-row.lead-level-C {
  background: #fff9c4;
  border-left: 4px solid #fbc02d;
}
table.biz-sheet tbody tr.biz-row.lead-level-D {
  background: #eeeeee;
  border-left: 4px solid #9e9e9e;
}
table.biz-sheet tbody tr.biz-row.lead-level-A:hover,
table.biz-sheet tbody tr.biz-row.lead-level-B:hover,
table.biz-sheet tbody tr.biz-row.lead-level-C:hover,
table.biz-sheet tbody tr.biz-row.lead-level-D:hover {
  filter: brightness(0.97);
}

/* Dense table: smaller level chips */
table.biz-sheet .lead-level-chip {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 12px;
}




.fieldwork-progress {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #e8e8e8;
  border-left: 4px solid var(--green);
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f5f5, #f0f2f5);
}

.fieldwork-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.fieldwork-progress-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fieldwork-progress-label {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.fieldwork-progress-head strong,
.fieldwork-case-no {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.fieldwork-progress-head strong {
  color: #fff;
  background: var(--green);
}

.fieldwork-case-no {
  color: #6b4a22;
  background: #e6f4ff;
  white-space: nowrap;
}

.fieldwork-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 15px 0;
}

.fieldwork-steps span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8a827c;
  font-size: 12px;
}

.fieldwork-steps span::after {
  content: "";
  position: absolute;
  left: 26px;
  right: -4px;
  top: 11px;
  height: 2px;
  background: #e8e8e8;
  z-index: 0;
}

.fieldwork-steps span:last-child::after {
  display: none;
}

.fieldwork-steps i {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8a827c;
  background: #ebe4e2;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  z-index: 1;
}

.fieldwork-steps b {
  position: relative;
  z-index: 1;
  background: #f5f5f5;
}

.fieldwork-steps .done {
  color: var(--green);
}

.fieldwork-steps .current {
  color: var(--deep-2);
}

.fieldwork-steps .done i {
  color: #fff;
  background: var(--green);
}

.fieldwork-steps .current i {
  color: #fff;
  background: var(--deep-2);
}

.fieldwork-steps .done::after {
  background: #8db5a4;
}

.fieldwork-steps .current i {
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.13);
}

.fieldwork-progress-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fieldwork-progress-meta > span {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.fieldwork-progress-meta small,
.fieldwork-latest small {
  color: var(--muted);
  font-size: 11px;
}

.fieldwork-progress-meta b {
  color: var(--ink);
  font-size: 13px;
}

.fieldwork-latest {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 11px 0 0 !important;
  color: #5c3a36;
  font-size: 12px;
}

.fieldwork-latest span {
  color: var(--muted);
}

.fieldwork-missing {
  color: #9a6222;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

@media (max-width: 760px) {
  .fieldwork-progress-head { align-items: flex-start; }
  .fieldwork-steps { grid-template-columns: 1fr; gap: 9px; }
  .fieldwork-steps span::after { left: 11px; right: auto; top: 22px; bottom: -9px; width: 2px; height: auto; }
  .fieldwork-steps b { background: transparent; }
  .fieldwork-progress-meta { grid-template-columns: 1fr; }
}

.meta span {
  background: #f3eee5;
  color: #694a24;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.inline-forms {
  align-items: flex-start;
}

.inline-forms form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.inline-forms input,
.inline-forms select {
  width: auto;
  min-width: 120px;
  flex: 1 1 140px;
}

.deal-classification {
  display: flex;
  gap: 8px;
  flex: 2 1 360px;
  min-width: 300px;
}

.deal-classification select {
  min-width: 145px;
  flex: 1 1 0;
}

.deal-classification select:disabled {
  color: var(--muted);
  background: #f3f0ef;
}

.mini-link {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: #fff;
  color: var(--deep);
}

.status-panel {
  margin-bottom: 18px;
}

.status-tabs {
  justify-content: flex-end;
}

.compact-tabs {
  margin-bottom: 14px;
}

.status-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 21, 41, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.status-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 21, 41, .14);
}

.status-tab.active {
  border-color: rgba(31, 26, 23, .45);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.45), 0 14px 28px rgba(0, 21, 41, .16);
}

.status-1 { background: #fff4df; color: #9a5b00; }
.status-2 { background: #e8f0ff; color: #2c579f; }
.status-3 { background: #fff0d7; color: #a05f00; }
.status-4 { background: #e6f7ed; color: #176c3d; }
.status-5 { background: #ffe7e3; color: #a7352b; }
.status-6 { background: #f1e9ff; color: #6533a3; }
.status-7 { background: #e3f6f0; color: #0f6b57; }
.status-all { background: #eef1ec; color: #2a2220; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
}

.payment-grid {
  margin: 0;
}

.filter-grid {
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(108px, 1fr)) minmax(86px, auto);
  margin: 16px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.single-detail-grid {
  grid-template-columns: 1fr;
}

.detail-lead-list {
  margin-bottom: 18px;
}

.kv {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}

.kv span,
.timeline span,
.hint,
.empty {
  color: var(--muted);
}

.note {
  background: #f6f1e8;
  padding: 14px;
  border-radius: 14px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline article {
  border-left: 4px solid var(--gold);
  background: #fff;
  padding: 14px;
  border-radius: 12px;
}

.followup-timeline-card {
  margin-bottom: 18px;
}

/* Lead detail: compact header + single info block */
.lead-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.lead-detail-header-main {
  flex: 1 1 280px;
  min-width: 0;
}

.lead-detail-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.lead-detail-title-row h2 {
  margin: 0;
  font-size: 28px;
}

.lead-detail-header .pill-stack {
  justify-content: flex-start;
}

.lead-detail-contacts {
  margin: 10px 0 0 !important;
  width: auto !important;
  color: rgba(255,255,255,.82) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.lead-detail-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.lead-detail-actions {
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf7f2;
}


/* Lead detail: single-row follow-up form above timeline */
.followup-row-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf7f2;
  overflow-x: auto;
}

.followup-row-form select {
  width: auto;
  min-width: 110px;
  flex: 0 0 auto;
}

.followup-row-form input[name="note"] {
  width: auto;
  min-width: 160px;
  flex: 1 1 200px;
}

.followup-row-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.readonly-field,
input.readonly-field:disabled,
select.readonly-field:disabled {
  color: var(--muted);
  background: #f3f0ef !important;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .followup-row-form {
    flex-wrap: wrap;
  }
}


.lead-detail-admin-actions {
  margin: 0 0 14px;
}

.lead-info-card {
  margin-bottom: 18px;
}

.lead-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 12px;
  margin: 4px 0 8px;
  border-radius: 12px;
  background: #f6f1e8;
  color: var(--muted);
  font-size: 13px;
}

.lead-info-meta span {
  white-space: nowrap;
}


.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 4px;
}

.timeline-meta time {
  color: var(--muted);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-note {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.timeline article small {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
}

.radar-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-grid textarea {
  min-height: 180px;
}

.user-list {
  display: grid;
  gap: 12px;
}

.user-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 1fr 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.user-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.check.inline {
  margin: 0;
  white-space: nowrap;
}

.danger,
button.danger[type="submit"] {
  background: #fff2ef;
  color: var(--red);
  border-color: #ffccc7;
}

.muted-action {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.login-card {
  max-width: 460px;
  margin: 8vh auto;
  padding: 34px;
  border-radius: 28px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.login-card p {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 14px;
}

.center {
  text-align: center;
}

.fieldwork-hero {
  align-items: center;
  gap: 28px;
}

.flow-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(9, 88, 217, 0.12);
}

.flow-strip span {
  padding: 8px 10px;
  border-radius: 12px;
  background: #f0f2f5;
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
}

.flow-strip span.current {
  background: var(--gold);
  color: #2a2220;
}

.flow-strip b {
  color: var(--muted);
}

.five-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.fieldwork-layout {
  align-items: start;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 2fr);
}

.sticky-entry-card {
  position: sticky;
  top: 22px;
}

.fieldwork-main,
.fieldwork-case-list {
  display: grid;
  gap: 18px;
}

.ownership-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.case-lock-note {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 13px;
}

.fieldwork-filter-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.7fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  background: #f5f5f5;
}

.fieldwork-filter-grid .deal-classification {
  min-width: 0;
}

.fieldwork-filter-grid .mini-link {
  text-align: center;
  white-space: nowrap;
}

.deal-type-pill {
  color: #fff;
  background: var(--green);
}

.deal-subtype-pill {
  color: #654514;
  background: #f0ddb7;
}

.fieldwork-case {
  padding: 20px;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  background: linear-gradient(150deg, #fff 0%, #fbfcfb 100%);
}

.fieldwork-case-head,
.case-meta,
.case-update-form,
.renewal-handoff-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.fieldwork-case-head {
  justify-content: space-between;
  align-items: flex-start;
}

.fieldwork-case-head h4 {
  margin: 6px 0 4px;
  font-size: 21px;
}

.fieldwork-case-head p,
.fieldwork-case-head h4,
.case-meta {
  margin-top: 0;
}

.case-no {
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.case-meta {
  margin: 14px 0;
}

.case-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f5f1f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.case-update-form,
.renewal-handoff-form {
  align-items: end;
  padding-top: 14px;
  border-top: 1px dashed #e8e8e8;
}

.case-update-form label,
.renewal-handoff-form label {
  flex: 1 1 170px;
}

.case-update-form label.wide {
  flex-basis: 100%;
}

.renewal-handoff-form {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dcc991;
  border-radius: 16px;
  background: #fffaf0;
}

.renewal-handoff-form h5 {
  flex-basis: 100%;
  margin: 0;
  color: var(--green);
  font-size: 16px;
}

.integration-warning,
.case-error {
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff2ef;
  color: var(--red);
  font-weight: 700;
}

.compact-table {
  display: grid;
  gap: 8px;
}

.compact-table a {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.3fr) auto;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8f5f4;
  color: inherit;
  text-decoration: none;
}

.compact-table a:hover {
  background: #f0f2f5;
}

@media (min-width: 1281px) and (max-height: 950px) {
  .sidebar {
    padding: 18px 14px;
  }

  .brand {
    margin-bottom: 16px;
  }

  .side-nav {
    gap: 4px;
  }

  .side-nav a {
    min-height: 40px;
  }

  .role-card {
    margin-top: 8px;
    padding: 12px 14px;
  }

  .role-card b {
    margin-bottom: 0;
  }

  .role-card p {
    display: none;
  }
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    min-height: auto;
    border-radius: 28px;
  }

  .role-card {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 18px;
  }

  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .marketing-hero,
  .dashboard-grid,
  .layout,
  .detail-grid,
  .filter-grid,
  .user-row,
  .radar-task-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .marketing-stats,
  .stats-grid,
  .payment-grid,
  .five-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fieldwork-layout {
    grid-template-columns: 1fr;
  }

  .fieldwork-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-entry-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-shell,
  .public-shell {
    padding: 16px;
  }

  .topbar,
  .hero,
  .section-head {
    flex-direction: column;
  }

  .top-actions,
  .top-search {
    width: 100%;
  }

  .side-nav,
  .hero-right,
  .marketing-stats,
  .stats-grid,
  .payment-grid,
  .form-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .deal-classification,
  .fieldwork-filter-grid {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .deal-classification {
    flex-direction: column;
    flex-basis: 100%;
  }

  .compact-table a {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 28px;
  }
}

.lead-card .lead-address {
  margin: 0.35rem 0 0.15rem;
  word-break: break-all;
  color: #334155;
  font-size: 0.92rem;
}
.lead-card .lead-address a {
  color: #2563eb;
  text-decoration: none;
}
.lead-card .lead-address a:hover {
  text-decoration: underline;
}

/* === biz-sheet dense table (工商三池) === */
.biz-sheet-wrap {
  margin-top: 4px;
}

table.biz-sheet {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
  font-size: 13px;
  line-height: 1.35;
}

table.biz-sheet thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f1ef;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.biz-sheet tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #eee8e4;
  vertical-align: middle;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.biz-sheet tbody tr:hover {
  background: #faf7f5;
}

table.biz-sheet .col-name {
  min-width: 140px;
  max-width: 200px;
  font-weight: 650;
}

table.biz-sheet .col-contact { max-width: 90px; }
table.biz-sheet .col-phone { max-width: 110px; font-variant-numeric: tabular-nums; }
table.biz-sheet .col-date { max-width: 120px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.biz-sheet .col-addr {
  max-width: 280px;
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
}
table.biz-sheet .col-extra { max-width: 140px; }
table.biz-sheet .col-status { max-width: 160px; white-space: normal; }
table.biz-sheet .col-follow {
  max-width: 260px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
table.biz-sheet .col-actions {
  max-width: none;
  width: 1%;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

.biz-name-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.biz-name-link:hover { color: var(--green); text-decoration: underline; }

.biz-addr-link,
.biz-addr-text {
  color: inherit;
  text-decoration: none;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.biz-addr-link {
  color: var(--green);
}
.biz-addr-link:hover { text-decoration: underline; }

.biz-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.biz-row-actions form {
  display: inline;
  margin: 0;
}

.biz-claim-btn {
  padding: 4px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  white-space: nowrap;
  min-height: 0 !important;
}

.biz-delete-btn {
  padding: 4px 8px !important;
  font-size: 12px !important;
  min-height: 0 !important;
}

.biz-row-actions .mini-link {
  padding: 4px 8px;
  font-size: 12px;
}

table.biz-sheet .col-status .pill {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  border-radius: 999px;
  margin: 0 2px 0 0;
}

.biz-follow-cell {
  font-size: 12px;
  line-height: 1.35;
}
.biz-follow-cell summary {
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 250px;
}
.biz-follow-cell summary::-webkit-details-marker { display: none; }
.biz-follow-cell summary::before {
  content: "▸ ";
  color: var(--muted);
  font-size: 10px;
}
.biz-follow-cell[open] summary::before { content: "▾ "; }
.biz-follow-cell[open] summary {
  white-space: normal;
  max-width: none;
}
.biz-follow-cell p {
  margin: 4px 0 0;
  color: var(--muted);
  white-space: normal;
  word-break: break-word;
}

.biz-row-focus {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  background: #fff8e8 !important;
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.sales-entry-trigger {
  border: 1px solid rgba(22, 119, 255, .35);
  background: #fff;
  color: var(--deep);
  box-shadow: 0 8px 18px rgba(22, 119, 255, .08);
}

.sales-entry-trigger:hover {
  background: #f3f8ff;
}

.sales-entry-dialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  width: min(760px, 94vw);
  max-height: min(88vh, 900px);
  box-shadow: 0 22px 56px rgba(0, 21, 41, .28);
  color: var(--ink);
}

.sales-entry-dialog::backdrop {
  background: rgba(15, 23, 42, .45);
}

.sales-entry-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.sales-entry-dialog-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.sales-entry-dialog-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sales-entry-dialog-close,
.sales-entry-dialog-actions .ghost {
  border: 1px solid rgba(9, 88, 217, .18);
  background: #fff;
  color: var(--deep);
}

.sales-entry-dialog-body {
  display: grid;
  padding: 16px 20px 20px;
  overflow: auto;
  max-height: min(70vh, 720px);
}

.sales-entry-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .sales-entry-dialog-body {
    grid-template-columns: 1fr;
    padding: 12px 14px 16px;
  }
  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-actions > * {
    width: 100%;
  }
}

/* Sticky selected row (工商线索池等): deep red; survives mouse leave (not :hover). */
table.biz-sheet tbody tr.biz-row.row-selected,
table.biz-sheet tbody tr.biz-row.row-selected:hover {
  background: #c62828 !important;
  color: #fff;
}
table.biz-sheet tbody tr.biz-row.row-selected td,
table.biz-sheet tbody tr.biz-row.row-selected:hover td {
  color: #fff;
  border-bottom-color: #b71c1c;
}
table.biz-sheet tbody tr.biz-row.row-selected a,
table.biz-sheet tbody tr.biz-row.row-selected .biz-name-link,
table.biz-sheet tbody tr.biz-row.row-selected .mini-link,
table.biz-sheet tbody tr.biz-row.row-selected .biz-addr-link,
table.biz-sheet tbody tr.biz-row.row-selected .muted {
  color: #ffebee !important;
}
table.biz-sheet tbody tr.biz-row.row-selected .col-actions {
  background: #b71c1c !important;
}
.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.filter-check input {
  width: auto;
  margin: 0;
}

.biz-batch-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.biz-batch-count { font-size: 13px; }
.biz-batch-delete-btn {
  padding: 6px 14px !important;
  font-size: 13px !important;
  min-height: 0 !important;
  background: #c0392b !important;
  border-color: #a93226 !important;
  color: #fff !important;
}
.biz-batch-delete-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
table.biz-sheet .col-seq {
  width: 52px;
  max-width: 56px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #8c8c8c;
  white-space: nowrap;
}
table.biz-sheet .col-check {
  width: 36px;
  max-width: 36px;
  text-align: center;
  padding-left: 8px !important;
  padding-right: 4px !important;
}
table.biz-sheet .col-check input {
  width: 15px;
  height: 15px;
  cursor: pointer;
  vertical-align: middle;
}

@media (max-width: 1100px) {
  table.biz-sheet { font-size: 12px; }
  .biz-claim-btn { padding: 3px 8px !important; }
}


/* 同行 mark on 工商三池 */
table.biz-sheet .col-peer {
  max-width: 64px;
  width: 56px;
  text-align: center;
}
.pill-peer {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  border-radius: 999px;
  background: #fde8e8;
  color: #b03a2e;
  border: 1px solid #f5c6c0;
  font-weight: 700;
}
.biz-peer-btn {
  padding: 4px 8px !important;
  font-size: 12px !important;
  min-height: 0 !important;
  border-radius: 8px !important;
  white-space: nowrap;
  background: #fff !important;
  border: 1px solid #d9a59c !important;
  color: #a04030 !important;
  cursor: pointer;
}
.biz-peer-btn:hover {
  background: #fde8e8 !important;
}
.biz-peer-btn.is-on {
  background: #fde8e8 !important;
  border-color: #c0392b !important;
  color: #922b21 !important;
}

/* Lead pool pagination */
.pool-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #595959;
}
.pool-pager-info strong { color: #1f1f1f; }
.pool-pager-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pool-pager-btn,
.pool-pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: #1f1f1f;
  text-decoration: none;
  line-height: 1;
}
.pool-pager-btn:hover,
.pool-pager-num:hover {
  border-color: #1677ff;
  color: #1677ff;
}
.pool-pager-num.active {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
  font-weight: 600;
}
.pool-pager-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.pool-pager-ellipsis { padding: 0 2px; color: #8c8c8c; }
.pool-pager-size select {
  margin: 0 4px;
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
}
.pool-pager-jump {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pool-pager-jump label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.pool-pager-page-input {
  width: 64px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pool-pager-jump .pool-pager-btn {
  cursor: pointer;
  font: inherit;
}

/* === precise lead pool: fit all columns without horizontal scroll (~1280–1440) === */
.precise-sheet-wrap {
  overflow-x: hidden;
}

table.biz-sheet.precise-sheet {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
  line-height: 1.3;
}

table.biz-sheet.precise-sheet thead th {
  padding: 6px 6px;
  font-size: 11px;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.biz-sheet.precise-sheet tbody td {
  padding: 5px 6px;
  max-width: none;
}

table.biz-sheet.precise-sheet .col-name {
  width: 13%;
  min-width: 0;
  max-width: none;
}
table.biz-sheet.precise-sheet .col-contact { width: 7%; max-width: none; }
table.biz-sheet.precise-sheet .col-phone { width: 9%; max-width: none; }
table.biz-sheet.precise-sheet .col-extra { width: 7%; max-width: none; }
table.biz-sheet.precise-sheet .col-status { width: 8%; max-width: none; white-space: normal; }
table.biz-sheet.precise-sheet th.col-status:nth-child(5),
table.biz-sheet.precise-sheet td.col-status:nth-child(5) { width: 5%; } /* 等级 */
table.biz-sheet.precise-sheet th.col-status:nth-child(6),
table.biz-sheet.precise-sheet td.col-status:nth-child(6) { width: 8%; } /* 跟进 */
table.biz-sheet.precise-sheet th.col-status:nth-child(7),
table.biz-sheet.precise-sheet td.col-status:nth-child(7) { width: 10%; } /* 状态 */
table.biz-sheet.precise-sheet .col-follow {
  width: 15%;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.biz-sheet.precise-sheet .col-actions {
  width: 7%;
  min-width: 64px;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 2;
  box-shadow: -6px 0 8px -8px rgba(0, 0, 0, 0.12);
}
table.biz-sheet.precise-sheet thead th.col-actions {
  background: #f4f1ef;
  z-index: 3;
}

table.biz-sheet.precise-sheet .biz-name-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.biz-sheet.precise-sheet .health-chip,
table.biz-sheet.precise-sheet .lead-level-chip,
table.biz-sheet.precise-sheet .col-status .pill {
  padding: 1px 5px;
  font-size: 10px;
  margin: 0 1px 1px 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

table.biz-sheet.precise-sheet .biz-follow-cell summary {
  max-width: 100%;
}

table.biz-sheet.precise-sheet .biz-row-actions {
  gap: 4px;
}
table.biz-sheet.precise-sheet .biz-row-actions .mini-link,
table.biz-sheet.precise-sheet .biz-delete-btn {
  padding: 3px 6px !important;
  font-size: 11px !important;
}

table.biz-sheet.precise-sheet tbody tr.biz-row:hover .col-actions,
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-A .col-actions,
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-B .col-actions,
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-C .col-actions,
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-D .col-actions {
  background: inherit;
}
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-A .col-actions { background: #ffcdd2; }
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-B .col-actions { background: #fff3e0; }
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-C .col-actions { background: #fff9c4; }
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-D .col-actions { background: #eeeeee; }
table.biz-sheet.precise-sheet tbody tr.biz-row:hover .col-actions { background: #faf7f5; }
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-A:hover .col-actions { background: #ffcdd2; }
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-B:hover .col-actions { background: #fff3e0; }
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-C:hover .col-actions { background: #fff9c4; }
table.biz-sheet.precise-sheet tbody tr.biz-row.lead-level-D:hover .col-actions { background: #eeeeee; }

@media (max-width: 1100px) {
  .precise-sheet-wrap { overflow-x: auto; }
  table.biz-sheet.precise-sheet { min-width: 880px; table-layout: auto; }
}


/* === 工商私有池: denser fixed columns (match 线索池 compact row; no vertical address stack) === */
.biz-private-sheet-wrap {
  overflow-x: auto;
}

table.biz-sheet.biz-private-sheet {
  min-width: 1120px;
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
  line-height: 1.3;
}

table.biz-sheet.biz-private-sheet thead th {
  padding: 6px 6px;
  font-size: 11px;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.biz-sheet.biz-private-sheet tbody td {
  padding: 5px 6px;
  max-width: none;
}

table.biz-sheet.biz-private-sheet .col-seq {
  width: 48px;
  max-width: 52px;
}

table.biz-sheet.biz-private-sheet .col-name {
  width: 14%;
  min-width: 0;
  max-width: none;
}

table.biz-sheet.biz-private-sheet .col-contact { width: 6%; max-width: none; }
table.biz-sheet.biz-private-sheet .col-phone { width: 9%; max-width: none; }
table.biz-sheet.biz-private-sheet .col-date { width: 8%; max-width: none; }

table.biz-sheet.biz-private-sheet .col-addr {
  width: 16%;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.biz-sheet.biz-private-sheet .col-extra {
  width: 8%;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.biz-sheet.biz-private-sheet .col-status {
  width: 8%;
  max-width: none;
  white-space: normal;
}

table.biz-sheet.biz-private-sheet .col-actions {
  width: 150px;
  min-width: 140px;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 2;
  box-shadow: -6px 0 8px -8px rgba(0, 0, 0, 0.12);
}

table.biz-sheet.biz-private-sheet thead th.col-actions {
  background: #f4f1ef;
  z-index: 3;
}

table.biz-sheet.biz-private-sheet .biz-name-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.biz-sheet.biz-private-sheet .lead-level-chip,
table.biz-sheet.biz-private-sheet .col-status .pill {
  padding: 1px 5px;
  font-size: 10px;
  margin: 0 1px 1px 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

table.biz-sheet.biz-private-sheet .biz-row-actions {
  gap: 4px;
  flex-wrap: nowrap;
}

table.biz-sheet.biz-private-sheet .biz-row-actions .mini-link,
table.biz-sheet.biz-private-sheet .biz-delete-btn,
table.biz-sheet.biz-private-sheet .biz-peer-btn {
  padding: 3px 6px !important;
  font-size: 11px !important;
}

table.biz-sheet.biz-private-sheet tbody tr.biz-row.lead-level-A .col-actions { background: #ffcdd2; }
table.biz-sheet.biz-private-sheet tbody tr.biz-row.lead-level-B .col-actions { background: #fff3e0; }
table.biz-sheet.biz-private-sheet tbody tr.biz-row.lead-level-C .col-actions { background: #fff9c4; }
table.biz-sheet.biz-private-sheet tbody tr.biz-row.lead-level-D .col-actions { background: #eeeeee; }
table.biz-sheet.biz-private-sheet tbody tr.biz-row:hover .col-actions { background: #faf7f5; }
table.biz-sheet.biz-private-sheet tbody tr.biz-row.lead-level-A:hover .col-actions { background: #ffcdd2; }
table.biz-sheet.biz-private-sheet tbody tr.biz-row.lead-level-B:hover .col-actions { background: #fff3e0; }
table.biz-sheet.biz-private-sheet tbody tr.biz-row.lead-level-C:hover .col-actions { background: #fff9c4; }
table.biz-sheet.biz-private-sheet tbody tr.biz-row.lead-level-D:hover .col-actions { background: #eeeeee; }


/* 精准线索协作 / 转入公海 */
.pill-collab {
  background: #e8f1ff;
  color: #1d4f91;
  border: 1px solid #b7d0f5;
}
.collab-release-card .collab-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.collab-release-card .collab-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f7f9fc;
  border-radius: 8px;
}
.collab-release-card .inline-mini {
  display: inline;
  margin-left: auto;
}
.collab-push-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}


/* === 总部推广专员：工作台顶部横排推广录入 === */
.hq-promo-entry-card {
  margin-bottom: 20px;
  border: 1px solid rgba(22, 119, 255, .22);
  background: linear-gradient(180deg, #f7fbff 0%, #fff 70%);
}
.hq-promo-entry-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  align-items: end;
}
.hq-promo-entry-form > label {
  flex: 1 1 140px;
  min-width: 132px;
  max-width: 220px;
  margin: 0;
}
.hq-promo-entry-form > label.hq-consult-field {
  flex: 2 1 220px;
  max-width: 360px;
}
.hq-promo-entry-form > .hq-promo-submit {
  flex: 0 0 auto;
  min-width: 140px;
  height: 46px;
  margin-bottom: 1px;
}
.hq-promo-entry-form .promo-channel-custom,
.hq-promo-entry-form .hq-biz-type-custom {
  flex: 1 1 160px;
  max-width: 240px;
}
.hq-dashboard-grid {
  grid-template-columns: 1fr;
}
@media (max-width: 900px) {
  .hq-promo-entry-form > label,
  .hq-promo-entry-form > label.hq-consult-field {
    max-width: none;
    flex: 1 1 100%;
  }
  .hq-promo-entry-form > .hq-promo-submit {
    width: 100%;
  }
}


/* 成交池：今日/本周/本月已成交 chips */
.deal-period-legend a.health-chip {
  text-decoration: none;
  cursor: pointer;
}

/* 成交池多行：首次恢复/保持等级原色；二次黄；三次及以上红 */
table.biz-sheet.deal-pool-sheet tbody tr.biz-row.deal-repeat-2,
table.biz-sheet.deal-pool-sheet tbody tr.biz-row.deal-repeat-2:hover {
  background: #fff59d;
  border-left: 4px solid #f9a825;
  filter: none;
}
table.biz-sheet.deal-pool-sheet tbody tr.biz-row.deal-repeat-3plus,
table.biz-sheet.deal-pool-sheet tbody tr.biz-row.deal-repeat-3plus:hover {
  background: #ef9a9a;
  border-left: 4px solid #c62828;
  filter: none;
}
table.biz-sheet.deal-pool-sheet tbody tr.biz-row.deal-repeat-2 .col-actions,
table.biz-sheet.deal-pool-sheet tbody tr.biz-row.deal-repeat-3plus .col-actions {
  background: inherit;
}
.deal-repeat-pill {
  background: rgba(0, 0, 0, 0.06);
  font-weight: 600;
}
table.biz-sheet.deal-pool-sheet tbody tr.biz-row.deal-repeat-2 .deal-repeat-pill {
  background: #fbc02d;
  color: #4e342e;
}
table.biz-sheet.deal-pool-sheet tbody tr.biz-row.deal-repeat-3plus .deal-repeat-pill {
  background: #c62828;
  color: #fff;
}
.deal-period-legend a.health-chip.is-active {
  outline: 2px solid #1b7f5a;
  box-shadow: 0 0 0 2px rgba(27, 127, 90, 0.15);
}
.timeline-deal-summary {
  margin: 12px 0 8px;
}
.timeline-deal-card {
  border: 1px solid #c8e6d5;
  background: #f3fbf6;
  border-radius: 12px;
  padding: 12px 14px;
}
.deal-range-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.timeline-refund-card {
  border-color: #f0c2c2;
  background: #fff6f6;
}
.timeline-deal-summary .timeline-deal-card + .timeline-deal-card {
  margin-top: 8px;
}
.timeline-deal-net {
  margin: 8px 0 0;
  font-size: 13px;
}
.deal-register-actions {
  flex-wrap: wrap;
  gap: 10px;
}
.deal-register-form .js-deal-type-custom,
.deal-register-form .js-payment-method-custom,
.deal-refund-form input[type="date"] {
  min-width: 120px;
}
.deal-refund-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ICP filing footer — discreet */
.site-icp-foot {
  margin: 18px auto 12px;
  padding: 0 16px 8px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: #8a939c;
}
.site-icp-foot a,
.site-icp-link {
  color: inherit;
  text-decoration: none;
}
.site-icp-foot a:hover,
.site-icp-link:hover {
  color: #5a6570;
  text-decoration: underline;
}
.portal-foot .site-icp-link {
  display: inline-block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 12px;
}
.portal-foot .site-icp-link:hover {
  color: rgba(255, 255, 255, 0.7);
}
