:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #172033;
  --muted: #667085;
  --line: #e6ebf3;
  --blue: #1d63ed;
  --blue-dark: #0c2448;
  --teal: #10b7a5;
  --amber: #f6a31a;
  --purple: #7555e7;
  --red: #ee4b5e;
  --green: #18a56b;
  --cyan: #24a7dc;
  --shadow: 0 18px 46px rgba(24, 39, 75, 0.08);
  --shadow-soft: 0 8px 24px rgba(24, 39, 75, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 76% -12%, rgba(29, 99, 237, 0.14), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 320px, #eef3f9 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px;
  background:
    linear-gradient(180deg, rgba(31, 69, 139, 0.4), transparent 230px),
    #0b182b;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  box-shadow: 12px 0 34px rgba(11, 24, 43, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-home-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

.brand-home-button:hover {
  transform: none;
}

.brand-home-button:hover .brand-mark {
  box-shadow: 0 14px 30px rgba(29, 99, 237, 0.46);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2d7cff, #15c7ad);
  box-shadow: 0 10px 26px rgba(29, 99, 237, 0.36);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 4px;
  color: #aebbd0;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.nav-item {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #dbe4f4;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, #1d63ed, #1b4db1);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(29, 99, 237, 0.24);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.nav-item.active .nav-dot {
  background: #70e4ff;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
}

.sidebar-footer .nav-item-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #d7e4f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prototype-link-stack {
  display: grid;
  gap: 8px;
  margin: 8px 0 14px;
}

.prototype-link-stack .nav-item-secondary {
  min-height: 36px;
  font-size: 13px;
  opacity: .9;
}

.sidebar-footer span,
.sidebar-footer strong {
  display: block;
}

.sidebar-footer span {
  color: #9fb0c8;
  font-size: 12px;
}

.sidebar-footer strong {
  margin-top: 6px;
}

.sidebar-logout-button {
  width: 100%;
  height: 38px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbe4f4;
  text-align: center;
}

.sidebar-logout-button:hover {
  background: rgba(238, 75, 94, 0.16);
  border-color: rgba(238, 75, 94, 0.36);
  color: #fff;
}

.workspace {
  min-width: 0;
  padding: 24px 28px 36px;
}

.topbar {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 2px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1.2;
  color: #111827;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.35;
  color: #172033;
}

.topbar-actions,
.filter-row,
.form-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 12px;
}

.quick-filter-row button {
  min-height: 34px;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  padding: 0 11px;
  background: #fff;
  color: #344054;
  box-shadow: var(--shadow-soft);
}

.quick-filter-row button.active {
  border-color: rgba(29, 99, 237, .45);
  background: linear-gradient(135deg, rgba(29, 99, 237, .12), rgba(16, 183, 165, .1));
  color: #174fd0;
  font-weight: 700;
}

.search-box {
  width: 320px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(208, 215, 225, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
}

.role-switch {
  width: 180px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.primary-button,
.ghost-button,
.link-button,
.icon-button {
  border-radius: 8px;
  border: 1px solid transparent;
  height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.primary-button {
  background: linear-gradient(135deg, #226ff4, #174fd0);
  color: #fff;
  box-shadow: 0 10px 22px rgba(29, 99, 237, 0.22);
}

.primary-button:hover {
  box-shadow: 0 14px 28px rgba(29, 99, 237, 0.28);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--line);
  color: #344054;
  box-shadow: var(--shadow-soft);
}

.ghost-button:hover {
  border-color: #b9c8dc;
}

.link-button {
  height: auto;
  padding: 0;
  color: var(--blue);
  background: transparent;
}

.small-button {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  background: #f2f4f7;
  color: #475467;
}

.view {
  display: none;
  scroll-margin-top: 0;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.scope-banner {
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid #c8d9ff;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(29, 99, 237, 0.1), rgba(16, 183, 165, 0.08)),
    #ffffff;
  color: #1e3a8a;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.scope-banner-footer {
  margin: 14px 0 0;
  background: rgba(255, 255, 255, 0.72);
  border-color: #dfe7f3;
  color: #475467;
  box-shadow: none;
}

.scope-banner-footer b {
  color: #344054;
}

.scope-banner b {
  white-space: nowrap;
}

.scope-banner span {
  line-height: 1.6;
  color: #344054;
  font-size: 13px;
}

.scope-banner em {
  grid-column: 2;
  margin-top: -6px;
  color: #667085;
  font-style: normal;
  line-height: 1.5;
  font-size: 12px;
}

.panel.process-panel {
  margin-bottom: 12px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(12, 36, 72, .96), rgba(29, 99, 237, .9)),
    #0c2448;
  color: #fff;
  overflow: hidden;
}

.panel.process-panel::before {
  content: "";
  position: absolute;
  right: -110px;
  top: -130px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 68%);
}

.panel.process-panel .panel-title h2,
.panel.process-panel .panel-title span {
  color: #fff;
}

.panel.process-panel .process-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.panel.process-panel .process-flow::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, rgba(125, 211, 252, .25), rgba(255,255,255,.75), rgba(45, 212, 191, .35));
}

