:root {
  --blue: #008dfe;
  --green: #c7fe1d;
  --ink: #10233f;
  --muted: #65748b;
  --paper: #f4f7fb;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(16, 35, 63, 0.12);
  --danger: #dd4b4b;
  --warning: #d89119;
  --yellow: #f9d000;
}

/* v3.06 · direct-manager contract approval */
.contract-stage-track{grid-template-columns:repeat(4,minmax(120px,1fr));padding:18px 7%;overflow:visible}.contract-stage-track::before{left:13%;right:13%;top:36px}.contract-stage-track span.complete{color:#167344}.contract-stage-track span.complete i{background:#dff5e7;color:#167344}.contract-approval-task{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 22px 0;padding:16px 18px;border:1px solid #cfe0ec;border-radius:14px;background:linear-gradient(135deg,#f8fbfd,#edf7fb);box-shadow:0 8px 18px rgba(7,53,91,.07),inset 0 1px #fff}.contract-approval-task.needs-action{border-color:rgba(8,127,206,.36);background:linear-gradient(135deg,#edf8ff,#eefaf5);box-shadow:0 12px 24px rgba(8,127,206,.13),inset 0 1px #fff}.contract-approval-task>div{display:grid;gap:4px;min-width:220px}.contract-approval-task>div>b{color:#123a5a;font-size:16px}.contract-approval-task>div>span{color:#657c8f;line-height:1.55}.contract-approval-task>label{display:grid;flex:1;gap:5px;margin:0;color:#4d6a80;font-size:12px}.contract-approval-task input{width:100%;min-height:44px;box-sizing:border-box}.approval-buttons{display:flex;gap:9px}.contract-record-body{grid-template-columns:repeat(3,minmax(0,1fr))}.contract-record-body>details[open]{grid-column:1/-1}.contract-record-body>details>summary{justify-content:space-between}.contract-governance-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.contract-governance-grid>section{display:grid;align-content:start;gap:12px;padding:14px;border:1px solid #dce7ed;border-radius:12px;background:#f8fbfd}.contract-governance-grid .reminder-form,.contract-governance-grid .risk-form{grid-template-columns:1fr}.readonly-note{grid-column:1/-1;padding:10px 12px;border-radius:9px;background:#eef3f6;color:#657c8f}.contract-record input[readonly],.contract-record textarea[readonly]{background:#f0f4f6;color:#657c8f;box-shadow:inset 0 1px 3px rgba(7,35,61,.05)}
@media(max-width:900px){.contract-record-body{grid-template-columns:1fr 1fr}.contract-approval-task{align-items:stretch;flex-direction:column}.approval-buttons{align-self:flex-start}.contract-governance-grid{grid-template-columns:1fr}}
@media(max-width:600px){.contract-stage-track{grid-template-columns:repeat(4,minmax(98px,1fr));padding:14px 12px;overflow-x:auto}.contract-stage-track::before{display:none}.contract-record-body{grid-template-columns:1fr}.contract-approval-task{margin:14px 14px 0}.approval-buttons{display:grid;width:100%}.approval-buttons button,.contract-approval-task>button{width:100%}.contract-record>footer span+span{padding-left:0;border-left:0}}

/* v3.06 final cascade · HTML2 contract lifecycle disclosure controls. */
.contract-record-body{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:start}
.contract-record-body>details{padding:0;overflow:hidden;border-radius:14px;background:linear-gradient(180deg,#fff 0%,#f6fafd 100%);box-shadow:0 8px 17px rgba(7,53,91,.08),0 3px 7px rgba(7,53,91,.05),inset 0 1px #fff;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.contract-record-body>details:hover:not([open]){border-color:#a9cee7;box-shadow:0 11px 21px rgba(7,53,91,.11),0 4px 8px rgba(7,53,91,.06),inset 0 1px #fff;transform:translateY(-1px)}
.contract-record-body>details>summary{position:relative;justify-content:flex-start;min-height:58px;width:100%;padding:0 60px 0 20px;line-height:1.35;user-select:none}
.contract-record-body>details>summary::before{position:absolute;top:9px;right:8px;bottom:9px;width:42px;border-left:1px solid rgba(8,127,206,.16);border-radius:0 9px 9px 0;background:linear-gradient(180deg,#f8fcff,#eaf5fc);box-shadow:inset 1px 0 rgba(255,255,255,.85);content:""}
.contract-record-body>details>summary::after{right:21px;font-size:20px;line-height:1}
.contract-record-body>details>summary:focus-visible{z-index:1;outline:3px solid rgba(8,141,254,.28);outline-offset:-3px;border-radius:12px}
.contract-record-body>details[open]{grid-column:1/-1;background:#fff;box-shadow:0 14px 28px rgba(7,53,91,.12),0 5px 11px rgba(7,53,91,.07),inset 0 1px #fff}
.contract-record-body>details[open]>summary{min-height:62px;border-bottom:1px solid rgba(8,127,206,.16);background:linear-gradient(180deg,#fbfdff,#eef7fc)}
.contract-record-body>details>summary+div{margin:16px 18px 18px;padding:20px;border:1px solid #e0eaf1;border-radius:12px;background:#fbfdfe;box-shadow:inset 0 2px 6px rgba(7,53,91,.045),0 4px 9px rgba(7,53,91,.04)}
.contract-record-body>details>summary+.contract-terms,.contract-record-body>details>summary+.signature-form,.contract-record-body>details>summary+.activation-form{column-gap:18px;row-gap:16px}
.contract-record-body>details>summary+div>label{gap:7px}
@media(max-width:1180px){.contract-record-body{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.contract-record-body{grid-template-columns:1fr}.contract-record-body>details[open]{grid-column:1}.contract-record-body>details>summary{min-height:56px;padding-left:17px}.contract-record-body>details>summary+div{margin:14px;padding:16px}}
@media(prefers-reduced-motion:reduce){.contract-record-body>details{transition:none}}
* {
  box-sizing: border-box;
}
button,
input,
select,
textarea {
  font: inherit;
}
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(
      circle at 10% 0%,
      rgba(0, 141, 254, 0.14),
      transparent 28rem
    ),
    linear-gradient(135deg, #f7f9fc, #eef5fa);
  font-family: Inter, "Noto Sans SC", Arial, sans-serif;
  min-height: 100vh;
}
.shell {
  width: min(1920px, 100%);
  margin: 0 auto;
  padding: 28px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}
.eyebrow {
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
h1 {
  margin: 0.35rem 0 0;
  font-size: 32px;
  font-weight: 700;
}
.subtitle {
  color: var(--muted);
  margin: 0.5rem 0 0;
}
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(199, 254, 29, 0.18);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.sales-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(23, 50, 83, 0.07);
}
.metric {
  padding: 18px;
  min-height: 118px;
  position: relative;
  overflow: hidden;
}
.metric::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}
.metric-label {
  color: var(--muted);
  font-size: 13px;
}
.metric-value {
  font-size: 34px;
  font-weight: 700;
  margin-top: 16px;
}
.grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  margin-top: 16px;
}
.panel {
  padding: 20px;
  min-height: 350px;
}
.table-panel {
  min-width: 0;
}
.event-panel {
  margin-top: 0;
  min-height: 0;
}
/* min-height:0 remains the compact compatibility contract for activity panels. */
.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.panel h2 {
  margin: 0 0 14px;
  font-size: 17px;
}
table {
  width: 100%;
  min-width: 1540px;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  color: var(--muted);
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
}
td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(16, 35, 63, 0.07);
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9fbfd;
  white-space: nowrap;
}
.company {
  min-width: 170px;
  font-weight: 700;
}
.health-index-btn {
  display: block;
  margin-top: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(0, 141, 254, 0.2);
  border-radius: 999px;
  background: rgba(0, 141, 254, 0.07);
  color: #006fc9;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.health-index-btn:hover {
  background: rgba(199, 254, 29, 0.24);
  border-color: rgba(126, 166, 0, 0.35);
}
.stage-cell {
  width: 1%;
  min-width: 92px;
  white-space: nowrap;
}
.narrative {
  min-width: 260px;
  line-height: 1.65;
  vertical-align: top;
}
.assign-control {
  display: flex;
  gap: 6px;
  min-width: 200px;
}
.assign-control select {
  min-width: 120px;
  padding: 8px;
}
.owner-label {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.source-label {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
  white-space: nowrap;
}
button.small {
  padding: 8px 11px;
  border-radius: 9px;
  white-space: nowrap;
}
button.ghost {
  color: #006fc9;
  background: rgba(0, 141, 254, 0.09);
  padding: 8px 10px;
  border: 1px solid rgba(0, 141, 254, 0.15);
  white-space: nowrap;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.history-row td {
  background: rgba(0, 141, 254, 0.035);
  padding: 0;
}
.history-content {
  padding: 16px 22px;
}
.facts-content {
  padding: 20px 22px;
}
.files-content {
  padding: 16px 22px;
}
.timeline {
  display: grid;
  gap: 12px;
}
.timeline article {
  border-left: 3px solid var(--blue);
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  gap: 7px;
  line-height: 1.55;
}
.timeline-date {
  color: #006fc9;
  font-weight: 700;
}
.compact {
  padding: 18px;
}
.badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0, 141, 254, 0.09);
  color: #006fc9;
  font-size: 11px;
}
.stage-cell .badge {
  white-space: nowrap;
}
.priority-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}
.management-due,
.activity-panel {
  margin-top: 16px;
  min-height: 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.attention-chip {
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  color: #8a5500;
  background: rgba(249, 208, 0, 0.18);
  font-size: 11px;
  font-weight: 800;
}
.panel-note {
  color: var(--muted);
  font-size: 12px;
  margin: -6px 0 14px;
}
.overdue-list,
.organization {
  display: grid;
  gap: 9px;
  max-height: 380px;
  overflow: auto;
}
.overdue-item {
  background: rgba(216, 145, 25, 0.08);
  border-left: 3px solid var(--warning);
  padding: 12px;
  border-radius: 8px;
}
.overdue-item > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.overdue-item em {
  color: #8a5500;
  background: rgba(249, 208, 0, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.overdue-item span,
.overdue-item p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin: 5px 0 0;
}
.overdue-open {
  width: 100%;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.overdue-open > i {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}
.overdue-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.overdue-pager > span {
  color: var(--muted);
  font-size: 11px;
}
.overdue-pager > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.overdue-pager button {
  padding: 7px 10px;
}
.chart-legend {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.legend-visit {
  background: var(--blue);
}
.legend-close {
  background: var(--yellow);
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 14px;
  align-items: start;
}
.activity-card {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(
    145deg,
    #fff 0%,
    #f7fbff 70%,
    rgba(199, 254, 29, 0.08) 100%
  );
  box-shadow: 0 10px 30px rgba(18, 55, 91, 0.05);
}
.activity-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}
.activity-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.activity-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.activity-card header span,
.activity-card header small {
  color: var(--muted);
  font-size: 11px;
}
.activity-rollups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.activity-rollups span {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: baseline;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid rgba(0,141,254,.16);
  border-radius: 12px;
  background: linear-gradient(155deg,#fff,#eef7fd);
  box-shadow: 0 12px 22px -14px rgba(18,55,91,.7),0 5px 10px -7px rgba(18,55,91,.28),inset 0 1px #fff;
}
.activity-rollups span.week { background: linear-gradient(155deg,#fff,#f5fae9);border-color:rgba(116,153,12,.17); }
.activity-rollups b { color: var(--blue);font-size:20px;font-variant-numeric:tabular-nums; }
.activity-rollups span.close b { color:#a97800; }
.activity-rollups small { color:var(--muted);font-size:10px;white-space:nowrap; }
.activity-account-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}
.activity-account-kpis span {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(0, 141, 254, 0.06);
}
.activity-account-kpis b {
  color: #12385f;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.activity-account-kpis small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.activity-coaching {
  margin-top: 11px;
  border: 1px solid rgba(0, 141, 254, 0.15);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
}
.activity-coaching summary {
  padding: 10px 12px;
  color: #006fc9;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.activity-coaching[open] summary {
  border-bottom: 1px solid var(--line);
}
.personal-coaching-panel {
  margin: 16px 0;
}
.personal-coaching-panel h2 {
  margin: 0 0 8px;
}
.coaching-center {
  display: grid;
  gap: 14px;
}
.compact-coaching {
  padding: 12px;
}
.coach-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.coach-summary span {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(0, 141, 254, 0.06);
  color: var(--muted);
  font-size: 11px;
}
.coach-summary span b {
  color: #12385f;
  font-size: 16px;
}
.coach-summary > em {
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(249, 208, 0, 0.18);
  color: #805500;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.capability-list {
  display: grid;
  gap: 7px;
}
.capability-row {
  display: grid;
  grid-template-columns: 92px minmax(90px, 1fr) 40px;
  gap: 9px;
  align-items: center;
  font-size: 11px;
}
.capability-row > span {
  color: #344a62;
  font-weight: 700;
}
.capability-row > progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #e8eef5;
  appearance: none;
}
.capability-row > progress::-webkit-progress-bar {
  border-radius: 99px;
  background: #e8eef5;
}
.capability-row > progress::-webkit-progress-value {
  border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow), var(--green), var(--blue));
}
.capability-row > progress::-moz-progress-bar {
  border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow), var(--green), var(--blue));
}
.capability-row > b {
  text-align: right;
  color: var(--muted);
}
.coach-priorities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.coach-priority {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.coach-priority header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 7px;
  align-items: center;
}
.coach-priority header span {
  color: #805500;
  font-size: 10px;
  font-weight: 800;
}
.coach-priority header b {
  font-size: 13px;
}
.coach-priority header em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.coach-priority p {
  margin: 8px 0;
  color: #3c5068;
  font-size: 11px;
  line-height: 1.65;
}
.coach-priority small {
  display: block;
  color: var(--muted);
  line-height: 1.55;
}
.coach-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.coach-sources {
  color: var(--muted);
  font-size: 10px;
}
.coach-sources a {
  color: #006fc9;
}
.compact-coaching .coach-priorities {
  grid-template-columns: 1fr;
}
.compact-coaching .coach-priority:nth-child(n + 3) {
  display: none;
}
.compact-coaching .coach-sources {
  display: none;
}
.route-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 141, 254, 0.11);
  border-radius: 12px;
  background: rgba(0, 141, 254, 0.035);
}
.route-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.route-search-form {
  display: flex;
  align-items: center;
  gap: 7px;
  width: auto;
  max-width: none;
}
.route-search-form input {
  width: clamp(190px, 20vw, 320px);
  padding: 8px 10px;
}
.route-search-form button { padding: 8px 12px; }
.route-toolbar select {
  min-width: 140px;
  padding: 8px 30px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.route-progress-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(199, 254, 29, 0.24);
  color: #315200;
  font-size: 12px;
  white-space: nowrap;
}
.route-progress-chip b {
  font-size: 15px;
}
.route-pager,
.record-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.route-footer-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.route-footer-pager .route-pager { margin-left: 0; }
.route-pager button,
.record-pager button {
  padding: 7px 10px;
}
.route-pager b,
.record-pager span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.record-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  color: var(--ink);
  background: none;
  text-align: left;
}
.record-toggle span {
  display: grid;
  gap: 4px;
}
.record-toggle b {
  font-size: 18px;
}
.record-toggle small {
  color: var(--muted);
  font-weight: 500;
}
.record-toggle strong {
  color: var(--blue);
  white-space: nowrap;
}
.record-panel { min-height: 0; }
.record-toggle-state {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 9px;
}
.record-toggle-state em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}
.record-toggle-state i {
  color: var(--blue);
  font-size: 18px;
  font-style: normal;
  transition: transform .18s ease;
}
.record-toggle[aria-expanded="true"] .record-toggle-state i { transform: rotate(180deg); }
.legacy-data-badge {
  display: block;
  width: max-content;
  margin-top: 6px;
  padding: 3px 7px;
  border: 1px solid rgba(169,120,0,.2);
  border-radius: 999px;
  background: rgba(255,193,7,.12);
  color: #805500;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.legacy-data-badge.activated {
  border-color: rgba(0,141,254,.18);
  background: rgba(0,141,254,.08);
  color: #0066ad;
}
.performance-note.excluded { color: #8a5b00; }
.performance-note.included { color: #08745a; }
.record-panel:has(> div:not([hidden])) {
  grid-column: 1/-1;
}
.record-panel > div {
  margin-top: 16px;
}
.record-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  max-width: 420px;
}
.record-pager {
  justify-content: flex-end;
  margin-top: 12px;
}
.week-bars {
  height: 104px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 5px;
  margin: 13px 0 7px;
  padding: 8px 6px 0;
  border-radius: 11px;
  background: rgba(0, 141, 254, 0.035);
}
.chart-scale-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}
.week-chart {
  position: relative;
  padding-left: 24px;
}
.absolute-axis {
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted-soft);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.week-chart .week-bars {
  margin-top: 4px;
}
.day-bars {
  height: 92px;
  display: grid;
  grid-template-rows: 60px auto auto;
  justify-items: center;
  align-items: end;
  gap: 2px;
}
.bar-pair {
  width: 22px;
  height: 60px;
  overflow: visible;
}
.bar-pair rect {
  rx: 3px;
}
.visit-bar {
  fill: var(--blue);
}
.close-bar {
  fill: var(--yellow);
}
.day-bars small {
  color: var(--muted);
  font-size: 9px;
}
.day-bars b {
  font-size: 9px;
  color: #52627a;
}
.month-line {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.line-caption {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.month-line svg {
  width: 100%;
  height: 76px;
  margin-top: 5px;
  overflow: visible;
}
.month-line line {
  stroke: rgba(16, 35, 63, 0.12);
  stroke-width: 1;
}
.month-line text {
  fill: var(--muted-soft);
  font-size: 8px;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}
.month-line .grid-line {
  stroke: rgba(16, 35, 63, 0.1);
  stroke-dasharray: 3 4;
}
.month-line polyline {
  fill: none;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visit-line {
  stroke: var(--blue);
}
.close-line {
  stroke: var(--yellow);
}
.org-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 150px auto auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
}
.org-row span small,
.file-list small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.org-row select {
  padding: 8px;
}
.file-list {
  display: grid;
  gap: 8px;
}
.file-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.file-list > div.is-archived { opacity: .72; background: #f4f6f8; }
.file-list > div > div { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.contract-management-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.contract-management-summary article{display:flex;align-items:baseline;gap:6px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f5f9fc}.contract-management-summary small{display:block;margin-right:auto;color:var(--muted)}.contract-management-summary strong{font-size:24px;color:var(--blue)}.contract-flow-note{display:grid;gap:5px;margin:12px 0 16px;padding:13px 15px;border-left:4px solid var(--blue);border-radius:10px;background:#edf7ff}.contract-flow-note span{color:var(--muted)}.deal-custom-workflow{display:grid;grid-template-columns:1fr 180px auto;gap:10px;margin:12px 0}.deal-custom-workflow label{margin:0}.deal-custom-workflow>button{align-self:end;min-height:42px}.deal-custom-workflow-list{grid-column:1/-1;display:grid;gap:8px}.deal-custom-workflow-list>div{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fff}.deal-custom-workflow-list span{display:grid}.preview-linked-contract{margin-left:8px}@media(max-width:760px){.contract-management-summary{grid-template-columns:repeat(2,1fr)}.deal-custom-workflow{grid-template-columns:1fr}.deal-custom-workflow-list{grid-column:1}.deal-custom-workflow-list>div{grid-template-columns:1fr auto}.preview-linked-contract{margin:8px 0 0}}
.customer-contract-lifecycle{display:grid;gap:14px;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.contract-lifecycle-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.contract-lifecycle-head>div{display:grid;gap:5px}.contract-lifecycle-head>b,.contract-lifecycle-head div>b{font-size:18px}.contract-lifecycle-head span{color:var(--muted)}.contract-lifecycle-head em{white-space:nowrap;padding:7px 11px;border-radius:999px;background:#eaf5ff;color:var(--blue);font-style:normal;font-weight:700}.contract-empty{display:grid;gap:5px;padding:20px;border:1px dashed #a9c8df;border-radius:14px;background:#f7fbff}.contract-empty span{color:var(--muted)}.contract-record{overflow:hidden;border:1px solid #cfe0ec;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(18,72,110,.06)}.contract-record>header{display:flex;justify-content:space-between;gap:16px;padding:18px;background:linear-gradient(135deg,#f7fbff,#effaf7)}.contract-record>header>div{display:grid;gap:4px;min-width:0}.contract-record>header span,.contract-record>header small{color:var(--muted);overflow-wrap:anywhere}.contract-record>header b{font-size:17px}.contract-status{align-self:flex-start;white-space:nowrap;padding:7px 11px;border-radius:999px;background:#edf2f6;color:#486270}.contract-status.status-approved,.contract-status.status-signed,.contract-status.status-effective{background:#e6f8ed;color:#167344}.contract-status.status-terminated,.contract-status.status-expired{background:#fff0ef;color:#a23a32}.contract-stage-track{display:grid;grid-template-columns:repeat(8,minmax(88px,1fr));gap:6px;overflow-x:auto;padding:12px 18px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.contract-stage-track span{white-space:nowrap;padding:7px 8px;border-radius:8px;background:#f2f5f7;color:#72818b;font-size:12px;text-align:center}.contract-stage-track span.current{background:var(--blue);color:#fff;font-weight:700}.contract-record details{padding:0 18px;border-bottom:1px solid var(--line)}.contract-record summary{cursor:pointer;padding:14px 0;font-weight:700}.contract-record details>div{margin:0 0 16px}.contract-snapshot{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.contract-snapshot pre{max-height:280px;overflow:auto;margin:0;padding:12px;border-radius:10px;background:#172530;color:#dbeaf2;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.contract-diff,.approval-list,.reminder-list,.risk-list{display:grid;gap:8px}.contract-diff p,.approval-list p,.reminder-list p,.risk-list p{display:grid;gap:4px;margin:0;padding:10px;border:1px solid var(--line);border-radius:10px}.contract-diff del{color:#a23a32}.contract-diff ins{color:#167344;text-decoration:none}.contract-terms,.signature-form,.activation-form,.reminder-form,.risk-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.contract-terms label,.signature-form label,.activation-form label{display:grid;gap:5px;margin:0}.contract-terms textarea{min-height:84px;resize:vertical}.contract-terms button,.signature-form button,.activation-form button{align-self:end}.contract-actions,.termination{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:14px 18px}.contract-actions input,.termination input{min-width:240px;flex:1}.danger-outline{border-color:#da6f67!important;color:#a23a32!important;background:#fff!important}.reminder-form{grid-template-columns:160px 220px minmax(180px,1fr) auto}.risk-form{grid-template-columns:120px minmax(150px,.5fr) minmax(220px,1fr) auto}.reminder-list p,.risk-list p{grid-template-columns:minmax(0,1fr) auto;align-items:center}.reminder-list p span,.risk-list p span{grid-column:1/-1;color:var(--muted)}.reminder-list p.completed{opacity:.62}.risk-list .severity-critical,.risk-list .severity-high{border-left:4px solid #d24b43}.risk-list .severity-medium{border-left:4px solid #e6a800}.risk-list .severity-low{border-left:4px solid #47a76f}.contract-record>footer{padding:12px 18px;background:#f7f9fa;color:var(--muted);font-size:13px}@media(max-width:900px){.contract-snapshot{grid-template-columns:1fr}.reminder-form,.risk-form{grid-template-columns:1fr 1fr}.reminder-form button,.risk-form button{justify-self:start}}@media(max-width:600px){.contract-lifecycle-head,.contract-record>header{display:grid}.contract-status{justify-self:start}.contract-terms,.signature-form,.activation-form,.reminder-form,.risk-form{grid-template-columns:1fr}.contract-actions,.termination{align-items:stretch}.contract-actions>*,.termination>*{width:100%;min-width:0}.contract-management-summary{grid-template-columns:1fr 1fr}}
.file-list-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }

/* 客户文件 HTML2：创建、编辑、生命周期与文件库使用分层任务架构。 */
.customer-file-creators{display:grid;gap:20px}.customer-files-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px;border:1px solid rgba(8,127,206,.15);border-radius:18px;background:linear-gradient(135deg,#f7fbff 0%,#edf7fc 65%,#f7fce9 100%);box-shadow:0 16px 34px rgba(7,53,91,.11),0 5px 10px rgba(7,53,91,.06),inset 0 1px #fff}.customer-files-hero>div{display:grid;gap:6px}.customer-files-hero>div>span,.section-heading>div>span,.contract-lifecycle-head>div>span{color:#087fce;font-size:10px;font-weight:800;letter-spacing:.14em}.customer-files-hero h3,.section-heading h3{margin:0;color:#102c45;font-size:24px;font-weight:430}.customer-files-hero p,.section-heading p{margin:0;color:#657c8f;line-height:1.6}.customer-files-hero em{padding:8px 11px;border:1px solid rgba(8,127,206,.14);border-radius:999px;background:#fff;color:#4d6a80;box-shadow:0 6px 12px rgba(7,53,91,.09),inset 0 1px #fff;font-size:11px;font-style:normal;white-space:nowrap}.contract-management-summary{margin:0}.contract-management-summary article{min-height:70px;padding:15px 16px;background:linear-gradient(180deg,#fff,#f2f8fb);box-shadow:0 10px 20px rgba(7,53,91,.08),0 3px 6px rgba(7,53,91,.05),inset 0 1px #fff}.document-create-section,.customer-file-library{display:grid;gap:14px;padding:20px;border:1px solid rgba(9,44,76,.1);border-radius:18px;background:rgba(255,255,255,.92);box-shadow:0 16px 34px rgba(7,35,61,.09),0 5px 10px rgba(7,35,61,.05),inset 0 1px #fff}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.section-heading>div{display:grid;gap:4px}.section-heading h3{font-size:20px}.section-heading p{font-size:12px;text-align:right}.document-create-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.document-create-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;min-height:144px;padding:16px;border:1px solid #d5e3ed;border-radius:15px;background:linear-gradient(145deg,#fff,#f5f9fc);box-shadow:0 9px 18px rgba(7,53,91,.08),0 3px 6px rgba(7,53,91,.05),inset 0 1px #fff}.document-create-card.primary{border-color:rgba(8,127,206,.28);background:linear-gradient(145deg,#f7fcff,#eaf6fd)}.document-create-card>.document-type{display:grid;place-items:center;width:42px;height:42px;border:1px solid rgba(8,127,206,.16);border-radius:12px;background:linear-gradient(180deg,#fff,#eaf4fa);box-shadow:0 7px 14px rgba(7,53,91,.12),inset 0 1px #fff;color:#087fce;font-size:11px;font-weight:800}.document-create-card>span{display:grid;align-content:start;gap:5px;min-width:0}.document-create-card>span>b{font-size:15px}.document-create-card>span>small{color:#657c8f;line-height:1.55}.document-create-card>button{grid-column:1/-1;align-self:end;justify-self:stretch;min-height:44px}.customer-file-quote-builder{scroll-margin-top:18px}.customer-file-quote-builder[hidden]{display:none}.customer-file-quote-builder .deal-desk-quote{padding:0;overflow:hidden;border-color:rgba(8,127,206,.2);background:#fff;box-shadow:0 20px 44px rgba(7,53,91,.14),0 7px 14px rgba(7,53,91,.07),inset 0 1px #fff}.quote-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 24px;background:linear-gradient(135deg,#0b365d,#126b9d);color:#fff}.quote-editor-head>div{display:grid;gap:5px}.quote-editor-head span{color:#9edcf2;font-size:10px;font-weight:800;letter-spacing:.13em}.quote-editor-head h3{margin:0;color:#fff;font-size:22px;font-weight:430}.quote-editor-head p{margin:0;color:rgba(235,247,255,.78);line-height:1.6}.quote-editor-head em{padding:8px 11px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(255,255,255,.1);font-size:11px;font-style:normal;white-space:nowrap}.quote-editor-section{padding:20px 24px;border-bottom:1px solid rgba(9,44,76,.09)}.quote-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:18px;margin-bottom:12px}.quote-section-title b{color:#163d5f;font-size:15px}.quote-section-title span{color:#71869a;font-size:11px}.deal-desk-quote label{margin-top:0}.deal-offers{grid-template-columns:repeat(2,minmax(0,1fr))}.deal-offers label{min-height:68px;background:linear-gradient(180deg,#fff,#f7fafc);box-shadow:0 7px 14px rgba(7,53,91,.06),inset 0 1px #fff}.deal-offers label:has(input:checked),.deal-support label:has(input:checked){border-color:rgba(8,127,206,.4);background:#eef8ff;box-shadow:0 9px 17px rgba(8,127,206,.12),inset 0 1px #fff}.deal-offers input,.deal-support input{min-width:18px;min-height:18px}.deal-support{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.deal-support label{display:grid;grid-template-columns:auto 1fr;gap:5px 8px;min-height:58px;padding:12px;border:1px solid #d5e2ed;background:linear-gradient(180deg,#fff,#f5f9fc);box-shadow:0 7px 14px rgba(7,53,91,.06),inset 0 1px #fff}.deal-support label strong{grid-column:2;color:#163d5f}.deal-quote-meta{grid-template-columns:1.3fr .8fr .55fr .65fr}.deal-custom-workflow input,.deal-quote-meta input,.contract-record input,.contract-record select{min-height:46px;box-sizing:border-box;box-shadow:inset 0 2px 5px rgba(7,35,61,.07),0 4px 9px rgba(7,53,91,.05)}.deal-budget-result{margin:18px 24px 12px;padding:18px 20px;border:1px solid rgba(8,127,206,.12);box-shadow:0 10px 20px rgba(7,53,91,.08),inset 0 1px #fff}.quote-preview-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 24px}.quote-preview-actions button{width:100%;min-height:48px;margin:0}.deal-desk-status{margin:10px 24px 20px;text-align:center}.customer-contract-lifecycle{margin-top:0;padding:20px;border:1px solid rgba(9,44,76,.1);border-radius:18px;background:rgba(255,255,255,.92);box-shadow:0 16px 34px rgba(7,35,61,.09),0 5px 10px rgba(7,35,61,.05),inset 0 1px #fff}.contract-lifecycle-head>div>small{color:#657c8f;line-height:1.55}.contract-empty{min-height:92px;align-content:center;border-style:solid;background:linear-gradient(145deg,#f8fbfd,#eef7fc);box-shadow:inset 0 2px 6px rgba(7,53,91,.05)}.contract-record summary{position:relative;list-style:none;padding-right:32px}.contract-record summary::-webkit-details-marker{display:none}.contract-record summary::after{content:"＋";position:absolute;right:2px;top:50%;transform:translateY(-50%);color:#087fce;font-size:18px}.contract-record details[open]>summary::after{content:"−"}.customer-file-library{margin-top:20px}.customer-document-list>div{min-height:66px;padding:12px 14px;border-radius:12px;box-shadow:0 8px 16px rgba(7,53,91,.06),inset 0 1px #fff}.customer-document-list>div>span{display:flex;align-items:center;gap:12px;min-width:0}.customer-document-list>div>span>em{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:10px;background:#eaf5fb;color:#087fce;font-size:10px;font-style:normal;font-weight:800}.customer-document-list>div>span>span{min-width:0}.customer-document-list b{overflow-wrap:anywhere}.file-list-controls{margin:0;padding:10px 12px;border-radius:11px;background:#f3f7fa}.file-list-controls button{min-height:40px}
@media(max-width:1050px){.document-create-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.deal-offers{grid-template-columns:1fr}.deal-quote-meta{grid-template-columns:1fr 1fr}.deal-support{grid-template-columns:1fr}.deal-custom-workflow{grid-template-columns:1fr 180px}.deal-custom-workflow>button{grid-column:1/-1;justify-self:start}}
@media(max-width:700px){.customer-files-hero,.section-heading,.quote-editor-head,.quote-section-title,.file-list-controls{align-items:flex-start;flex-direction:column}.section-heading p{text-align:left}.document-create-grid,.deal-quote-meta,.quote-preview-actions{grid-template-columns:1fr}.document-create-card{min-height:132px}.contract-management-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-editor-section,.quote-editor-head{padding:18px}.deal-budget-result{align-items:flex-start;flex-direction:column;margin:16px 18px 10px}.deal-budget-result small{margin-left:0}.quote-preview-actions{padding:0 18px}.deal-desk-status{margin:10px 18px 18px;text-align:left}.deal-custom-workflow{grid-template-columns:1fr}.customer-document-list>div{align-items:flex-start;flex-direction:column}.customer-document-list>div>div{width:100%;justify-content:flex-start}.customer-document-list>div>div button{flex:1}.customer-file-library,.document-create-section,.customer-contract-lifecycle{padding:16px}}

/* v3.04：合同版本卡从全宽长表单改为有界、分组的治理工作台。 */
.contract-lifecycle-head,.contract-record,.contract-empty{width:min(100%,1440px);margin-inline:auto}.contract-record{display:block}.contract-record>header{padding:20px 22px}.contract-stage-track{position:relative;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0;padding:16px 22px;background:#fbfdff}.contract-stage-track::before{position:absolute;top:34px;left:6.5%;right:6.5%;height:2px;background:#dbe6ee;content:""}.contract-stage-track span{position:relative;z-index:1;display:grid;justify-items:center;gap:5px;padding:0 4px;background:transparent;color:#6d8090;font-size:11px}.contract-stage-track span i{display:grid;place-items:center;width:32px;height:32px;border:4px solid #fbfdff;border-radius:50%;background:#e6edf2;box-shadow:0 3px 8px rgba(7,53,91,.1);font-size:11px;font-style:normal}.contract-stage-track span.current{background:transparent;color:#087fce;font-weight:800}.contract-stage-track span.current i{background:#1689e5;color:#fff;box-shadow:0 5px 13px rgba(8,127,206,.28)}.contract-record-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px 22px;background:#f6f9fb}.contract-record-body>details{min-width:0;padding:0 16px;border:1px solid #d8e4ec;border-radius:12px;background:linear-gradient(180deg,#fff,#f8fbfd);box-shadow:0 7px 15px rgba(7,53,91,.07),inset 0 1px #fff}.contract-record-body>details>summary{min-height:52px;box-sizing:border-box;display:flex;align-items:center;padding-top:12px;padding-bottom:12px;color:#176eb4}.contract-record-body>details[open]{grid-column:1/-1;border-color:rgba(8,127,206,.3);box-shadow:0 11px 23px rgba(7,53,91,.1),inset 0 1px #fff}.contract-record-body>.contract-actions,.contract-record-body>.termination{grid-column:1/-1;margin:0;padding:14px 16px;border:1px solid rgba(8,127,206,.15);border-radius:12px;background:#edf7fd;box-shadow:0 7px 15px rgba(7,53,91,.07),inset 0 1px #fff}.contract-record-body>.contract-actions:empty{display:none}.contract-record>footer{display:flex;align-items:center;gap:10px 24px;flex-wrap:wrap;padding:13px 22px}.contract-record>footer span{display:inline-flex;color:#657c8f}.contract-record>footer span+span{padding-left:24px;border-left:1px solid #d6e1e8}
@media(max-width:900px){.contract-record-body{grid-template-columns:1fr}.contract-record-body>details[open]{grid-column:1}.contract-stage-track{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:14px}.contract-stage-track::before{display:none}.contract-stage-track span i{width:30px;height:30px}}
@media(max-width:560px){.contract-record>header,.contract-record-body,.contract-stage-track{padding-left:14px;padding-right:14px}.contract-stage-track{grid-template-columns:repeat(2,minmax(0,1fr))}.contract-record>footer{align-items:flex-start;flex-direction:column}.contract-record>footer span+span{padding-left:0;border-left:0}}

/* v3.06：合同治理折叠控件按 HTML2 control-like / compound panel 闭包。 */
.contract-record-body{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:start}
.contract-record-body>details{padding:0;overflow:hidden;border-radius:14px;background:linear-gradient(180deg,#fff 0%,#f6fafd 100%);box-shadow:0 8px 17px rgba(7,53,91,.08),0 3px 7px rgba(7,53,91,.05),inset 0 1px #fff;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.contract-record-body>details:hover:not([open]){border-color:#a9cee7;box-shadow:0 11px 21px rgba(7,53,91,.11),0 4px 8px rgba(7,53,91,.06),inset 0 1px #fff;transform:translateY(-1px)}
.contract-record-body>details>summary{position:relative;min-height:58px;width:100%;padding:0 60px 0 20px;line-height:1.35;user-select:none}
.contract-record-body>details>summary::before{position:absolute;top:9px;right:8px;bottom:9px;width:42px;border-left:1px solid rgba(8,127,206,.16);border-radius:0 9px 9px 0;background:linear-gradient(180deg,#f8fcff,#eaf5fc);box-shadow:inset 1px 0 rgba(255,255,255,.85);content:""}
.contract-record-body>details>summary::after{right:21px;font-size:20px;line-height:1}
.contract-record-body>details>summary:focus-visible{z-index:1;outline:3px solid rgba(8,141,254,.28);outline-offset:-3px;border-radius:12px}
.contract-record-body>details[open]{grid-column:1/-1;background:#fff;box-shadow:0 14px 28px rgba(7,53,91,.12),0 5px 11px rgba(7,53,91,.07),inset 0 1px #fff}
.contract-record-body>details[open]>summary{min-height:62px;border-bottom:1px solid rgba(8,127,206,.16);background:linear-gradient(180deg,#fbfdff,#eef7fc)}
.contract-record-body>details>summary+div{margin:16px 18px 18px;padding:20px;border:1px solid #e0eaf1;border-radius:12px;background:#fbfdfe;box-shadow:inset 0 2px 6px rgba(7,53,91,.045),0 4px 9px rgba(7,53,91,.04)}
.contract-record-body>details>summary+.contract-terms,.contract-record-body>details>summary+.signature-form,.contract-record-body>details>summary+.activation-form{column-gap:18px;row-gap:16px}
.contract-record-body>details>summary+div>label{gap:7px}
@media(max-width:1180px){.contract-record-body{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.contract-record-body{grid-template-columns:1fr}.contract-record-body>details[open]{grid-column:1}.contract-record-body>details>summary{min-height:56px;padding-left:17px}.contract-record-body>details>summary+div{margin:14px;padding:16px}}
@media(prefers-reduced-motion:reduce){.contract-record-body>details{transition:none}}
.close-reason {
  min-width: 180px;
  padding: 9px;
}
.lead-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.lead-layout {
  display: grid;
  grid-template-columns: minmax(440px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  margin-top: 16px;
}
.lead-layout .panel {
  min-height: 0;
}
.lead-intake form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.lead-intake label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.lead-intake .wide {
  grid-column: 1/-1;
}
.lead-intake input,
.lead-intake select,
.lead-intake textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.lead-intake button {
  justify-self: start;
}
.source-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 400px;
  overflow: auto;
}
.source-catalog article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.source-catalog article b {
  font-size: 13px;
}
.source-catalog article span {
  float: right;
  padding: 2px 6px;
  border-radius: 999px;
  color: #006fc9;
  background: rgba(0, 141, 254, 0.08);
  font-size: 9px;
}
.source-catalog article p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.lead-table-panel {
  margin-top: 16px;
  min-height: 0;
}
.lead-table {
  min-width: 1320px;
}
.lead-table td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.lead-table td a {
  display: block;
  margin-top: 6px;
  color: #006fc9;
}
.lead-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(199, 254, 29, 0.2);
  color: #456500;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 750;
}
.ghost-link {
  padding: 8px 10px;
  border: 1px solid rgba(0, 141, 254, 0.18);
  border-radius: 9px;
  color: #006fc9;
  background: rgba(0, 141, 254, 0.07);
  text-decoration: none;
}
.lead-entry-link {
  color: #006fc9;
  font-weight: 750;
  text-decoration: none;
}
.dev-lock {
  margin: 12px 0;
  padding: 11px 14px;
  border: 1px solid rgba(249, 208, 0, 0.5);
  border-radius: 11px;
  background: rgba(249, 208, 0, 0.12);
  font-size: 12px;
  color: #6c5900;
}
.acquisition-panel,
.product-panel {
  margin-top: 16px;
}
.acquisition-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.switch-line,
.source-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}
.run-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.run-stats span {
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--bg);
  font-size: 11px;
}
.run-stats .danger {
  color: #a32929;
  background: #fff0f0;
}
.source-catalog.full {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
}
.source-catalog article > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.source-catalog article small {
  display: block;
  color: var(--muted);
  min-height: 28px;
}
.source-toggle {
  margin-top: 9px;
}
.adapter {
  float: none !important;
  white-space: nowrap;
}
.adapter.ready,
.adapter.connected {
  background: rgba(199, 254, 29, 0.25) !important;
  color: #456500 !important;
}
.adapter.planned,
.adapter.needs_credentials {
  background: rgba(249, 208, 0, 0.16) !important;
  color: #7a6300 !important;
}
.product-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.product-catalog article {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.product-catalog b {
  font-size: 12px;
}
.product-catalog p,
.product-catalog small {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.queue-summary {
  padding: 12px;
  border-radius: 10px;
  background: var(--bg);
}
.queue-summary p {
  color: var(--muted);
  font-size: 11px;
}
.scan-runs {
  max-height: 270px;
  overflow: auto;
}
.scan-runs article {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.scan-runs article span {
  float: right;
  color: var(--muted);
  font-size: 10px;
}
.scan-runs article p {
  margin: 5px 0;
  font-size: 11px;
}
.lead-table details {
  margin-top: 7px;
}
.lead-table summary {
  cursor: pointer;
  color: #006fc9;
  font-size: 11px;
}
.lead-table details p {
  margin: 5px 0;
  font-size: 10px;
  line-height: 1.45;
}
@media (max-width: 1000px) {
  .lead-layout {
    grid-template-columns: 1fr;
  }
  .lead-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 1200px) {
  .source-catalog.full {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-catalog {
    grid-template-columns: repeat(3, 1fr);
  }
}
.matrix-panel {
  margin-top: 16px;
}
.matrix-products {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.matrix-products article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.matrix-products article b {
  color: #007bdc;
}
.matrix-products article span {
  font-size: 10px;
}
.matrix-products article small {
  color: var(--muted);
  font-size: 9px;
}
.matrix-detail {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.matrix-detail > summary {
  cursor: pointer;
  color: #006fc9;
  font-weight: 750;
}
.matrix-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.matrix-columns > div {
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  background: var(--bg);
  border-radius: 10px;
}
.matrix-columns p {
  margin: 0;
  padding: 7px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.matrix-columns p small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.split-lead-table {
  min-width: 1500px;
  table-layout: fixed;
}
.split-lead-table th:nth-child(1) {
  width: 13%;
}
.split-lead-table th.signal-col {
  width: 39%;
}
.split-lead-table th:nth-child(3) {
  width: 12%;
}
.split-lead-table th:nth-child(4) {
  width: 10%;
}
.split-lead-table th:nth-child(5) {
  width: 9%;
}
.split-lead-table th:nth-child(6) {
  width: 17%;
}
.signal-cell {
  font-size: 13px;
  line-height: 1.65;
  white-space: normal;
}
.signal-cell strong {
  font-weight: 650;
}
.evidence-meta {
  margin-top: 8px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(0, 141, 254, 0.07);
  color: #0067ad;
  font-size: 10px;
}
.lead-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px 0 2px;
}
.lead-pager button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.lead-pager button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.lead-pager span {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 1300px) {
  .matrix-products {
    grid-template-columns: repeat(4, 1fr);
  }
}
.scan-cost {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.scan-cost article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.scan-cost article b {
  color: #006fc9;
}
.scan-cost article span {
  font-size: 12px;
  font-weight: 700;
}
.scan-cost article small,
.scan-cost > p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.scan-cost > p {
  grid-column: 1/-1;
  margin: 0;
}
.network-families {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.network-families > article {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.network-families h3 {
  margin: 0;
  font-size: 13px;
}
.network-families h3 span {
  color: #007bdc;
}
.network-families > article > p {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 10px;
}
.network-families article div {
  display: grid;
  gap: 6px;
}
.network-families section {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}
.network-families section b {
  font-size: 11px;
}
.network-families section small {
  font-size: 9px;
  color: #0071c5;
}
.network-families section em {
  font-size: 9px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}
.signal-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.signal-controls button {
  padding: 5px 8px;
  border: 1px solid #b8d9f5;
  border-radius: 7px;
  background: #eef7ff;
  color: #0066ad;
  font-size: 10px;
  cursor: pointer;
}
.signal-controls .danger-lite {
  border-color: #f0c6c6;
  background: #fff4f4;
  color: #a83434;
}
.signal-controls span {
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .scan-cost,
  .network-families {
    grid-template-columns: 1fr;
  }
}
button.danger-outline {
  color: #a52c2c;
  background: #fff;
  border: 1px solid rgba(221, 75, 75, 0.45);
  padding: 8px 10px;
  white-space: nowrap;
}
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19, 27, 35, 0.48);
  backdrop-filter: blur(5px);
}
.confirm-dialog {
  width: min(520px, 100%);
  padding: 26px;
  border: 1px solid rgba(221, 75, 75, 0.24);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(14, 28, 41, 0.26);
}
.confirm-dialog h2 {
  margin: 6px 0 8px;
}
.confirm-dialog p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}
.dialog-kicker {
  color: #a52c2c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.impact-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(221, 75, 75, 0.08);
  color: #742424;
}
.impact-summary b {
  font-size: 28px;
}
.impact-summary span {
  line-height: 1.5;
}
.dialog-field {
  display: grid;
  gap: 7px;
  font-weight: 650;
}
.dialog-field textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}
.risk-confirm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  line-height: 1.5;
  color: #5b3030;
}
.risk-confirm input {
  margin-top: 4px;
}
.dialog-error {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(221, 75, 75, 0.1);
  color: #9f2929;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.bw-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1100;
  max-width: min(440px, calc(100vw - 48px));
  padding: 13px 16px;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(14, 28, 41, 0.18);
}
.bw-toast.success {
  background: #183d32;
  color: #fff;
}
.bw-toast.error {
  background: #922f2f;
  color: #fff;
  border: 0;
}
.blocker {
  margin-top: 8px;
  color: #9b5b08;
  font-size: 11px;
}
.compact-copy {
  max-width: 300px;
}
.row-actions,
.close-inline,
.fact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.row-actions {
  min-width: 150px;
}
.row-actions button {
  padding: 8px 10px;
}
.close-inline {
  min-width: 210px;
}
.close-inline input {
  min-width: 120px;
}
.deal-detail-head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.deal-detail-head > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}
.deal-detail-head p {
  grid-column: 1/-1;
  margin: 4px 0;
  line-height: 1.6;
}
.deal-detail-head ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.facts-content h3 {
  margin: 20px 0 10px;
  font-size: 15px;
}
.guidance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.guidance-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 12px;
  padding: 13px;
}
.guidance-grid article > span {
  float: right;
  color: var(--blue);
  font-weight: 800;
}
.guidance-grid p {
  line-height: 1.55;
  margin: 8px 0;
}
.guidance-grid small {
  color: var(--muted);
  line-height: 1.55;
}
.execution-detail {
  margin-top: 10px;
  border: 1px solid rgba(0, 141, 254, 0.2);
  border-radius: 11px;
  background: rgba(0, 141, 254, 0.035);
  overflow: hidden;
}
.execution-detail summary {
  cursor: pointer;
  color: #006fc9;
  font-weight: 800;
  padding: 9px 11px;
  list-style: none;
  user-select: none;
}
.execution-detail summary::-webkit-details-marker {
  display: none;
}
.execution-detail summary::after {
  content: "＋";
  float: right;
  font-size: 16px;
}
.execution-detail[open] summary::after {
  content: "－";
}
.execution-body {
  display: grid;
  gap: 11px;
  padding: 3px 12px 13px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.65;
}
.execution-body section,
.execution-objective {
  padding: 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
}
.execution-body p,
.execution-body ol,
.execution-body ul {
  margin: 6px 0 0;
}
.execution-body ol,
.execution-body ul {
  padding-left: 20px;
}
.execution-body li + li {
  margin-top: 5px;
}
.execution-body blockquote {
  margin: 7px 0 0;
  padding: 9px 11px;
  border-left: 3px solid var(--blue);
  background: rgba(0, 141, 254, 0.05);
  border-radius: 6px;
}
.execution-warning {
  border-left: 3px solid var(--yellow) !important;
}
.completion-evidence {
  border-left: 3px solid var(--green) !important;
}
.guidance-grid .execution-detail {
  grid-column: 1/-1;
}
.action-tools {
  margin-top: 9px;
}
.execution-workbench {
  padding: 18px 22px 22px;
  background: linear-gradient(
    135deg,
    rgba(0, 141, 254, 0.035),
    rgba(199, 254, 29, 0.04)
  );
}
.workbench-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}
.workbench-head b {
  font-size: 15px;
}
.workbench-head span {
  color: var(--muted);
  font-size: 11px;
}
.execution-workbench .execution-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.execution-workbench .execution-objective,
.execution-workbench .talk-track,
.execution-workbench .completion-evidence {
  grid-column: 1/-1;
}
.facts-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}
.facts-title p {
  color: var(--muted);
  font-size: 12px;
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.fact {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #aab4c2;
  border-radius: 10px;
  padding: 11px;
}
.fact.candidate {
  border-left-color: var(--warning);
}
.fact.confirmed {
  border-left-color: #54a800;
}
.fact.rejected {
  border-left-color: var(--danger);
}
.fact > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.fact > div:first-child span {
  color: var(--muted);
  font-size: 11px;
}
.fact p {
  min-height: 36px;
  margin: 7px 0;
}
.fact small {
  color: var(--muted);
}
.fact-actions {
  margin-top: 9px;
}
.error {
  padding: 16px;
  border: 1px solid rgba(221, 75, 75, 0.25);
  background: rgba(221, 75, 75, 0.08);
  color: #9f2929;
  border-radius: 12px;
}
.empty {
  color: var(--muted);
  padding: 42px 10px;
  text-align: center;
}
.route {
  display: grid;
  gap: 10px;
}
.route-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: rgba(0, 141, 254, 0.04);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
}
form {
  display: grid;
  gap: 16px;
  max-width: 760px;
}
.unassigned-pool-panel {
  margin-top: 18px;
}
.managed-customer-panel {
  border-top: 3px solid rgba(0, 141, 254, 0.72);
}
.managed-table {
  min-width: 1380px;
}
.managed-table th:nth-child(4),
.managed-table td:nth-child(4),
.managed-table th:nth-child(6),
.managed-table td:nth-child(6) {
  min-width: 250px;
}
.pool-toolbar,
.pool-batchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.pool-toolbar input {
  min-width: 260px;
  flex: 1;
}
.pool-toolbar select,
.pool-batchbar select {
  width: auto;
  min-width: 170px;
}
.pool-batchbar {
  padding: 12px;
  background: rgba(0, 141, 254, 0.045);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pool-batchbar > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.pool-table .company {
  min-width: 250px;
}
.pool-table {
  min-width: 1900px;
}
.pool-table th:nth-child(4),
.pool-table td:nth-child(4),
.pool-table th:nth-child(6),
.pool-table td:nth-child(6),
.pool-table th:nth-child(7),
.pool-table td:nth-child(7) {
  min-width: 260px;
}
.pool-table th:nth-child(8),
.pool-table td:nth-child(8),
.pool-table th:nth-child(9),
.pool-table td:nth-child(9) {
  min-width: 210px;
}
.pool-company-name {
  font-weight: 800;
  line-height: 1.4;
}
.pool-registered,
.pool-meta,
.pool-source,
.pool-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.pool-note {
  color: var(--ink);
  padding: 7px 9px;
  background: rgba(0, 141, 254, 0.045);
  border-radius: 8px;
}
.pool-source {
  color: #66798e;
}
.pool-health {
  display: block;
  margin-top: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.pool-contact-count {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.pool-contact {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}
.pool-contact:last-of-type {
  border-bottom: 0;
}
.pool-contact span {
  color: var(--muted);
}
.pool-contact em {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 190, 0, 0.16);
  color: #805700;
  font-style: normal;
  font-size: 10px;
}
.pool-empty-evidence {
  color: var(--muted);
  font-size: 12px;
}
.refresh-pending {
  cursor: pointer;
  color: #805700 !important;
  background: rgba(255, 190, 0, 0.14) !important;
}
.tool-draft-status {
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
}
.fact-draft-note {
  color: var(--muted);
  font-size: 13px;
}
.framework-lens {
  display: block;
  margin: 7px 0;
  color: #55708c;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
body.modal-open {
  overflow: hidden;
}
.workspace-modal-overlay {
  z-index: 1200;
  align-items: stretch;
  padding: clamp(14px, 3vw, 36px);
}
.nested-dialog-overlay {
  z-index: 1400;
}
.nested-dialog-overlay .confirm-dialog {
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.workspace-modal {
  display: flex;
  flex-direction: column;
  width: min(1500px, 100%);
  max-height: calc(100vh - clamp(28px, 6vw, 72px));
  margin: auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(13, 35, 61, 0.28);
}
.workspace-modal-fixed {
  position: sticky;
  top: 0;
  z-index: 4;
  flex: 0 0 auto;
  background: #fff;
  box-shadow: 0 7px 18px rgba(13, 35, 61, 0.055);
}
.workspace-modal-fixed > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.workspace-modal-fixed > header span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.workspace-modal-fixed > header h2 {
  margin: 4px 0 0;
}
.workspace-modal-fixed > header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.workspace-close {
  flex: 0 0 auto;
}
.workspace-modal-nav {
  display: flex;
  gap: 8px;
  padding: 10px 24px;
  overflow-x: auto;
  background: rgba(0, 141, 254, 0.035);
  border-bottom: 1px solid var(--line);
}
.workspace-modal-nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  white-space: nowrap;
  background: #fff;
  color: var(--blue);
  border: 1px solid rgba(0, 141, 254, 0.2);
}
.workspace-modal-nav button em {
  display: none;
  font-size: 10px;
  font-style: normal;
}
.workspace-modal-nav button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 5px 14px rgba(0, 141, 254, 0.22);
  cursor: default;
  opacity: 1;
}
.workspace-modal-nav button.active::after {
  position: absolute;
  right: 12px;
  bottom: -7px;
  left: 12px;
  height: 3px;
  border-radius: 3px;
  background: var(--green);
  content: "";
}
.workspace-modal-nav button.active em { display: inline; }
.workspace-modal-body {
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
}
.workspace-modal-body > * {
  max-width: none;
}
@media (max-width: 720px) {
  .workspace-modal-overlay { padding: 0; }
  .workspace-modal { max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .workspace-modal-fixed > header, .workspace-modal-nav, .workspace-modal-body { padding-left: 16px; padding-right: 16px; }
}
.pool-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.origin-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3f8;
  font-size: 11px;
  white-space: nowrap;
}
.origin-badge.mappable_active {
  background: rgba(84, 168, 0, 0.12);
  color: #397100;
}
.origin-badge.active_owner_candidate,
.origin-badge.handover_candidate {
  background: rgba(84, 168, 0, 0.12);
  color: #397100;
}
.origin-badge.conflicting_evidence {
  background: rgba(255, 190, 0, 0.16);
  color: #805700;
}
.origin-badge.inactive_staff {
  background: rgba(221, 75, 75, 0.11);
  color: #9f2929;
}
.origin-badge.public_pool {
  background: rgba(0, 141, 254, 0.1);
  color: #006fca;
}
.restorable {
  display: block;
  color: #397100;
  margin-top: 5px;
}
.pool-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 720px) {
  .pool-toolbar > *,
  .pool-batchbar > * {
    width: 100% !important;
  }
  .pool-batchbar > span {
    margin: 0;
  }
}
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(0, 141, 254, 0.25);
  border-color: var(--blue);
}
button {
  justify-self: start;
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  color: #071523;
  background: linear-gradient(135deg, var(--blue), var(--green));
  font:
    700 14px Inter,
    "Noto Sans SC",
    sans-serif;
  cursor: pointer;
}
#result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(199, 254, 29, 0.12);
  border: 1px solid rgba(126, 166, 0, 0.25);
}
@media (max-width: 1200px) {
  .guidance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 1100px) {
  .priority-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .metrics,
  .sales-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  .shell {
    padding: 16px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .deal-detail-head,
  .guidance-grid,
  .fact-grid,
  .execution-workbench .execution-body {
    grid-template-columns: 1fr;
  }
  .execution-workbench .execution-objective,
  .execution-workbench .talk-track,
  .execution-workbench .completion-evidence {
    grid-column: auto;
  }
  .section-heading {
    display: block;
  }
  .chart-legend {
    margin-bottom: 12px;
  }
  .activity-grid {
    grid-template-columns: 1fr;
  }
}

/* BW report design system v5 — brand asset catalog only */
:root {
  --ink: #10233f;
  --ink-strong: #07172d;
  --muted: #66758a;
  --muted-soft: #8b98aa;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --surface-blue: #eef7ff;
  --line: rgba(16, 35, 63, 0.11);
  --line-strong: rgba(16, 35, 63, 0.18);
  --shadow-card: 0 12px 34px rgba(22, 50, 82, 0.07);
  --shadow-float: 0 18px 48px rgba(22, 50, 82, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
}
html {
  font-size: 14px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body {
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Inter, Arial,
    sans-serif;
  line-height: 1.55;
  background: radial-gradient(
      circle at 8% -5%,
      rgba(0, 141, 254, 0.13),
      transparent 32rem
    ),
    linear-gradient(145deg, #f8fafc 0%, #eef4f9 100%);
}
.shell {
  width: min(2048px, 100%);
  padding: clamp(18px, 2vw, 32px);
}
.topbar {
  align-items: center;
  min-height: 92px;
  margin-bottom: 20px;
  padding: 2px 2px 0;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
}
h1 {
  color: var(--ink-strong);
  font-size: clamp(26px, 2vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.subtitle {
  font-size: 13px;
  line-height: 1.6;
}
.status {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
}
.metrics {
  gap: 12px;
}
.metric {
  min-height: 104px;
  padding: 16px 18px;
}
.metric-label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.metric-value {
  margin-top: 10px;
  color: var(--ink-strong);
  font-size: 30px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.metric::after {
  left: 18px;
  right: 18px;
  height: 2px;
}
.panel {
  padding: 20px;
}
.panel h2 {
  color: var(--ink-strong);
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.panel-note {
  line-height: 1.6;
}
.table-panel {
  padding: 20px 20px 22px;
}
.table-scroll {
  position: relative;
  max-width: 100%;
  border-color: var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8);
  scrollbar-color: rgba(0, 141, 254, 0.42) transparent;
  scrollbar-width: thin;
}
table {
  min-width: 1900px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
th {
  z-index: 4;
  height: 44px;
  padding: 0 12px;
  color: #5d6d82;
  background: #f4f8fc;
  border-bottom: 1px solid var(--line-strong);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.025em;
  vertical-align: middle;
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid rgba(16, 35, 63, 0.075);
  line-height: 1.62;
  vertical-align: top;
  overflow-wrap: anywhere;
}
tbody > tr:not(.history-row):hover > td {
  background: #f9fcff;
}
thead th:first-child {
  left: 0;
  z-index: 6;
  box-shadow: 1px 0 0 var(--line);
}
tbody > tr:not(.history-row) > td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}
tbody > tr:not(.history-row):hover > td:first-child {
  background: #f9fcff;
}
th:nth-child(1),
td:nth-child(1) {
  width: 210px;
}
th:nth-child(2),
td:nth-child(2) {
  width: 145px;
}
th:nth-child(3),
td:nth-child(3) {
  width: 220px;
}
th:nth-child(4),
td:nth-child(4) {
  width: 360px;
}
th:nth-child(5),
td:nth-child(5) {
  width: 135px;
}
th:nth-child(6),
td:nth-child(6) {
  width: 370px;
}
th:nth-child(7),
td:nth-child(7) {
  width: 300px;
}
th:nth-child(8),
td:nth-child(8) {
  width: 160px;
}
th:nth-child(9),
td:nth-child(9) {
  width: 220px;
}
.company {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}
.identity-chip {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.identity-chip.pending {
  color: #855800;
  background: #fff6dc;
  border: 1px solid #efd28a;
}
.identity-chip.verified {
  color: #087448;
  background: #eaf9f2;
  border: 1px solid #9ed9bd;
}
.identity-candidate {
  margin: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(13, 55, 88, 0.06);
}
.identity-candidate header,
.identity-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.identity-candidate header div {
  display: grid;
  gap: 3px;
}
.identity-candidate header span,
.identity-candidate header em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.identity-candidate dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.identity-candidate dl div {
  padding: 10px;
  border-radius: 10px;
  background: #f5f9fc;
}
.identity-candidate dt {
  color: var(--muted);
  font-size: 11px;
}
.identity-candidate dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.identity-evidence {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}
.identity-evidence li span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.identity-conflict {
  margin: 10px 0;
  padding: 10px;
  border-radius: 9px;
  color: #9c2d27;
  background: #fff0ef;
}
.identity-actions {
  justify-content: flex-start;
  margin-top: 14px;
}
.identity-verified {
  border-color: #9ed9bd;
  background: linear-gradient(145deg, #ffffff, #f2fbf7);
}
.identity-verified header span {
  color: #087448;
  font-weight: 750;
}
.identity-confirmed-note {
  padding: 11px 12px;
  border: 1px solid rgba(8, 116, 72, 0.18);
  border-radius: 10px;
  color: #315b4a;
  background: rgba(234, 249, 242, 0.75);
}
.identity-decision-panel {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(8, 127, 206, 0.2);
  border-radius: 12px;
  background: #f5f9fc;
}
.identity-decision-panel[hidden] { display: none; }
.identity-decision-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.identity-decision-panel textarea { width: 100%; resize: vertical; }
.identity-confirm-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.identity-confirm-check[hidden] { display: none; }
.identity-confirm-check input { flex: 0 0 auto; margin-top: 2px; }
.identity-decision-controls { display: flex; gap: 9px; }
.identity-decision-feedback { min-height: 18px; color: #087448; font-size: 12px; }
.identity-decision-feedback.error { color: #a3322b; }
.stage-cell {
  min-width: 0;
  width: auto;
}
.badge {
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.2;
}
.health-index-btn {
  min-height: 28px;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1.2;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}
.health-index-btn:hover {
  transform: translateY(-1px);
}
.narrative {
  min-width: 0;
  line-height: 1.66;
}
.situation {
  color: #243a57;
}
.blocker {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed rgba(216, 145, 25, 0.28);
  line-height: 1.5;
}
.source-label,
.owner-label {
  color: var(--muted-soft);
  font-size: 10.5px;
  line-height: 1.45;
}
.assign-control {
  min-width: 0;
  align-items: center;
}
.assign-control select {
  min-width: 0;
  height: 34px;
  padding: 6px 30px 6px 10px;
  border-radius: 9px;
  font-size: 12px;
}
input,
select,
textarea {
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #fff;
}
button {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 141, 254, 0.12);
}
button.ghost {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 11px;
}
button.small {
  min-height: 32px;
  padding: 7px 10px;
}
.row-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}
.row-actions button {
  width: 100%;
  justify-self: stretch;
  text-align: center;
}
.action-tools {
  display: flex;
  margin-top: 10px;
}
.action-cell > .action-tools button {
  font-weight: 750;
}
.history-row td {
  background: #f4f9fd;
}
.history-content,
.files-content,
.contacts-content {
  padding: 18px 24px;
}
.facts-content {
  padding: 24px;
}
.toolbox-content {
  position: sticky;
  left: 0;
  width: min(1500px, calc(100vw - 72px));
  box-sizing: border-box;
  padding: 24px;
}
.toolbox-workbench {
  overflow: hidden;
  border: 1px solid rgba(0, 141, 254, 0.18);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    #fff 0%,
    #f5fbff 72%,
    rgba(199, 254, 29, 0.08) 100%
  );
  box-shadow: 0 14px 40px rgba(18, 55, 91, 0.07);
}
.toolbox-workbench > header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 22px 24px 18px;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--blue), var(--green)) 1;
}
.toolbox-workbench h3 {
  margin: 5px 0 6px;
  font-size: 21px;
  color: var(--ink-strong);
}
.toolbox-workbench header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.toolbox-kicker {
  color: #0073ca;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
}
.completion-ring {
  flex: none;
  width: 76px;
  height: 76px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 7px solid rgba(0, 141, 254, 0.13);
  border-top-color: var(--blue);
  border-radius: 50%;
  background: #fff;
}
.completion-ring b {
  color: #006fc9;
  font-size: 19px;
}
.completion-ring span {
  color: var(--muted);
  font-size: 9px;
}
.tool-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 7px;
  overflow: auto;
  padding: 11px 14px;
  border-block: 1px solid var(--line);
  background: rgba(0, 141, 254, 0.035);
}
.tool-tab {
  min-height: 48px;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  color: #31506d;
  border: 1px solid transparent;
  background: transparent;
}
.tool-tab small {
  color: var(--muted);
  font-size: 9px;
}
.tool-tab.active {
  color: #005ea8;
  border-color: rgba(0, 141, 254, 0.28);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 141, 254, 0.09);
}
.tool-form {
  width: 100%;
  max-width: none;
  padding: 22px 24px;
}
.tool-impact-map,
.toolbox-refresh-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 141, 254, 0.2);
  border-radius: 13px;
  background: linear-gradient(105deg, rgba(0, 141, 254, 0.08), rgba(199, 254, 29, 0.09));
  box-shadow: 0 8px 22px rgba(18, 55, 91, 0.08);
}
.tool-impact-map b,
.toolbox-refresh-result b { color: #075f9f; }
.tool-impact-map span,
.toolbox-refresh-result span { color: var(--muted); line-height: 1.55; }
.toolbox-refresh-result > div { display: grid; gap: 4px; }
.toolbox-refresh-result > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.tool-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(340px, 1fr));
  gap: 14px;
}
.tool-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #29435f;
  font-size: 12px;
  font-weight: 750;
}
.tool-field textarea,
.tool-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  font: inherit;
  font-weight: 500;
  resize: vertical;
}
.tool-field textarea {
  min-height: 92px;
  line-height: 1.55;
  overflow-wrap: normal;
  word-break: normal;
}
.tool-field-structured,
.tool-field-account_goal,
.tool-field-relationship_gap { grid-column: 1 / -1; }
.tool-field-example {
  color: #6c8299;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
}
.tool-attestation-row {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 141, 254, 0.2);
  border-radius: 12px;
  background: rgba(0, 141, 254, 0.045);
}
.tool-attestation-row label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #173a60;
  font-weight: 750;
}
.tool-attestation-control { position: relative; cursor: pointer; }
.tool-attestation-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.tool-attestation-indicator {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1px solid rgba(8, 114, 187, 0.55);
  border-radius: 6px;
  background: var(--surface, #fff);
  box-shadow: inset 0 2px 4px rgba(7, 35, 61, 0.12), 0 4px 9px rgba(7, 53, 91, 0.14);
}
.tool-attestation-control input:focus-visible + .tool-attestation-indicator {
  outline: 3px solid rgba(0, 141, 254, 0.28);
  outline-offset: 3px;
}
.tool-attestation-control input:checked + .tool-attestation-indicator {
  border-color: #0872bb;
  background: #0872bb;
  box-shadow: 0 7px 14px rgba(0, 105, 184, 0.28), inset 0 1px rgba(255,255,255,.28);
}
.tool-attestation-control input:checked + .tool-attestation-indicator::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.tool-attestation-row small { padding-left: 29px; color: var(--muted); line-height: 1.55; }
.tool-attestation-row .tool-attestation-status { color: #76560c; font-weight: 750; }
.tool-attestation-row.is-confirmed { border-color: rgba(72, 134, 0, 0.42); background: rgba(199, 254, 29, 0.09); }
.tool-attestation-row.is-confirmed .tool-attestation-status { color: #487000; }
.tool-savebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.tool-savebar span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.tool-savebar em {
  color: var(--muted);
  font-style: normal;
}
.tool-task-list {
  padding: 0 24px 22px;
}
.tool-task-list h4 {
  margin: 0 0 8px;
}
.tool-task-list ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-task-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.tool-task-list li div {
  display: grid;
  gap: 3px;
}
.tool-task-list li span {
  color: var(--muted);
  font-size: 10px;
}
.deal-tool-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(199, 254, 29, 0.13);
}
.deal-tool-entry span {
  color: var(--muted);
  font-size: 11px;
}
.open-guidance-tool {
  margin-top: 14px;
}
.deal-detail-head {
  padding: 18px;
  border-radius: var(--radius-md);
}
.guidance-grid {
  gap: 12px;
}
.guidance-grid article {
  padding: 15px;
  border-radius: var(--radius-md);
}
.fact-grid {
  gap: 10px;
}
.fact {
  padding: 12px;
}
.execution-workbench {
  padding: 20px 24px 24px;
}
.execution-body {
  gap: 12px;
}
.execution-body section,
.execution-objective {
  padding: 12px;
}
.overdue-item {
  padding: 13px 14px;
}
.org-row {
  min-height: 52px;
  padding: 10px;
}
.activity-grid {
  gap: 12px;
}
.activity-card {
  padding: 16px;
}
.event-panel {
  margin-top: 0;
}
.route-item {
  align-items: center;
  min-height: 46px;
  padding: 11px 13px;
}
.contact-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.75fr);
  gap: 22px;
  padding: 4px;
}
.contact-workbench h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.contact-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}
.contact-card > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.contact-card-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.contact-card-actions button { min-height:34px; padding:6px 12px; }
.contact-card span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.contact-card b {
  color: var(--ink-strong);
  font-size: 14px;
}
.contact-card em {
  color: var(--muted);
  font-style: normal;
}
.contact-card i {
  padding: 2px 7px;
  border-radius: 999px;
  color: #356000;
  background: rgba(199, 254, 29, 0.22);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}
.contact-card p {
  margin: 8px 0 0;
  color: #29435f;
  overflow-wrap: anywhere;
}
.contact-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.contact-form {
  max-width: none;
  padding: 16px;
  border: 1px solid rgba(0, 141, 254, 0.18);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #f8fcff, #f4f9fd);
}
.contact-form-head,
.contact-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.contact-form-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.contact-form input,
.contact-form textarea {
  padding: 9px 10px;
  font-size: 12px;
}
.primary-check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}
.primary-check input {
  width: auto;
}
.contact-form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.contact-feedback {
  color: var(--muted);
  font-size: 12px;
}
.contact-readonly {
  align-self: start;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface-soft);
}
@media (max-width: 1200px) {
  .shell {
    padding: 18px;
  }
  .status {
    white-space: normal;
  }
  .activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .contact-workbench {
    grid-template-columns: 1fr;
  }
  .tool-tabs {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }
  .tool-fields {
    grid-template-columns: 1fr;
  }
  .tool-impact-map,
  .toolbox-refresh-result {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbox-refresh-result > div:last-child { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .route-search-form { width: 100%; flex-wrap: wrap; }
  .route-search-form label { width: 100%; }
  .route-search-form input { flex: 1 1 190px; width: auto; }
  .topbar {
    min-height: 0;
  }
  .activity-grid,
  .contact-list,
  .contact-fields {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 16px;
  }
  .table-panel {
    padding: 16px 12px 16px;
  }
  .table-scroll {
    border-radius: 10px;
  }
  .workbench-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbox-content {
    width: calc(100vw - 28px);
    padding: 12px;
  }
  .toolbox-workbench > header,
  .tool-form {
    padding: 17px;
  }
  .tool-tabs {
    grid-template-columns: repeat(2, minmax(135px, 1fr));
  }
  .tool-savebar,
  .deal-tool-entry {
    align-items: flex-start;
    flex-direction: column;
  }
  .completion-ring {
    width: 62px;
    height: 62px;
  }
}
@media (max-width: 760px) {
  .route-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 0 0 14px;
  }
  .route-toolbar label {
    width: 100%;
  }
  .route-toolbar select {
    flex: 1;
  }
  .record-grid {
    grid-template-columns: 1fr;
  }
  .activity-rollups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .route-pager {
    width: 100%;
    margin-left: 0;
  }
}
@media (max-width: 560px) {
  .activity-account-kpis {
    grid-template-columns: 1fr;
  }
  .activity-account-kpis span {
    grid-template-columns: 44px 1fr;
  }
}
@media (max-width: 760px) {
  .coach-priorities {
    grid-template-columns: 1fr;
  }
  .coach-summary > em {
    margin-left: 0;
  }
  .capability-row {
    grid-template-columns: 78px minmax(80px, 1fr) 36px;
  }
}
@media (max-width: 760px) {
  .priority-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .priority-grid > * {
    min-width: 0;
  }
  .overdue-item > div {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 760px) {
  .overdue-pager {
    align-items: flex-start;
    flex-direction: column;
  }
  .overdue-pager > div {
    width: 100%;
  }
  .overdue-pager button {
    flex: 1;
  }
}
/* Authenticated entry */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(
      circle at 20% 10%,
      rgba(40, 181, 255, 0.18),
      transparent 35%
    ),
    #06131f;
}
.login-card {
  width: min(520px, 100%);
  padding: 42px;
}
.login-card h1 {
  margin: 12px 0 10px;
}
.login-actions {
  display: grid;
  gap: 12px;
  margin: 30px 0 20px;
}
.login-actions a {
  display: block;
  padding: 14px 18px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}
.login-primary,
.login-primary:visited {
  background: #35c3ff;
  color: #03131f;
}
.login-secondary,
.login-secondary:visited {
  border: 1px solid #4d7088;
  background: #ffffff;
  color: #17324d;
}
.login-primary:hover {
  background: #008dfe;
  color: #ffffff;
}
.login-secondary:hover {
  border-color: #008dfe;
  background: #eef7ff;
  color: #005ea8;
}
.login-actions a:focus-visible {
  outline: 3px solid rgba(0, 141, 254, 0.35);
  outline-offset: 3px;
}
.login-actions a[aria-disabled="true"] {
  border-color: #c8d2dc;
  background: #eef1f4;
  color: #66798b;
  cursor: not-allowed;
}
.login-note {
  color: #91aabb;
  font-size: 13px;
  line-height: 1.7;
}
.view-switch {
  display: flex;
  gap: 6px;
  align-items: center;
}
.view-switch button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
.view-switch button:hover {
  border-color: var(--accent);
}
.private-source-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin: 16px 0;
}
.source-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.55);
}
.source-form h3 {
  margin: 0 0 12px;
}
.source-form label {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  color: var(--muted);
}
.source-form input,
.source-form select,
.source-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
}
.source-form fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 10px 0;
  padding: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.source-form fieldset label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.source-form fieldset input {
  width: auto;
}
.source-form button {
  border: 0;
  border-radius: 9px;
  padding: 10px 15px;
  background: linear-gradient(135deg, #008dfe, #9edb35);
  color: #07111f;
  font-weight: 700;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.safe-note {
  color: var(--muted);
  font-size: 12px;
}
.private-source-panel td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
@media (max-width: 900px) {
  .private-source-grid {
    grid-template-columns: 1fr;
  }
  .score-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.collector-page {
  background: #f3f7fb;
  color: #17243a;
}
.collector-page main,
.collector-page .topbar {
  max-width: 1760px;
  margin: auto;
}
.collector-page .topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 34px 38px 18px;
}
.collector-page .topbar h1 {
  margin: 5px 0;
  font-size: 30px;
}
.collector-page .topbar p,
.collector-page small {
  color: #6d7b91;
}
.collector-page .topbar nav {
  display: flex;
  gap: 10px;
}
.collector-page .topbar a,
.button-link {
  color: #2076d2;
  text-decoration: none;
}
.collector-page main {
  padding: 0 38px 50px;
}
.collector-page .card {
  margin: 14px 0;
  padding: 22px;
  border: 1px solid #dfe7f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(34, 60, 90, 0.05);
}
.collector-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 14px;
  margin: 8px 0 18px;
}
.collector-metrics article {
  position: relative;
  min-height: 112px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(23, 50, 83, 0.07);
}
.collector-metrics article::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), #61c9dc, var(--green));
}
.collector-metrics article span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.collector-metrics article b {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}
.collector-discovery-form,
.collector-filters {
  display: grid;
  grid-template-columns: minmax(300px, 2fr) repeat(4, minmax(120px, 0.55fr)) auto;
  gap: 12px;
  align-items: end;
}
.collector-discovery-form button,
.collector-filters button {
  min-width: 126px;
  white-space: nowrap;
}
.collector-discovery-form label,
.profile-form label {
  display: grid;
  gap: 6px;
  color: #52627b;
  font-size: 13px;
}
.collector-discovery-form input,
.collector-discovery-form select,
.collector-filters input,
.collector-filters select,
.profile-form input,
.profile-form select,
.profile-form textarea,
.candidate-grid input,
.candidate-grid textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfdae8;
  border-radius: 9px;
  padding: 10px;
  background: #fbfdff;
  color: #17243a;
}
.collector-discovery-form input,
.collector-discovery-form select,
.collector-discovery-form button {
  height: 44px;
  min-height: 44px;
  line-height: 1.2;
}
.collector-page .collector-filters > input,
.collector-page .collector-filters > select,
.collector-page .collector-filters > button {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 42px;
}
.collector-page .collector-filters > select {
  line-height: normal;
}
.collector-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.collector-table th:nth-child(1) { width: 20%; }
.collector-table th:nth-child(2) { width: 25%; }
.collector-table th:nth-child(3) { width: 31%; }
.collector-table th:nth-child(4) { width: 9%; }
.collector-table th:nth-child(5) { width: 15%; }
.collector-table td {
  vertical-align: top;
  padding: 15px 14px;
  border-bottom: 1px solid rgba(16, 35, 63, 0.08);
  line-height: 1.45;
}
.collector-table th {
  padding: 13px 14px;
  color: #5b6c84;
  background: #f1f6fc;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-align: left;
  white-space: nowrap;
}
.collector-table tbody tr:hover td {
  background: rgba(0, 141, 254, 0.035);
}
.collector-table .collector-action-column {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 132px;
  background: #fff;
  box-shadow: -10px 0 18px rgba(33, 63, 98, 0.06);
}
.collector-table th.collector-action-column {
  z-index: 3;
  background: #f1f6fc;
}
.platform-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.inline-manage {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(0, 141, 254, 0.2);
  background: #eef7ff;
  color: #176eaf;
  font-size: 12px;
}
.primary-manage {
  width: 100%;
  min-height: 38px;
  white-space: nowrap;
}
.collector-table small,
.candidate-grid small,
.detail-columns small {
  display: block;
  margin-top: 5px;
  line-height: 1.45;
}
.status-good {
  color: #267f51;
  font-weight: 700;
}
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.candidate-grid article {
  border: 1px solid #dbe5f0;
  border-radius: 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.candidate-grid article a {
  display: block;
  color: #2877c9;
  margin-top: 7px;
}
.candidate-grid form {
  display: grid;
  gap: 8px;
}
.candidate-grid form div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.collector-dialog {
  width: min(1260px, 94vw);
  max-height: 92vh;
  border: 0;
  border-radius: 24px;
  padding: 32px 36px 38px;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fcff 0, #fff 180px);
  box-shadow: 0 24px 80px rgba(14, 35, 63, 0.28);
}
.collector-dialog::backdrop {
  background: rgba(17, 30, 48, 0.5);
}
.dialog-close {
  appearance: none;
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid #d8e2ee;
  border-radius: 12px;
  color: #52627a;
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 49, 84, 0.08);
  font:
    400 25px/1 Arial,
    sans-serif;
}
.dialog-close span {
  display: block;
  width: 1em;
  height: 1em;
  line-height: 0.9;
  text-align: center;
}
.dialog-close:hover {
  color: var(--ink);
  background: #eef6fd;
}
.maturity-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin: 18px 0;
}
.maturity-grid article {
  min-height: 92px;
  padding: 15px;
  border: 1px solid #dce7f2;
  border-radius: 14px;
  background: linear-gradient(145deg, #f2f8ff, #fbfdff);
}
.maturity-grid span,
.maturity-grid b {
  display: block;
}
.maturity-grid span {
  color: var(--muted);
  font-size: 12px;
}
.maturity-grid b {
  margin-top: 8px;
  font-size: 14px;
}
.maturity-grid small {
  display: block;
  margin-top: 5px;
}
.boundary-guidance {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #dce7f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(30, 65, 105, 0.045);
}
.login-guidance {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #dce7f2;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(0,141,254,.035), rgba(199,254,29,.055));
}
.login-guidance h3 { margin: 4px 0 0; }
.login-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.login-guidance-grid article {
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(43,83,126,.09);
  border-radius: 12px;
  background: rgba(255,255,255,.8);
}
.login-guidance-grid span,
.login-guidance-grid b { display: block; }
.login-guidance-grid span { color: var(--muted); font-size: 12px; }
.login-guidance-grid b { margin-top: 6px; font-size: 13px; line-height: 1.55; }
.login-evidence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  font-size: 13px;
}
.login-evidence a { color: #2076d2; }
.boundary-guidance h3 {
  margin: 4px 0 0;
}
.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.boundary-grid article {
  padding: 14px;
  border-radius: 12px;
  background: #f5f8fc;
}
.boundary-grid span,
.boundary-grid b {
  display: block;
}
.boundary-grid span {
  color: var(--muted);
  font-size: 12px;
}
.boundary-grid b {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.55;
}
.known-boundaries {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 13px;
  border-left: 3px solid var(--blue);
  background: rgba(0, 141, 254, 0.045);
}
.known-boundaries span {
  font-size: 13px;
}
.known-boundaries small {
  margin-top: 4px;
}
.ai-config-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  padding: 12px 15px;
  border: 1px solid rgba(119, 174, 0, 0.22);
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(199, 254, 29, 0.12),
    rgba(0, 141, 254, 0.05)
  );
}
.ai-config-note b {
  white-space: nowrap;
}
.ai-config-note span {
  color: var(--muted);
  font-size: 13px;
}
.profile-form {
  display: grid;
  gap: 14px;
}
.collector-dialog .profile-form {
  width: 100%;
  max-width: none;
}
.profile-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.profile-form fieldset {
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.profile-form fieldset label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.profile-form fieldset input {
  width: auto;
}
.profile-form textarea {
  min-height: 112px;
}
.profile-form input,
.profile-form select {
  min-height: 42px;
}
.smart-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.smart-text-single {
  grid-template-columns: 1fr;
}
.account-url-field {
  max-width: 760px;
}
.smart-text-grid label {
  height: 100%;
}
.smart-text-grid textarea {
  height: 118px;
  min-height: 118px;
}
.smart-text-grid input {
  height: 42px;
}
.profile-form > button {
  min-width: 150px;
  margin-top: 2px;
}
.account-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.account-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.account-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce6f0;
  border-radius: 11px;
  background: #fff;
}
.account-list article > div:last-child {
  text-align: right;
}
.account-list small {
  display: block;
  margin-top: 4px;
}
.account-list span {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #236da9;
  font-size: 11px;
}
.account-empty {
  padding: 12px;
  border: 1px dashed #ccd9e7;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
.account-edit-button {
  width: fit-content;
  margin-top: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 141, 254, 0.24);
  border-radius: 8px;
  background: #f4f9ff;
  color: #236da9;
  font-size: 12px;
}
.account-readiness {
  margin-top: 5px;
  color: #236da9;
  font-size: 12px;
}
.account-apply-link {
  display: inline-block;
  font-weight: 700;
}
.official-account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0 18px;
}
.official-account-links .button-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(0, 141, 254, 0.22);
  border-radius: 10px;
  background: #eef7ff;
  cursor: pointer;
  pointer-events: auto;
}
.official-account-links .button-link[aria-disabled="true"] {
  color: #8b97a8;
  background: #f3f5f7;
  cursor: not-allowed;
  pointer-events: none;
}
.platform-account-form {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid #dfe8f1;
}
.platform-account-form h4 {
  margin: 0;
  font-size: 16px;
}
.platform-account-form textarea {
  min-height: 78px;
}
.enrollment-command {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(0, 141, 254, 0.2);
  border-radius: 12px;
  background: #f1f8ff;
}
.enrollment-command[hidden] { display: none; }
.enrollment-command textarea {
  min-height: 76px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.enrollment-command > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.copy-command-status { color: var(--muted); font-size: 12px; }
.account-heading {
  padding-right: 0 !important;
}
.account-heading h3 {
  margin: 3px 0 0;
}
.private-source-summary p,
.platform-run-summary p {
  margin: 8px 0;
  padding: 10px 0;
  border-bottom: 1px solid #e3eaf2;
}
.collector-dialog .section-heading {
  padding-right: 44px;
}
.collector-dialog .section-heading h2 {
  margin: 4px 0 0;
  font-size: 25px;
}
.collector-dialog .platform-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}
.collector-dialog .manual-registration {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #dce6f0;
  border-radius: 14px;
  background: #f8fbfe;
}
.collector-dialog .manual-registration summary {
  outline: none;
}
.collector-dialog .safe-note {
  padding: 12px;
  border-radius: 10px;
  background: #fff7dc;
  color: #6c5714;
  font-size: 12px;
  line-height: 1.6;
}
.reach-runtime-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.reach-runtime-metrics article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.reach-runtime-metrics span, .runtime-list small { color: var(--muted); font-size: 10px; }
.reach-runtime-metrics b { color: #007bdc; font-size: 22px; }
.reach-runtime-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reach-runtime-columns h3 { margin: 0 0 10px; font-size: 14px; }
.runtime-list { display: grid; gap: 8px; }
.runtime-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.runtime-list article > div { display: grid; gap: 4px; min-width: 0; }
.runtime-list article > div:last-child { text-align: right; }
.runtime-list span { color: #0071c5; font-size: 11px; font-weight: 750; }
@media (max-width: 900px) {
  .reach-runtime-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reach-runtime-columns { grid-template-columns: 1fr; }
}
.detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}
.detail-columns > section {
  padding: 16px;
  background: #f6f9fc;
  border-radius: 12px;
}
.form-message {
  min-height: 20px;
  color: #2877c9;
}
.authority-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f2ff;
  color: #276da7;
}
.run-card table {
  min-width: 900px;
}
.manual-registration {
  margin-top: 12px;
  border-top: 1px solid #e3eaf2;
  padding-top: 12px;
}
.manual-registration summary {
  cursor: pointer;
  color: #2674bd;
  font-weight: 700;
}
.manual-registration form {
  margin-top: 12px;
}
@media (max-width: 980px) {
  .collector-page main,
  .collector-page .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .collector-page .topbar {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
  }
  .collector-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .collector-discovery-form,
  .collector-filters,
  .profile-form .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .candidate-grid,
  .candidate-grid article,
  .detail-columns {
    grid-template-columns: 1fr;
  }
  .maturity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .boundary-grid,
  .login-guidance-grid,
  .smart-text-grid {
    grid-template-columns: 1fr;
  }
  .collector-dialog {
    width: 96vw;
    padding: 24px 18px;
  }
}

