/* ==========================================================================
   polish.css — V3 视觉精修层（2026-11）
   目标：更接近成熟企业 BI / 管理后台：清晰层级、留白、统一圆角与阴影、
   在 1224px（小梦仔 iframe）宽度下仍然舒展。只覆盖样式，不改结构。
   ========================================================================== */

:root {
  /* 品牌：深海军蓝 + 香槟金，背景偏冷白 */
  --navy: #0a1a2f;
  --navy-700: #102542;
  --navy-600: #183456;
  --ink: #142239;
  --gold: #c9a45d;
  --gold-strong: #a8843d;
  --gold-soft: #ead9b6;
  --gold-wash: rgba(201, 164, 93, 0.1);
  --bg: #f3f6fb;

  --surface: #ffffff;
  --surface-2: #f8fafd;
  --surface-3: #eef2f8;
  --line: #e4e9f2;
  --line-strong: #d2dae7;

  --text: #142239;
  --text-2: #4f5f78;
  --text-3: #7c8ba3;

  --success: #1f7a55;
  --warn: #b0731b;
  --danger: #b0433c;
  --info: #2a6294;

  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-1: 0 1px 2px rgba(16, 34, 58, 0.04), 0 2px 8px rgba(16, 34, 58, 0.035);
  --shadow-2: 0 2px 6px rgba(16, 34, 58, 0.06), 0 14px 32px rgba(16, 34, 58, 0.08);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --fs-2xs: 10.5px;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-md: 13.5px;
  --fs-lg: 15px;
  --fs-xl: 18px;
  --fs-2xl: 22px;
  --fs-3xl: 28px;

  --appbar-h: 56px;
  --w-nav: clamp(224px, 16.5vw, 250px);
  --w-chat: clamp(360px, 31.5vw, 460px);
  --w-cockpit-min: 420px;
}

body {
  background: var(--bg);
}

/* ---------- 顶栏 ---------- */