.panel.process-panel .process-flow button {
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  justify-items: start;
  gap: 6px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.09));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 32px rgba(2, 8, 23, .16);
  backdrop-filter: blur(8px);
}

.panel.process-panel .process-flow button:nth-child(3),
.panel.process-panel .process-flow button:nth-child(4),
.panel.process-panel .process-flow button:nth-child(5) {
  border-color: rgba(125, 211, 252, .48);
  background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(29, 99, 237, .22));
}

.panel.process-panel .process-flow button.no-count {
  opacity: .62;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.05));
}

.panel.process-panel .process-flow button.has-count {
  border-color: rgba(45, 212, 191, .58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 20px 38px rgba(20, 184, 166, .18);
}

.panel.process-panel .process-flow b {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #dbeafe;
  font-size: 11px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}

.panel.process-panel .process-flow span {
  max-width: calc(100% - 30px);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.panel.process-panel .process-flow em {
  align-self: end;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: 0 12px 22px rgba(2, 8, 23, .28);
}

.panel.process-panel .process-flow button.no-count em {
  color: #93a4bd;
  text-shadow: none;
}

.panel.process-panel .process-flow button.has-count em {
  color: #7dd3fc;
}

.panel.process-panel .process-flow em::after {
  content: " 个";
  font-size: 12px;
  font-weight: 600;
  color: #bfdbfe;
}

.metric-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  position: relative;
  min-height: 96px;
  padding: 15px 16px 13px;
  overflow: hidden;
}

.drill-card {
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.drill-card:hover {
  border-color: rgba(37, 99, 235, .38);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, .13);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(29, 99, 237, 0.14), rgba(36, 167, 220, 0.2));
}

.metric-card span::before {
  content: "";
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border-radius: 6px;
  vertical-align: -4px;
  background: rgba(29, 99, 237, .14);
  box-shadow: inset 0 0 0 1px rgba(29, 99, 237, .18);
}

.metric-card::after {
  content: "";
  position: absolute;
  top: 29px;
  right: 29px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(29, 99, 237, 0.28);
}

.metric-card:nth-child(2)::before {
  background: linear-gradient(135deg, rgba(24, 165, 107, 0.14), rgba(16, 183, 165, 0.2));
}

.metric-card:nth-child(2)::after {
  background: var(--green);
}

.metric-card:nth-child(3)::before {
  background: linear-gradient(135deg, rgba(246, 163, 26, 0.16), rgba(255, 211, 98, 0.24));
}

.metric-card:nth-child(3)::after {
  background: var(--amber);
}

.metric-card:nth-child(4)::before {
  background: linear-gradient(135deg, rgba(238, 75, 94, 0.14), rgba(255, 125, 146, 0.2));
}

.metric-card:nth-child(4)::after {
  background: var(--red);
}

.metric-card:nth-child(5)::before {
  background: linear-gradient(135deg, rgba(117, 85, 231, 0.14), rgba(107, 126, 255, 0.2));
}

.metric-card:nth-child(5)::after {
  background: var(--purple);
}

.metric-card span,
.metric-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0;
}

.role-workbench-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .8fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(29, 99, 237, .96), rgba(16, 183, 165, .82)),
    #1d63ed;
  color: #fff;
}

.role-workbench-hero span,
.role-workbench-hero p {
  color: rgba(255, 255, 255, .82);
}

.role-workbench-hero h2 {
  margin: 7px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.role-workbench-hero p {
  margin: 0;
  line-height: 1.65;
}

.role-workbench-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.role-workbench-metrics button {
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  text-align: left;
  padding: 14px;
}

.role-workbench-metrics b,
.role-workbench-metrics span {
  display: block;
}

.role-workbench-metrics b {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
}

.role-workbench-metrics span {
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
}

.role-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr);
  gap: 16px;
}