/* v3.06 final cascade · direct-manager contract approval */
.contract-stage-track{grid-template-columns:repeat(4,minmax(120px,1fr));padding:18px 7%;overflow:visible}.contract-stage-track::before{left:13%;right:13%;top:36px}.contract-stage-track span.complete{color:#167344}.contract-stage-track span.complete i{background:#dff5e7;color:#167344}.contract-approval-task{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 22px 0;padding:16px 18px;border:1px solid #cfe0ec;border-radius:14px;background:linear-gradient(135deg,#f8fbfd,#edf7fb);box-shadow:0 8px 18px rgba(7,53,91,.07),inset 0 1px #fff}.contract-approval-task.needs-action{border-color:rgba(8,127,206,.36);background:linear-gradient(135deg,#edf8ff,#eefaf5);box-shadow:0 12px 24px rgba(8,127,206,.13),inset 0 1px #fff}.contract-approval-task>div{display:grid;gap:4px;min-width:220px}.contract-approval-task>div>b{color:#123a5a;font-size:16px}.contract-approval-task>div>span{color:#657c8f;line-height:1.55}.contract-approval-task>label{display:grid;flex:1;gap:5px;margin:0;color:#4d6a80;font-size:12px}.contract-approval-task input{width:100%;min-height:44px;box-sizing:border-box}.approval-buttons{display:flex;gap:9px}.contract-record-body{grid-template-columns:repeat(3,minmax(0,1fr))}.contract-record-body>details[open]{grid-column:1/-1}.contract-record-body>details>summary{justify-content:space-between}.contract-governance-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.contract-governance-grid>section{display:grid;align-content:start;gap:12px;padding:14px;border:1px solid #dce7ed;border-radius:12px;background:#f8fbfd}.contract-governance-grid .reminder-form,.contract-governance-grid .risk-form{grid-template-columns:1fr}.readonly-note{grid-column:1/-1;padding:10px 12px;border-radius:9px;background:#eef3f6;color:#657c8f}.contract-record input[readonly],.contract-record textarea[readonly]{background:#f0f4f6;color:#657c8f;box-shadow:inset 0 1px 3px rgba(7,35,61,.05)}
@media(max-width:900px){.contract-record-body{grid-template-columns:1fr 1fr}.contract-approval-task{align-items:stretch;flex-direction:column}.approval-buttons{align-self:flex-start}.contract-governance-grid{grid-template-columns:1fr}}
@media(max-width:600px){.contract-stage-track{grid-template-columns:repeat(4,minmax(98px,1fr));padding:14px 12px;overflow-x:auto}.contract-stage-track::before{display:none}.contract-record-body{grid-template-columns:1fr}.contract-approval-task{margin:14px 14px 0}.approval-buttons{display:grid;width:100%}.approval-buttons button,.contract-approval-task>button{width:100%}.contract-record>footer span+span{padding-left:0;border-left:0}}

/* v3.06 ultimate cascade · HTML2 contract lifecycle disclosure controls. */
.contract-record-body{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:start}
.contract-record-body>details{padding:0;overflow:hidden;border-radius:14px;background:linear-gradient(180deg,#fff 0%,#f6fafd 100%);box-shadow:0 8px 17px rgba(7,53,91,.08),0 3px 7px rgba(7,53,91,.05),inset 0 1px #fff;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.contract-record-body>details:hover:not([open]){border-color:#a9cee7;box-shadow:0 11px 21px rgba(7,53,91,.11),0 4px 8px rgba(7,53,91,.06),inset 0 1px #fff;transform:translateY(-1px)}
.contract-record-body>details>summary{position:relative;justify-content:flex-start;min-height:58px;width:100%;padding:0 60px 0 20px;line-height:1.35;user-select:none}
.contract-record-body>details>summary::before{position:absolute;top:9px;right:8px;bottom:9px;width:42px;border-left:1px solid rgba(8,127,206,.16);border-radius:0 9px 9px 0;background:linear-gradient(180deg,#f8fcff,#eaf5fc);box-shadow:inset 1px 0 rgba(255,255,255,.85);content:""}
.contract-record-body>details>summary::after{right:21px;font-size:20px;line-height:1}
.contract-record-body>details>summary:focus-visible{z-index:1;outline:3px solid rgba(8,141,254,.28);outline-offset:-3px;border-radius:12px}
.contract-record-body>details[open]{grid-column:1/-1;background:#fff;box-shadow:0 14px 28px rgba(7,53,91,.12),0 5px 11px rgba(7,53,91,.07),inset 0 1px #fff}
.contract-record-body>details[open]>summary{min-height:62px;border-bottom:1px solid rgba(8,127,206,.16);background:linear-gradient(180deg,#fbfdff,#eef7fc)}
.contract-record-body>details>summary+div{margin:24px 18px 18px;padding:20px;border:1px solid #e0eaf1;border-radius:12px;background:#fbfdfe;box-shadow:inset 0 2px 6px rgba(7,53,91,.045),0 4px 9px rgba(7,53,91,.04)}
.contract-record-body>details>summary+.contract-terms,.contract-record-body>details>summary+.signature-form,.contract-record-body>details>summary+.activation-form{column-gap:18px;row-gap:16px}
.contract-record-body>details>summary+div>label{gap:7px}
@media(max-width:1180px){.contract-record-body{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.contract-record-body{grid-template-columns:1fr}.contract-record-body>details[open]{grid-column:1}.contract-record-body>details>summary{min-height:56px;padding-left:17px}.contract-record-body>details>summary+div{margin:20px 14px 14px;padding:16px}}
@media(prefers-reduced-motion:reduce){.contract-record-body>details{transition:none}}
.file-unavailable{display:inline-flex;align-items:center;min-height:38px;padding:0 12px;border:1px solid #d8e3ea;border-radius:10px;background:#f2f5f7;color:#708392;font-size:12px;font-weight:700}