.appbar {
  height: var(--appbar-h);
  padding: 0 16px 0 10px;
  gap: 12px;
  background: linear-gradient(90deg, #07162a 0%, #0a1d35 45%, #0d2544 100%);
  border-bottom: 1px solid rgba(201, 164, 93, 0.22);
  box-shadow: 0 1px 0 rgba(201, 164, 93, 0.12), 0 6px 18px rgba(4, 14, 28, 0.18);
}

.brand {
  padding-right: 16px;
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 16px;
  background: linear-gradient(150deg, #e3c88a 0%, var(--gold) 45%, #a8843d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 12px rgba(0, 0, 0, 0.22);
}

.brand-text strong {
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

.brand-text small {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(234, 217, 182, 0.78);
}

.appbar-context {
  font-size: 12.5px;
  gap: 10px;
}

.appbar-context .ctx-ent {
  font-weight: 600;
}

/* ---------- 三栏 ---------- */

.panes {
  background: var(--bg);
}

.pane--nav {
  background: linear-gradient(180deg, #091a30 0%, #0a1c34 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.22);
}

.pane--chat {
  background: #f7f9fd;
  border-right: 1px solid var(--line);
}

/* ---------- 左栏 ---------- */

.ent-card {
  margin: 14px 12px 10px;
  padding: 14px 13px 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.ent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 15px;
  background: linear-gradient(150deg, var(--gold) 0%, #a8843d 100%);
  color: #08182e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ent-name {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ent-meta {
  font-size: 10.5px;
  color: rgba(223, 230, 241, 0.6);
}

.ent-stats {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ent-stat b {
  font-size: 15px;
}

.ent-stat span {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(223, 230, 241, 0.45);
}

.navlist {
  padding: 4px 10px 0;
  gap: 2px;
}

.navitem {
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(223, 230, 241, 0.7);
  gap: 10px;
}

.navitem:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.navitem[aria-pressed="true"] {
  background: linear-gradient(90deg, rgba(201, 164, 93, 0.2), rgba(201, 164, 93, 0.08));
  color: #f4e6c6;
  font-weight: 600;
}

.navitem[aria-pressed="true"]::before {
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 2px;
  background: var(--gold);
}

.navitem .icon {
  width: 17px;
  height: 17px;
  opacity: 0.9;
}

.nav-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 9.5px;
}

.navpanel {
  padding: 4px 14px 16px;
  font-size: 11.5px;
  color: rgba(223, 230, 241, 0.72);
}

.navpanel .np-title {
  margin: 14px 0 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201, 164, 93, 0.78);
}

.navpanel .np-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.5;
}

.navpanel .np-row span:first-child {
  color: rgba(223, 230, 241, 0.42);
  flex: 0 0 auto;
}

.navpanel .np-row span:last-child {
  text-align: right;
  color: rgba(255, 255, 255, 0.78);
  overflow-wrap: anywhere;
}

.nav-foot {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ---------- 中间对话 ---------- */

.chat-head {
  padding: 16px 20px 12px;
  background: #f7f9fd;
  border-bottom: 1px solid var(--line);
}

.chat-title h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.chat-title p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

.chat-head-actions .btn:not(.btn--primary):not(.btn--gold) {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.stages {
  padding: 10px 18px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  gap: 6px;
}

.stage {
  padding: 8px 9px 9px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f7f9fc;
}

.stage:hover {
  background: #f2f6fd;
}

.stage[data-status="active"] {
  background: #fffaf0;
  border-color: rgba(201, 164, 93, 0.38);
  box-shadow: 0 2px 10px rgba(201, 164, 93, 0.12);
}

.stage-idx {
  font-size: 9.5px;
  color: var(--text-3);
  font-weight: 600;
}

.stage-name {
  font-size: 11.5px;
  font-weight: 600;
}

.stage-track {
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: #e9eef6;
}

.stage-fill {
  border-radius: 999px;
}

.chat-log {
  padding: 18px 20px 8px;
  gap: 18px;
  background: #f7f9fd;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 11px;
}

.msg--advisor .msg-avatar {
  background: linear-gradient(150deg, #e3c88a, var(--gold));
  color: #08182e;
  box-shadow: 0 4px 10px rgba(201, 164, 93, 0.28);
}

.msg-meta {
  font-size: 10.5px;
  margin-bottom: 5px;
}

.msg-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.72;
  box-shadow: var(--shadow-1);
}

.msg--advisor .msg-bubble {
  background: #fff;
  border: 1px solid var(--line);
  border-top-left-radius: 4px;
}

.msg--question .msg-bubble {
  background: #fffdf8;
  border: 1px solid rgba(201, 164, 93, 0.32);
  border-left: 3px solid var(--gold);
  border-top-left-radius: 4px;
}

.msg--user .msg-bubble {
  background: linear-gradient(160deg, #16345a, #0d2440);
  border: 0;
  color: #f5f7fb;
  border-top-right-radius: 4px;
  box-shadow: 0 6px 18px rgba(13, 36, 64, 0.2);
}

.msg-bubble .msg-why {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed rgba(201, 164, 93, 0.35);
  font-size: 11.5px;
  color: var(--text-3);
}

.chat-foot {
  padding: 8px 18px 14px;
  background: linear-gradient(180deg, rgba(247, 249, 253, 0) 0%, #f7f9fd 30%);
}

.quick-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.quick-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  font-size: 11.5px;
  box-shadow: var(--shadow-1);
}

.quick-chip:hover {
  border-color: rgba(201, 164, 93, 0.55);
  color: var(--navy);
  background: #fffdf8;
}

.composer {
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-2);
}

.composer:focus-within {
  border-color: rgba(201, 164, 93, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 164, 93, 0.12), var(--shadow-2);
}

.composer-input {
  font-size: 13px;
  padding: 11px 14px 2px;
  min-height: 44px;
}

.composer-hint {
  font-size: 10px;
  color: var(--text-3);
}

.btn--primary {
  background: linear-gradient(160deg, #16345a, #0b2038);
  box-shadow: 0 2px 8px rgba(11, 32, 56, 0.2);
}

.btn--gold {
  background: linear-gradient(160deg, #d8b873, var(--gold));
  color: #16233a;
  box-shadow: 0 2px 8px rgba(201, 164, 93, 0.28);
}

/* ---------- 右栏驾驶舱 ---------- */

.cockpit-head {
  padding: 10px 18px 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.cockpit-tabs {
  gap: 2px;
}

.cockpit-tabs button {
  padding: 8px 12px 9px;
  border-radius: 8px 8px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
}

.cockpit-tabs button:hover {
  color: var(--navy);
  background: #f6f8fc;
}

.cockpit-tabs button[aria-selected="true"] {
  color: var(--navy);
  font-weight: 700;
  background: transparent;
  border-bottom-color: var(--gold);
}

.tab-count {
  font-size: 9.5px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eef2f8;
  color: var(--text-3);
}

.cockpit-tabs button[aria-selected="true"] .tab-count {
  background: rgba(201, 164, 93, 0.16);
  color: var(--gold-strong);
}

.cockpit-meta {
  padding: 5px 0 8px;
  font-size: 10.5px;
  color: var(--text-3);
}

.cockpit-body {
  padding: 16px 18px 22px;
  gap: 14px;
}

.view-head {
  margin-bottom: 2px;
}

.view-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.view-sub {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.65;
  max-width: 62ch;
}

.view-actions .btn:not(.btn--primary):not(.btn--gold) {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.card-head {
  padding: 13px 16px 9px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.card-sub {
  font-size: 10.5px;
  color: var(--text-3);
}

.card-body {
  padding: 4px 16px 15px;
}

.card-foot {
  padding: 10px 16px;
  background: #fbfcfe;
  border-top: 1px solid var(--line);
}

.kpi-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.kpi {
  padding: 12px 13px 11px;
  border-radius: 12px;
  border-color: var(--line);
  box-shadow: none;
  background: linear-gradient(180deg, #fff, #fdfefe);
}

.kpi:hover {
  border-color: rgba(201, 164, 93, 0.45);
  box-shadow: 0 4px 14px rgba(16, 34, 58, 0.06);
}

.kpi-label {
  font-size: 11px;
  color: var(--text-3);
}

.kpi-value {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.kpi-value small {
  font-size: 11px;
}

.kpi-detail {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}

.comp-card .card-body {
  gap: 18px;
  padding: 8px 16px 16px;
}

.comp-ring-wrap {
  width: 118px;
  height: 118px;
}

.comp-center b {
  font-size: 22px;
}

.comp-side-head {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.comp-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 4px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.comp-counts div {
  padding: 8px 6px;
  border-left: 1px solid var(--line);
  background: #fbfcfe;
  text-align: center;
  min-width: 0;
}

.comp-counts span {
  white-space: nowrap;
}

.comp-counts div:first-child {
  border-left: 0;
}

.comp-counts b {
  font-size: 16px;
}

.comp-counts span {
  font-size: 9.5px;
}

.mini-row {
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
}

.mini-row:hover {
  background: #f8fafd;
  border-color: var(--line);
}

.mini-row-title {
  font-size: 12px;
  font-weight: 600;
}

.mini-row-sub {
  font-size: 10.5px;
  color: var(--text-3);
}

.dim-row {
  padding: 5px 0;
}

.dim-name {
  font-size: 11.5px;
}

.dim-count {
  font-size: 10px;
  color: var(--text-3);
}

.chart-box {
  border-radius: 12px;
}

.tbl th {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}

.tbl td {
  font-size: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f8;
}

.tbl tbody tr:hover {
  background: #fbfcfe;
}

.chip {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.badge {
  border-radius: 6px;
}

.callout {
  border-radius: 10px;
  font-size: 12px;
}

.empty {
  border-radius: 12px;
  border-style: dashed;
  background: #fbfcfe;
}

/* 细节：减少 12px 以下的“灰字噪音” */
.meta-item,
.card-sub,
.view-sub,
.kpi-label,
.comp-counts span {
  color: #73829a;
}

/* 让右侧滚动条更轻 */
.cockpit-body::-webkit-scrollbar,
.chat-log::-webkit-scrollbar {
  width: 6px;
}

.cockpit-body::-webkit-scrollbar-thumb,
.chat-log::-webkit-scrollbar-thumb {
  background: #d7deea;
  border-radius: 999px;
}

@media (max-width: 1280px) {
  :root {
    --w-nav: 204px;
    --w-chat: 388px;
  }

  .chat-title h1 {
    font-size: 18px;
  }

  .view-title {
    font-size: 17px;
  }

  .kpi-value {
    font-size: 20px;
  }
}

@media (max-width: 1099.98px) {
  .chat-head {
    padding: 14px 16px 10px;
  }

  .chat-log {
    padding: 16px;
  }
}

/* ---------- 容器查询：驾驶舱窄于 690px 时自动降为单列（小梦仔/侧栏场景） ---------- */

.pane--cockpit {
  container-type: inline-size;
  container-name: cockpit;
}

@container cockpit (max-width: 690px) {
  .ov-top,
  .ov-profile-grid,
  .sim-split,
  .board-grid,
  .scenario-grid,
  .iss-grid,
  .exec-split {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .view-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .view-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .cockpit-tabs button {
    padding: 8px 9px;
    font-size: 12px;
  }

  .cockpit-body {
    padding: 14px 14px 20px;
  }

  .card-head {
    padding: 12px 14px 8px;
  }

  .card-body {
    padding: 2px 14px 14px;
  }

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

  .tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }

  .tbl-wrap .tbl {
    min-width: 700px;
  }

  /* 窄驾驶舱隐藏「评分」列（真实数据下评分通常为空，推演动作保留） */
  .tbl-wrap .tbl th:nth-child(8),
  .tbl-wrap .tbl td:nth-child(8) {
    display: none;
  }

  .tbl-wrap .tbl th,
  .tbl-wrap .tbl td {
    white-space: nowrap;
  }

  .comp-card .card-body {
    flex-direction: row;
    align-items: center;
  }
}

@container cockpit (min-width: 601px) and (max-width: 690px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 左栏：外部资料 · 引用 ---------- */

.np-source {
  padding: 10px 0 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.np-source-head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  justify-content: space-between;
}

.np-source-title {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 550;
  overflow-wrap: anywhere;
}

.np-source-link {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: rgba(201, 164, 93, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-source-excerpt {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.55;
  color: rgba(223, 230, 241, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-source-form {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.np-source-form input,
.np-source-form textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #eef3fb;
  font-size: 11.5px;
  resize: vertical;
}

.np-source-form input::placeholder,
.np-source-form textarea::placeholder {
  color: rgba(223, 230, 241, 0.38);
}

.np-source-form input:focus,
.np-source-form textarea:focus {
  outline: none;
  border-color: rgba(201, 164, 93, 0.6);
  box-shadow: 0 0 0 2px rgba(201, 164, 93, 0.12);
}

.np-btn--primary {
  background: linear-gradient(160deg, #d8b873, var(--gold));
  color: #16233a;
  border: 1px solid transparent;
  font-weight: 600;
}

.np-btn--danger {
  margin-top: 5px;
  color: rgba(255, 160, 150, 0.85);
  border-color: rgba(255, 120, 110, 0.18);
  background: transparent;
}

/* ==========================================================================
   共享决策条：把“当前决策 + 四关进度 + AI 状态”提到对话与驾驶舱之上，
   让对话和全景不再是两个互不相干的区块。
   ========================================================================== */

:root {
  --strip-h: 66px;
}

.workspace-strip {
  flex: 0 0 var(--strip-h);
  height: var(--strip-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: linear-gradient(90deg, #07162a 0%, #0a1e38 52%, #0d2748 100%);
  border-bottom: 1px solid rgba(201, 164, 93, 0.2);
  color: #eef3fb;
  position: relative;
  z-index: 12;
}

.ws-title-wrap {
  width: clamp(220px, 24vw, 340px);
  min-width: 0;
  flex: 0 1 auto;
}

.ws-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 164, 93, 0.85);
}

.ws-title-wrap h1 {
  margin: 1px 0 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-title-wrap p {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(223, 230, 241, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-strip .stages {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-strip .stages::-webkit-scrollbar {
  display: none;
}

.workspace-strip .stage {
  flex: 1 1 0;
  min-width: 74px;
  padding: 6px 8px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.workspace-strip .stage:hover {
  background: rgba(255, 255, 255, 0.08);
}

.workspace-strip .stage-idx {
  font-size: 8.5px;
  color: rgba(201, 164, 93, 0.75);
}

.workspace-strip .stage-name {
  font-size: 10.5px;
  font-weight: 550;
  color: rgba(238, 243, 251, 0.78);
  white-space: nowrap;
}

.workspace-strip .stage-track {
  height: 2px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.workspace-strip .stage-fill {
  background: rgba(201, 164, 93, 0.65);
}

.workspace-strip .stage[data-status="completed"] .stage-fill {
  background: #5fc08d;
}

.workspace-strip .stage[data-status="active"] {
  background: rgba(201, 164, 93, 0.14);
  border-color: rgba(201, 164, 93, 0.42);
}

.workspace-strip .stage[data-status="active"] .stage-name {
  color: #f4e6c6;
}

.workspace-strip .stage-gap-dot {
  top: 4px;
  right: 4px;
}

/* 去掉中栏自己的标题后，对话头部更紧凑，视线上移 */
.chat-head {
  padding: 12px 20px 10px;
}

.chat-title h1 {
  font-size: 15px;
  font-weight: 650;
}

.chat-title p {
  margin-top: 2px;
  font-size: 11px;
}

@media (max-width: 1099.98px) {
  :root {
    --strip-h: 60px;
  }

  .workspace-strip {
    padding: 0 14px;
    gap: 12px;
  }

  .ws-title-wrap {
    width: 200px;
  }

  .ws-title-wrap h1 {
    font-size: 15px;
  }

  .ws-title-wrap p {
    display: none;
  }

  .pane--nav {
    top: calc(var(--appbar-h) + var(--strip-h));
  }
}

@media (max-width: 759.98px) {
  :root {
    --strip-h: 56px;
  }

  .workspace-strip {
    padding: 0 12px;
    gap: 10px;
  }

  .ws-title-wrap {
    width: 132px;
  }

  .ws-kicker {
    display: none;
  }

  .ws-title-wrap h1 {
    font-size: 14px;
  }

  .workspace-strip .stage {
    min-width: 62px;
    padding: 5px 6px;
  }

  .workspace-strip .stage-name {
    font-size: 10px;
  }
}

/* 对话与驾驶舱共享同一张画布：去掉硬分隔，仅保留可拖拽的细线 */
.pane--chat {
  background: var(--bg);
  border-right: 0;
}

.pane--cockpit {
  background: var(--bg);
}

.pane--chat .chat-log,
.pane--chat .chat-head,
.pane--chat .chat-foot {
  background: transparent;
}

.pane--chat .chat-foot {
  background: linear-gradient(180deg, rgba(243, 246, 251, 0), var(--bg) 35%);
}

.resizer {
  background: transparent;
}

.resizer-grip {
  background: #dbe2ee;
}

.np-member {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.np-member .np-btn {
  flex: 0 0 auto;
}

.np-source-form select {
  width: 100%;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #eef3fb;
  font-size: 11.5px;
}

.np-enterprise {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: rgba(238, 243, 251, 0.78);
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}

.np-enterprise:hover {
  background: rgba(255, 255, 255, 0.06);
}

.np-enterprise.is-active {
  background: rgba(201, 164, 93, 0.14);
  border-color: rgba(201, 164, 93, 0.35);
  color: #f4e6c6;
}

.np-enterprise-role {
  flex: 0 0 auto;
  font-size: 9.5px;
  color: rgba(223, 230, 241, 0.5);
}

.np-audit {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.np-audit-action {
  font-size: 11.5px;
  color: rgba(238, 243, 251, 0.85);
}

.np-dec {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 7px;
}

.np-dec.is-archived {
  opacity: 0.72;
}

.np-dec-tag {
  flex: 0 0 auto;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(223, 230, 241, 0.6);
}

.np-dec .np-actions {
  margin-top: 2px;
}

.np-audit-filter {
  display: flex;
  gap: 6px;
  margin: 4px 0 6px;
}

.np-audit-filter select {
  flex: 1;
  min-width: 0;
  padding: 5px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #eef3fb;
  font-size: 11px;
}

.np-audit-filter .np-btn {
  flex: 0 0 auto;
}

.chart-box--sm {
  height: 240px;
}

.chart-radar {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-bubble {
  display: block;
  width: 100%;
  height: 100%;
}

.threshold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px;
}

.threshold-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.threshold-card[data-pass="false"] {
  border-color: rgba(180, 69, 60, 0.35);
  background: #fdf5f4;
}

.threshold-label {
  font-size: 10.5px;
  color: var(--text-3);
}

.threshold-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 3px 0;
}

.threshold-rule {
  font-size: 9.5px;
  color: var(--text-3);
  line-height: 1.5;
}

.np-comment {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.np-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: rgba(238, 243, 251, 0.88);
}

.np-comment-body {
  margin: 3px 0;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(223, 230, 241, 0.7);
  overflow-wrap: anywhere;
}

.fact-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(10, 26, 47, 0.28);
}

.fact-dialog::backdrop {
  background: rgba(8, 22, 42, 0.45);
  backdrop-filter: blur(3px);
}

.fact-dialog-form {
  padding: 16px 18px 14px;
  display: grid;
  gap: 9px;
}

.fact-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

.fact-dialog label {
  display: grid;
  gap: 3px;
  font-size: 11px;
  color: var(--text-3);
}

.fact-dialog input,
.fact-dialog select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.fact-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 3px;
}

.fact-history {
  max-height: 140px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.fact-history-title {
  font-size: 10.5px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.fact-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}

.timeline-list {
  padding: 6px 14px 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.timeline-title {
  font-size: 11.5px;
  color: var(--ink);
  font-weight: 550;
}

.timeline-meta {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 1px;
}

.heatmap-slices {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 10px 10px;
}

.heatmap-slices .btn.is-active {
  border-color: var(--gold);
  color: var(--gold-strong);
}

.settings-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: 86vh;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 0;
  background: #0a1a2f;
  color: #eef3fb;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.4);
}

.settings-dialog::backdrop {
  background: rgba(5, 15, 30, 0.55);
  backdrop-filter: blur(4px);
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.settings-body {
  max-height: calc(86vh - 55px);
  overflow-y: auto;
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  align-items: start;
}

.settings-body .np-section {
  padding-top: 12px;
}

.settings-body .np-note,
.settings-body .np-empty {
  font-size: 10.5px;
}

@media (max-width: 700px) {
  .settings-body {
    grid-template-columns: 1fr;
  }
}

.fact-more {
  margin-top: 6px;
}

.fact-more > summary {
  cursor: pointer;
  font-size: 10.5px;
  color: var(--text-3);
  padding: 5px 0;
}

.fact-more-body {
  margin-top: 5px;
}

.np-report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 8px;
}

.np-report-grid .np-btn {
  text-align: center;
  padding: 6px 4px;
}

.np-menu {
  position: relative;
}

.np-menu > summary {
  list-style: none;
  cursor: pointer;
}

.np-menu > summary::-webkit-details-marker {
  display: none;
}

.np-menu-body {
  display: grid;
  gap: 4px;
  margin-top: 5px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #0d213c;
}

.np-report-group {
  padding-top: 8px;
}

.np-report-history {
  margin: 2px 0 6px;
}

.np-report-history > summary {
  cursor: pointer;
  font-size: 10px;
  color: var(--text-3);
  padding: 3px 0;
}

.np-report-history-body {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 8px;
}

@media (max-width: 760px) {
  .cockpit-tabs {
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  }

  .cockpit-tabs button {
    scroll-snap-align: start;
  }

  .workspace-strip .stages {
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  }
}

@media (max-width: 760px) {
  .cockpit-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    -webkit-mask-image: none;
    mask-image: none;
    width: 100%;
  }

  .cockpit-tabs button {
    flex: 1 1 28%;
    text-align: center;
    scroll-snap-align: none;
  }
}

.dim-row {
  grid-template-columns: 64px minmax(0, 1fr) max-content;
}

.dim-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 决策条：紧凑步骤条，不再用五张大卡片 */
.workspace-strip .stage {
  padding: 4px 4px 3px;
  background: transparent;
  border-color: transparent;
  border-radius: 6px;
}

.workspace-strip .stage:hover {
  background: rgba(255, 255, 255, 0.05);
}

.workspace-strip .stage[data-status="active"] {
  background: rgba(201, 164, 93, 0.12);
  border-color: transparent;
}

.workspace-strip .stage-idx {
  font-size: 8px;
}

.workspace-strip .stage-name {
  font-size: 10px;
}

.workspace-strip .stage-track {
  margin-top: 3px;
}

.workspace-strip .stage[data-locked="true"] {
  opacity: 0.45;
}

.workspace-strip .stage[data-locked="true"] .stage-name {
  text-decoration: line-through dotted;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.profile-strip {
  display: grid;
  grid-template-columns: minmax(210px, 1.1fr) minmax(0, 2.4fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.ps-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ps-id-text {
  min-width: 0;
}

.ps-contact {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--text-3);
}

.ps-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 14px;
  min-width: 0;
}

.ps-cell {
  min-width: 0;
}

.ps-cell-text > span {
  display: block;
  font-size: 9.5px;
  color: var(--text-3);
}

.ps-cell b {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ps-readiness {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--text-2);
  background: var(--surface-3);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .profile-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ps-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ps-side {
    justify-content: flex-start;
  }
}

/* 顶栏：居中品牌，不再放企业名 */
.appbar .brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-right: 0;
  padding-right: 0;
}

@media (max-width: 759.98px) {
  .appbar .brand {
    position: static;
    transform: none;
    margin-left: 2px;
  }
}

/* 企业画像横条：信息铺满一行，避免 3 列小字截断 */
.profile-strip {
  grid-template-columns: minmax(0, 1fr) auto;
}

.profile-strip .ps-identity {
  grid-column: 1;
}

.profile-strip .ps-side {
  grid-column: 2;
}

.profile-strip .ps-facts {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.ps-cell b {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.4;
  word-break: break-word;
}

@media (max-width: 900px) {
  .profile-strip {
    grid-template-columns: 1fr;
  }
  .profile-strip .ps-identity,
  .profile-strip .ps-side,
  .profile-strip .ps-facts {
    grid-column: 1;
  }
  .profile-strip .ps-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 顶栏桌面端不显示汉堡；移动端才显示 */
.appbar .appbar-menu {
  display: none;
}

@media (max-width: 1099.98px) {
  .appbar .appbar-menu {
    display: inline-flex;
  }
}

@media (max-width: 759.98px) {
  .appbar .brand-text {
    display: flex;
  }

  .appbar .brand-text strong {
    font-size: 11px;
  }

  .appbar .brand-text small {
    display: none;
  }

  .workspace-strip .ws-title-wrap {
    width: 100px;
  }

  .workspace-strip .stage {
    min-width: 0;
    padding: 4px 2px 3px;
  }

  .workspace-strip .stage-name {
    font-size: 9px;
  }
}

.ws-progress {
  width: clamp(150px, 18vw, 220px);
  flex: 0 0 auto;
}

.ws-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(223, 230, 241, 0.55);
  margin-bottom: 5px;
}

.ws-progress-head b {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
}

.ws-progress-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.ws-progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-strong), var(--gold));
  transition: width 0.35s var(--ease);
}

@media (max-width: 759.98px) {
  .ws-progress {
    width: 86px;
  }
  .ws-progress-head span {
    display: none;
  }
}

.ent-current {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ent-current span {
  display: block;
  font-size: 9px;
  color: rgba(223, 230, 241, 0.45);
}

.ent-current b {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 550;
  color: rgba(238, 243, 251, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 顶栏品牌：不要 D 图标，中文后接英文 */
.appbar .brand-mark {
  display: none;
}

.appbar .brand-text {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.appbar .brand-text strong {
  font-size: 14px;
}

.appbar .brand-text small {
  font-size: 10px;
}

@media (max-width: 759.98px) {
  .appbar .brand-text {
    gap: 5px;
  }
  .appbar .brand-text strong {
    font-size: 12px;
  }
}

/* 五段进度：每段自带百分比，合起来是一条 100% */
.workspace-strip .stages {
  gap: 3px;
  flex: 1 1 auto;
}

.workspace-strip .stage {
  flex: 1 1 0;
  border-radius: 4px;
  padding: 5px 6px 4px;
}

.workspace-strip .stage-label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.workspace-strip .stage-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-strip .stage-pct {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(223, 230, 241, 0.55);
}

/* 顶栏标题左对齐拉长，不再居中留空 */
.appbar .brand {
  position: static;
  transform: none;
  margin-right: auto;
  padding-left: 4px;
}

.appbar .brand-text strong {
  font-size: 15px;
  letter-spacing: 0.03em;
}

@media (max-width: 759.98px) {
  .appbar .brand {
    margin-right: 0;
  }
  .appbar .brand-text strong {
    font-size: 12px;
  }
}

.ent-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ent-name-row .ent-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-edit {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(223, 230, 241, 0.7);
  font-size: 9px;
  border-radius: 4px;
  padding: 1px 5px;
  cursor: pointer;
}

.ent-contact {
  margin-top: 3px;
  font-size: 10px;
  color: rgba(223, 230, 241, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 五段合成一条连续进度条 */
.workspace-strip .stages {
  gap: 0;
  border-radius: 5px;
  overflow: hidden;
}

.workspace-strip .stage {
  border-radius: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  padding: 5px 8px 4px;
}

.workspace-strip .stage:last-child {
  border-right: 0;
}

.workspace-strip .stage-track {
  border-radius: 0;
  height: 4px;
  margin-top: 4px;
}

/* 顶栏企业信息：与标题同一排，铺满，不再放左栏 */
.appbar-profile {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  flex: 1 1 auto;
  padding-left: 18px;
  margin-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.apf-main {
  min-width: 0;
  max-width: 46%;
}

.apf-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.apf-name-row b {
  font-size: 12.5px;
  font-weight: 550;
  color: rgba(238, 243, 251, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apf-edit {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(223, 230, 241, 0.6);
  font-size: 9px;
  border-radius: 4px;
  padding: 1px 5px;
  cursor: pointer;
}

.apf-meta {
  margin-top: 2px;
  font-size: 10px;
  color: rgba(223, 230, 241, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apf-decision {
  min-width: 0;
  max-width: 48%;
}

.apf-decision span {
  display: block;
  font-size: 9px;
  color: rgba(223, 230, 241, 0.4);
}

.apf-decision b {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(238, 243, 251, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1099.98px) {
  .appbar-profile {
    gap: 10px;
    padding-left: 10px;
  }
  .apf-decision {
    display: none;
  }
  .apf-main {
    max-width: 100%;
  }
}

@media (max-width: 759.98px) {
  .appbar-profile {
    display: none;
  }
}

.apf-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.avatar-choice {
  aspect-ratio: 1;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--avatar-bg) 18%, #fff);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.avatar-choice.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(200, 161, 90, 0.22);
}

.ent-name-row {
  align-items: flex-start;
}

.ent-name-row .ent-name {
  white-space: normal;
  overflow: visible;
  line-height: 1.25;
}

.ent-meta,
.ent-contact {
  white-space: normal;
  line-height: 1.35;
}

/* 经营全景企业卡：更有层次的横向画像 */
.profile-strip {
  position: relative;
  grid-template-columns: minmax(220px, 1.25fr) minmax(320px, 2.4fr) auto;
  gap: 18px;
  padding: 16px 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(200, 161, 90, 0.1), transparent 46%),
    linear-gradient(150deg, #fffdf8 0%, #ffffff 48%, #f8fafc 100%);
  border-color: #e7e2d7;
  box-shadow: 0 10px 30px rgba(16, 34, 58, 0.06);
  overflow: hidden;
}

.ps-orb {
  position: absolute;
  right: -40px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 161, 90, 0.16), transparent 68%);
  pointer-events: none;
}

.ps-identity {
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ps-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.profile-strip .ov-logo {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 24px;
  box-shadow: 0 8px 18px rgba(16, 34, 58, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ps-online {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4faf7f;
  border: 2px solid #fff;
}

.ps-id-text .ov-name {
  font-size: 16px;
  font-weight: 700;
}

.ps-contact {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--text-3);
}

.ps-contact .icon {
  width: 11px;
  height: 11px;
}

.ps-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-top: 0;
  border-top: 0;
  position: relative;
  z-index: 1;
}

.ps-cell {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(216, 222, 232, 0.7);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ps-cell:hover {
  border-color: rgba(200, 161, 90, 0.45);
  box-shadow: 0 5px 14px rgba(16, 34, 58, 0.06);
  transform: translateY(-1px);
}

.ps-icon {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--gold-strong);
  background: rgba(200, 161, 90, 0.12);
}

.ps-icon .icon {
  width: 13px;
  height: 13px;
}

.ps-cell-text {
  min-width: 0;
}

.ps-cell-text span {
  display: block;
  font-size: 9px;
  color: var(--text-3);
}

.ps-cell-text b {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  font-weight: 550;
  color: var(--text);
  line-height: 1.35;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  word-break: break-word;
}

.ps-side {
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  position: relative;
  z-index: 1;
}

.ps-readiness {
  border: 1px solid rgba(200, 161, 90, 0.22);
  background: rgba(200, 161, 90, 0.08);
  color: var(--gold-strong);
  margin-bottom: 2px;
}

@media (max-width: 1100px) {
  .profile-strip {
    grid-template-columns: 1fr auto;
  }
  .profile-strip .ps-facts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .profile-strip {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .profile-strip .ps-identity,
  .profile-strip .ps-side,
  .profile-strip .ps-facts {
    grid-column: 1;
  }
  .profile-strip .ps-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ps-side {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
}

/* 企业画像卡：压缩成头部 + 三列事实，不再悬空 */
.profile-strip {
  display: block;
  position: relative;
  padding: 14px 16px;
}

.ps-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.profile-strip .ps-identity {
  min-width: 0;
}

.profile-strip .ps-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 46%;
}

.profile-strip .ps-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}

.profile-strip .ps-cell {
  padding: 6px 8px;
  border-radius: 8px;
}

.profile-strip .ps-cell-text b {
  font-size: 10px;
}

@media (max-width: 1100px) {
  .profile-strip .ps-side {
    max-width: none;
    justify-content: flex-start;
  }
  .ps-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .profile-strip .ps-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .profile-strip .ps-facts {
    grid-template-columns: 1fr;
  }
  .profile-strip .ps-side {
    width: 100%;
  }
}

.composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.model-link {
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 10px;
  cursor: pointer;
  padding: 2px 4px;
}

.model-link:hover {
  color: var(--gold-strong);
}

.decision-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.chain-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.chain-item:hover {
  border-color: rgba(200, 161, 90, 0.55);
  box-shadow: 0 6px 16px rgba(16, 34, 58, 0.06);
  transform: translateY(-1px);
}

.chain-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--gold-strong);
  background: rgba(200, 161, 90, 0.12);
}

.chain-icon .icon {
  width: 14px;
  height: 14px;
}

.chain-text {
  min-width: 0;
  flex: 1;
}

.chain-text b {
  display: block;
  font-size: 11px;
  color: var(--text);
}

.chain-text em {
  display: block;
  margin-top: 1px;
  font-style: normal;
  font-size: 9px;
  color: var(--text-3);
}

.chain-count {
  flex: 0 0 auto;
  text-align: right;
}

.chain-count b {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}

.chain-count span {
  display: block;
  font-size: 8px;
  color: var(--text-3);
}

.chain-arrow {
  color: var(--text-3);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .decision-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .decision-chain {
    grid-template-columns: 1fr;
  }
}

.decision-chain .chain-item {
  padding: 9px 10px;
  gap: 7px;
}

.decision-chain .chain-text b,
.decision-chain .chain-text em,
.decision-chain .chain-count span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.decision-chain .chain-text b {
  font-size: 10.5px;
}

.decision-chain .chain-count b {
  font-size: 13px;
}

.decision-chain .chain-arrow {
  font-size: 10px;
}

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

@media (max-width: 600px) {
  .decision-chain {
    grid-template-columns: 1fr;
  }
}

/* 顶栏模型入口：明确的功能按钮，不再塞在输入框下面 */
.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid rgba(200, 161, 90, 0.28);
  background: rgba(200, 161, 90, 0.08);
  color: rgba(238, 243, 251, 0.82);
  font-size: 10.5px;
  cursor: pointer;
}

.model-chip:hover {
  border-color: rgba(200, 161, 90, 0.55);
  background: rgba(200, 161, 90, 0.14);
}

.model-chip .icon {
  width: 13px;
  height: 13px;
  color: var(--gold);
}

@media (max-width: 759.98px) {
  .model-chip span {
    display: none;
  }
  .model-chip {
    padding: 0 7px;
  }
}

/* 一条连续彩色进度条：五段颜色，整体 0→100% */
.ws-stage-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.workspace-strip .stages {
  gap: 4px;
}

.workspace-strip .stage {
  padding: 2px 4px;
  border: 0;
  background: transparent;
}

.workspace-strip .stage-label {
  gap: 4px;
}

.workspace-strip .stage-idx {
  font-family: var(--font-mono);
}

.workspace-strip .stage:nth-child(1) .stage-idx { color: #c8a15a; }
.workspace-strip .stage:nth-child(2) .stage-idx { color: #5b8fc7; }
.workspace-strip .stage:nth-child(3) .stage-idx { color: #4fa38a; }
.workspace-strip .stage:nth-child(4) .stage-idx { color: #d08a4e; }
.workspace-strip .stage:nth-child(5) .stage-idx { color: #b45c5c; }

.stage-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.stage-progress-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg,
    rgba(200, 161, 90, 0.18) 0 20%,
    rgba(91, 143, 199, 0.18) 20% 40%,
    rgba(79, 163, 138, 0.18) 40% 60%,
    rgba(208, 138, 78, 0.18) 60% 80%,
    rgba(180, 92, 92, 0.18) 80% 100%);
}

.stage-progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg,
    #c8a15a 0 20%,
    #5b8fc7 20% 40%,
    #4fa38a 40% 60%,
    #d08a4e 60% 80%,
    #b45c5c 80% 100%);
  transition: width 0.35s var(--ease);
}

.stage-progress-pct {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(223, 230, 241, 0.58);
  min-width: 27px;
  text-align: right;
}

.workspace-sync {
  flex: 0 0 auto;
  color: #edc990;
  font-size: 10px;
  white-space: nowrap;
}

.workspace-sync:empty {
  position: absolute;
}

@media (max-width: 759.98px) {
  .stage-progress-pct {
    min-width: 24px;
    font-size: 8px;
  }
}

/* 画像卡：头像/名称/标签/联系人层级与六格对齐 */
.profile-strip .ps-id-text {
  min-width: 0;
}

.profile-strip .ov-name {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.profile-strip .ps-facts {
  grid-auto-rows: minmax(44px, auto);
}

.profile-strip .ps-cell {
  min-height: 44px;
  align-items: center;
}

.profile-strip .ps-cell-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 30px;
}

.profile-strip .ps-cell-text span {
  line-height: 1.2;
}

.profile-strip .ps-cell-text b {
  line-height: 1.35;
}

@media (max-width: 700px) {
  .profile-strip .ps-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-strip .ps-side {
    justify-content: flex-start;
  }
}