.role-task-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.role-quick-grid {
  display: grid;
  gap: 10px;
}

.role-quick-grid button {
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: var(--text);
  text-align: left;
}

.role-quick-grid b,
.role-quick-grid span {
  display: block;
}

.role-quick-grid b {
  margin-bottom: 6px;
}

.role-quick-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(360px, .78fr);
  gap: 12px;
  align-items: start;
}

.dashboard-side-rail {
  position: sticky;
  top: 92px;
  min-width: 0;
}

.dashboard-side-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.dashboard-side-stack .panel {
  min-height: 0;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr .9fr;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-panel {
  min-height: 218px;
}

.line-chart,
.radar-chart {
  width: 100%;
  min-height: 150px;
  max-height: 170px;
}

.chart-axis,
.radar-line {
  stroke: #d8e2f0;
  stroke-width: 1;
}

.trend-path {
  fill: none;
  stroke: url(#trendLineGradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-dot {
  fill: #ffffff;
  stroke: #1d63ed;
  stroke-width: 3;
}

.chart-label {
  fill: #667085;
  font-size: 11px;
}

.chart-value {
  fill: #172033;
  font-size: 12px;
  font-weight: 800;
}

.radar-grid {
  fill: #f8fbff;
  stroke: #d8e2f0;
  stroke-width: 1;
}

.radar-area {
  fill: rgba(29, 99, 237, .18);
  stroke: #1d63ed;
  stroke-width: 3;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 140px;
}

.donut-chart {
  width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#e5e7eb 0 100%);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06), 0 18px 34px rgba(24, 39, 75, .08);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef2f7;
}

.donut-legend {
  display: grid;
  gap: 9px;
}

.donut-legend div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-size: 13px;
}

.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
}

.danger-text {
  color: var(--red);
}

.panel {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr);
  gap: 12px;
  margin-bottom: 0;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.two-column.dashboard-side-stack {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.dashboard-side-stack .panel {
  align-self: start;
}

.dashboard-side-stack .panel-title {
  margin-bottom: 12px;
}

.funnel-wrap {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 14px;
  align-items: center;
}

.funnel {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.funnel div {
  width: var(--w);
  height: 38px;
  border-radius: 8px;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  background: var(--c);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 28%, transparent);
}

.funnel div[data-drill-stage] {
  cursor: pointer;
}

.funnel div[data-drill-stage]:hover {
  filter: saturate(1.12) brightness(1.02);
}

.stage-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stage-list div,
.analysis-grid div,
.info-grid div,
.context-summary div,
.ownership-card div,
.profile-grid div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, var(--panel-soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.stage-list strong,
.stage-list span,
.analysis-grid span,
.analysis-grid b,
.info-grid span,
.info-grid b,
.context-summary span,
.context-summary b,
.ownership-card span,
.ownership-card b,
.profile-grid span,
.profile-grid b {
  display: block;
}

.stage-list span,
.analysis-grid span,
.info-grid span,
.context-summary span,
.ownership-card span,
.profile-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 188px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 10px;
  }

  .brand {
    gap: 8px;
    padding-bottom: 16px;
  }

  .brand-text b {
    font-size: 15px;
  }

  .brand-text span,
  .nav-item,
  .sidebar-footer span,
  .sidebar-footer strong {
    font-size: 12px;
  }

  .nav {
    gap: 5px;
  }

  .nav-item {
    min-height: 36px;
    padding: 0 9px;
  }

  .workspace {
    padding: 16px 14px 28px;
  }

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

  .funnel-wrap {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .funnel {
    gap: 7px;
  }

  .funnel div {
    width: clamp(340px, var(--w), 100%);
    height: 34px;
    padding: 0 13px;
    font-size: 13px;
  }

  .funnel div b,
  .funnel div span {
    line-height: 1;
  }

  .stage-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stage-list div {
    padding: 9px 10px;
  }

  .stage-list strong {
    font-size: 15px;
  }

  .stage-list span {
    margin-bottom: 4px;
    font-size: 12px;
  }
}

.alert-list,
.timeline,
.quote-list,
.review-list,
.action-list {
  display: grid;
  gap: 8px;
}

.task-alert-list {
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

.task-alert-list article {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
}

.task-alert-list article b,
.task-alert-list article span {
  grid-column: 2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-alert-list article .inline-actions {
  grid-column: 2;
  justify-content: flex-start;
  margin-top: 6px;
}

.live-timeline {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.alert-list article,
.timeline div,
.quote-list div,
.review-list div,
.round-list div,
.action-list div {
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 18px rgba(24, 39, 75, 0.04);
}

.alert-list article {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 3px 9px;
  border-left: 4px solid var(--blue);
}

.alert-list article:nth-child(2) {
  border-left-color: var(--amber);
}

.alert-list article:nth-child(3) {
  border-left-color: var(--teal);
}

.alert-list i {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
}

.alert-list b,
.alert-list span,
.quote-list b,
.quote-list span,
.review-list b,
.review-list span,
.round-list b,
.round-list span,
.action-list b,
.action-list span {
  display: block;
}

.alert-list span,
.quote-list span,
.review-list span,
.round-list span,
.action-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.timeline time {
  display: block;
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.timeline-card {
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.timeline-card > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.timeline p {
  margin-bottom: 0;
  line-height: 1.45;
  font-size: 13px;
}

.list-more-tip {
  width: 100%;
  padding: 9px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

button.list-more-tip:hover {
  border-color: #8eb7ff;
  background: #eef6ff;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(29, 99, 237, 0.08);
}

.followup-detail-card {
  display: grid;
  gap: 7px;
}

.followup-detail-card p {
  margin: 0;
  color: #344054;
  line-height: 1.55;
}

.followup-detail-card strong {
  color: #172033;
}

.followup-detail-card em {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-style: normal;
}

.followup-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.mini-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-tag,
.muted-text {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.muted-text {
  background: #f2f4f7;
  color: var(--muted);
}

.followup-ledger-panel {
  margin-top: 12px;
}

.dashboard-ledger-details {
  padding: 0;
  overflow: hidden;
}

.dashboard-ledger-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.dashboard-ledger-details summary::-webkit-details-marker {
  display: none;
}

.dashboard-ledger-details summary h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.dashboard-ledger-details summary span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-ledger-details summary b {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-ledger-details[open] summary b {
  background: #f2f4f7;
  color: #475467;
}

.dashboard-ledger-details[open] summary b::before {
  content: "收起";
}

.dashboard-ledger-details[open] summary b {
  font-size: 0;
}

.dashboard-ledger-details[open] summary b::before {
  font-size: 12px;
}

.dashboard-ledger-details .ledger-toolbar {
  margin: 0;
  padding: 0 16px 12px;
  justify-content: flex-end;
}

.dashboard-ledger-details .table-scroll {
  margin: 0 16px 16px;
  max-height: 360px;
}

.followup-ledger-table td {
  vertical-align: top;
}

.followup-ledger-table td b,
.followup-ledger-table td span,
.product-table td span {
  display: block;
}

.followup-ledger-table td span,
.product-table td span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.bars {
  display: grid;
  gap: 13px;
}

.bars div {
  display: grid;
  grid-template-columns: 130px 1fr 34px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.bars b {
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  width: var(--bar);
  min-width: 18px;
  box-shadow: 0 6px 14px rgba(29, 99, 237, 0.14);
}

.bars em {
  font-style: normal;
  color: var(--text);
  text-align: right;
}

.dashboard-side-stack .bars {
  gap: 10px;
}

.dashboard-side-stack .bars div {
  grid-template-columns: minmax(96px, 120px) 1fr 28px;
  gap: 8px;
  font-size: 12px;
}

.dashboard-side-stack .bars b {
  height: 8px;
}

.content-split {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
}

select,
textarea,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

select:focus,
textarea:focus,
input:focus {
  border-color: #8eb7ff;
  outline: 3px solid rgba(29, 99, 237, 0.12);
}

select,
input {
  height: 38px;
  padding: 0 10px;
}

textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px;
  resize: vertical;
  line-height: 1.6;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  background: #f5f8fc;
  font-weight: 600;
}

.data-table tbody tr {
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.data-table tbody tr:hover {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.data-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-style: normal;
  background: #eef2ff;
  color: var(--blue);
  font-weight: 600;
}

.tag.blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.tag.green {
  background: #ecfdf3;
  color: #067647;
}

.tag.amber {
  background: #fffaeb;
  color: #b54708;
}

.tag.purple {
  background: #f4f3ff;
  color: #6d28d9;
}

.customer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  color: #075985;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(29, 99, 237, 0.13);
}

.customer-head h2 {
  margin-bottom: 4px;
}

.customer-head span {
  color: var(--muted);
  font-size: 13px;
}

.info-grid,
.analysis-grid,
.context-summary,
.ownership-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.profile-grid div {
  min-height: 78px;
  min-width: 0;
  overflow: hidden;
}

.profile-grid b,
.ownership-card b,
.info-grid b {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.switch-grid span {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
}

.switch-grid span.on {
  border-color: #abefc6;
  color: #067647;
  background: #ecfdf3;
}

.customer-extra {
  margin-top: 16px;
}

.asset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.asset-header .customer-head {
  margin-bottom: 0;
}

.asset-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.asset-browser {
  display: grid;
  grid-template-columns: minmax(520px, 0.82fr) minmax(0, 1fr);
  gap: 16px;
}

.asset-list-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
}

.asset-list-panel .filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin-bottom: 12px;
}

.asset-list-panel .filter-row .search-input {
  grid-column: 1 / -1;
}

.asset-list-panel .filter-row select {
  width: 100%;
  min-width: 0;
}

.asset-list-panel .panel-title {
  align-items: flex-start;
}

.asset-list-panel .panel-actions {
  justify-content: flex-end;
  max-width: 330px;
}

.search-input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(208, 215, 225, 0.9);
  border-radius: 8px;
  background: #fff;
}

.asset-table-scroll {
  max-height: calc(100vh - 245px);
}

.asset-detail-area {
  min-width: 0;
}

.asset-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.asset-tabs button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.asset-tabs button.active {
  border-color: rgba(37, 99, 235, .18);
  background: #eff6ff;
  color: var(--blue);
  font-weight: 700;
}

.asset-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.asset-tab-panel {
  display: none;
}

.asset-tab-panel.active {
  display: block;
}

.compact-table {
  font-size: 13px;
}

.compact-table th,
.compact-table td {
  padding: 10px;
}

.rule-list {
  display: grid;
  gap: 8px;
}

.rule-list div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.rule-list b,
.rule-list span,
.moment-analysis-grid span,
.moment-analysis-grid b {
  display: block;
}

.rule-list span,
.moment-analysis-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.moment-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.moment-analysis-grid div {
  padding: 12px;
  border: 1px solid #c8d9ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.moment-card {
  padding: 14px;
  border: 1px solid #fedf89;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #fffbeb);
  margin-bottom: 12px;
}

.moment-card span {
  display: block;
  color: #b54708;
  font-size: 13px;
  margin-bottom: 6px;
}

.moment-card p {
  margin-bottom: 0;
  line-height: 1.7;
}

.moment-input {
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  margin-bottom: 14px;
}

.compact-title {
  margin-bottom: 12px;
}

.compact-title h3 {
  margin: 0;
  font-size: 15px;
}

.moment-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.moment-form-grid label,
.moment-textarea {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.moment-textarea {
  margin-bottom: 12px;
}

.upload-placeholder {
  min-height: 74px;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #eff6ff;
  margin-bottom: 12px;
}

.upload-placeholder b,
.upload-placeholder span {
  display: block;
}

.upload-placeholder span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.section-title {
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.chip-cloud,
.select-chips,
.scenario-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-cloud span,
.select-chips button,
.scenario-grid button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(24, 39, 75, 0.04);
}

.select-chips button.selected,
.scenario-grid button:hover,
.chip-cloud.editable span {
  border-color: var(--blue);
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  color: #1d4ed8;
}

.duplicate-panel {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

.duplicate-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: center;
}

.duplicate-row b,
.duplicate-row span {
  display: block;
}

.duplicate-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 480px;
  gap: 16px;
}

.follow-form {
  display: grid;
  gap: 14px;
}

.follow-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.analysis-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  margin-bottom: 12px;
}

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

.analysis-block p {
  margin-bottom: 0;
  line-height: 1.7;
}

.ai-result-card {
  align-self: start;
}

.ai-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ai-editor-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.ai-editor-grid .full-field {
  grid-column: 1 / -1;
}

.ai-editor-grid span {
  color: var(--muted);
  font-size: 12px;
}

.ai-editor-grid input,
.ai-editor-grid select,
.ai-editor-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 10px 11px;
}

.ai-editor-grid textarea {
  min-height: 88px;
  resize: vertical;
}

.button-row {
  flex-wrap: wrap;
  margin-top: 16px;
}

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

.code-block {
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  background: #111827;
  color: #e5e7eb;
  overflow: auto;
  line-height: 1.55;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.scenario-grid button {
  height: 46px;
  border-radius: 8px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.phone-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(390px, 1fr));
  gap: 22px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 6px;
}

.phone-frame {
  width: 100%;
  max-width: 430px;
  min-height: 680px;
  margin: 0 auto;
  padding: 18px;
  border: 8px solid #0d1626;
  border-radius: 34px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f9fd 160px, #eef3f9 100%);
  box-shadow: 0 24px 58px rgba(11, 24, 43, 0.18);
  overflow: hidden;
}

.phone-status {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #475467;
}

.phone-hero {
  margin: 10px 0 12px;
  padding: 17px;
  border-radius: 14px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(135deg, #246ef2, #10b7a5);
  box-shadow: 0 14px 26px rgba(29, 99, 237, 0.24);
}

.phone-hero.sales {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(135deg, #7555e7, #226ff4);
}

.phone-hero.delivery {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(135deg, #0f8c83, #f6a31a);
}

.phone-hero b,
.phone-hero span {
  display: block;
}

.phone-hero b {
  font-size: 20px;
  margin-bottom: 6px;
}

.phone-hero span {
  font-size: 13px;
  opacity: 0.9;
}

.phone-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.phone-metrics div {
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 8px 18px rgba(24, 39, 75, 0.05);
}

.phone-metrics b,
.phone-metrics span,
.phone-list b,
.phone-list span {
  display: block;
}

.phone-metrics span,
.phone-list span {
  color: var(--muted);
  font-size: 12px;
}

.phone-list {
  display: grid;
  gap: 10px;
}

.phone-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(24, 39, 75, 0.05);
}

.phone-list span {
  margin-top: 5px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.quick-actions button {
  height: 52px;
  border: 1px solid #c8d9ff;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  color: #1d4ed8;
  font-weight: 700;
}

.phone-tabs {
  margin-top: 16px;
  padding: 11px 8px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.task-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 18px rgba(24, 39, 75, 0.04);
}

.task-card:has(.inline-actions),
.task-card .inline-actions {
  align-items: center;
}

.task-card:has(.inline-actions) {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.task-card b,
.task-card span {
  display: block;
}

.task-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.task-card.warn {
  border-color: #fedf89;
  background: linear-gradient(180deg, #ffffff, #fffbeb);
}

.task-card.danger {
  border-color: #fecdca;
  background: linear-gradient(180deg, #ffffff, #fff1f3);
}

.task-card.done {
  border-color: #abefc6;
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.task-card.done b,
.task-card.done span {
  color: #067647;
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.task-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 16px;
}

.task-home-main,
.pool-home-panel {
  min-height: 420px;
}

.task-list-large,
.pool-list {
  display: grid;
  gap: 10px;
}

.task-list-large .task-card,
.pool-list .task-card {
  margin-top: 0;
}

.product-table td:nth-child(2) {
  font-weight: 800;
}

.delivery-project-list {
  display: grid;
  gap: 10px;
}

.delivery-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.delivery-steps div {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f9fafb;
}

.delivery-steps .done {
  color: #067647;
  border-color: #abefc6;
  background: #ecfdf3;
}

.delivery-steps .active {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.config-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
}

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

.setup-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.setup-list li {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.setup-list li.done {
  color: #067647;
  border-color: #abefc6;
  background: #ecfdf3;
}

.setup-list li.active {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.tab-buttons {
  display: flex;
  gap: 8px;
}

.config-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  margin-bottom: 14px;
}

.tab-buttons button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
}

.tab-buttons button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.config-tab {
  display: none;
}

.config-tab.active {
  display: block;
}

.data-center-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.entity-list {
  display: grid;
  gap: 8px;
}

.entity-item {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #344054;
  text-align: left;
  display: grid;
  gap: 3px;
}

.entity-item span {
  color: var(--muted);
  font-size: 12px;
}

.entity-item.active {
  border-color: #9fc1ff;
  background: linear-gradient(135deg, #226ff4, #174fd0);
  color: #fff;
  box-shadow: 0 12px 24px rgba(29, 99, 237, 0.22);
}

.entity-item.active span {
  color: rgba(255, 255, 255, 0.78);
}

.data-main-title {
  align-items: flex-start;
}

.data-search-box {
  width: 260px;
  box-shadow: none;
}

.data-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.data-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.data-summary span,
.data-summary b {
  display: block;
}

.data-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table-wrap .data-table {
  min-width: 920px;
}

.data-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.data-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.data-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.data-form label.full-field {
  grid-column: 1 / -1;
}

.data-form textarea {
  min-height: 110px;
}

.system-settings-panel {
  margin-bottom: 16px;
}

.system-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.system-settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.system-settings-form .full-field {
  grid-column: 1 / -1;
}

.system-settings-form input,
.system-settings-form textarea {
  width: 100%;
  border: 1px solid #d7dfed;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdff;
  color: var(--text);
  outline: none;
}

.system-settings-form textarea {
  min-height: 84px;
  resize: vertical;
}

.system-settings-form input:focus,
.system-settings-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.1);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.login-tip {
  padding: 12px;
  border: 1px solid #c8d9ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.login-tip b,
.login-tip span {
  display: block;
}

.login-tip span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.6;
}

body.login-page {
  min-width: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(12, 36, 72, 0.95), rgba(20, 62, 122, 0.9) 48%, rgba(16, 183, 165, 0.82)),
    linear-gradient(180deg, #eef4fb, #dce8f6);
}

.login-shell {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(4, 16, 38, 0.3);
  backdrop-filter: blur(12px);
}

.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  padding: 56px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(11, 31, 64, 0.62), rgba(29, 99, 237, 0.16));
}

.login-hero .brand-mark {
  width: 58px;
  height: 58px;
  font-size: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.login-hero h1 {
  margin: 16px 0 0;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-hero p {
  max-width: 420px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.login-hero .login-system-name {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

.login-hero .login-subcopy,
.login-hero .login-intro {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.72);
}

.login-hero .login-intro {
  max-width: 480px;
}

.login-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 420px;
  margin-top: 18px;
}

.login-points span {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 54px;
  background: rgba(255, 255, 255, 0.96);
}

.login-card h2 {
  margin: 4px 0 0;
  font-size: 30px;
  letter-spacing: 0;
}

.login-page .login-form {
  gap: 16px;
}

.login-page .login-form label {
  gap: 9px;
  color: #344054;
  font-weight: 700;
}

.login-page .login-form input {
  height: 46px;
  border: 1px solid #d7dfed;
  border-radius: 8px;
  padding: 0 14px;
  background: #fbfdff;
  color: var(--text);
  outline: none;
}

.login-page .login-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.12);
}

.login-page .login-form .primary-button {
  height: 46px;
  margin-top: 4px;
  justify-content: center;
  font-size: 15px;
}

.login-demo {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #dbe6f6;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.login-demo b {
  color: var(--text);
}

.login-error {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(238, 75, 94, 0.24);
  border-radius: 8px;
  background: rgba(238, 75, 94, 0.08);
  color: #c92a3f;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
}

.modal {
  width: 620px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  scrollbar-gutter: stable;
}

.large-modal {
  width: 820px;
}

.crud-body {
  display: grid;
  gap: 14px;
}

.crud-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.crud-form-grid label,
.crud-body label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.crud-form-grid .full-field {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-right: -20px;
  margin-bottom: -20px;
  margin-left: -20px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.table-action {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0 6px;
  font-size: 13px;
}

.table-scroll {
  overflow-x: auto;
  max-height: 58vh;
}

.data-table tbody tr.is-active {
  background: #eef5ff;
}

.row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions .table-action {
  padding: 4px 6px;
}

.detail-actions {
  justify-content: stretch;
}

.detail-actions button {
  flex: 1;
}

.customer-flow-panel {
  margin-bottom: 14px;
}

.customer-flow-runner {
  display: grid;
  gap: 12px;
}

.flow-empty {
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
}

.flow-steps span {
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px solid #e3eaf5;
  border-radius: 8px;
  background: #f8fbff;
  color: #7a8799;
  font-size: 12px;
  text-align: center;
}

.flow-steps b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8eef8;
  color: #64748b;
  font-size: 12px;
}

.flow-steps em {
  font-style: normal;
  line-height: 1.25;
}

.flow-steps span.done {
  border-color: rgba(24, 165, 107, 0.25);
  background: #effaf5;
  color: #16805a;
}

.flow-steps span.done b {
  background: var(--green);
  color: #fff;
}

.flow-steps span.active {
  border-color: rgba(29, 99, 237, 0.36);
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  color: var(--blue);
  box-shadow: 0 10px 24px rgba(29, 99, 237, 0.1);
}

.flow-steps span.active b {
  background: var(--blue);
  color: #fff;
}

.flow-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  background: #fff;
}

.flow-status-line b {
  color: var(--text);
}

.flow-status-line span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.flow-action-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.flow-action-grid button {
  justify-content: center;
  min-width: 0;
  white-space: normal;
}

.flow-action-grid button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

.compact-flow .flow-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.compact-flow .flow-status-line {
  display: grid;
}

.compact-flow .flow-status-line span {
  text-align: left;
}

.drill-summary,
.promote-customer {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.promote-customer b,
.promote-customer span {
  display: block;
}

.promote-customer b {
  margin-bottom: 4px;
  color: var(--text);
}

.ai-confirm-readonly {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.ai-confirm-readonly div,
.ai-confirm-readonly label {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.ai-confirm-readonly .full-field {
  grid-column: 1 / -1;
}

.ai-confirm-readonly span,
.ai-confirm-readonly b {
  display: block;
}

.ai-confirm-readonly span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.ai-confirm-readonly b {
  color: var(--text);
}

.ai-confirm-readonly p {
  margin: 0;
  color: #344054;
  line-height: 1.65;
  white-space: pre-wrap;
}

.ai-confirm-readonly input,
.ai-confirm-readonly select,
.ai-confirm-readonly textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 10px 11px;
}

.ai-confirm-readonly textarea {
  min-height: 92px;
  resize: vertical;
}

.drill-table td:last-child {
  min-width: 128px;
}

.danger-action {
  color: var(--red);
}

.success-action {
  color: #047857;
}

@media (max-width: 1450px) {
  .dashboard-main-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr);
  }

  .chart-grid {
    grid-template-columns: 1fr 1fr;
  }

  .chart-grid .chart-panel:first-child {
    grid-column: 1 / -1;
  }

  .asset-browser {
    grid-template-columns: 1fr;
  }

  .asset-list-panel {
    position: static;
    max-height: none;
  }
}

.form-tag-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-tag-chips button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  cursor: pointer;
}

.form-tag-chips button.selected {
  border-color: rgba(29, 99, 237, .45);
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(29, 99, 237, .1);
}

.modal p {
  line-height: 1.7;
  color: #475467;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #101827;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .workspace {
    padding: 16px;
  }

  .topbar,
  .topbar-actions,
  .metric-grid,
  .role-workbench-hero,
  .role-workbench-grid,
  .role-workbench-metrics,
  .dashboard-main-grid,
  .dashboard-side-stack,
  .chart-grid,
  .dashboard-layout,
  .two-column,
  .content-split,
  .workbench-grid,
  .task-home-layout,
  .kanban,
  .config-layout,
  .data-center-layout,
  .phone-board,
  .profile-grid,
  .asset-grid,
  .asset-header,
  .asset-browser {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
  }

  .asset-list-panel {
    position: static;
    max-height: none;
  }

  .search-box {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .funnel div {
    width: clamp(260px, var(--w), 100%);
  }

  .dashboard-side-rail {
    position: static;
  }

  .task-alert-list,
  .live-timeline {
    max-height: none;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

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

  .data-table,
  .data-table-wrap .data-table {
    min-width: 0;
  }

  #customerTable thead {
    display: none;
  }

  #customerTable,
  #customerTable tbody,
  #customerTable tr,
  #customerTable td {
    display: block;
    width: 100%;
  }

  #customerTable tr {
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
  }

  #customerTable td {
    padding: 7px 0;
    border-bottom: 0;
  }

  #customerTable td:nth-child(2)::before { content: "阶段："; color: var(--muted); }
  #customerTable td:nth-child(3)::before { content: "等级："; color: var(--muted); }
  #customerTable td:nth-child(4)::before { content: "意向产品："; color: var(--muted); }
  #customerTable td:nth-child(5)::before { content: "负责人："; color: var(--muted); }
  #customerTable td:nth-child(6)::before { content: "最近跟进："; color: var(--muted); }

  .filter-row,
  .panel-actions,
  .topbar-actions,
  .quick-filter-row {
    align-items: stretch;
  }

  .filter-row select,
  .filter-row input,
  .panel-actions button,
  .quick-filter-row button {
    flex: 1 1 145px;
    min-width: 0;
  }

  .panel {
    overflow-x: auto;
  }

  .scenario-grid {
    grid-template-columns: 1fr 1fr;
  }

  .phone-frame {
    max-width: 100%;
  }

  .switch-grid {
    grid-template-columns: 1fr 1fr;
  }

  .moment-form-grid {
    grid-template-columns: 1fr;
  }

  .crud-form-grid {
    grid-template-columns: 1fr;
  }

  .data-summary,
  .data-form {
    grid-template-columns: 1fr;
  }

  .data-main-title {
    display: grid;
  }
}
